/* ===== Card Component ===== */
.card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: none; /* Remove translateY for cleaner hover */
}

/* Next Step block: light background, light border, for in-flow internal linking (e.g. kW→kVA result) */
/* 电力链路：动态「下一步」推荐 */
.flow-next-steps {
  margin-bottom: 1.25rem;
}

/* Tool UX V2: one calculator, optional refinement, one result, then next intent. */
[data-tool-refinement="advanced"] {
  margin-top: 1rem;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}

[data-tool-refinement="advanced"] > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  color: #1e3a8a;
  font-weight: 600;
  cursor: pointer;
}

[data-tool-refinement="advanced"] > :not(summary) {
  margin-right: 0.85rem;
  margin-left: 0.85rem;
}

[data-tool-refinement="advanced"] > :last-child {
  margin-bottom: 0.85rem;
}

[data-result-accuracy] {
  display: inline-flex;
  align-items: center;
  margin: 0.65rem 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.82rem;
  line-height: 1.35;
}

[data-result-assumptions] {
  margin: 0.25rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}

[data-result-action-zone] {
  border-left: 4px solid #16a34a;
  background: #f0fdf4;
}

[data-result-action-zone] [data-commercial-action] {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #bbf7d0;
}

.flow-next-steps h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #1f2937;
}

.workflow-path-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.25rem 0 0.5rem;
}

.workflow-path-nav__sep {
  color: #6b7280;
  font-size: 0.85rem;
  user-select: none;
}

.workflow-path-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: #166534;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.workflow-path-nav__link:hover {
  color: #14532d;
}

.flow-next-steps .primary-next-step[hidden] {
  display: none !important;
}

#nextSteps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.calc-flow {
  width: 100%;
}

.flow-label {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #4b5563;
  font-weight: 600;
}

.flow-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.1rem;
}

.flow-steps .step {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid #e5e7eb;
}

.flow-steps .step.done {
  color: #4b5563;
  background: #f3f4f6;
}

.flow-steps .step.current {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  font-weight: 600;
}

.flow-steps .step.next {
  color: #1d4ed8;
  background: #ffffff;
  border-color: #93c5fd;
  font-weight: 600;
}

.next-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.next-step ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.primary-next-step {
  margin-top: 0.6rem;
}

.primary-next-step .btn {
  width: 100%;
  text-align: center;
  min-height: 44px;
}

.flow-reset-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  border: 1px solid #16a34a;
  background: #ffffff;
  color: #166534;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.flow-reset-btn:hover {
  background: #ecfdf5;
}

#nextSteps .next-link {
  display: inline-block;
  min-height: 44px;
  line-height: 1.4;
  padding: 0.55rem 0.8rem;
  background: #fff;
  border: 1px solid #2563eb;
  border-radius: 6px;
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

#nextSteps .next-link:hover {
  background: #eff6ff;
  color: #1e40af;
}

@media (max-width: 768px) {
  .flow-steps {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-x: visible;
    white-space: normal;
    -webkit-overflow-scrolling: auto;
    padding-bottom: 0;
  }

  .flow-steps .step {
    white-space: normal;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    text-align: left;
    line-height: 1.4;
  }

  .flow-steps .step + .step {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e5e7eb;
  }
}

.next-step-block {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #f0f9ff;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
}

.next-step-block h3 {
  margin: 0;
}

.next-step-summary {
  margin: 0.75rem 0 0 0;
  color: #374151;
}

.next-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.next-step-card {
  display: block;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  color: #111827;
  transition: all 0.2s ease;
}

.next-step-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.next-step-card span {
  color: #4b5563;
  font-size: 0.9rem;
}

.next-step-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.result-hint {
  color: #334155;
}

.quick-examples-wrap {
  padding: 1.1rem 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  border: 2px solid #2563eb;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.quick-examples-title {
  margin: 0 0 0.2rem 0;
  font-weight: 700;
  color: #0f172a;
  font-size: 1.05rem;
}

.quick-examples-hint {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: #475569;
}

