/* Pisonics redesign — design system */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f3;
  --bg-soft: #fafaf6;
  --bg-dark: #0b1a16;
  --ink: #0f1512;
  --ink-2: #3a4641;
  --ink-3: #6b7670;
  --line: #e4e4df;
  --line-2: #d4d4cc;
  --brand: #0e5e4d;
  --brand-2: #0a4a3c;
  --brand-3: #d9efe6;
  --accent: #c8a24e;
  --radius: 2px;
  --max: 1280px;
  --pad: clamp(20px, 4vw, 56px);
  --font-sans: "Inter", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ============ NAV ============ */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.98);
  /* backdrop-filter removed — nav is sticky, so blur would repaint on every scroll frame */
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 40px;
  height: 68px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.nav-logo-img {
  height: 22px;       /* SVG ratio 7.76:1 → ~170px wide, fits navbar */
  width: auto;
  display: block;
}
/* No need for separator line — the SVG already has its own divider between P and PISONICS */
.footer-brand .nav-logo-img { height: 20px; }

/* Brand slogan — locks up directly under the footer logo. The SVG is
   460×67 (~7:1) so we constrain by width, not height. Display:block puts it
   on its own row; the small top margin separates it cleanly from the logo. */
.footer-brand-slogan {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 14px 0 0;
}

.nav-links {
  display: flex; gap: 28px;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { display: flex; align-items: center; }
.nav-links > li > a {
  font-size: 14px;
  color: var(--ink-2);
  padding: 8px 0;
  position: relative;
  /* Subtle vertical-feel transition; transform handles the press-down on click */
  transition: color 0.18s ease, transform 0.12s ease;
}

/* Hover/active underline: grows from center outward, easing in */
.nav-links > li > a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -22px;
  height: 2px;
  background: var(--brand);
  transition: left 0.28s cubic-bezier(0.4, 0.0, 0.2, 1),
              right 0.28s cubic-bezier(0.4, 0.0, 0.2, 1),
              opacity 0.2s ease;
  opacity: 0;
}
.nav-links > li > a:hover::after,
.nav-links > li > a:focus-visible::after {
  left: 0;
  right: 0;
  opacity: 1;
}

