/* ==========================================================================
   Hengyou Refrigeration — design system
   Zero-build static site. Motion is transform/opacity only.
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */
:root {
  --accent: #0f5c8c;
  --accent-strong: #0a4568;
  --accent-soft: #e8f1f7;
  --accent-line: #b9d3e3;
  --ink: #101820;
  --ink-2: #33414e;
  --ink-3: #63707c;
  --line: #dde3e8;
  --line-soft: #eef2f5;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --surface-3: #eceff2;
  --warn: #9a5b00;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 32, .06), 0 1px 1px rgba(16, 24, 32, .04);
  --shadow-2: 0 6px 18px rgba(16, 24, 32, .10), 0 2px 4px rgba(16, 24, 32, .05);
  --shadow-3: 0 18px 48px rgba(16, 24, 32, .14);
  --ease-reveal: cubic-bezier(.16, 1, .3, 1);
  --ease-ui: cubic-bezier(.4, 0, .2, 1);
  --dur-micro: 220ms;
  --dur-reveal: 760ms;
  --maxw: 1240px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* --- reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.22; font-weight: 650; letter-spacing: -.008em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Bilingual pairing — one system, two renderings
   --------------------------------------------------------------------------
   Every visible string is a pair; both sides are always in the DOM:
       <span class="hy-pair">
         <span class="i18n-en">Shell-and-tube condenser</span>
         <span class="i18n-zh">壳管式冷凝器</span>
       </span>
   <html data-lang="en|zh" data-pair="off|on"> decides which side is seen:
     en   + off  ->  English only
     zh   + off  ->  Chinese only
     en   + on   ->  both, English leading, Chinese beneath it in a quieter token
   Nothing is ever glued into one sentence, and no pair is rendered at runtime.
   ========================================================================== */

/* single-language modes */
[data-pair="off"][data-lang="en"] .i18n-zh { display: none !important; }
[data-pair="off"][data-lang="zh"] .i18n-en { display: none !important; }

/* pair mode: English line, Chinese line under it, both visible */
[data-pair="on"] .hy-pair .i18n-en { display: block; }
[data-pair="on"] .hy-pair .i18n-zh {
  display: block;
  margin-top: .2em;
  font-size: .82em;
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
}
/* a pair that must stay on one line (table headers, footer meta, chips) */
[data-pair="on"] .hy-pair--inline { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1em .5em; }
[data-pair="on"] .hy-pair--inline .i18n-en,
[data-pair="on"] .hy-pair--inline .i18n-zh { display: inline; margin-top: 0; font-size: .92em; }
/* a pair wrapper carries no box of its own: the two sides are inline elements,
   so a pair inside a heading, a table cell or a footer list never breaks the
   line. Structural containers opt into a stacked pair (see the list below). */
.hy-pair { display: inline; }
[data-pair="on"] .hy-pair .i18n-en { display: block; }
/* block-level homes: a pair that owns its container stacks inside it */
[data-pair="on"] h1 > .hy-pair, [data-pair="on"] h2 > .hy-pair,
[data-pair="on"] h3 > .hy-pair, [data-pair="on"] h4 > .hy-pair,
[data-pair="on"] p > .hy-pair, [data-pair="on"] li > .hy-pair,
[data-pair="on"] dd > .hy-pair, [data-pair="on"] caption > .hy-pair,
[data-pair="on"] figcaption > .hy-pair, [data-pair="on"] summary > .hy-pair,
[data-pair="on"] .ap-tile-label > .hy-pair, [data-pair="on"] .ap-spec-k > .hy-pair,
[data-pair="on"] .ap-figure-label > .hy-pair { display: block; }

/* the cross-fade between modes: opacity only, content never gates on it */
.i18n-en, .i18n-zh { transition: opacity 180ms var(--ease-ui); }

/* Chinese typography: looser leading, lighter weight, no italics */
[data-lang="zh"] body,
body.zh { line-height: 1.78; }
[data-lang="zh"] .i18n-zh,
[data-pair="on"] .i18n-zh { font-weight: 400; font-style: normal; }
[data-lang="zh"] h1, [data-lang="zh"] h2, [data-lang="zh"] h3, [data-lang="zh"] h4,
[data-pair="on"] .i18n-zh { text-wrap: pretty; }

/* legacy helper kept neutral: quiet secondary line, no layout opinions */
.sub-zh { color: var(--ink-3); font-weight: 400; }
.t-zh { line-height: 1.78; font-weight: 350; }

/* --- skip link ---------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: .6rem 1rem;
}
.skip:focus { left: 0; }

/* --- first paint: the stored mode is applied before the first frame ------ */
html.js.hy-booting .i18n-en, html.js.hy-booting .i18n-zh { transition: none; }

/* --- language-only register shifts -------------------------------------- */
[data-lang="zh"] { --ink-3: #5c6a76; }          /* a touch more contrast for CJK */
[data-lang="zh"] .eyebrow,
[data-lang="zh"] .card-tag,
[data-lang="zh"] .variant-bar .vb-label { letter-spacing: .06em; }
[data-lang="zh"] .btn,
[data-lang="zh"] .chip { letter-spacing: 0; }
[data-pair="on"] .hero-sub .i18n-zh,
[data-pair="on"] .lede .i18n-zh { font-size: .84em; }
[data-pair="on"] h1 .i18n-zh { font-size: .5em; margin-top: .35em; line-height: 1.35; }
[data-pair="on"] h2 .i18n-zh { font-size: .58em; margin-top: .3em; line-height: 1.4; }
[data-pair="on"] h3 .i18n-zh { font-size: .72em; margin-top: .24em; line-height: 1.45; }
[data-pair="on"] .stat-value .i18n-zh { font-size: .5em; }

/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  min-height: 62px;
}
.site-header .wrap {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; min-height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 6px; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--accent) 0%, #06304a 100%);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .82rem; letter-spacing: .04em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-en { font-weight: 680; font-size: .96rem; letter-spacing: .01em; }
.brand-zh { font-size: .74rem; color: var(--ink-3); font-weight: 400; }
.brand-zh .i18n-en, .brand-zh .i18n-zh { display: inline; }
[data-pair="on"] .brand-zh { font-size: .7rem; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav a {
  position: relative; color: var(--ink-2); font-size: .92rem; padding: .42rem .62rem;
  border-radius: var(--radius); transition: color var(--dur-micro) var(--ease-ui), background-color var(--dur-micro) var(--ease-ui);
}
/* the two sides of a nav label sit on one line, the Chinese quieter and smaller */
.nav a .hy-pair { display: inline; }
[data-pair="on"] .nav a .hy-pair { line-height: 1.15; }
[data-pair="on"] .nav a .hy-pair .i18n-zh {
  margin-top: 0; font-size: .78em; line-height: 1.2; color: var(--ink-3);
}
[data-pair="on"] .nav a { text-align: center; }
[data-pair="on"] .brand-zh .i18n-zh, .brand-zh .i18n-en { display: inline; }
[data-pair="on"] .brand-zh .i18n-zh { margin-left: .4em; }
.nav a:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 620; }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .62rem; right: .62rem; bottom: .1rem;
  height: 2px; background: var(--accent); border-radius: 2px;
}
/* --- language control: EN | 中文 | EN+中 -------------------------------- */
.lang-toggle {
  display: inline-flex; align-items: stretch; border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-left: 10px;
}
.lang-toggle button {
  border: 0; background: transparent; padding: .32rem .66rem; cursor: pointer;
  font-size: .8rem; line-height: 1.3; color: var(--ink-3); white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-ui), color var(--dur-micro) var(--ease-ui);
}
.lang-toggle button + button { border-left: 1px solid var(--line); }
.lang-toggle button:hover { color: var(--accent); }
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.lang-toggle__pair { letter-spacing: .01em; }
.nav-toggle { display: none; }