.quick-examples-buttons {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-example-cta {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  color: #1d4ed8;
  border: 2px solid #2563eb;
  border-radius: 10px;
}

.btn-example-cta:hover,
.btn-example-cta:focus-visible {
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  outline: none;
}

.btn-example-cta.btn-example-cta--primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.btn-example-cta.btn-example-cta--primary:hover,
.btn-example-cta.btn-example-cta--primary:focus-visible {
  background: #1d4ed8;
  color: #ffffff;
}

/* ===== Button Component ===== */
.btn {
  display: inline-block;
  background-color: #2563EB; /* Primary Blue - solid color */
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: var(--font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition), box-shadow var(--transition);
  text-align: center;
  text-decoration: none;
  font-family: var(--font-family);
}

.btn:hover {
  background-color: #1E40AF; /* Secondary Deep Blue on hover */
  box-shadow: var(--shadow-md);
  transform: none; /* Remove translateY */
}

.btn:active {
  transform: none;
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-hover-bg);
  border-color: var(--color-hover-border);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ===== Input Component ===== */
.input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.input:hover {
  border-color: var(--color-hover-border);
  background-color: var(--color-hover-bg);
}

.input:focus {
  outline: none;
  border-color: var(--color-hover-border);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: var(--color-white);
}

.input:disabled {
  background-color: var(--color-gray-light);
  cursor: not-allowed;
  opacity: 0.6;
}

.input::placeholder {
  color: var(--color-gray-medium);
}

/* Textarea */
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  resize: vertical;
}

textarea:hover {
  border-color: var(--color-hover-border);
  background-color: var(--color-hover-bg);
}

textarea:focus {
  outline: none;
  border-color: var(--color-hover-border);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: var(--color-white);
}

textarea:disabled {
  background-color: var(--color-gray-light);
  cursor: not-allowed;
  opacity: 0.6;
}

textarea::placeholder {
  color: var(--color-gray-medium);
}

/* Select */
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
  cursor: pointer;
}

select:hover {
  border-color: var(--color-hover-border);
  background-color: var(--color-hover-bg);
}

select:focus {
  outline: none;
  border-color: var(--color-hover-border);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: var(--color-white);
}

select:disabled {
  background-color: var(--color-gray-light);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== Grid Layouts ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

/* Top calculators: 3 columns on desktop */
.top-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.tools-category {
  margin-bottom: var(--spacing-xl);
}

.tools-category:last-of-type {
  margin-bottom: 0;
}

.category-title {
  font-size: var(--font-size-h3);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--spacing-md) 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-border);
}

@media (max-width: 768px) {
  .grid-2,
  .tools-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  .top-tools-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

.ups-applications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  margin: 1rem 0 0;
}

.ups-app-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.ups-app-card__tags li {
  font-size: 0.8125rem;
  color: #475569;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.ups-app-card__specs {
  margin: 0.75rem 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ups-app-card__specs dt {
  font-weight: 600;
  color: #334155;
  margin-top: 0.35rem;
}

.ups-app-card__specs dt:first-child {
  margin-top: 0;
}

.ups-app-card__specs dd {
  margin: 0.15rem 0 0;
  color: #64748b;
}

@media (max-width: 768px) {
  .ups-applications-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* Hub page in-page navigation */
.hub-page-nav {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.hub-page-nav a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  min-height: 40px;
  line-height: 1.35;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hub-page-nav a:hover,
.hub-page-nav a:focus-visible {
  border-color: var(--color-primary, #2563eb);
  background: #eff6ff;
  color: #1e40af;
}

.hub-topic-map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.hub-topic-map li {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.hub-topic-map a {
  font-weight: 600;
  color: var(--color-primary, #2563eb);
}

.hub-topic-map span {
  display: block;
  margin-top: 0.2rem;
  color: #64748b;
  font-weight: 400;
  font-size: 0.875rem;
}

.hub-subtopic-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text, #0f172a);
  margin: 0 0 0.75rem;
}

@media (max-width: 640px) {
  .hub-topic-map {
    grid-template-columns: 1fr;
  }
}

/* ===== Tool Card (for homepage) ===== */
.tool-card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--color-primary);
}

.tool-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.tool-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.tool-card p {
  flex-grow: 1;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-body);
  font-size: 14px;
  line-height: 1.6;
}

.tool-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ===== Engineering Calculation Paths ===== */
.calculation-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.calculation-path h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.path-step {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 0.95rem;
}


.path-step a {
  display: inline-block;
  margin-top: 4px;
}

/* ===== Blog Card ===== */
.blog-card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: none; /* Remove translateY */
}

.blog-card h3 {
  font-size: var(--font-size-h3);
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
}

.blog-card p {
  flex-grow: 1;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.blog-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ===== Calculator Section ===== */
.calculator-section {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-xl);
  transition: box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
}

.calculator-section:focus-within {
  box-shadow: var(--shadow-md);
  border-color: var(--color-hover-border);
  background-color: var(--color-hover-bg);
}

.calculator-section h2 {
  margin-bottom: var(--spacing-lg);
}

.input-group {
  margin-bottom: var(--spacing-lg);
}

.input-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--color-text);
}