/* Active page: underline always visible, plus a slow gold breathing tone */
.nav-links > li > a.active {
  color: var(--ink);
  font-weight: 500;
}
.nav-links > li > a.active::after {
  left: 0;
  right: 0;
  opacity: 1;
  animation: nav-breath 2.4s ease-in-out infinite;
}
.hero-nav .nav-links > li > a.active::after {
  background: var(--accent, #d4a84b);
}

/* Hero (dark) navbar — text uses inherited light color, but underline is brand */
.hero-nav .nav-links > li > a { color: rgba(255, 255, 255, 0.78); }
.hero-nav .nav-links > li > a:hover,
.hero-nav .nav-links > li > a.active { color: #fff; }
.hero-nav .nav-links > li > a::after { background: var(--accent, #d4a84b); }

/* A small dot indicator that fades in on hover, sits to the left of the link */
.nav-links > li > a::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.18s ease;
}
.nav-links > li > a:hover::before,
.nav-links > li > a.active::before {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}
.hero-nav .nav-links > li > a::before { background: var(--accent, #d4a84b); }

/* Hover: subtle text color change handled above; here we add a 1px lift */
.nav-links > li > a:hover { color: var(--brand); }
.hero-nav .nav-links > li > a:hover { color: #fff; }

/* Press-down on click — works on the link itself, not the dot/underline */
.nav-links > li > a:active {
  transform: translateY(1px);
  transition: transform 0.06s ease;
}

@keyframes nav-breath {
  0%, 100% { opacity: 1;   filter: brightness(1); }
  50%      { opacity: 0.65; filter: brightness(1.15); }
}

/* Respect users who don't want motion */
@media (prefers-reduced-motion: reduce) {
  .nav-links > li > a,
  .nav-links > li > a::after,
  .nav-links > li > a::before { transition: none !important; animation: none !important; }
}

/* ============ MEGA MENU (desktop nav dropdowns) ============ */
.nav-mega { position: relative; }
.nav-mega .nav-caret {
  display: inline-block; margin-left: 4px;
  font-size: 10px; opacity: 0.6;
  transition: transform 0.2s ease;
}
.nav-mega.open .nav-caret { transform: rotate(180deg); }

.mega-panel {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff;
  color: var(--ink, #050f0c);
  border: 1px solid var(--line, #e8eae6);
  box-shadow: 0 24px 48px -12px rgba(5, 15, 12, 0.18),
              0 0 0 1px rgba(5, 15, 12, 0.04);
  border-radius: 4px;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 100;
}
.nav-mega.open > .mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}
/* Hover bridge — invisible padding above the panel keeps mouse from landing in
   the gap between trigger and panel and prematurely closing it */
.mega-panel::before {
  content: ""; position: absolute;
  top: -16px; left: 0; right: 0; height: 16px;
}
.mega-inner { padding: 32px 40px 28px; }

.mega-section-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3, #6b7470);
  margin-bottom: 16px;
}

/* ---- Products mega: 2-column (principle list + featured) ---- */
.mega-products { width: min(1100px, 96vw); left: 0; transform: translateX(-180px) translateY(8px); }
.nav-mega.open > .mega-products { transform: translateX(-180px) translateY(0); }
.mega-products-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 36px;
}
.mega-by-principle {
  border-right: 1px solid var(--line, #e8eae6);
  padding-right: 36px;
  max-height: 70vh;
  overflow-y: auto;
}
.mega-principle-grid {
  /* Multi-column flow rather than CSS Grid. Grid was forcing each row
     to the height of its tallest cell — so 音叉 (1 product) ended up
     padded out to match 超声 (3 sub-principles) on the same row, with
     a chunky vertical gap below it. With column-count, principle
     groups flow top-to-bottom column-first and the columns auto-balance,
     so single-item groups pack right under whatever's above them. */
  column-count: 2;
  column-gap: 32px;
  column-fill: balance;
}
.mega-principle {
  /* Keep each principle group together — never split "超声" header from
     its sub-principles across the column break. */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;   /* old Chromium */
  page-break-inside: avoid;             /* old Safari */
  /* Multicol has no row-gap, so we space groups via margin-bottom.
     Matches the previous grid's row-gap of 24px. */
  margin-bottom: 24px;
}
.mega-principle:last-child { margin-bottom: 0; }
.mega-panel .mega-principle-title,
a.mega-principle-title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 13px;
  font-weight: 500;
  color: #0e5e4d !important;       /* explicit hex + !important to defeat any inherited rule */
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line, #e8eae6);
  display: block !important;
  text-decoration: none !important;
  cursor: pointer;
  visibility: visible !important;
  opacity: 1 !important;
  transition: color 0.15s, border-color 0.15s;
}
.mega-panel .mega-principle-title:hover,
a.mega-principle-title:hover {
  color: #0a4538 !important;
  border-bottom-color: #0e5e4d;
}
.mega-principle ul { list-style: none; padding: 0; margin: 0; }
/* Second-level group inside a principle (e.g. ultrasonic → 声阻抗法/声衰减法/声速法) */
.mega-subprinciple { margin-top: 12px; }
.mega-subprinciple:first-child { margin-top: 0; }
.mega-panel .mega-subprinciple-title,
a.mega-subprinciple-title {
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
  margin-bottom: 4px;
  padding-left: 4px;
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}
.mega-panel .mega-subprinciple-title:hover,
a.mega-subprinciple-title:hover {
  color: var(--brand, #0e5e4d);
}
.mega-principle li a {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; margin: 0 -8px;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: background 0.15s, transform 0.15s;
}
.mega-principle li a:hover {
  background: rgba(14, 94, 77, 0.05);
  transform: translateX(2px);
}
.mega-prod-icon {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand, #0e5e4d);
  background: rgba(14, 94, 77, 0.06);
  border-radius: 4px;
}
.mega-prod-icon svg {
  width: 18px; height: 18px;
  display: block;
}
/* When iconSvg is missing the template falls back to a tiny mono code label.
   Constrain it so a long slug never overflows the 28px icon box. */
.mega-prod-icon-mono {
  font-family: var(--font-mono, ui-monospace);
  font-size: 8px;
  color: var(--brand, #0e5e4d);
  letter-spacing: 0;
  font-weight: 600;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}
.mega-prod-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.mega-prod-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mega-prod-tag {
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Right column container ---- */
.mega-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- Selection-help CTA card (top of right column) ---- */
.mega-cta {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 18px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg,
              rgba(14, 94, 77, 0.06) 0%,
              rgba(212, 168, 75, 0.05) 100%);
  border: 1px solid rgba(14, 94, 77, 0.12);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.mega-cta:hover {
  border-color: var(--brand, #0e5e4d);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(14, 94, 77, 0.18);
}
.mega-cta-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand, #0e5e4d);
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
}
.mega-cta-icon svg { width: 28px; height: 28px; display: block; }
.mega-cta-body { min-width: 0; }
.mega-cta-title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  line-height: 1.3;
  margin-bottom: 4px;
}
.mega-cta-desc {
  font-size: 12px;
  color: var(--ink-2, #475569);
  line-height: 1.5;
  margin-bottom: 10px;
}
.mega-cta-action {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand, #0e5e4d);
  font-weight: 500;
  transition: gap 0.15s;
}
.mega-cta:hover .mega-cta-action { gap: 10px; }

/* ---- Featured product list (compact, bottom of right column) ---- */
.mega-featured-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 2px;
}
/* Featured items reuse the same .mega-principle li a style for visual unity */
.mega-featured-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; margin: 0 -8px;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: background 0.15s, transform 0.15s;
}
.mega-featured-list li a:hover {
  background: rgba(14, 94, 77, 0.05);
  transform: translateX(2px);
}

/* ---- Industries mega: grid of cards ---- */
.mega-industries { width: min(840px, 92vw); }
.mega-industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 20px;
}
.mega-industry-card {
  display: block;
  padding: 16px 18px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.mega-industry-card:hover {
  background: var(--bg-soft, #fafaf6);
  border-color: var(--brand, #0e5e4d);
}
.mega-industry-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.mega-industry-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand, #0e5e4d);
  background: rgba(14, 94, 77, 0.06);
  border-radius: 6px;
}
.mega-industry-icon svg {
  width: 22px; height: 22px;
  display: block;
}
.mega-industry-card:hover .mega-industry-icon {
  background: rgba(14, 94, 77, 0.12);
}
.mega-industry-num {
  display: inline-block;
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  color: var(--brand, #0e5e4d);
  letter-spacing: 0.14em;
}
.mega-industry-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  margin: 0 0 6px;
  line-height: 1.3;
}
.mega-industry-desc {
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- "View all" link at bottom of any mega ---- */
.mega-all-link {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 32px !important;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff !important;
  background: var(--brand, #0e5e4d);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, gap 0.15s, transform 0.15s;
  white-space: nowrap;
}
.mega-all-link:hover {
  background: var(--ink, #050f0c);
  gap: 16px;
  transform: translateY(-1px);
}

/* ---- Dark hero variant: panel still light, but trigger caret picks gold ---- */
.hero-nav .nav-mega .nav-caret { color: rgba(255, 255, 255, 0.6); }
.hero-nav .nav-mega.open .nav-caret { color: var(--accent, #d4a84b); }

/* ---- Mobile accordion in drawer ---- */
.drawer-accordion .drawer-acc-trigger {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cdd4d1;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.drawer-accordion .drawer-acc-caret {
  transition: transform 0.2s;
  font-size: 12px; opacity: 0.6;
}
.drawer-accordion.open .drawer-acc-caret { transform: rotate(180deg); }
.drawer-accordion .drawer-acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.drawer-accordion.open .drawer-acc-body { max-height: 600px; }
.drawer-acc-group { padding: 8px 0; }
.drawer-acc-grouplabel {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 6px 16px;
  /* Now a link — reset and add subtle hover */
  display: block;
  text-decoration: none;
  transition: color 0.15s;
}
.drawer-acc-grouplabel:hover {
  color: rgba(255, 255, 255, 0.7);
}
.drawer-acc-subgroup {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 16px 4px;
  margin-top: 4px;
  display: block;
  text-decoration: none;
  transition: color 0.15s;
}
.drawer-acc-subgroup:hover {
  color: rgba(255, 255, 255, 0.8);
}
.drawer-acc-subitem {
  padding-left: 28px !important;   /* indent from sub-group label */
  font-size: 13px !important;
}
.drawer-acc-body a {
  display: block;
  padding: 10px 16px;
  color: #cdd4d1;
  text-decoration: none;
  font-size: 14px;
}
.drawer-acc-body a:hover { background: rgba(255, 255, 255, 0.04); }
.drawer-acc-all {
  display: block !important;
  margin-top: 8px; padding: 12px 16px !important;
  color: var(--accent, #d4a84b) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px !important;
}

/* Skip-link for keyboard / screen-reader users — visually hidden until focus */
.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  background: var(--ink, #050f0c);
  color: #fff;
  padding: 12px 20px;
  z-index: 100000;
  font-size: 14px;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--accent, #d4a84b);
  outline-offset: 2px;
}

.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-toggle {
  display: flex; align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  overflow: hidden;
}
.lang-toggle button,
.lang-toggle span,
.lang-toggle a {
  padding: 6px 12px;
  color: var(--ink-3);
  font-size: 12px;
  display: inline-block;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.lang-toggle a:hover { color: var(--ink); }
.lang-toggle button.on,
.lang-toggle span.on,
.lang-toggle a.on {
  background: var(--ink);
  color: #fff;
}
.nav-cta {
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--brand-2); }

/* ============ TYPE ============ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.eyebrow-brand { color: var(--brand); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }

.lede {
  font-size: 17px; line-height: 1.55; color: var(--ink-2);
  max-width: 58ch;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  font-size: 14px; font-weight: 500;
  border-radius: 2px;
  transition: all 0.18s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn .arrow { display: inline-block; transition: transform 0.18s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ SECTION ============ */
section { padding: clamp(10px, 8vw, 25px) 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; margin-bottom: 56px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 16ch; }
.section-head .meta { max-width: 40ch; color: var(--ink-2); }

/* ============ PAGE HERO (light) — used by products/industries/about/contact ============ */
.page-hero {
  position: relative;
  padding: 120px 0 80px;
  background: linear-gradient(180deg, var(--bg-soft, #fafaf6) 0%, #fff 100%);
  border-bottom: 1px solid var(--line, #e8eae6);
  overflow: hidden;
}
.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: end;
  position: relative;
  z-index: 2;
}
.page-hero-text { max-width: 720px; }
.page-hero-title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 16px 0 24px;
  color: var(--ink, #050f0c);
}
.page-hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  max-width: 60ch;
  margin: 0;
}
.page-hero-stats {
  display: flex;
  gap: 32px;
  flex-shrink: 0;
}
.page-hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.page-hero-stats .num {
  font-family: var(--font-display, serif);
  font-size: 56px;
  line-height: 1;
  color: var(--brand, #0e5e4d);
  font-weight: 300;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.page-hero-stats .lbl {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3, #6b7470);
}
.page-hero-deco {
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(circle at 50% 50%, rgba(14, 94, 77, 0.05), transparent 60%);
  top: -200px; right: -200px;
  pointer-events: none;
  z-index: 1;
}

/* ============ PRINCIPLE FILTER CHIPS (products list) ============ */
.principle-filter {
  padding: 48px var(--pad) 0;
}
.filter-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3, #6b7470);
  margin-bottom: 12px;
}
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink, #050f0c);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-chips .chip:hover {
  background: var(--brand, #0e5e4d);
  border-color: var(--brand, #0e5e4d);
  color: #fff;
}
.filter-chips .chip-count {
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  opacity: 0.6;
}
.filter-chips .chip:hover .chip-count { opacity: 0.85; }

/* ============ PRODUCT SECTION (one per principle) ============ */
.product-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line, #e8eae6);
  scroll-margin-top: 100px;   /* offset sticky nav when anchor-scrolling */
}
.product-section:last-of-type { border-bottom: none; }
.product-section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink, #050f0c);
}
.product-section-head h2 {
  font-family: var(--font-display, serif);
  font-size: clamp(32px, 3.5vw, 48px);
  margin: 8px 0 0;
  color: var(--ink, #050f0c);
}
.product-section-count {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
}

/* Second-level grouping inside a principle section.
   Renders as a thin horizontal divider with the sub-principle name. */
.sub-principle-section {
  scroll-margin-top: 100px;
}
.sub-principle-section + .sub-principle-section { margin-top: 56px; }
.sub-principle-section:first-of-type { margin-top: 16px; }
.sub-principle-head {
  display: flex; align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}
.sub-principle-title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--brand, #0e5e4d);
  margin: 0;
  white-space: nowrap;
}
.sub-principle-rule {
  flex: 1;
  height: 1px;
  background: var(--line, #e8eae6);
}
.sub-principle-count {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (min-width: 1280px) {
  /* On wide desktop go to 4 columns to keep cards from being huge */
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
/* "相关产品" 区域 — 3-up max even on wide desktop. With 4 cards in a row each
   card gets ~280px wide which leaves the body cramped; 3-up at ~360px feels
   like real product cards instead of compact tiles. The 4th related product
   wraps to a second row. The grid still degrades to 2-up / 1-up on smaller
   screens via the existing breakpoints. */
.related-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .related-grid { grid-template-columns: 1fr !important; }
}

/* ---- Image-led product card (hover scale 1.05 to match home page) ---- */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  border-color: var(--brand, #0e5e4d);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -16px rgba(14, 94, 77, 0.18);
}
.product-card-image {
  aspect-ratio: 16 / 10;
  background: var(--bg-soft, #fafaf6);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image img {
  transform: scale(1.05);
}
.product-card-icon-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  /* Subtle brand-tinted gradient — without an image the card otherwise looks
     bleached out. This keeps it on-brand and gives the eye something to rest on. */
  background:
    radial-gradient(circle at 30% 25%, rgba(14, 94, 77, 0.06), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(212, 168, 75, 0.05), transparent 50%),
    var(--bg-soft, #fafaf6);
}
.product-card-icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand, #0e5e4d);
  background: #fff;
  border: 1px solid rgba(14, 94, 77, 0.12);
  border-radius: 12px;
  box-shadow: 0 4px 16px -8px rgba(14, 94, 77, 0.15);
  transition: transform 0.3s ease;
}
.product-card:hover .product-card-icon {
  transform: scale(1.08);
}
.product-card-icon svg { width: 44px; height: 44px; display: block; }
.product-card-mono {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  letter-spacing: 0.05em;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card-name {
  font-family: var(--font-display, serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  color: var(--ink, #050f0c);
}
.product-card-tag {
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  line-height: 1.5;
}
.product-card-arrow {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand, #0e5e4d);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}
.product-card:hover .product-card-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   PRODUCTS PAGE — direction 3 layout (guide + sidebar + catalog)
   ============================================================= */

/* "How to choose" 3-card guide */
.principle-guide {
  padding: 64px 0;
  background: #fff;
  border-bottom: 1px solid var(--line, #e8eae6);
}
.guide-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.guide-title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 12px 0 0;
  color: var(--ink, #050f0c);
}
.guide-cta { white-space: nowrap; }
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.guide-card {
  padding: 28px 24px;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 12px;
  background: var(--bg-soft, #fafaf6);
  transition: border-color 0.2s, transform 0.2s;
}
.guide-card:hover {
  border-color: var(--brand, #0e5e4d);
  transform: translateY(-2px);
}
.guide-card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand, #0e5e4d);
  background: rgba(14, 94, 77, 0.08);
  border-radius: 8px;
  margin-bottom: 16px;
}
.guide-card-icon svg { width: 24px; height: 24px; }
.guide-card h3 {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--ink, #050f0c);
}
.guide-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  margin: 0;
}

/* Main: sidebar + catalog grid */
.products-main {
  padding: 64px 0 96px;
  background: #fff;
}
.products-main-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

/* Sticky sidebar on desktop */
.products-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}
.sidebar-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
  margin-bottom: 16px;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line, #e8eae6);
  margin-bottom: 24px;
}
.sidebar-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2, #475569);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sidebar-link:hover {
  color: var(--ink, #050f0c);
  background: var(--bg-soft, #fafaf6);
}
.sidebar-link.is-active {
  color: var(--brand, #0e5e4d);
  border-left-color: var(--brand, #0e5e4d);
  font-weight: 500;
  background: rgba(14, 94, 77, 0.04);
}
.sidebar-link-name { flex: 1; min-width: 0; }
.sidebar-link-count {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  margin-left: 8px;
}
.sidebar-cta { padding-left: 16px; }
.sidebar-cta .btn {
  width: 100%;
  justify-content: space-between;
  font-size: 12px;
  padding: 10px 14px;
}

/* Section heads now include description paragraph */
.product-section-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  max-width: 60ch;
  margin: 8px 0 0;
}

/* Responsive: collapse sidebar */
@media (max-width: 1024px) {
  .products-main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .products-sidebar {
    position: static;
    order: -1;
  }
  .sidebar-label { margin-bottom: 12px; }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-left: none;
    gap: 6px;
    margin-bottom: 0;
  }
  .sidebar-link {
    border: 1px solid var(--line, #e8eae6);
    border-radius: 999px;
    padding: 7px 14px;
    margin: 0;
  }
  .sidebar-link.is-active {
    border-color: var(--brand, #0e5e4d);
    background: var(--brand, #0e5e4d);
    color: #fff;
  }
  .sidebar-link.is-active .sidebar-link-count {
    color: rgba(255,255,255,0.75);
  }
  .sidebar-cta { display: none; }

  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .principle-guide { padding: 48px 0; }
  .guide-cards { grid-template-columns: 1fr; gap: 12px; }
  .product-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .product-grid { grid-template-columns: 1fr; }
}

/* ============ PRODUCT DETAIL ============ */
.breadcrumb {
  padding: 24px 0;
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  display: flex;
  gap: 8px;
  align-items: center;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--brand, #0e5e4d); }
.breadcrumb [aria-current] { color: var(--ink, #050f0c); }
.breadcrumb [aria-hidden] { opacity: 0.4; }
/* When a breadcrumb sits directly above a page-hero (the new layout for list
   pages), the hero already gets enough top breathing room from the breadcrumb's
   own padding. Tighten the hero's padding-top so the title doesn't float too
   far below the breadcrumb. */
.breadcrumb + .page-hero {
  padding-top: 56px;
}

.product-detail-hero {
  padding: 40px 0 80px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-soft, #fafaf6) 100%);
  border-bottom: 1px solid var(--line, #e8eae6);
}
.product-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.product-detail-title {
  font-family: var(--font-display, serif);
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 16px 0 16px;
  color: var(--ink, #050f0c);
}
.product-detail-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(212, 168, 75, 0.15);
  color: #8a6420;
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 4px;
  margin-bottom: 24px;
}
.product-detail-desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  max-width: 56ch;
  margin: 0 0 32px;
}
.product-detail-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* ---- Product detail: applicable industries chip cloud ---- */
.product-detail-industries {
  margin: 0 0 28px;
}
.product-detail-industries-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3, #6b7470);
  margin-bottom: 10px;
}
.product-detail-industries-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.industry-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(14, 94, 77, 0.06);
  color: var(--brand, #0e5e4d);
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
  border: 1px solid rgba(14, 94, 77, 0.12);
}
.industry-chip:hover {
  background: rgba(14, 94, 77, 0.12);
  transform: translateY(-1px);
}
.industry-chip-arrow {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  opacity: 0.6;
  transition: transform 0.15s, opacity 0.15s;
}
.industry-chip:hover .industry-chip-arrow {
  transform: translateX(2px);
  opacity: 1;
}

/* ---- Industries list page: applicable products under each industry ---- */
.industry-row-products {
  margin: 28px 0 24px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line, #e8eae6);
}
.industry-row-products-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3, #6b7470);
  margin-bottom: 12px;
}
.industry-row-products-label .count {
  color: var(--accent, #d4a84b);
  font-variant-numeric: tabular-nums;
}
.industry-row-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.industry-product-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--bg-soft, #fafaf6);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink, #050f0c);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.industry-product-chip:hover {
  border-color: var(--brand, #0e5e4d);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px rgba(14, 94, 77, 0.2);
}
.industry-product-chip-name {
  font-size: 14px;
  font-weight: 500;
}
.industry-product-chip-tag {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--ink-3, #6b7470);
}

.product-detail-visual {
  display: flex; justify-content: center; align-items: center;
  min-height: 300px;
}
.product-detail-visual img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 60px -20px rgba(14, 94, 77, 0.15);
}
.product-detail-icon {
  width: 240px; height: 240px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 16px;
  color: var(--brand, #0e5e4d);
}
.product-detail-icon svg { width: 120px; height: 120px; }
.product-detail-icon-mono {
  font-family: var(--font-mono, ui-monospace);
  font-size: 24px;
  font-weight: 600;
  color: var(--brand, #0e5e4d);
  letter-spacing: 0.05em;
}

.product-detail-body {
  padding: 80px 0;
  background: #fff;
}

/* Brand slogan band — sits between the technical body and the related-products
   block. Mirrors the docx/PDF closing layout: orange "Precision beyond limits"
   slogan, then a small grey customer note about custom orders.
   The band shares the same off-white as related-products / bg-soft so
   it reads as part of the same visual zone, not a hard break. */
.product-slogan-band {
  padding: 56px 0 32px;
  background: var(--bg-soft, #fafaf6);
  text-align: center;
}
.product-slogan-band .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.product-slogan-band .product-slogan {
  /* SVG viewBox is 460×67. Cap by width — height auto-scales. */
  display: block;
  width: 360px;
  max-width: 92%;
  height: auto;
}
.product-slogan-band .product-slogan-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7470;
  max-width: 60ch;
}

.related-products {
  padding: 80px 0;
  background: var(--bg-soft, #fafaf6);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.section-head h2 {
  font-family: var(--font-display, serif);
  font-size: clamp(32px, 4vw, 56px);
  margin: 8px 0 0;
}
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand, #0e5e4d);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: gap 0.15s;
}
.link-arrow:hover { gap: 12px; }

.prose {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2, #475569);
  max-width: 72ch;
}
.prose h2, .prose h3 {
  color: var(--ink, #050f0c);
  margin-top: 1.5em;
}
.prose h2 { font-size: 28px; font-family: var(--font-display, serif); }
.prose h3 { font-size: 20px; }
.prose p { margin: 1em 0; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 1em 0; }
.prose li { margin: 0.5em 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose a { color: var(--brand, #0e5e4d); text-decoration: underline; text-decoration-color: rgba(14, 94, 77, 0.3); }
.prose a:hover { text-decoration-color: var(--brand, #0e5e4d); }

/* ============ QUILL RICH-TEXT ALIGNMENT ============
   The admin uses Quill (snow theme) for body fields. When the operator
   picks an alignment in the toolbar, Quill writes a class onto the block
   element rather than a style attribute:
     <p class="ql-align-center">…</p>
     <p class="ql-align-right">…</p>
     <p class="ql-align-justify">…</p>
   Left is the default (no class). The frontend MUST mirror these classes
   in CSS, otherwise the operator's alignment choice silently disappears. */
.ql-align-center  { text-align: center; }
.ql-align-right   { text-align: right; }
.ql-align-justify { text-align: justify; }

/* Images are `display: block` site-wide (see global img rule at the top of
   this file), so `text-align` on the parent does NOT center them. For
   aligned <p> wrappers around images, we use auto margins instead — the
   standard way to center a block-level image.

   We use !important here because section-level rules like
   `.news-article-body .prose img { margin: 1.5em 0 }` use shorthand syntax
   that collapses left/right to ZERO and have specificity that's tricky to
   beat across all four detail page layouts (news / product / industry /
   application use different container class structures). !important is
   the cleanest way to express "the operator's alignment choice always
   wins", and it's scoped to `.ql-align-*` so it only affects intentionally
   aligned content. */
.ql-align-center > img,
.ql-align-center img {
  margin-left:  auto !important;
  margin-right: auto !important;
  display: block !important;
}
.ql-align-right > img,
.ql-align-right img {
  margin-left:  auto !important;
  margin-right: 0 !important;
  display: block !important;
}

/* ============ INDUSTRIES LIST ============ */
.industries-list {
  padding: 80px 0;
}
.industry-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  padding: 48px 0;
  border-bottom: 1px solid var(--line, #e8eae6);
  scroll-margin-top: 100px;
}
.industry-row:first-child { padding-top: 0; }
.industry-row:last-child { border-bottom: none; }
.industry-row-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
}
.industry-row-icon {
  width: 56px; height: 56px;
  flex: 0 0 56px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand, #0e5e4d);
  background: rgba(14, 94, 77, 0.06);
  border-radius: 8px;
}
.industry-row-icon svg {
  width: 32px; height: 32px;
  display: block;
}
.industry-row-num {
  font-family: var(--font-mono, ui-monospace);
  font-size: 12px;
  color: var(--brand, #0e5e4d);
  letter-spacing: 0.16em;
}
.industry-row-name {
  font-family: var(--font-display, serif);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--ink, #050f0c);
}
.industry-row-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  margin: 0;
}
.industry-row-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2, #475569);
  margin-bottom: 24px;
}

/* ============ ABOUT ============ */
.about-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line, #e8eae6);
}
.about-section:last-of-type { border-bottom: none; }
.about-timeline-section { background: var(--bg-soft, #fafaf6); }
.about-cols {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
}
/* Decorative SVG block at the top of each section's left label column */
.about-col-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.about-deco {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  background: rgba(14, 94, 77, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #0e5e4d);
  transition: background 0.2s;
}
.about-deco:hover {
  background: rgba(14, 94, 77, 0.07);
}
.about-deco svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* "Who we are" section: 3-column variant — label / body / visual side */
.about-cols-3 {
  grid-template-columns: 180px 1fr 320px;
  gap: 56px;
}
.about-col-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-visual-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft, #fafaf6);
  border: 1px solid var(--line, #e8eae6);
}
.about-visual-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-visual-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-visual-photo-fallback svg {
  width: 100%; height: 100%;
}
.about-visual-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.about-visual-stat {
  background: #fff;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 10px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.18s, transform 0.18s;
}
.about-visual-stat:hover {
  border-color: var(--brand, #0e5e4d);
  transform: translateY(-2px);
}
.about-visual-stat .num {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--brand, #0e5e4d);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.about-visual-stat .lbl {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3, #6b7470);
}

/* Responsive: visual column drops below body */
@media (max-width: 1100px) {
  .about-cols-3 {
    grid-template-columns: 180px 1fr;
  }
  .about-col-visual {
    grid-column: 2;       /* align with body, not under the label */
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
  }
  .about-visual-photo { width: 280px; flex-shrink: 0; }
  .about-visual-stats { flex: 1; min-width: 240px; }
}
@media (max-width: 768px) {
  .about-cols-3 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-col-visual {
    grid-column: auto;
    margin-top: 16px;
  }
  .about-visual-photo { width: 100%; }
  /* On mobile the deco shrinks and sits inline with the eyebrow */
  .about-col-label { flex-direction: row; align-items: center; gap: 14px; }
  .about-deco { width: 56px; height: 56px; flex-shrink: 0; }
}
.about-col-body h2 {
  font-family: var(--font-display, serif);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
  margin: 0 0 32px;
  color: var(--ink, #050f0c);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line, #e8eae6);
}
.timeline-year {
  font-family: var(--font-display, serif);
  font-size: 22px;
  color: var(--brand, #0e5e4d);
  font-variant-numeric: tabular-nums;
}
.timeline-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  margin-bottom: 4px;
}
.timeline-desc {
  font-size: 14px;
  color: var(--ink-3, #6b7470);
  line-height: 1.6;
}
.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 40px;
}
.capability-num {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--brand, #0e5e4d);
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.capability-item h3 {
  font-family: var(--font-display, serif);
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--ink, #050f0c);
}
.capability-item p {
  font-size: 14px;
  color: var(--ink-2, #475569);
  line-height: 1.6;
  margin: 0;
}

/* ============ CONTACT ============ */
.contact-section { padding: 80px 0 120px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
}
.contact-form-wrap h2 {
  font-family: var(--font-display, serif);
  font-size: clamp(28px, 3vw, 40px);
  margin: 0 0 8px;
  color: var(--ink, #050f0c);
}
.contact-form-lead {
  color: var(--ink-3, #6b7470);
  margin: 0 0 32px;
}
.contact-form-success {
  background: rgba(14, 94, 77, 0.08);
  border: 1px solid rgba(14, 94, 77, 0.3);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  color: var(--ink, #050f0c);
}
.contact-form-success strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}
.contact-form-success p { margin: 0; font-size: 14px; color: var(--ink-2, #475569); }
.contact-form-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 24px;
  color: #b91c1c;
  font-size: 14px;
}
.contact-form { display: grid; gap: 20px; }
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2, #475569);
}
.contact-form label .required { color: #b91c1c; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink, #050f0c);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand, #0e5e4d);
  box-shadow: 0 0 0 3px rgba(14, 94, 77, 0.1);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form-submit {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.contact-form-privacy {
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.contact-info { display: grid; gap: 16px; align-content: start; }
.contact-info-card {
  padding: 24px;
  background: var(--bg-soft, #fafaf6);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 8px;
}
.contact-info-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
  margin-bottom: 8px;
}
.contact-info-value {
  display: block;
  font-family: var(--font-display, serif);
  font-size: 22px;
  color: var(--ink, #050f0c);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.contact-info-value:hover { color: var(--brand, #0e5e4d); }
.contact-info-addr { font-family: inherit; font-size: 16px; line-height: 1.5; }
.contact-info-sub {
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  margin-top: 6px;
}
.contact-wechat-qr {
  display: block;
  width: 160px; height: 160px;
  margin: 12px auto;
  border: 1px solid var(--line, #e8eae6);
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
}
.contact-wechat { text-align: center; }

/* ============ PAGE-LEVEL RESPONSIVE ============ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .industry-row { grid-template-columns: 1fr; gap: 16px; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-cols { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .page-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .page-hero-stats { justify-content: flex-start; }
  .page-hero-stats > div { text-align: left; }
  .capability-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .contact-form-row { grid-template-columns: 1fr; }
  .page-hero { padding: 80px 0 48px; }
  .product-section { padding: 56px 0; }
  .industries-list { padding: 56px 0; }
  .about-section { padding: 56px 0; }
  .contact-section { padding: 56px 0 80px; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .product-detail-icon { width: 180px; height: 180px; }
  .product-detail-icon svg { width: 90px; height: 90px; }
  .contact-wechat-qr { width: 140px; height: 140px; }
  .page-hero-stats .num { font-size: 42px; }
}

/* ============ NEWS CARDS (used on home, news list, news detail "related") ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.3s;
}
.news-card:hover { transform: translateY(-4px); }
.news-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: var(--bg-soft, #f5f4ee);
  border-radius: 4px;
}
.news-img .news-cover,
.news-img .ph {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.4s;
}
.news-img .news-cover {
  object-fit: cover;   /* crop to fill, all cards same shape regardless of source image ratio */
}
.news-card:hover .news-img .news-cover,
.news-card:hover .news-img .ph { transform: scale(1.05); }
.news-cat {
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand, #0e5e4d);
}
.news-card h3 {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
  color: var(--ink, #050f0c);
  transition: color 0.2s;
}
.news-card:hover h3 { color: var(--brand, #0e5e4d); }
.news-date {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--ink-3, #6b7470);
}

/* ============ NEWS LIST ============ */
.news-list-section {
  padding: 64px 0 96px;
}
.news-grid-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.news-empty {
  text-align: center;
  color: var(--ink-3, #6b7470);
  padding: 80px 0;
}

/* ===== Category tabs (above the news grid) ===== */
.news-tabs-section {
  padding: 32px 0 0;
  background: #fff;
}
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line, #e8eae6);
  padding-bottom: 0;
}
.news-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  margin-bottom: -1px;          /* overlap the section's bottom border */
  border-bottom: 2px solid transparent;
  color: var(--ink-2, #475569);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, border-color 0.15s;
}
.news-tab:hover {
  color: var(--ink, #050f0c);
}
.news-tab.is-active {
  color: var(--brand, #0e5e4d);
  border-bottom-color: var(--brand, #0e5e4d);
}
.news-tab-count {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  background: var(--bg-soft, #fafaf6);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.news-tab.is-active .news-tab-count {
  color: var(--brand, #0e5e4d);
  background: rgba(14, 94, 77, 0.08);
}

/* ===== Pagination (below the news grid) ===== */
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line, #e8eae6);
  flex-wrap: wrap;
}
.news-pg-numbers {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.news-pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--ink-2, #475569);
  text-decoration: none;
  font-family: var(--font-mono, ui-monospace);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.news-pg-num:hover {
  background: var(--bg-soft, #fafaf6);
  color: var(--ink, #050f0c);
}
.news-pg-num.is-current {
  background: var(--brand, #0e5e4d);
  border-color: var(--brand, #0e5e4d);
  color: #fff;
  font-weight: 500;
}
.news-pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: var(--ink-3, #6b7470);
  font-family: var(--font-mono, ui-monospace);
  font-size: 13px;
}
.news-pg-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--ink-2, #475569);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--line, #e8eae6);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.news-pg-arrow:hover {
  border-color: var(--brand, #0e5e4d);
  color: var(--brand, #0e5e4d);
}
.news-pg-arrow.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Tighten pagination on mobile */
@media (max-width: 640px) {
  .news-pg-arrow span:not([aria-hidden]) {
    display: none;     /* keep just the arrow glyph on tiny screens */
  }
  .news-pg-arrow { padding: 8px 12px; }
}

/* ============ NEWS ARTICLE (detail) ============ */
.news-article {
  padding: 16px 0 80px;
}
.news-article-head {
  max-width: 840px;
  margin: 0 auto;
  padding-top: 48px;
  padding-bottom: 32px;
  text-align: center;
}
.news-article-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
  margin-bottom: 24px;
}
.news-article-meta .news-cat {
  color: var(--brand, #0e5e4d);
}
.news-article-meta .news-article-dot { opacity: 0.4; }
.news-article-title {
  font-family: var(--font-display, "Fraunces", serif);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink, #050f0c);
  margin: 0 0 24px;
}
.news-article-summary {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  margin: 0;
}
.news-article-cover {
  margin: 32px auto;
  max-width: 1080px;
}
.news-article-cover img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  border-radius: 8px;
}
.news-article-body {
  max-width: 760px;
  margin: 0 auto;
}
.news-article-body .prose {
  max-width: none;
  font-size: 17px;
  line-height: 1.8;
}
.news-article-body .prose p { margin: 1.2em 0; }
.news-article-body .prose img {
  /* Use max-width so the operator's inline width="..." attribute (set in
     the rich-text editor) takes effect — width: 100% would override it
     and force every image to span the full prose column. */
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
}
.news-article-body .prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}
.news-article-body .prose th,
.news-article-body .prose td {
  border: 1px solid var(--line, #e8eae6);
  padding: 10px 14px;
  text-align: left;
}
.news-article-body .prose th {
  background: var(--bg-soft, #fafaf6);
  font-weight: 500;
}
.news-article-foot {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line, #e8eae6);
}
.news-article-foot .link-arrow { gap: 8px; }
.news-article-foot .link-arrow:hover { gap: 12px; }

@media (max-width: 1024px) {
  .news-grid-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .news-grid-list { grid-template-columns: 1fr; }
  .news-article-cover { margin: 24px auto; }
  .news-article-cover img { max-height: 320px; }
  .news-article-body .prose { font-size: 16px; }
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg-dark);
  color: #cdd4d1;
  padding: 80px 0 40px;
  margin-top: 80px;
}
footer a { color: #cdd4d1; transition: color 0.15s; }
footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 2fr 1.2fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-grid h4,
.footer-grid h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8d9691;
  font-weight: 500;
  margin: 0 0 16px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid li { font-size: 13px; }

/* ---- Products column: 9-principle 3x3 grid + count badges + VIEW ALL CTA ---- */
.footer-products-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 16px !important;
  flex-direction: unset !important;     /* override the default flex-column from .footer-grid ul */
}
.footer-product-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.15s;
}
.footer-product-link:hover {
  color: #fff;
}
.footer-product-name {
  /* allow wrap for longer Chinese labels (e.g. "电导率") */
  min-width: 0;
}
.footer-product-count {
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.footer-product-link:hover .footer-product-count {
  color: rgba(255, 255, 255, 0.7);
}
.footer-view-all {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent, #d4a84b) !important;
  text-decoration: none;
  transition: opacity 0.15s;
}
.footer-view-all:hover {
  opacity: 0.78;
  color: var(--accent, #d4a84b) !important;
}

.footer-brand p { font-size: 13px; line-height: 1.6; color: #8d9691; margin: 12px 0 0; max-width: 36ch; }
.footer-bottom {
  padding-top: 28px;
  display: flex; justify-content: space-between;
  font-size: 12px; color: #6b7470;
  flex-wrap: wrap; gap: 12px;
}

/* ---------- Social icons ---------- */
.footer-social {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 24px;
}
.social-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #8d9691;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
  text-decoration: none;
  padding: 0;
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover {
  color: var(--accent, #d4a84b);
  background: rgba(212, 168, 75, 0.08);
  border-color: rgba(212, 168, 75, 0.4);
  transform: translateY(-2px);
}

/* ---------- WeChat QR modal ---------- */
.qr-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.qr-modal.open { opacity: 1; }
.qr-modal[hidden] { display: none; }
.qr-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(5, 15, 12, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.qr-modal-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  max-width: 320px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
.qr-modal.open .qr-modal-card { transform: scale(1); }
.qr-modal-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #050f0c);
  margin: 0 0 16px;
}
.qr-modal-card img {
  width: 200px; height: 200px;
  display: block; margin: 0 auto;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}
.qr-modal-card p {
  font-size: 13px;
  color: var(--ink-3, #6b7470);
  margin: 16px 0 0;
}
.qr-modal-close {
  position: absolute; top: 12px; right: 16px;
  width: 28px; height: 28px;
  border: none; background: none;
  font-size: 24px; line-height: 1;
  color: var(--ink-3, #6b7470);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
}
.qr-modal-close:hover { background: rgba(0, 0, 0, 0.06); }

/* ============ PLACEHOLDERS ============ */
.ph {
  background:
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(14,94,77,0.06) 8px 9px),
    var(--bg-alt);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-align: center;
  padding: 20px;
}

/* ============ FLOAT CONSULT ============ */
.float-consult {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
}
.float-consult button {
  width: 56px; height: 56px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 30px rgba(14,94,77,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.float-consult button:hover { transform: translateY(-2px); }

/* ============ UTIL ============ */
.divider { height: 1px; background: var(--line); }
.mono { font-family: var(--font-mono); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) {
  .nav-right .lang-toggle { display: none; }   /* save space — language switch via direct domain */
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-cta { padding: 8px 14px !important; font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  /* Even when the parent footer-grid drops to 2 cols, the products inner
     grid should keep its 3 columns since it lives in one cell. */
  .footer-products-grid { grid-template-columns: repeat(3, 1fr); }
  /* Mobile menu hint button — clicked, scrolls to footer where the same nav lives */
  .nav-mobile-hint {
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 50%; cursor: pointer;
    background: transparent; color: inherit;
    margin-right: 8px;
  }
  .nav-mobile-hint svg { width: 18px; height: 18px; }
}
.nav-mobile-hint { display: none; }   /* hidden by default on desktop */

/* ---------- Mobile drawer ---------- */
.nav-drawer {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg-dark, #050f0c);
  border-top: 1px solid rgba(255,255,255,0.08);
  max-height: 0; overflow-y: auto;
  transition: max-height 0.32s ease;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open {
  max-height: calc(100vh - 64px);  /* fill almost the whole screen */
}
.nav-drawer-links {
  list-style: none; padding: 8px 24px 16px; margin: 0;
}
.nav-drawer-links li.divider {
  height: 1px; background: rgba(255,255,255,0.08); margin: 8px 0;
}
.nav-drawer-links a {
  display: block; padding: 14px 0;
  color: #cdd4d1; font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-drawer-links a[aria-current] { color: var(--accent, #d4a84b); }
.nav-drawer-links li:last-child a { border-bottom: none; }

@media (max-width: 900px) {
  .nav-drawer { display: block; }
  .hero-nav .nav-drawer { background: rgba(5, 15, 12, 0.96); backdrop-filter: blur(8px); }
}

@media (max-width: 480px) {
  .nav { padding: 14px 16px; }
  .nav-logo-img { height: 18px; }
  .nav-cta { display: none; }    /* save space; CTA available below the fold */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* =========================================================================
   Cookie consent banner + preferences modal
   ------------------------------------------------------------------------- */

.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(15, 23, 22, 0.97);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 9000;
  padding: 18px 0;
  box-shadow: 0 -8px 32px -16px rgba(0, 0, 0, 0.4);
  animation: cookie-banner-slide-up 0.4s ease-out;
}
@keyframes cookie-banner-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner-inner {
  display: flex; flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cookie-banner-text {
  flex: 1 1 480px; min-width: 0;
}
.cookie-banner-text strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #fff;
}
.cookie-banner-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 72ch;
}
.cookie-banner-link {
  color: var(--accent, #d4a84b);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-link:hover { opacity: 0.8; }
.cookie-banner-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: inherit;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  white-space: nowrap;
}
.cookie-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}
.cookie-btn:active { transform: translateY(1px); }
.cookie-btn-ghost { /* default — same as base */ }
.cookie-btn-primary {
  background: var(--accent, #d4a84b);
  border-color: var(--accent, #d4a84b);
  color: #1a1f1d;
  font-weight: 500;
}
.cookie-btn-primary:hover {
  background: #e0b860;
  border-color: #e0b860;
}

/* Preferences modal — used both from banner and footer link */
.cookie-prefs-modal {
  position: fixed; inset: 0;
  z-index: 9100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.cookie-prefs-modal[hidden] { display: none !important; }
.cookie-prefs-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cookie-prefs-card {
  position: relative;
  background: #fff;
  color: var(--ink, #050f0c);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.4);
  animation: cookie-prefs-pop 0.25s ease-out;
}
@keyframes cookie-prefs-pop {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.cookie-prefs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line, #e8eae6);
}
.cookie-prefs-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  font-family: var(--font-display, serif);
}
.cookie-prefs-close {
  background: none; border: none;
  font-size: 24px;
  color: var(--ink-3, #6b7470);
  cursor: pointer;
  width: 32px; height: 32px;
  border-radius: 6px;
  line-height: 1;
}
.cookie-prefs-close:hover {
  background: var(--bg-soft, #fafaf6);
  color: var(--ink, #050f0c);
}
.cookie-prefs-body {
  padding: 20px 24px;
  overflow-y: auto;
}
.cookie-prefs-intro {
  font-size: 13px;
  color: var(--ink-2, #475569);
  line-height: 1.6;
  margin: 0 0 24px;
}
.cookie-prefs-row {
  padding: 16px 0;
  border-top: 1px solid var(--line, #e8eae6);
}
.cookie-prefs-row:first-of-type { border-top: none; padding-top: 0; }
.cookie-prefs-row-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.cookie-prefs-name {
  font-size: 14px;
  font-weight: 500;
}
.cookie-prefs-desc {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  line-height: 1.55;
}

/* Toggle switch */
.cookie-prefs-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cookie-prefs-toggle input {
  position: absolute;
  opacity: 0;
  width: 36px; height: 20px;
  cursor: pointer;
}
.cookie-prefs-toggle-track {
  display: inline-block;
  width: 36px; height: 20px;
  background: #d1d5db;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}
.cookie-prefs-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.cookie-prefs-toggle input:checked + .cookie-prefs-toggle-track {
  background: var(--brand, #0e5e4d);
}
.cookie-prefs-toggle input:checked + .cookie-prefs-toggle-track::after {
  transform: translateX(16px);
}
.cookie-prefs-toggle input:disabled + .cookie-prefs-toggle-track {
  background: #94a3b8;
  cursor: not-allowed;
}
.cookie-prefs-toggle-label {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  letter-spacing: 0.05em;
}
.cookie-prefs-toggle-locked input { cursor: not-allowed; }

.cookie-prefs-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line, #e8eae6);
  background: var(--bg-soft, #fafaf6);
  border-radius: 0 0 12px 12px;
}
.cookie-prefs-link {
  font-size: 13px;
  color: var(--brand, #0e5e4d);
  text-decoration: none;
}
.cookie-prefs-link:hover { text-decoration: underline; }
.cookie-prefs-footer .cookie-btn-primary {
  background: var(--brand, #0e5e4d);
  border-color: var(--brand, #0e5e4d);
  color: #fff;
}
.cookie-prefs-footer .cookie-btn-primary:hover {
  background: #0c4d3f;
  border-color: #0c4d3f;
}

/* Privacy policy / cookies info pages */
.privacy-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2, #475569);
}
.privacy-page h1 {
  font-family: var(--font-display, serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  margin: 0 0 12px;
}
.privacy-page .privacy-meta {
  font-family: var(--font-mono, ui-monospace);
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  letter-spacing: 0.05em;
  margin: 0 0 40px;
}
.privacy-page h2 {
  font-family: var(--font-display, serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  margin: 40px 0 12px;
}
.privacy-page h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  margin: 24px 0 8px;
}
.privacy-page p, .privacy-page ul, .privacy-page ol {
  margin: 0 0 16px;
}
.privacy-page ul, .privacy-page ol { padding-left: 24px; }
.privacy-page li { margin-bottom: 6px; }
.privacy-page a {
  color: var(--brand, #0e5e4d);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-page .privacy-placeholder {
  background: rgba(212, 168, 75, 0.1);
  border-left: 3px solid var(--accent, #d4a84b);
  padding: 8px 14px;
  font-size: 13px;
  color: #8a6420;
  border-radius: 0 4px 4px 0;
  margin: 8px 0 16px;
  font-family: var(--font-mono, ui-monospace);
}

/* Mobile cookie banner */
@media (max-width: 700px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .cookie-btn {
    flex: 1 1 calc(33.333% - 6px);
    min-width: 0;
    text-align: center;
    padding: 10px 8px;
    font-size: 12px;
  }
}

/* Footer privacy links */
.footer-privacy-links {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-privacy-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}
.footer-privacy-links a:hover { color: rgba(255, 255, 255, 0.85); }
.footer-privacy-link-button {
  background: none; border: none; padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.footer-privacy-link-button:hover { color: rgba(255, 255, 255, 0.85); }

/* =========================================================================
   Application case pages
   ------------------------------------------------------------------------- */

.section--apps {
  padding: 40px 0 80px;
}

.app-group {
  margin-bottom: 64px;
}
.app-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line, #e8eae6);
}
.app-group-eyebrow {
  font-family: var(--font-mono, ui-monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-3, #6b7470);
}
.app-group-product-link {
  color: var(--brand, #0e5e4d);
  text-decoration: none;
  display: inline-flex; gap: 6px; align-items: center;
}
.app-group-product-link:hover {
  text-decoration: underline;
}
.app-group-title {
  font-family: var(--font-display, serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  color: var(--ink, #050f0c);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.app-grid-related {
  margin-top: 20px;
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--bg, #fff);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.app-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand, #0e5e4d);
  box-shadow: 0 12px 32px -16px rgba(14, 94, 77, 0.2);
}
.app-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft, #fafaf6);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.app-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.app-card-image-placeholder {
  background: linear-gradient(135deg, rgba(14, 94, 77, 0.05) 0%, rgba(212, 168, 75, 0.05) 100%);
}
.app-card-image-icon {
  width: 48px; height: 48px;
  color: var(--brand, #0e5e4d);
  opacity: 0.5;
}
.app-card-image-icon svg { width: 100%; height: 100%; }

.app-card-body {
  padding: 16px 18px;
  flex: 1;
  display: flex; flex-direction: column;
  gap: 8px;
}
.app-card-tag {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--accent, #d4a84b);
  text-transform: uppercase;
}
.app-card-name {
  font-family: var(--font-display, serif);
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  color: var(--ink, #050f0c);
  line-height: 1.3;
}
.app-card-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2, #475569);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.app-card-cta {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono, ui-monospace);
  font-size: 12px;
  color: var(--brand, #0e5e4d);
}

.eyebrow-link {
  color: inherit;
  text-decoration: none;
}
.eyebrow-link:hover {
  color: var(--brand, #0e5e4d);
  text-decoration: underline;
}

.related-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 4px;
}
.related-product {
  color: var(--brand, #0e5e4d);
}
.related-all {
  font-family: var(--font-mono, ui-monospace);
  font-size: 12px;
  color: var(--brand, #0e5e4d);
  text-decoration: none;
}
.related-all:hover { text-decoration: underline; }

/* =========================================================================
   Application matrix (home page)
   Principle × industry crosstab. Designed to fit ~10 rows × ~9 columns
   without horizontal scroll on desktop, falling back to scroll on mobile.
   ------------------------------------------------------------------------- */

.matrix-section {
  padding: 80px 0;
  background: var(--bg-soft, #fafaf6);
}

.matrix-head {
  max-width: 720px;
  margin-bottom: 36px;
}
.matrix-lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2, #475569);
  margin-top: 16px;
  margin-bottom: 0;
}

.matrix-wrapper {
  background: var(--bg, #ffffff);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.matrix-table th,
.matrix-table td {
  border-bottom: 1px solid var(--line, #e8eae6);
  border-right: 1px solid var(--line, #e8eae6);
  vertical-align: middle;
  /* No padding here — each specific class (.matrix-corner, .matrix-col-head,
     .matrix-row-head, .matrix-cell) sets its own padding. We previously had
     `padding: 0` here, which has higher selector specificity (0,1,1) than the
     specific classes (0,1,0), making the per-class padding silently fail.
     Solution: don't set padding at the generic level. */
}
.matrix-table th:last-child,
.matrix-table td:last-child {
  border-right: none;
}
.matrix-table tr:last-child th,
.matrix-table tr:last-child td {
  border-bottom: none;
}

/* Top-left corner cell — labels both axes. Two compact labels in a single
   horizontal row, sized and padded to match the visual weight of the
   adjacent column headers. The label "principle / industry" reads as a
   single phrase, not a stacked label. */
.matrix-corner {
  background: var(--bg-soft, #fafaf6);
  padding: 14px 24px;
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  text-align: left;
  min-width: 180px;
  vertical-align: middle;
  line-height: 1.4;
  white-space: nowrap;
}
.matrix-corner-row,
.matrix-corner-col {
  display: inline;
  font-family: var(--font-mono, ui-monospace);
  letter-spacing: 0.04em;
}
.matrix-corner-row {
  color: var(--ink-2, #475569);
  font-weight: 500;
}
.matrix-corner-col {
  color: var(--ink-3, #6b7470);
}
.matrix-corner-divider {
  display: inline-block;
  margin: 0 8px;
  color: var(--line-2, #d1d5db);
}

/* Column headers (industries) */
.matrix-col-head {
  background: var(--bg-soft, #fafaf6);
  font-weight: 500;
  font-size: 12px;
  text-align: center;
  padding: 16px 12px;
  white-space: nowrap;
  color: var(--ink-2, #475569);
  vertical-align: middle;
}
.matrix-col-head a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.matrix-col-head a:hover {
  color: var(--brand, #0e5e4d);
}

/* Row headers (products) */
.matrix-row-head {
  background: var(--bg-soft, #fafaf6);
  text-align: left;
  padding: 16px 24px;
  min-width: 180px;
  vertical-align: middle;
}
.matrix-row-head a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.matrix-row-head a:hover .matrix-row-code {
  color: var(--brand, #0e5e4d);
}
.matrix-row-code {
  display: block;
  font-family: var(--font-mono, ui-monospace);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  letter-spacing: 0.02em;
}
.matrix-row-name {
  display: block;
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  margin-top: 2px;
}

/* Cells */
.matrix-cell {
  padding: 12px 8px;
  text-align: center;
  min-width: 88px;
  vertical-align: middle;
}
.matrix-cell-empty {
  color: var(--line-2, #d1d5db);
  font-size: 14px;
}

/* "Fits" cell — product tagged for this industry but no specific application
   case yet. Renders as a small muted pill linking to product page. Visually
   between empty (em-dash) and filled (colored chip) so the eye reads it as
   "available but not detailed". */
.matrix-cell-fits {
  padding: 8px;
  text-align: center;
}
.matrix-cell-fits-link {
  display: inline-block;
  padding: 4px 10px;
  background: transparent;
  color: var(--ink-3, #6b7470);
  border: 1px dashed var(--line-2, #d1d5db);
  border-radius: 999px;
  font-size: 11px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s, border-color 0.15s;
}
.matrix-cell-fits-link:hover {
  color: var(--brand, #0e5e4d);
  border-color: var(--brand, #0e5e4d);
}

.matrix-cell-link {
  display: block;
  padding: 8px 6px;
  background: rgba(14, 94, 77, 0.06);
  color: var(--brand, #0e5e4d);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.matrix-cell-link:hover {
  background: var(--brand, #0e5e4d);
  color: #ffffff;
}

.matrix-cell-multi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.matrix-cell-more {
  display: block;
  font-family: var(--font-mono, ui-monospace);
  font-size: 10px;
  color: var(--ink-3, #6b7470);
  padding: 2px 0;
}

/* Footer link */
.matrix-foot {
  margin-top: 24px;
  text-align: right;
}
.matrix-foot .link-arrow {
  font-family: var(--font-mono, ui-monospace);
  font-size: 13px;
  color: var(--brand, #0e5e4d);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.matrix-foot .link-arrow:hover {
  text-decoration: underline;
}

/* Mobile: smaller cells, tighter padding */
@media (max-width: 720px) {
  .matrix-section { padding: 56px 0; }
  .matrix-corner,
  .matrix-row-head { min-width: 140px; padding: 10px; }
  .matrix-cell { min-width: 72px; padding: 6px; }
  .matrix-cell-link { font-size: 10px; padding: 6px 4px; }
}

/* =========================================================================
   Variant tabs — used inside product detail body for products with multiple
   sub-types (e.g. PS7200 弯管/直管, PS7300 三种安装方式).
   Activated by the operator pasting a snippet from admin product_edit.
   The JS handler is in public/js/variant-tabs.js (loaded globally).
   ------------------------------------------------------------------------- */

.variant-tabs {
  margin: 24px 0;
}

.variant-tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line, #e8eae6);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.variant-tab {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3, #6b7470);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.variant-tab:hover {
  color: var(--ink, #050f0c);
}
.variant-tab.active {
  color: var(--brand, #0e5e4d);
  border-bottom-color: var(--brand, #0e5e4d);
}

.variant-tab-panel {
  display: none;
}
.variant-tab-panel.active {
  display: block;
}

/* =========================================================================
   Industry catalog & detail pages
   ------------------------------------------------------------------------- */

.section--industry-cards {
  padding: 24px 0 80px;
}

.industry-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Card: top icon + number, name, desc, footer with stats + CTA arrow.
   Whole card is clickable (it's an <a>). Hover lifts and highlights border. */
.industry-card {
  position: relative;            /* anchor for any future overlays */
  display: flex;
  flex-direction: column;
  background: var(--bg, #ffffff);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: 240px;
}
.industry-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand, #0e5e4d);
  box-shadow: 0 12px 32px -16px rgba(14, 94, 77, 0.18);
}

.industry-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px;
}
.industry-card-icon {
  width: 44px; height: 44px;
  color: var(--brand, #0e5e4d);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.industry-card-icon svg { width: 100%; height: 100%; }

.industry-card-num {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3, #6b7470);
  flex-shrink: 0;
  padding-top: 6px;
}

.industry-card-name {
  font-family: var(--font-display, serif);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--ink, #050f0c);
  line-height: 1.25;
}
.industry-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2, #475569);
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer: stats on left, CTA arrow on right. Sits at bottom via auto margin. */
.industry-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line, #e8eae6);
}

.industry-card-stats {
  display: flex; gap: 16px;
  flex: 1; min-width: 0;
}
.industry-card-stat {
  display: flex; align-items: baseline; gap: 4px;
  font-size: 11px;
  color: var(--ink-3, #6b7470);
  white-space: nowrap;
}
.industry-card-stat-num {
  font-family: var(--font-mono, ui-monospace);
  font-size: 15px;
  font-weight: 500;
  color: var(--brand, #0e5e4d);
  line-height: 1;
}
.industry-card-stat-label {
  /* inline label — small and muted */
}
/* Empty-stats state: still show muted "暂无应用案例" so the card doesn't look broken */
.industry-card-stats-empty {
  font-size: 11px;
  color: var(--line-2, #d1d5db);
  font-style: italic;
}

.industry-card-cta-arrow {
  font-family: var(--font-mono, ui-monospace);
  font-size: 13px;
  color: var(--brand, #0e5e4d);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.industry-card:hover .industry-card-cta-arrow {
  transform: translateX(3px);
}

/* Detail page hero */
.section--ind-hero {
  padding: 56px 0 32px;
  background: var(--bg-soft, #fafaf6);
}
.industry-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}
@media (max-width: 720px) {
  .industry-hero { grid-template-columns: 1fr; gap: 24px; }
}

.industry-hero-text {
  max-width: 720px;
}
.industry-hero-num {
  margin-left: 8px;
  color: var(--ink-3, #6b7470);
}
.industry-hero-title {
  font-family: var(--font-display, serif);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 500;
  margin: 12px 0 0;
  color: var(--ink, #050f0c);
  line-height: 1.15;
}
.industry-hero-tagline {
  font-size: 18px;
  font-weight: 500;
  color: var(--brand, #0e5e4d);
  margin: 16px 0 0;
}
.industry-hero-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2, #475569);
  margin: 16px 0 0;
}
.industry-hero-stats {
  display: flex; gap: 32px;
  margin: 28px 0 0;
}
.industry-hero-stat {
  display: flex; flex-direction: column; align-items: flex-start;
}
.industry-hero-stat-num {
  font-family: var(--font-mono, ui-monospace);
  font-size: 32px;
  font-weight: 500;
  color: var(--brand, #0e5e4d);
  line-height: 1;
}
.industry-hero-stat-label {
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.industry-hero-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin: 28px 0 0;
}

.industry-hero-icon {
  width: 200px; height: 200px;
  color: var(--brand, #0e5e4d);
  opacity: 0.4;
}
.industry-hero-icon svg { width: 100%; height: 100%; }

.section--ind-body { padding: 48px 0; }
.industry-body { max-width: 760px; }

.section--ind-products,
.section--ind-apps {
  padding: 48px 0;
  background: var(--bg-soft, #fafaf6);
}
.section--ind-apps { background: var(--bg, #ffffff); }

.section--ind-related {
  padding: 32px 0 64px;
}
.section-title-sm {
  font-size: 20px;
  margin-bottom: 20px;
}

.industry-pill-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.industry-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg, #ffffff);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2, #475569);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.industry-pill:hover {
  border-color: var(--brand, #0e5e4d);
  color: var(--brand, #0e5e4d);
}

/* =========================================================================
   Generic page section header — eyebrow + title + lede.
   Used by /industries, /applications, /privacy and similar list pages.
   ------------------------------------------------------------------------- */

.section--head {
  padding: 24px 0 32px;
}
.section--head .eyebrow {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3, #6b7470);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section--head .section-title {
  font-family: var(--font-display, serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--ink, #050f0c);
  max-width: 880px;
}
.section--head .section-lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2, #475569);
  margin: 0;
  max-width: 720px;
}

/* =========================================================================
   Contact page — region picker & distributor card
   Operator can configure regional distributors that override the head-office
   contact info on /contact. Visitors pick their region; the page reloads
   with the matching distributor's phone/email/IM.
   ------------------------------------------------------------------------- */

.region-picker-card {
  background: #fafaf6;
  border: 1px dashed var(--line, #e8eae6);
}
.region-picker {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg, #ffffff);
  border: 1px solid var(--line, #e8eae6);
  border-radius: 8px;
  color: var(--ink, #050f0c);
  cursor: pointer;
  transition: border-color 0.15s;
}
.region-picker:hover,
.region-picker:focus {
  border-color: var(--brand, #0e5e4d);
  outline: none;
}
.region-picker-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3, #6b7470);
  font-style: italic;
}

/* Primary contact card — eyebrow + company name. Distributor and head-office
   render the same shape with different eyebrow text. */
.contact-info-primary {
  border-left: 3px solid var(--line, #e8eae6);
  padding-left: 12px;
}
.contact-info-primary.is-distributor {
  border-left-color: var(--brand, #0e5e4d);
}
.contact-info-eyebrow {
  font-family: var(--font-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3, #6b7470);
  margin-bottom: 4px;
}
.contact-info-name {
  font-family: var(--font-display, serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink, #050f0c);
  line-height: 1.3;
}

/* Secondary "or contact head office" card — softer styling */
.contact-info-secondary {
  background: #fafaf6;
  border: 1px dashed var(--line, #e8eae6);
}
.contact-info-secondary .contact-info-label {
  color: var(--ink-3, #6b7470);
  font-style: italic;
}

/* =========================================================================
   Rich-text prose styling for product / application / industry detail bodies
   Operators paste HTML (tables, lists, headings, images) into these body
   editors. Without explicit styles, browser defaults give borderless tables
   and tight spacing — looks like raw text. These rules make pasted content
   look at home in the page.
   ------------------------------------------------------------------------- */

.product-detail-body .prose table,
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
  /* Force the browser to render borders even on empty cells. By default
     some browsers paint nothing for a `<td></td>` with collapsed borders,
     leaving visual "holes" in the table — empty-cells: show fixes that. */
  empty-cells: show;
  /* Outer border removed by request — internal grid only. With
     border-collapse:collapse the visible outer line is actually drawn
     by the edge cells' outer-facing borders; the perimeter-cell rules
     below strip those. The table-element border is also dropped (it
     would otherwise add a second line that wins specificity over
     `border: none` on perimeter cells). */
  border: 0;
}
/* Strip the outer-facing edges of perimeter cells so the table has no
   enclosing box — only the inner cell-dividing lines remain. Specificity
   (3 classes/pseudos + 2 elements) beats the cell-border rule below
   (2 classes + 1 element), so explicit !important isn't required. */
.product-detail-body .prose table tr:first-child > *,
.article-body table tr:first-child > * {
  border-top: 0;
}
.product-detail-body .prose table tr:last-child > *,
.article-body table tr:last-child > * {
  border-bottom: 0;
}
.product-detail-body .prose table tr > *:first-child,
.article-body table tr > *:first-child {
  border-left: 0;
}
.product-detail-body .prose table tr > *:last-child,
.article-body table tr > *:last-child {
  border-right: 0;
}
.product-detail-body .prose th,
.product-detail-body .prose td,
.article-body th,
.article-body td {
  border: 1px solid var(--line, #e8eae6);
  padding: 12px 14px;
  text-align: center;        /* horizontally centered — reads cleaner for spec tables */
  vertical-align: middle;
  line-height: 1.55;
  /* Default white background — makes the cell visually present even when
     it contains nothing. Without this, an empty cell collapses to the
     page background color and reads as "broken table". */
  background: var(--bg, #ffffff);
}
.product-detail-body .prose th,
.article-body th {
  background: var(--bg-soft, #fafaf6);
  font-weight: 500;
  color: var(--ink, #050f0c);
}
.product-detail-body .prose tr:nth-child(even) td,
.article-body tr:nth-child(even) td {
  /* Subtle zebra striping — long compatibility tables are easier to scan */
  background: rgba(0, 0, 0, 0.012);
}

/* Lists, paragraphs, and headings within rich-text bodies */
.product-detail-body .prose p,
.article-body p {
  margin: 0 0 1em;
  line-height: 1.7;
  color: var(--ink-2, #475569);
}
/* But inside table cells, kill the bottom margin — otherwise <p> takes up
   the full td height plus 1em padding, which pushes the visual content
   off-center even when text-align/vertical-align say "center". */
.product-detail-body .prose td p,
.product-detail-body .prose th p,
.product-detail-body .prose td ul,
.product-detail-body .prose td ol,
.product-detail-body .prose td h1,
.product-detail-body .prose td h2,
.product-detail-body .prose td h3,
.article-body td p,
.article-body th p,
.article-body td ul,
.article-body td ol,
.article-body td h1,
.article-body td h2,
.article-body td h3 {
  margin: 0;
}
/* Last child inside a cell — even after the rule above, browsers may
   reapply margin-bottom from inherited rules on first/last children.
   This is the belt-and-suspenders fix. */
.product-detail-body .prose td > *:last-child,
.product-detail-body .prose th > *:last-child,
.article-body td > *:last-child,
.article-body th > *:last-child {
  margin-bottom: 0;
}
.product-detail-body .prose td > *:first-child,
.product-detail-body .prose th > *:first-child,
.article-body td > *:first-child,
.article-body th > *:first-child {
  margin-top: 0;
}
.product-detail-body .prose ul,
.product-detail-body .prose ol,
.article-body ul,
.article-body ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
  line-height: 1.7;
  color: var(--ink-2, #475569);
}
.product-detail-body .prose li,
.article-body li {
  margin: 0.25em 0;
}
.product-detail-body .prose h2,
.article-body h2 {
  font-family: var(--font-display, serif);
  font-size: 22px;
  font-weight: 500;
  margin: 1.8em 0 0.6em;
  color: var(--ink, #050f0c);
}
.product-detail-body .prose h3,
.article-body h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 1.4em 0 0.5em;
  color: var(--ink, #050f0c);
}
.product-detail-body .prose img,
.article-body img {
  max-width: 100%;
  height: auto;
  margin: 1em 0;
  border-radius: 6px;
}
.product-detail-body .prose blockquote,
.article-body blockquote {
  margin: 1em 0;
  padding: 8px 16px;
  border-left: 3px solid var(--brand, #0e5e4d);
  background: var(--bg-soft, #fafaf6);
  color: var(--ink-2, #475569);
}
.product-detail-body .prose code,
.article-body code {
  background: var(--bg-soft, #fafaf6);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}

/* Mobile: tables become horizontally scrollable so wide compatibility
   matrices don't break the page layout. Wrap the table in any block-level
   parent and it scales correctly. */
@media (max-width: 720px) {
  .product-detail-body .prose,
  .article-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .product-detail-body .prose table,
  .article-body table {
    font-size: 13px;
  }
  .product-detail-body .prose th,
  .product-detail-body .prose td,
  .article-body th,
  .article-body td {
    padding: 8px 10px;
  }
}

/* ============ /ai-ready PAGE ============
   Public-facing summary of the site's AI/agent integrations. Visual style
   matches the rest of the site (Pisonics green accent on cream background),
   but the page leans more "developer landing page" — feature grid + code
   blocks — than the typical product/news layout. */

.ai-ready {
  background: var(--bg, #faf9f5);
}

.ai-ready-hero {
  padding: 64px 0 32px;
  background: linear-gradient(180deg, #f3f6f0 0%, var(--bg, #faf9f5) 100%);
  border-bottom: 1px solid #e5e7eb;
}
.ai-ready-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand, #0e5e4d);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.ai-ready-title {
  font-size: 36px;
  line-height: 1.2;
  color: #0f172a;
  margin: 0 0 12px;
  font-weight: 700;
}
.ai-ready-lead {
  font-size: 17px;
  line-height: 1.7;
  color: #475569;
  max-width: 760px;
  margin: 0;
}

.ai-ready-section {
  padding: 48px 0;
}
.ai-ready-section-title {
  font-size: 24px;
  color: #0f172a;
  margin: 0 0 24px;
  font-weight: 700;
}

.ai-ready-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.ai-ready-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ai-ready-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.ai-ready-card-feature {
  /* MCP card stands out — it's the differentiator */
  border-color: var(--brand, #0e5e4d);
  background: linear-gradient(180deg, #fff 0%, #f3f6f0 100%);
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .ai-ready-card-feature {
    /* On wider screens MCP card spans 2 columns to feel premium */
    grid-column: span 2;
  }
}
.ai-ready-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.ai-ready-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: #0f172a;
  font-weight: 700;
}
.ai-ready-card p {
  font-size: 14px;
  line-height: 1.65;
  color: #475569;
  margin: 0 0 14px;
}
.ai-ready-card code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #0f172a;
}
.ai-ready-card-link {
  display: inline-block;
  font-size: 13.5px;
  color: var(--brand, #0e5e4d);
  font-weight: 600;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ai-ready-card-link:hover { text-decoration: underline; }

.ai-ready-tools {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}
.ai-ready-tools li {
  font-size: 13.5px;
  color: #475569;
  padding: 6px 0;
  line-height: 1.5;
}
.ai-ready-tools code {
  margin-right: 6px;
}

.ai-ready-quickstart {
  background: #0f172a;
  color: #cbd5e1;
}
.ai-ready-quickstart .ai-ready-section-title {
  color: #fff;
}
.ai-ready-quickstart h3 {
  color: #fff;
  font-size: 16px;
  margin: 28px 0 10px;
  font-weight: 600;
}
.ai-ready-quickstart > .container > p {
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 760px;
}
.ai-ready-quickstart code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}
.ai-ready-quickstart a {
  color: #4ade80;
  text-decoration: underline;
}
.ai-ready-code {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 8px 0 4px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #e2e8f0;
}
.ai-ready-code code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.ai-ready-note {
  margin-top: 20px;
  font-size: 14px;
  color: #94a3b8;
  font-style: italic;
}

.ai-ready-policy {
  background: #f3f6f0;
  border-top: 1px solid #e5e7eb;
}
.ai-ready-policy p {
  font-size: 16px;
  line-height: 1.7;
  color: #334155;
  max-width: 760px;
  margin: 0 0 12px;
}
.ai-ready-policy a {
  color: var(--brand, #0e5e4d);
  text-decoration: underline;
}

/* ---- Footer "AI Ready" badge ---- */
.footer-ai-ready-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 94, 77, 0.12);
  color: var(--brand, #0e5e4d) !important;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none !important;
}
.footer-ai-ready-link:hover {
  background: rgba(14, 94, 77, 0.2);
}

/* Mobile */
@media (max-width: 767px) {
  .ai-ready-title { font-size: 28px; }
  .ai-ready-lead { font-size: 15px; }
  .ai-ready-section { padding: 32px 0; }
  .ai-ready-section-title { font-size: 20px; }
  .ai-ready-card { padding: 20px; }
  .ai-ready-code { font-size: 12px; padding: 12px 14px; }
}

/* ---- AI Ready: Chinese ecosystem section ---- */
.ai-ready-china {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.ai-ready-china-intro {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  max-width: 760px;
  margin: 0 0 24px;
}
.ai-ready-vendors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.ai-ready-vendor {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: #f3f6f0;
  border: 1px solid #d6e4d8;
  border-radius: 8px;
  transition: transform 0.15s, border-color 0.15s;
}
.ai-ready-vendor:hover {
  transform: translateY(-1px);
  border-color: var(--brand, #0e5e4d);
}
.ai-ready-vendor strong {
  color: #0f172a;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
}
.ai-ready-vendor span {
  color: #6b7470;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ai-ready-china-note {
  font-size: 13.5px;
  color: #6b7470;
  line-height: 1.65;
  margin: 16px 0 0;
}
.ai-ready-china-note a {
  color: var(--brand, #0e5e4d);
  text-decoration: underline;
}

@media (max-width: 767px) {
  .ai-ready-vendors {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
  }
  .ai-ready-vendor {
    padding: 10px 12px;
  }
}

/* ============ /ai-ready LIVE DEMO ============ */
.ai-ready-demo {
  background: linear-gradient(180deg, #fff 0%, #f3f6f0 100%);
  border-top: 1px solid #e5e7eb;
}
.ai-ready-demo > .container > p {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  max-width: 760px;
  margin: 0 0 20px;
}

.ai-ready-demo-box {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.ai-ready-demo-input {
  width: 100%;
  border: none;
  outline: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  padding: 8px 4px;
  background: transparent;
  color: #0f172a;
}
.ai-ready-demo-input:disabled { color: #6b7470; cursor: wait; }
.ai-ready-demo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.ai-ready-demo-hint {
  font-size: 12.5px;
  color: #6b7470;
}
.ai-ready-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--brand, #0e5e4d);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.ai-ready-demo-btn:hover:not(:disabled) { background: #0a4a3c; }
.ai-ready-demo-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ai-ready-demo-btn .spinner {
  display: none;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-ready-spin 0.7s linear infinite;
}
.ai-ready-demo-btn.loading .label   { display: none; }
.ai-ready-demo-btn.loading .spinner { display: inline-block; }
@keyframes ai-ready-spin { to { transform: rotate(360deg); } }

.ai-ready-demo-status {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
}
.ai-ready-demo-status.info  { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.ai-ready-demo-status.warn  { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.ai-ready-demo-status.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.ai-ready-demo-result {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
}
.ai-ready-demo-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.ai-ready-demo-meta:nth-child(2) { border-bottom: 1px solid #e5e7eb; }
.ai-ready-demo-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 0 0 auto;
}
.ai-ready-demo-meta code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: #0f172a;
}
.ai-ready-demo-output {
  padding: 16px 20px 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #334155;
}
.ai-ready-demo-output h3 { font-size: 18px; color: #0f172a; margin: 4px 0 12px; font-weight: 700; }
.ai-ready-demo-output h4 { font-size: 15.5px; color: #0f172a; margin: 18px 0 8px; font-weight: 700; }
.ai-ready-demo-output h5 { font-size: 14px; color: #475569; margin: 14px 0 6px; font-weight: 700; }
.ai-ready-demo-output p  { margin: 6px 0; }
.ai-ready-demo-output ul { margin: 6px 0 10px; padding-left: 22px; }
.ai-ready-demo-output li { margin: 3px 0; }
.ai-ready-demo-output code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12.5px;
}
.ai-ready-demo-output a {
  color: var(--brand, #0e5e4d);
  text-decoration: underline;
}

/* ============ Home hero — tiny "AI Ready" badge ============
   Sits next to the eyebrow. Deliberately small (12.5px) so it whispers
   instead of competing with the H1 hero headline. */
.hero-ai-ready {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffe28a !important;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none !important;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  vertical-align: baseline;
}
.hero-ai-ready:hover {
  background: rgba(255, 226, 138, 0.2);
  color: #fff !important;
}

/* Mobile */
@media (max-width: 767px) {
  .ai-ready-demo-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-ready-demo-btn { justify-content: center; }
  .hero-ai-ready { display: none; }   /* hide on mobile to keep hero clean */
}

/* ============ PRODUCT DETAIL — 3-column layout ============
   Left  : auto-generated TOC (built by product-toc.js)
   Center: prose article (the operator's body HTML)
   Right : sticky quick-reference card (from Product model fields)

   On screens narrower than 1024px the layout collapses to a single
   column, the TOC is hidden, and the info card moves above the
   article so the visitor sees CTAs before scrolling through long
   technical content. */
.product-detail-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 240px;
  column-gap: 32px;
  align-items: start;
}

/* When product-toc.js can't find any H2/H3/H4 in the article (e.g. the
   operator pasted from Word and ended up with <p><strong>…</strong></p>
   instead of real headings), the script hides the TOC aside AND adds
   .product-detail-layout--no-toc so the grid collapses to two columns.
   Without this, CSS Grid's auto-placement would slide the article into
   the now-empty 180px first column and crush its line length. */
.product-detail-layout--no-toc {
  grid-template-columns: minmax(0, 1fr) 240px;
}

@media (max-width: 1199px) {
  .product-detail-layout,
  .product-detail-layout--no-toc {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
  }
  .product-detail-toc { display: none; }
  /* The sidebar sticky behaviour is scoped to the (min-width: 1200px)
     media query down by the .product-detail-sidebar rule itself, so we
     only need to flip the grid order here. */
  .product-detail-sidebar { order: -1; }
}

/* ---- Left: TOC ---- */
.product-detail-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.product-detail-toc-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 14px;
  padding-left: 12px;
}
.product-detail-toc-nav { padding: 0; }
.product-detail-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-detail-toc-list a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid #e5e7eb;
  font-size: 13.5px;
  line-height: 1.4;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.product-detail-toc-list a:hover {
  color: #050f0c;
  border-left-color: #94a3b8;
}
.product-detail-toc-list a.active {
  color: var(--brand, #0e5e4d);
  border-left-color: var(--brand, #0e5e4d);
  font-weight: 600;
}
.product-detail-toc-list a.toc-h3 {
  padding-left: 26px;
  font-size: 12.5px;
  color: #94a3b8;
}
.product-detail-toc-list a.toc-h3.active {
  color: var(--brand, #0e5e4d);
}

/* ---- Center: prose ---- */
.product-detail-content {
  min-width: 0; /* prevent grid blow-out from wide tables */
  /* Long words / URLs / no-break strings (common after EN translation —
     "Linear Frequency-Modulated (Chirp)…") break at character level if
     needed instead of pushing past the column edge into the sidebar.
     Combined with the text-align override below (justify → start), this
     no longer causes mid-word breaks on normal English text because the
     browser only invokes break-word when a word genuinely can't fit. */
  overflow-wrap: break-word;
  word-wrap: break-word;
}
/* Override BOTH variants of "make this paragraph justified":
     - inline style="text-align: justify" (Word/Excel paste)
     - inline style="text-align:justify"  (no space, some apps)
     - .ql-align-justify class (Quill toolbar's justify button)
   CJK has uniform char widths so justify looks fine in Chinese; English
   has variable-width words and justify creates "rivers" of whitespace
   plus forces aggressive mid-word breaks. The `i` flag matches the
   attribute value case-insensitively (handles TEXT-ALIGN: JUSTIFY too).
   !important is needed because inline `style="..."` beats every class
   selector and Quill's own .ql-align-justify rule lives at .prose level. */
.product-detail-content [style*="text-align: justify" i],
.product-detail-content [style*="text-align:justify" i],
.product-detail-content .ql-align-justify,
.product-detail-content .ql-align-justify * {
  text-align: start !important;
}
/* If the operator's body HTML has a wide table (e.g. a 12-column spec
   matrix), let it scroll horizontally inside the column instead of
   forcing the whole grid to widen. min-width:0 above is necessary but
   not sufficient — without overflow-x the table still pushes the
   layout. */
.product-detail-content > table,
.product-detail-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
/* Word/Excel-paste survival kit. The clipboard tends to drop inline
   `style="width: 800px"` onto block elements (<p>, <div>, <figure>,
   <table>, <img>). Cap them at the article column's actual width. We
   use !important to defeat the inline style attribute — that's the
   only thing CSS specificity rules can't beat by selector alone. */
.product-detail-content img,
.product-detail-content video,
.product-detail-content iframe,
.product-detail-content embed,
.product-detail-content figure,
.product-detail-content > div,
.product-detail-content > section,
.product-detail-content > article {
  max-width: 100% !important;
}
.product-detail-content img,
.product-detail-content video {
  height: auto; /* preserve aspect when width gets clamped */
}
.product-detail-content pre {
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: break-word;
}
/* Long unbreakable strings in <code>/<a> (file paths, URLs) — allow
   per-char breaks so they don't punch past the column edge. Targeted
   here, NOT on the article body, to avoid breaking normal words. */
.product-detail-content code,
.product-detail-content a[href] {
  word-break: break-word;
}

/* ---- Right: spec card ---- */
.product-detail-sidebar {
  align-self: start;
}
/* Sticky behaviour for the right-rail spec card — desktop only. On
   mobile the card moves above the article (order:-1 in the mobile
   layout block above) and spans full width; we MUST NOT pin it to the
   viewport there or it covers article body as the user scrolls.
   Scoped via min-width so the property simply doesn't apply at narrow
   widths — no need to fight the cascade with a reset rule. */
@media (min-width: 1200px) {
  .product-detail-sidebar {
    position: sticky;
    top: 100px;
  }
}
.product-spec-card {
  background: linear-gradient(180deg, #fafbfa 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 22px 22px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.product-spec-card-eyebrow {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand, #0e5e4d);
  letter-spacing: 0.04em;
}
.product-spec-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 6px 0 18px;
  line-height: 1.35;
  color: #050f0c;
}
.product-spec-list {
  margin-bottom: 18px;
}
.product-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
}
.product-spec-row:last-child { border-bottom: none; }
.product-spec-row-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.product-spec-label {
  font-size: 11.5px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
}
.product-spec-value {
  font-size: 13.5px;
  color: #050f0c;
  font-weight: 500;
  text-align: right;
}
.product-spec-row-stack .product-spec-value { text-align: left; }

.product-spec-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.product-spec-industry {
  font-size: 11.5px;
  background: #ecfdf5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.product-spec-industry:hover {
  background: #d1fae5;
  color: #064e3b;
}

.product-spec-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}
.product-spec-cta-primary {
  width: 100%;
  justify-content: center;
}
.product-spec-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  padding: 6px;
  transition: color 0.15s;
}
.product-spec-link:hover { color: var(--brand, #0e5e4d); }