/* --- layout helpers ----------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(2.6rem, 1.6rem + 3.4vw, 5rem) 0; }
.section--tight { padding: clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem) 0; }
.section--alt { background: var(--surface-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { max-width: 760px; margin-bottom: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); }
.eyebrow {
  display: inline-block; font-size: .76rem; font-weight: 650; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .55rem;
}
.lede { font-size: 1.06rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .68rem 1.15rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-weight: 600; font-size: .94rem; cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-ui), box-shadow var(--dur-micro) var(--ease-ui), background-color var(--dur-micro) var(--ease-ui);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; background: var(--accent-strong); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--quiet { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn--quiet:hover { border-color: var(--accent-line); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; }
/* a label inside a filled button follows the button, not the link colour */
a.btn { color: #fff; }
a.btn .i18n-en, a.btn .i18n-zh { color: inherit; }
a.btn.btn--ghost, a.btn.btn--quiet { color: var(--accent); }
a.btn.btn--quiet { color: var(--ink-2); }
/* in pair mode a button label stacks, so the two sides never fight for width */
[data-pair="on"] .btn > .hy-pair--inline { flex-direction: column; align-items: center; gap: 0; }
[data-pair="on"] .btn .i18n-zh { font-size: .84em; line-height: 1.35; }

/* --- hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f7fafc 0%, #ffffff 68%); border-bottom: 1px solid var(--line-soft); }
.hero .wrap { padding-top: clamp(2.4rem, 1.6rem + 3vw, 4.6rem); padding-bottom: clamp(2rem, 1.4rem + 2.4vw, 3.6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem, 1rem + 3vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .5rem; }
.hero-sub { font-size: 1.08rem; color: var(--ink-2); max-width: 46ch; }
.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow-2);
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem; margin-top: 1.8rem; }
.stat-value { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-unit { font-size: .82em; font-weight: 600; color: var(--accent); margin-left: .14em; }
.stat-label { font-size: .84rem; color: var(--ink-3); }

/* --- cards / grids ------------------------------------------------------ */
.grid { display: grid; gap: clamp(1rem, .7rem + .9vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem; box-shadow: var(--shadow-1);
  transition: transform var(--dur-micro) var(--ease-ui), box-shadow var(--dur-micro) var(--ease-ui), border-color var(--dur-micro) var(--ease-ui);
}
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent-line); }
.card h3 { margin-bottom: .35rem; }
.card p:last-child { margin-bottom: 0; }
.card-tag {
  display: inline-block; font-size: .72rem; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: .18rem .5rem; border-radius: 999px; margin-bottom: .6rem;
}
.card-media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-bottom: .9rem; }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; padding: .5rem; }
.product-card { display: flex; flex-direction: column; }
.product-card .meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .84rem; color: var(--ink-3); margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line-soft); }
.product-card .meta b { color: var(--ink-2); font-weight: 600; }