.input-group .input {
  margin-bottom: 0;
}

.input-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.4;
}

.help-tooltip {
  display: inline-block;
  margin-left: 0.25rem;
  cursor: help;
  color: #6b7280;
  font-size: 0.875rem;
  vertical-align: middle;
  position: relative;
}

.help-tooltip:hover {
  color: #2563eb;
}

.help-tooltip[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: #1f2937;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.help-tooltip[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
  margin-bottom: -5px;
  z-index: 1000;
}

.quick-examples {
  margin-bottom: 1.5rem;
}

.professional-disclaimer {
  margin-bottom: 1.5rem;
}

.result-section {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-xl);
  transition: box-shadow var(--transition);
}

.result-section h2 {
  margin-bottom: var(--spacing-lg);
}

/* Multi-metric result grid (pneumatic / multi-output Tier A tools) */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.result-grid .result-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 1rem 0.85rem;
  text-align: center;
}

.result-grid .result-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
}

.result-grid .result-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.2;
  word-break: break-word;
}

/* Two-column inputs on tablet+ when using calc-grid inside calculator-section */
.calculator-section .calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .calculator-section .calc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--spacing-lg);
  }
}

#result {
  font-size: var(--font-size-base);
  line-height: 1.8;
}

.button-group {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.button-group .btn {
  flex: 1;
  min-width: 120px;
}

/* ===== Info Sections ===== */
.info-section {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-xl);
}

.info-section h2 {
  margin-bottom: var(--spacing-lg);
}

/* ===== Related Sections ===== */
.related-section {
  margin-bottom: var(--spacing-xl);
}

.related-section h2 {
  margin-bottom: var(--spacing-lg);
}

.related-tools {
  margin-bottom: var(--spacing-xl);
}

.related-tools h2 {
  margin-bottom: var(--spacing-lg);
}

/* ===== Article Styles ===== */
.article-content {
  max-width: 100%;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  /* Header + nav already occupy document flow above main; only need normal card padding.
     scroll-margin-top covers sticky chrome for in-page anchors (header ~72px + nav ~54px). */
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 130px;
}

/* Keep long formulas and lookup tables inside the article card on narrow screens. */
.article-content pre,
.article-content code {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
}

.article-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calc-input-error {
  margin: 0.35rem 0 0;
  color: #b91c1c;
  font-size: 0.875rem;
  line-height: 1.35;
}

.calc-validation-summary {
  padding: 1rem;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #fef2f2;
  color: #7f1d1d;
}

input.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}

/* Disable card hover effects for article content to prevent overlap with header */
.article-content.card {
  transition: none !important; /* Disable all transitions to prevent transform */
}

.article-content.card:hover {
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
  border-color: var(--color-border) !important;
  background-color: var(--color-white) !important;
}

/* Ensure article header and content stay below header */
.article-content,
.article-header,
.article-header h1 {
  position: relative;
  z-index: 1; /* Lower than header's z-index: 100 */
}

.breadcrumb {
  margin-bottom: var(--spacing-lg);
  font-size: 14px;
  color: var(--color-gray-medium);
}

.breadcrumb a {
  color: var(--color-link);
}

.article-header {
  /* Must not inherit site chrome <header> height/sticky constraints */
  position: relative;
  height: auto;
  min-height: 0;
  max-height: none;
  margin-bottom: var(--spacing-xl);
  padding-bottom: 0; /* Remove padding-bottom to merge with content */
  border-bottom: none; /* Remove border to merge with content */
  box-shadow: none;
  background: transparent;
  scroll-margin-top: 130px; /* Sticky site chrome clearance for anchor jumps */
  margin-top: 0; /* Reset any default margin */
}

.article-header h1 {
  margin-top: 0; /* Ensure h1 starts at the top of article-header */
  padding-top: 0; /* No extra padding on h1 */
}

.article-meta {
  color: var(--color-gray-medium);
  font-size: 14px;
  margin-top: var(--spacing-sm);
}

.article-author-box {
  margin: 0 0 var(--spacing-lg);
  padding: 1rem 1.2rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.55;
}

.article-author-line {
  margin: 0;
}

.article-author-bio {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: #475569;
}

.article-body {
  line-height: 1.8;
}

.article-intro {
  font-size: 18px;
  color: var(--color-text);
  margin-bottom: var(--spacing-xl);
  font-weight: 500;
}

.article-body h2 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.article-body h3 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

.article-body li {
  margin-bottom: var(--spacing-sm);
}

.formula {
  background-color: var(--color-gray-light);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  margin: var(--spacing-md) 0;
  font-family: 'Courier New', monospace;
}

/* ===== Toast Notification ===== */
#toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-text);
  color: var(--color-white);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  display: none;
  max-width: 300px;
  min-width: 200px;
  word-wrap: break-word;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  #toast {
    bottom: 30px;
    left: 50%;
    right: auto;
    max-width: calc(100% - 40px);
    min-width: auto;
  }
}

#toast.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* ===== Back to Top Button ===== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition);
  z-index: 99;
  display: none;
}

#back-to-top:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  transform: translateY(-2px);
}

#back-to-top.show {
  display: block;
}

/* ===== AI Drawer ===== */
#ai-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

#ai-drawer-overlay.show {
  display: block;
}

#ai-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background-color: var(--color-white);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right var(--transition);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

#ai-drawer.open {
  right: 0;
}

#ai-drawer-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#ai-drawer-header h2 {
  margin: 0;
  font-size: var(--font-size-h3);
}

#ai-drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ai-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

#ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.ai-message {
  margin-bottom: var(--spacing-sm);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  line-height: 1.6;
  word-wrap: break-word;
  max-width: 85%;
  position: relative;
}

/* 用户消息样式 - 右侧，蓝色背景 */
.ai-message.ai-user {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: var(--color-white);
  margin-left: auto;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  border-top-right-radius: var(--radius-sm);
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

/* AI回复消息样式 - 左侧，灰色背景 */
.ai-message:not(.ai-user) {
  background-color: var(--color-gray-light);
  color: var(--color-text);
  margin-right: auto;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border-top-right-radius: var(--radius-sm);
  border-top-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

/* 思考中状态 */
.ai-message.ai-thinking {
  color: var(--color-gray-medium);
  font-style: italic;
  opacity: 0.7;
}

#ai-chat-input-container {
  display: flex;
  gap: var(--spacing-sm);
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-lg);
}

#ai-query {
  flex: 1;
  min-height: 80px;
  resize: vertical;
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

#ai-query:hover {
  border-color: var(--color-hover-border);
  background-color: var(--color-hover-bg);
}

#ai-query:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: var(--color-white);
}

#ai-query:disabled {
  background-color: var(--color-gray-light);
  cursor: not-allowed;
  opacity: 0.6;
}

#ai-query::placeholder {
  color: var(--color-gray-medium);
}

#ai-query-btn {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  cursor: pointer;
  font-weight: 500;
  font-family: var(--font-family);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

#ai-query-btn:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

#ai-query-btn:active {
  transform: translateY(0);
}

/* ===== Tool Description & FAQ Components ===== */
.tool-description,
.tool-faq {
  margin-top: 40px;
  padding: 24px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #eee;
}

.tool-description h2,
.tool-faq h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--color-text-primary);
  font-size: 24px;
  font-weight: 600;
}

.tool-description h2:not(:first-child) {
  margin-top: 32px;
}

.tool-description p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.tool-description ol,
.tool-description ul {
  margin: 16px 0;
  padding-left: 24px;
}