/* --- product page hero -------------------------------------------------- */
.phero { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.phero .wrap { padding: clamp(1.6rem, 1.2rem + 2vw, 2.8rem) 20px; }
.phero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.4rem, 1rem + 2.4vw, 3rem); align-items: center; }
.phero h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin-bottom: .3rem; }
.phero-sub { color: var(--ink-2); max-width: 52ch; }
.phero-media { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .6rem; box-shadow: var(--shadow-1); }
.phero-media img { width: 100%; height: auto; object-fit: contain; }
.crumbs { font-size: .84rem; color: var(--ink-3); margin-bottom: .7rem; }
.crumbs a { color: var(--ink-3); }
.crumbs span { margin: 0 .35rem; }

/* --- chip row ----------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  font-size: .84rem; padding: .3rem .68rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.chip b { font-weight: 620; color: var(--ink); }
.chip--on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-strong); }
.chip--btn { cursor: pointer; transition: background-color var(--dur-micro) var(--ease-ui), border-color var(--dur-micro) var(--ease-ui), color var(--dur-micro) var(--ease-ui); }
.chip--btn:hover { border-color: var(--accent-line); color: var(--accent); }
.chip--btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- spec table --------------------------------------------------------- */
.table-shell {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden; box-shadow: var(--shadow-1);
  max-width: 100%; min-width: 0;
}
.table-scroll { overflow: auto; max-height: min(72vh, 760px); -webkit-overflow-scrolling: touch; }
table.spec {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: .875rem; font-variant-numeric: tabular-nums;
}
table.spec caption { text-align: left; padding: .9rem 1rem; font-weight: 620; color: var(--ink-2); font-size: .92rem; }
table.spec thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--accent); color: #fff; font-weight: 600; text-align: center;
  padding: .5rem .6rem; white-space: nowrap; border-right: 1px solid rgba(255, 255, 255, .18);
  font-size: .8rem; letter-spacing: .01em;
}
table.spec thead tr:first-child th { top: 0; }
table.spec thead th:last-child { border-right: 0; }
table.spec tbody td {
  padding: .42rem .6rem; border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft); text-align: center; white-space: nowrap;
}
table.spec tbody td:first-child { text-align: left; font-weight: 620; font-variant-numeric: normal; }
table.spec tbody tr:nth-child(even) { background: #fafcfd; }
table.spec tbody tr:hover { background: var(--accent-soft); }
table.spec tbody tr.is-active { background: #dcebf5; box-shadow: inset 3px 0 0 var(--accent); }
table.spec tbody tr { cursor: default; }
table.spec tbody tr[data-row] { cursor: pointer; }
table.spec td.num { font-variant-numeric: tabular-nums; }
table.spec .col-group { border-left: 2px solid var(--accent-line); }
.table-note { padding: .8rem 1rem; font-size: .82rem; color: var(--ink-3); background: var(--surface-2); border-top: 1px solid var(--line-soft); }
.table-note p { margin: 0 0 .4rem; }
.table-note p:last-child { margin-bottom: 0; }

/* --- variant switcher --------------------------------------------------- */
.variant-bar {
  position: sticky; top: 62px; z-index: 90;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.variant-bar .wrap { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding-top: .55rem; padding-bottom: .55rem; }
.variant-bar .vb-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.variant-tabs { display: flex; gap: .35rem; flex-wrap: wrap; min-width: 0; }
.variant-tabs a {
  font-size: .88rem; padding: .34rem .78rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--surface);
  transition: background-color var(--dur-micro) var(--ease-ui), border-color var(--dur-micro) var(--ease-ui), color var(--dur-micro) var(--ease-ui), transform var(--dur-micro) var(--ease-ui);
}
.variant-tabs a:hover { transform: translateY(-2px); border-color: var(--accent-line); color: var(--accent); text-decoration: none; }
.variant-tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* --- spec digest (variant B) ------------------------------------------- */
.digest { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.digest-cell { background: var(--surface); padding: .85rem 1rem; }
.digest-cell dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: .25rem; }
.digest-cell dd { margin: 0; font-size: 1.06rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.digest-cell dd small { font-size: .74em; font-weight: 600; color: var(--accent); margin-left: .12em; }

/* --- diagram frame ------------------------------------------------------ */
.figure { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-1); }
.figure img { width: 100%; background: #fff; }
.figure figcaption { padding: .7rem .95rem; font-size: .84rem; color: var(--ink-3); border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.figure--pad img { padding: .8rem; }

/* --- photograph gallery ------------------------------------------------- */
/* Factory and product photographs arrive in mixed aspect ratios; a fixed frame
   with object-fit keeps the grid even without cropping anything away from the
   middle of the subject. */
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.photo-grid--units img { aspect-ratio: 1 / 1; object-fit: contain; padding: .6rem; }
.photo-grid .figure--wide { grid-column: span 2; }
.photo-grid .figure--wide img { aspect-ratio: 2 / 1; }
.photo-grid .figure--tall img { aspect-ratio: 3 / 4; }
@media (max-width: 720px) {
  .photo-grid .figure--wide { grid-column: span 1; }
  .photo-grid .figure--wide img { aspect-ratio: 4 / 3; }
}

/* --- steps / process ---------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 1.5rem 3.2rem; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: .1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.steps li::after { content: ""; position: absolute; left: 1.04rem; top: 2.4rem; bottom: .2rem; width: 1px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .2rem; }
.steps p { color: var(--ink-2); margin-bottom: 0; }

/* --- accordion / faq ---------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: .95rem .2rem; font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: .7rem;
  transition: color var(--dur-micro) var(--ease-ui);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--accent); }
.faq .faq-body { padding: 0 .2rem 1.1rem; color: var(--ink-2); }

/* --- notice ------------------------------------------------------------- */
.notice {
  border: 1px solid var(--accent-line); border-left-width: 3px; background: var(--accent-soft);
  border-radius: var(--radius); padding: .9rem 1.05rem; font-size: .9rem; color: var(--accent-strong);
}
.notice--todo { border-color: #e8d3a8; border-left-color: var(--warn); background: #fdf7ea; color: #6b4700; }
.notice ul { margin: .4rem 0 0; }

/* --- forms -------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: var(--radius); padding: .58rem .7rem;
  background: var(--surface); transition: border-color var(--dur-micro) var(--ease-ui), box-shadow var(--dur-micro) var(--ease-ui);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.field textarea { min-height: 118px; resize: vertical; }

/* --- footer ------------------------------------------------------------- */
.site-footer { background: #0d1a24; color: #c6d2dc; margin-top: 0; padding: clamp(2rem, 1.4rem + 2.4vw, 3.4rem) 0 1.4rem; }
.site-footer a { color: #c6d2dc; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(1.2rem, .8rem + 1.6vw, 2.6rem); }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.site-footer li { margin-bottom: .4rem; }
.footer-blurb { font-size: .9rem; max-width: 34ch; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: .9rem; }
.footer-brand .brand-mark { background: linear-gradient(150deg, #2b8cc4 0%, #0f5c8c 100%); }
.footer-brand .brand-en { color: #fff; }
.footer-brand .brand-zh { color: #8ba0b0; }
/* footer lists stay one language per line: the sitemap is dense by design */
[data-pair="on"] .site-footer li .i18n-zh,
[data-pair="on"] .site-footer h4 .i18n-zh { display: inline; margin-left: .45em; font-size: .92em; color: #8ba0b0; }
[data-pair="on"] .footer-bottom { gap: .35rem 1.4rem; }
[data-pair="on"] .footer-bottom .i18n-zh { display: block; font-size: .95em; color: #7d92a3; }
.footer-bottom { margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8rem; color: #8ba0b0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.footer-legal { font-size: .78rem; color: #7d92a3; margin-top: .5rem; }
.footer-legal .i18n-zh { margin-top: .3em; }

[data-pair="on"] .site-footer .i18n-zh { color: #8ba0b0; }

/* --- reveal / motion ---------------------------------------------------- */
/* Content is visible by default; motion only engages once JS has confirmed it
   can also undo it (html.js is set by an inline script in <head>). */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-reveal), transform var(--dur-reveal) var(--ease-reveal);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes hy-fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hy-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
html.js .hero-seq > * { animation: hy-fade-up 700ms var(--ease-reveal) both; }
.hero-seq > *:nth-child(1) { animation-delay: 60ms; }
.hero-seq > *:nth-child(2) { animation-delay: 150ms; }
.hero-seq > *:nth-child(3) { animation-delay: 240ms; }
.hero-seq > *:nth-child(4) { animation-delay: 330ms; }
.hero-seq > *:nth-child(5) { animation-delay: 420ms; }

/* scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--accent); z-index: 120; pointer-events: none;
}

/* capacity bar chart (variant C) */
.bars { display: grid; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: .7rem; font-size: .84rem; }
.bar-track { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #2b8cc4, var(--accent)); border-radius: 999px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 900ms var(--ease-reveal); }
.is-in .bar-fill, .bar-row.is-in .bar-fill { transform: scaleX(var(--v, 1)); }
.bar-val { font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 1040px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-grid, .phero-grid { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; gap: .4rem;
    border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
    padding: .34rem .6rem; font-size: .85rem; cursor: pointer;
  }
  .nav { display: none; width: 100%; margin-left: 0; }
  .site-header.nav-open .nav { display: flex; flex-wrap: wrap; padding-bottom: .6rem; }
  .site-header .wrap { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 16px; }
  .variant-bar .wrap { gap: .5rem; }
  .variant-bar .vb-label { display: none; }
  .variant-tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px; max-width: 100%;
  }
  .variant-tabs a { white-space: nowrap; }
  .variant-bar .btn { margin-left: 0 !important; }
  .phero h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
  .stat-value { font-size: 1.4rem; }
  .hero-stats { gap: 1rem 1.6rem; }
  table.spec { font-size: .78rem; }
  figure.figure img, .phero-media img, .card-media img { max-width: 100%; height: auto; }
  .bars .bar-row { grid-template-columns: 68px 1fr auto; }
  /* auto-fit grids must collapse to one column, not force a min track width */
  .digest { grid-template-columns: 1fr !important; }
  .field input, .field select, .field textarea { max-width: 100%; }
  .chips, .btn-row { max-width: 100%; }
  .bar-track { min-width: 0; }
  .grid, .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .card, .notice, .figure, .table-shell { max-width: 100%; min-width: 0; }
  .steps li { padding-left: 2.7rem; }
  .wrap, .wrap-narrow { max-width: 100%; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .variant-bar { top: 0; }
  .table-scroll { max-height: 62vh; }
  table.spec { font-size: .8rem; }
  table.spec thead th, table.spec tbody td { padding: .38rem .45rem; }
  .bar-row { grid-template-columns: 74px 1fr auto; }
}

/* --- print -------------------------------------------------------------- */
@media print {
  .site-header, .variant-bar, .site-footer, .scroll-progress, .btn-row { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .table-scroll { max-height: none; overflow: visible; }
}

/* --- reduced motion ----------------------------------------------------- */
/* elements with nowrap or intrinsic min-content wider than a phone screen */
.crumbs, .chips, .chip, .card-tag, .eyebrow, .stat-label, .phero-sub, .hero-sub,
.digest-cell dt, .digest-cell dd, .table-note, .notice, .figure figcaption,
.steps h3, .steps p, .faq summary, .field label, .footer-legal {
  overflow-wrap: anywhere;
  word-break: normal;
  min-width: 0;
}
.crumbs { white-space: normal; }
@media (max-width: 720px) {
  .crumbs { display: block; }
  .crumbs > * { display: inline; }
  .field input, .field select { width: 100%; }
  .digest-cell dd { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  /* the bars are a decorative scale only: with motion off they are simply full */
  .bar-row .bar-fill { transform: scaleX(1) !important; }
  .btn:hover, .card--link:hover, .variant-tabs a:hover { transform: none; }
  .scroll-progress { display: none; }
}

/* --- footer pairing (last word: stacked rows beat the inline default) --- */
/* footer rows: one language per line in pair mode, never two glued labels */
[data-pair="on"] .site-footer li > .hy-pair,
[data-pair="on"] .footer-legal > .hy-pair { display: block; }
[data-pair="on"] .site-footer h4 > .i18n-en { display: block; }
[data-pair="on"] .site-footer h4 > .i18n-zh { display: block; font-size: .92em; margin-top: .1em; color: #8ba0b0; letter-spacing: .04em; }
[data-pair="on"] .brand-zh { line-height: 1.25; }


/* hy-mobile-form-fix — 手机端表单排版修正
   ------------------------------------------------------------------
   问题：同意条款在窄屏被挤成一列竖排的单个汉字。
   原因：flex 子项默认 min-width:auto，窄屏下文本容器宽度被算到极窄，
        中文逐字换行、英文逐词换行。
   修法：文本容器 min-width:0 + flex:1 1 auto；勾选框 flex:0 0 auto。
   同时给输入控件加 max-width/box-sizing，防止窄屏横向溢出。
   ------------------------------------------------------------------ */
.form-grid label span,
.field label span { min-width: 0; }

/* 同意条款那一行（label 内直接放 input + span 的 flex 布局） */
.field--full label[style*="display:flex"] { align-items: flex-start; }
.field--full label[style*="display:flex"] > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.5;
}
.field--full label[style*="display:flex"] > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .2rem;
}

/* 输入控件不要溢出窄屏 */
.form-grid input,
.form-grid select,
.form-grid textarea { max-width: 100%; box-sizing: border-box; }
.form-grid textarea { min-height: 7rem; }

/* 手机端表单与按钮排布 */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; justify-content: center; }
  /* 网页邮箱按钮：三个横排会挤，改成竖排全宽 */
  .btn-row .btn--ghost { width: 100%; }
}

/* hy-brand — 品牌标识：用厂家提供的商标图片替代原来的 "HY" 色块。
   原来 .brand-mark 是 34x34 的蓝色渐变方块 + 白色 "HY" 文字；
   商标本身是横向的（法兰圈 + 地球 + 蓝带），所以改为按高度自适应宽度。 */
.brand-mark {
  background: none !important;
  width: auto !important;
  height: 40px !important;
  border-radius: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.brand-mark img { height: 100%; width: auto; display: block; }
.footer-brand .brand-mark { height: 44px !important; }
.brand-zh { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