.tool-description li {
  margin-bottom: 12px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.tool-description ol li {
  margin-bottom: 16px;
}

.tool-faq details {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-faq details:hover {
  border-color: #2563EB;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.tool-faq details[open] {
  border-color: #2563EB;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.tool-faq summary {
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  position: relative;
  padding-right: 24px;
}

.tool-faq summary::-webkit-details-marker {
  display: none;
}

.tool-faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 300;
  color: #2563EB;
  transition: transform 0.2s ease;
}

.tool-faq details[open] summary::after {
  content: '−';
  transform: translateY(-50%) rotate(0deg);
}

.tool-faq details p {
  margin-top: 12px;
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ===== AI Inline Component Styles ===== */
.ai-inline-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-inline-header {
  margin-bottom: 1rem;
}

.ai-inline-header h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ai-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-quick-btn {
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-quick-btn:hover {
  background: #e5e7eb;
  border-color: #2563eb;
  color: #2563eb;
}

.ai-input-section {
  margin-bottom: 1rem;
}

.ai-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.ai-input-wrapper textarea {
  flex: 1;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.ai-input-wrapper textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ai-submit-btn {
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.ai-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-cancel-btn {
  padding: 0.75rem 1.5rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-cancel-btn:hover {
  background: #dc2626;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.ai-answer-container {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: none;
}

.ai-answer-container.has-answer {
  display: block;
}

.ai-answer-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.ai-answer-content {
  color: #374151;
  line-height: 1.6;
  font-size: 0.875rem;
}

.ai-answer-content p {
  margin: 0.5rem 0;
}

.ai-answer-content p:first-child {
  margin-top: 0;
}

.ai-answer-content p:last-child {
  margin-bottom: 0;
}

.ai-loading {
  color: #6b7280;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .card,
  .calculator-section,
  .result-section,
  .info-section {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
  }
  
  .tool-card,
  .blog-card {
    padding: var(--spacing-md);
  }
  
  .button-group {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .button-group .btn {
    width: 100%;
  }
  
  .input-group {
    margin-bottom: var(--spacing-md);
  }
  
  .ai-drawer {
    width: 100%;
    right: -100%;
  }
  
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .hero-section {
    padding: var(--spacing-xl) var(--spacing-md);
  }
  
  /* Mobile: normal card padding; keep scroll-margin for sticky header/nav anchors */
  .article-content {
    padding: var(--spacing-md);
    scroll-margin-top: 140px;
  }
  
  .article-header {
    scroll-margin-top: 140px;
  }
  
  .tool-description,
  .tool-faq {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
  }
  
  .tool-description h2,
  .tool-faq h2 {
    font-size: 20px;
  }
  
  .tool-description h2:not(:first-child) {
    margin-top: 24px;
  }
  
  .tool-faq details {
    padding: 12px;
  }
}

/* ===== Responsive data tables (tool pages) ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.5rem;
  max-width: 100%;
}

.table-responsive table {
  min-width: 100%;
}

@media (max-width: 767px) {
  .tool-page-layout table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* kW/kVA formula section: text + power triangle side-by-side on wide screens */
.formula-explanation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  align-items: start;
}

@media (min-width: 768px) {
  .formula-explanation-grid {
    grid-template-columns: 1fr minmax(260px, 340px);
  }
}

.power-triangle-figure {
  margin: 0;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.power-triangle-figure .power-triangle-caption {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

.power-triangle-figure svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
}

/* Guide pages: Quick Answer + tool CTA (e.g. transformer sizing guide) */
.quick-answer {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  border-left: 4px solid #2563eb;
}

.quick-answer h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.tool-cta {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  text-align: center;
}

.tool-cta h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.tool-cta__btn {
  margin-top: 0.75rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .tool-cta--sticky {
    position: sticky;
    top: 0.75rem;
    z-index: 4;
  }
}

.related-guides-section {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.related-guides-section h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.related-guides-section ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.article-body .faq h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.35rem;
}

.article-body .faq h3:first-of-type {
  margin-top: 0.5rem;
}

/* Task 2.2: tool page sidebar + save/compare */
.tool-page-sidebar-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.tool-sidebar-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--color-text, #1f2937);
}

.tool-sidebar-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.65;
  font-size: 0.95rem;
}

.tool-related-sidebar {
  padding: 1rem 1.1rem;
}

@media (min-width: 1100px) {
  .tool-page-sidebar-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .tool-main-column {
    flex: 1 1 0;
    min-width: 0;
  }

  .tool-related-sidebar {
    flex: 0 0 248px;
    position: sticky;
    top: 0.75rem;
    align-self: flex-start;
  }
}

.save-compare-bar {
  padding: 1rem 1.15rem;
}

.save-compare-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.save-compare-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.save-compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.save-compare-list-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.save-compare-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.save-compare-list li {
  margin-bottom: 0.5rem;
}

.save-compare-snippet {
  margin: 0;
  padding: 0.5rem 0.65rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 10rem;
  overflow: auto;
}

.save-compare-empty {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Task 2.3: guide pages — floating calculator CTA */
.guide-tool-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  min-height: 3rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  max-width: calc(100vw - 2rem);
}

.guide-tool-fab:hover,
.guide-tool-fab:focus-visible {
  background: #1d4ed8;
  outline: none;
}

.guide-tool-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.25rem;
  z-index: 49;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.guide-tool-panel[hidden] {
  display: none !important;
}

.guide-tool-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #111827;
}

.guide-tool-panel-intro {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: #4b5563;
  line-height: 1.45;
}

.guide-tool-panel-list {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.guide-tool-panel-more {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
}

.guide-mini-kw-kva {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.guide-mini-kw-kva-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.guide-mini-kw-kva-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.guide-mini-kw-kva-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}

.guide-mini-kw-kva-input {
  max-width: 100%;
}

.guide-mini-kw-kva-out {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.9rem;
}

.guide-mini-kw-kva-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.4;
}

/* 指南内统一工具 CTA（短代码 articleToolCta） */
.article-tool-cta {
  margin: 1.5rem 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 55%);
}

.article-tool-cta__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.article-tool-cta__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.35;
  color: #0f172a;
}

.article-tool-cta__desc {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #475569;
}

.article-tool-cta__btn {
  display: inline-block;
  text-decoration: none;
}

/* UPS 拓扑轻量问卷（短代码 guideUpsTopologyQuiz） */
.article-ups-topology-quiz {
  margin: 1.75rem 0;
  padding: 1.2rem 1.25rem 1.35rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.article-ups-topology-quiz__title {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  color: #0f172a;
}

.article-ups-topology-quiz__intro {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #64748b;
}

.article-ups-topology-quiz__block {
  margin-bottom: 1rem;
}

.article-ups-topology-quiz__q {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: #334155;
}

.article-ups-topology-quiz__choice {
  display: block;
  margin: 0.35rem 0 0.35rem 0.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #1e293b;
  cursor: pointer;
}

.article-ups-topology-quiz__choice input {
  margin-right: 0.45rem;
  vertical-align: middle;
}

.article-ups-topology-quiz__submit {
  margin-top: 0.25rem;
}

.article-ups-topology-quiz__result {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.article-ups-topology-quiz__result-label {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: #64748b;
}

.article-ups-topology-quiz__result-class {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #0f172a;
}

.article-ups-topology-quiz__result-reason {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
}

/* ===== Workflow Recommendation (result-driven next step) ===== */
.workflow-recommendation {
  border-left-width: 4px;
  border-left-style: solid;
}

.workflow-recommendation--info {
  background: #f8fafc;
  border-left-color: #2563eb;
}

.workflow-recommendation--warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.workflow-recommendation--critical {
  background: #fef2f2;
  border-left-color: #dc2626;
}

.workflow-recommendation--positive {
  background: #f0fdf4;
  border-left-color: #16a34a;
}

.workflow-recommendation--positive .workflow-recommendation__title {
  color: #166534;
}

.workflow-recommendation__params {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.45;
}

.workflow-recommendation__problem {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}

.workflow-recommendation__impact {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #64748b;
}

.workflow-recommendation__solution {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #374151;
  font-weight: 500;
}

.workflow-recommendation__context {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.workflow-recommendation--positive .workflow-recommendation__problem {
  color: #166534;
}

.workflow-recommendation__heading {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.workflow-recommendation__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.4;
}

.workflow-recommendation__desc {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #475569;
}

.workflow-recommendation__cta {
  margin: 0.75rem 0 0;
}

.workflow-recommendation__secondary {
  display: inline-block;
  margin-top: 0.625rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
  line-height: 1.45;
}

.workflow-recommendation__secondary:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.workflow-recommendation__lead {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.workflow-recommendation__lead-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.45;
}

.workflow-recommendation__lead-desc {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
}

.workflow-recommendation__lead-btn {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  .workflow-recommendation__lead-btn {
    width: auto;
  }
}

/* ===== Result-matched affiliate shopping ===== */
.affiliate-shopping {
  margin: 1rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 72%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.affiliate-shopping > h3 {
  margin: 0 0 0.45rem;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1.35;
}

.affiliate-shopping__lead {
  margin: 0 0 1rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.affiliate-shopping__list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.affiliate-shopping__item {
  padding: 0.9rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.affiliate-shopping__item--highlight {
  border: 2px solid #2563eb;
  background: #eff6ff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.affiliate-shopping__item-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.affiliate-shopping__item-title {
  color: #0f172a;
  font-size: 1rem;
}

.affiliate-shopping__badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.affiliate-shopping__item-meta {
  margin: 0.3rem 0 0.75rem;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.45;
}

.affiliate-shopping__link {
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.affiliate-shopping__link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.affiliate-shopping__link--highlight {
  display: inline-flex;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 7px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  text-align: center;
}

.affiliate-shopping__link--highlight:hover {
  background: #1d4ed8;
  color: #ffffff;
  text-decoration: none;
}

.affiliate-shopping__surface-disclosure,
.affiliate-shopping__engineering,
.affiliate-shopping__professional-note {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.affiliate-shopping__surface-disclosure {
  margin: 1rem 0 0.2rem;
}

.affiliate-shopping__engineering {
  margin: 0;
}

.affiliate-shopping--professional {
  border-color: #fde68a;
  border-left-color: #d97706;
  background: #fffbeb;
  box-shadow: none;
}

@media (min-width: 720px) {
  .affiliate-shopping__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .affiliate-shopping__item {
    display: flex;
    flex-direction: column;
  }

  .affiliate-shopping__link {
    margin-top: auto;
  }
}

/* UPS Runtime Lead Form V1 */
.ups-runtime-lead {
  margin-top: 1rem;
  width: 100%;
  max-width: 600px;
}

.ups-runtime-lead__card {
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.ups-runtime-lead__card--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ups-runtime-lead__title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}

.ups-runtime-lead__summary-label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ups-runtime-lead__summary {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
}

.ups-runtime-lead__form {
  display: block;
  width: 100%;
}

.ups-runtime-lead__field {
  margin-bottom: 0.85rem;
}

.ups-runtime-lead__field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.ups-runtime-lead__field input,
.ups-runtime-lead__field select,
.ups-runtime-lead__field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
}

.ups-runtime-lead__field textarea {
  min-height: 88px;
  resize: vertical;
}

.ups-runtime-lead__error,
.ups-runtime-lead__api-error {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #b91c1c;
  line-height: 1.4;
}

.ups-runtime-lead__submit,
.ups-runtime-lead__continue {
  width: 100%;
  margin-top: 0.35rem;
}

@media (min-width: 640px) {
  .ups-runtime-lead__submit,
  .ups-runtime-lead__continue {
    width: auto;
    min-width: 180px;
  }
}

.ups-runtime-lead__privacy {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
}

.ups-runtime-lead__privacy a {
  color: #2563eb;
}

.workflow-recommendation__affiliate {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid #e2e8f0;
}

.workflow-recommendation__affiliate-title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.workflow-recommendation__affiliate-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-recommendation__affiliate-item + .workflow-recommendation__affiliate-item {
  margin-top: 0.35rem;
}

.workflow-recommendation__affiliate-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}

.workflow-recommendation__affiliate-link:hover {
  text-decoration: underline;
}

.workflow-recommendation__affiliate-disclaimer {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}

.workflow-recommendation--positive .workflow-recommendation__impact {
  color: #166534;
}

/* Intent recommendation — multi-task next steps (no btn-primary) */
.intent-recommendation {
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-left: 4px solid #2563eb;
}

.intent-recommendation__heading {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

.intent-recommendation__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.intent-recommendation__item {
  margin: 0;
}

.intent-recommendation__link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-decoration: none;
  color: #1e293b;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.intent-recommendation__link:hover {
  border-color: #93c5fd;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.08);
}

.intent-recommendation__title {
  font-weight: 600;
  font-size: 0.98rem;
  color: #1d4ed8;
}

.intent-recommendation__desc {
  flex: 1 1 100%;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #475569;
}

.intent-recommendation__arrow {
  margin-left: auto;
  font-weight: 600;
  color: #2563eb;
}

.sizing-preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #10b981;
}

.sizing-preview__heading {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #14532d;
  line-height: 1.35;
}

.sizing-preview__lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
}

.sizing-preview__grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .sizing-preview__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sizing-preview__item {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #d1fae5;
  background: #fff;
}

.sizing-preview__item--decision {
  padding: 1rem 1.1rem;
}

@media (min-width: 768px) {
  .sizing-preview__metrics--decision {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.25rem;
  }
}

.sizing-preview__item-title {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #166534;
}

.sizing-preview__metrics {
  margin: 0 0 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.sizing-preview__metrics div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.sizing-preview__metrics dt {
  margin: 0;
  color: #64748b;
  font-weight: 500;
}

.sizing-preview__metrics dd {
  margin: 0;
  color: #0f172a;
  text-align: right;
}

.sizing-preview__reason {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #475569;
}

.sizing-preview__action {
  margin: 0 0 0.35rem;
}

.sizing-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.35rem 0;
}

.sizing-preview__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #15803d;
  text-decoration: none;
}

.sizing-preview__link:hover {
  color: #166534;
  text-decoration: underline;
}

.sizing-preview__disclaimer {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #64748b;
}

.sizing-preview__hint {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sizing-preview__hint--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.sizing-preview__hint--warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.sizing-preview__hint--critical {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.engineering-decision__lead,
.decision-table__lead,
.workflow-timeline__lead {
  margin: 0 0 1rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
}

.engineering-decision__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .engineering-decision__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.engineering-decision__card {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.engineering-decision__card h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #0f172a;
}

.engineering-decision__metrics {
  margin: 0 0 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.engineering-decision__metrics div {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.engineering-decision__metrics dt {
  color: #64748b;
}

.engineering-decision__metrics dd {
  margin: 0;
  color: #0f172a;
}

.engineering-decision__reason {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.45;
}

.engineering-decision__action a {
  font-weight: 600;
  color: #2563eb;
}

.decision-table {
  width: 100%;
  border-collapse: collapse;
}

.decision-table th,
.decision-table td {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.decision-table thead tr {
  background: #f1f5f9;
}

.engineering-notes__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .engineering-notes__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.engineering-notes__item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #0f172a;
}

.engineering-notes__item p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334155;
}

.engineering-notes__rec {
  font-size: 0.9rem;
  color: #475569;
}

.editorial-review__line {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.editorial-review__sources {
  margin: 0.5rem 0 0 1.25rem;
  line-height: 1.6;
}

.hub-authority-context {
  border-color: #bfdbfe;
  background: #f8fafc;
}

.hub-featured-topic {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}

.hub-featured-topic__label {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.hub-featured-topic h2 {
  margin: 0 0 0.75rem;
}

.hub-knowledge-grid .hub-knowledge-card h3 {
  margin: 0 0 0.5rem;
}

.hub-knowledge-card--featured {
  border-color: #93c5fd;
  background: #f8fafc;
}

.power-cluster__featured {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: #1d4ed8;
}

.power-cluster__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .power-cluster__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.power-cluster__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  font-weight: 500;
}

.power-cluster__link--featured {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.power-cluster__hub {
  margin: 1rem 0 0;
}

.workflow-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .workflow-timeline__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.workflow-timeline__step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.workflow-timeline__step--current {
  border-color: #10b981;
  background: #f0fdf4;
}

.workflow-timeline__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.workflow-timeline__step--current .workflow-timeline__num {
  background: #10b981;
  color: #fff;
}

.workflow-timeline__step a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.result-actions-bar {
  background: #fff;
  border: 1px solid #e5e7eb;
}

.result-actions-bar .result-actions-secondary {
  margin: 0;
}
