/* cadtomesh long-tail converter pages.
   Same selectors and layout as the standalone template, retokenised to the
   brand system used by / and /convert (mint surfaces, teal ink, IBM Plex Sans). */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-500.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/jetbrains-mono-600.woff2") format("woff2"); }

:root {
  /* brand palette, mirroring tokens.css so the two trees stay legible together */
  --bg: #f0fdfa;
  --pn: #ffffff;
  --pn2: #f8fafc;
  --ln: #d7efe9;
  --ln2: #99f6e4;
  --tx: #134e4a;
  --dim: #475569;
  --cy: #0d9488;
  --cy2: #0f766e;
  --am: #ea580c;   /* must equal tokens.css --orange: the logo facet ink */
  --disp: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --ink: #134e4a;
  --ink-strong: #042f2e;
  --muted: #64748b;
  --line: var(--ln);
  --panel: var(--pn);
  --accent: var(--cy);
  --accent-ink: var(--cy2);
  --on: #ffffff;
  --on-dim: #e6faf5;
  --on-muted: #ccfbf1;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(19, 78, 74, .06), 0 1px 3px rgba(19, 78, 74, .08);
  --shadow: 0 4px 12px rgba(19, 78, 74, .08), 0 2px 4px rgba(19, 78, 74, .05);
  --shadow-lg: 0 12px 32px rgba(19, 78, 74, .12), 0 4px 8px rgba(19, 78, 74, .06);
  --shadow-xl: 0 24px 60px rgba(19, 78, 74, .14), 0 8px 20px rgba(19, 78, 74, .08);
  --glow-a: #99f6e4;
  --glow-b: #bfdbfe;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body {
  margin: 0; background: var(--bg); color: var(--tx);
  font: 16px/1.7 var(--disp);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cy2); text-decoration: none }
a:hover { color: var(--cy); text-decoration: underline }
:focus-visible { outline: 2px solid var(--cy); outline-offset: 3px; border-radius: 4px }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto }

.lab, footer h3 {
  font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}

/* header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(240, 253, 250, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ln);
}
.top .wrap { display: flex; align-items: center; gap: 26px; min-height: 66px }
.brand {
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none; color: var(--ink-strong);
}
.brand:hover { color: var(--ink-strong); text-decoration: none }
.mk { flex: none; display: block; width: 24px; height: 24px; color: var(--cy2) }
.mk svg { display: block; width: 100%; height: 100% }
.wordmark {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-size: 18px; line-height: 1; letter-spacing: -.026em; white-space: nowrap;
}
.wordmark .wm-cad, .wordmark .wm-mesh { font-weight: 700 }
.wordmark .wm-cad { color: var(--ink-strong); position: relative; top: -.018em }
.wordmark .wm-mesh { color: var(--cy) }
.wordmark .wm-to { font-weight: 400; font-size: .9em; color: var(--dim) }
.brand:hover .wm-cad { color: var(--cy2) }

.nav { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; color: var(--dim) }
.nav a {
  display: inline-flex; align-items: center; min-height: 40px;
  text-decoration: none; color: var(--dim); border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a:focus-visible { color: var(--cy2); text-decoration: none }
.nav a.cta {
  margin-left: 4px; padding: 0 14px; border-radius: 10px; min-height: 40px;
  background: var(--cy); color: var(--on); font-weight: 600;
  box-shadow: 0 4px 14px rgba(13, 148, 136, .24);
}
.nav a.cta:hover { background: var(--cy2); color: #fff }
.live { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); color: var(--muted) }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cy); animation: pulse 2.4s ease-in-out infinite }
@keyframes pulse { 50% { opacity: .35 } }

/* hero */
.hero { position: relative; padding: 72px 0 76px; overflow: hidden }
.hero::before {
  content: ""; position: absolute; inset: -120px -20% auto; height: 420px;
  pointer-events: none;
  background: radial-gradient(620px 300px at 78% 8%, rgba(45, 212, 191, .18), transparent 70%);
}
/* ambient layer injected by _pair_homefeel.py: two blurred blobs over a fading grid */
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .42 }
.hero-bg .b1 { width: 520px; height: 520px; top: -190px; right: -150px; background: radial-gradient(circle, var(--glow-a), transparent 72%); animation: drift 19s ease-in-out infinite alternate }
.hero-bg .b2 { width: 420px; height: 420px; bottom: -210px; left: -170px; background: radial-gradient(circle, var(--glow-b), transparent 72%); animation: drift 24s ease-in-out infinite alternate-reverse }
.hero-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(13, 148, 136, .07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(13, 148, 136, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(1000px 460px at 22% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(1000px 460px at 22% 0%, #000 20%, transparent 78%);
}
@keyframes drift { to { transform: translate3d(48px, 34px, 0) scale(1.08) } }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 48px; align-items: start }
/* Auto-placement would drop the H1 into the 480px rail beside the eyebrow. */
.hero .wrap > .eyebrow, .hero .wrap > h1, .hero .wrap > .lede, .hero .wrap > .stats { grid-column: 1 }
.hero .wrap > .tool { grid-column: 2; grid-row: 1 / span 4; align-self: center }
.eyebrow, .kick {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding: 7px 12px; border: 1px solid var(--ln2); border-radius: 999px;
  background: var(--pn); color: var(--cy2);
  font: 600 12.5px/1 var(--mono); letter-spacing: .06em;
}
/* homepage badge: a pulsing teal dot in front of the format pair, drawn in CSS so no text is added */
.eyebrow { margin-bottom: 20px; box-shadow: var(--shadow-sm) }
.eyebrow::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cy); box-shadow: 0 0 0 4px rgba(13, 148, 136, .14);
  animation: pulse 2.4s ease-in-out infinite;
}
h1 {
  margin: 0; font-weight: 700;
  font-size: clamp(2.05rem, 4.4vw, 3.25rem); line-height: 1.1; letter-spacing: -.032em;
  color: var(--ink-strong);
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--cy) }
h1 .grad {
  background: linear-gradient(100deg, var(--cy) 8%, #14b8a6 46%, #2563eb 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 20px 0 0; max-width: 56ch; font-size: 16.5px; line-height: 1.75; color: var(--dim) }
/* answer-first: one sentence that answers the query before the technical lede */
.hero .wrap > .answer { grid-column: 1; margin: 18px 0 0; max-width: 58ch; font-size: 17px; line-height: 1.65; color: var(--ink-strong); font-weight: 600 }
.hero .wrap > .answer b { color: var(--cy) }
.chiprow, .chips { display: flex; flex-wrap: wrap }
.chiprow { gap: 8px; margin-top: 24px }
.chip {
  padding: 9px 12px; border: 1px solid var(--ln); border-radius: 10px;
  color: var(--tx); font: 500 13px/1 var(--mono); background: var(--pn); box-shadow: var(--shadow-sm);
}
.note { margin-top: 22px; display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted) }
.log { margin-top: 24px; padding-left: 14px; border-left: 2px solid var(--ln2); font-size: 14px; line-height: 1.9; color: var(--muted) }
.log b { color: var(--cy2); font-weight: 600 }

/* converter card */
.tool {
  position: relative; background: var(--pn); border: 1px solid var(--ln);
  border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow);
}
#tool.over { border-color: var(--cy); box-shadow: var(--shadow-lg) }
/* drop box, same geometry as the homepage .dropzone in site.css */
.dropzone {
  position: relative; text-align: center; cursor: pointer;
  padding: 52px 30px 46px; border: 2px dashed var(--ln2); border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #ffffff, var(--bg));
  box-shadow: var(--shadow-lg);
  transition: border-color .24s var(--ease), transform .24s var(--ease), box-shadow .24s var(--ease), background .24s var(--ease);
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--cy); transform: translateY(-3px); box-shadow: var(--shadow-xl);
}
.dropzone.drag { background: var(--on-muted) }
.dz-ic {
  display: grid; place-items: center; width: 76px; height: 76px;
  margin: 0 auto 20px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #2dd4bf, var(--cy));
  box-shadow: 0 8px 24px rgba(13, 148, 136, .28);
}
.dz-ic svg { width: 36px; height: 36px }
.dropzone b {
  display: block; font-size: 24px; font-weight: 600; line-height: 1.28;
  letter-spacing: -.02em; color: var(--ink-strong);
}
.dz-sub { display: block; margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--dim) }
.dz-ext {
  display: block; margin-top: 18px; font: 500 13px/1.6 var(--mono);
  letter-spacing: .04em; color: var(--muted);
}
.dz-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; margin-top: 26px; padding: 0 34px; border-radius: 16px;
  font: 600 17px/1 var(--disp); color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, #14b8a6, var(--cy));
  box-shadow: 0 8px 24px rgba(13, 148, 136, .28);
  transition: background .24s var(--ease), box-shadow .24s var(--ease), transform .24s var(--ease);
}
.dz-cta:hover {
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--cy), var(--cy2));
  box-shadow: 0 10px 28px rgba(13, 148, 136, .36);
}
.dz-cta:active { transform: translateY(1px) scale(.99) }
ul.entry-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px }
.entry-list li { position: relative; padding-left: 21px; font-size: 13.5px; line-height: 1.5; color: var(--dim) }
.entry-list li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px;
  border: 2px solid var(--cy); border-top: 0; border-right: 0; transform: rotate(-45deg);
}
.file {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 12px 14px; border: 1px solid var(--ln); border-radius: 10px;
  background: var(--pn2); font: 500 13px/1.2 var(--mono); color: var(--tx);
}
.file .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 }
.file .s { color: var(--muted); flex: none }
.prog { margin-top: 14px }
.prog .h {
  display: flex; justify-content: space-between; font: 500 12px/1 var(--mono);
  color: var(--muted); margin-bottom: 8px;
}
.prog .bar { height: 4px; border-radius: 999px; background: var(--ln); overflow: hidden }
.prog .bar > i {
  display: block; height: 100%; border-radius: 999px; background: var(--cy);
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease-out;
}
.cm-action { display: flex; gap: 10px; margin-top: 14px }
.cm-go, .cm-cancel { font-size: 15px; font-weight: 600 }
.cm-go {
  flex: 1; min-width: 0; min-height: 48px; border: 0; border-radius: 10px; cursor: pointer;
  color: var(--on); background: var(--cy); box-shadow: 0 6px 18px rgba(13, 148, 136, .22);
  transition: filter .16s, transform .16s, box-shadow .16s;
}
.cm-go:hover { filter: brightness(1.06) }
.cm-go:active { transform: translateY(1px) }
.cm-go[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none }
.cm-cancel {
  flex: 0 0 auto; min-height: 48px; padding: 0 18px; color: var(--tx);
  background: var(--pn); border: 1px solid var(--ln); border-radius: 10px; cursor: pointer;
}
.cm-cancel:hover { border-color: var(--ln2); color: var(--cy2) }
.cm-cancel[hidden] { display: none !important }
.cm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.tiny { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); display: flex; align-items: center; gap: 6px }
#tool .viewer-wrap { height: 196px; min-height: 0; border-radius: var(--radius); overflow: hidden }
#result { margin-top: 12px }

.card {
  border: 1px solid var(--ln); border-radius: var(--radius);
  background: var(--pn); padding: 16px; box-shadow: var(--shadow-sm);
}
.card.bad { border-color: #fecaca; background: #fff5f5 }
.card-top { display: flex; justify-content: space-between; font: 500 12px/1 var(--mono); color: var(--muted) }
.card-top .ok { color: var(--cy2) }
.count { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 2px }
.count b { font: 600 clamp(26px, 5vw, 34px)/1.1 var(--mono); color: var(--ink-strong); font-variant-numeric: tabular-nums }
.count span { font: 500 12px/1 var(--mono); color: var(--muted) }
.delta { font: 13px var(--mono); color: var(--muted); margin: 5px 0 0 }
.delta b { color: var(--cy2); font-weight: 500 }
.rows { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ln) }
.row { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; font-size: 14px; color: var(--dim) }
.row b { font: 500 14px var(--mono); color: var(--tx); font-variant-numeric: tabular-nums }
.row em { font-style: normal; font: 13px var(--mono); color: var(--cy2); margin-left: 8px }
.mini { margin-top: 10px; display: grid; gap: 5px }
.mini > i { display: block; height: 4px; border-radius: 999px; background: var(--ln) }
.mini > i > b { display: block; height: 100%; border-radius: 999px; background: #94a3b8; transform-origin: left }
.mini > i > b.after { background: var(--cy) }
.chips { gap: 6px; margin-top: 12px }
.chips button {
  background: var(--pn); border: 1px solid var(--ln); color: var(--tx);
  font: 500 12.5px var(--mono); min-height: 40px; padding: 8px 12px; border-radius: 9px; cursor: pointer;
}
.chips button:hover { border-color: var(--ln2) }
.chips button.on { border-color: var(--cy); background: var(--cy); color: #fff }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap }
button.primary {
  background: var(--cy); border: 1px solid var(--cy); color: #fff;
  font-size: 15px; font-weight: 600; min-height: 46px; padding: 11px 18px; border-radius: 10px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(13, 148, 136, .22);
}
button.primary:hover { filter: brightness(1.06) }
button.ghost {
  background: none; border: 0; padding: 0 0 2px; color: var(--muted);
  font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--ln);
}
button.ghost:hover { color: var(--cy2); border-color: var(--cy) }
.again { margin-top: 14px; padding-top: 11px; border-top: 1px dashed var(--ln); font-size: 13.5px; color: var(--muted) }
.sess { margin-top: 9px; font: 13px var(--mono); color: var(--muted) }
.card p { margin: 0; font-size: 14.5px; color: var(--dim) }

.stats { border-block: 1px solid var(--ln); background: var(--pn) }
.stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 26px 0 }
.stat b { display: block; font: 600 26px/1.1 var(--mono); color: var(--ink-strong); font-variant-numeric: tabular-nums }
.stat b i { font-style: normal; color: var(--cy); font-size: .62em; margin-left: 5px }
.stat span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--muted) }

/* sections */
section.blk { padding: 56px 0; border-bottom: 1px solid var(--ln) }
h2 {
  margin: 12px 0 0; font-weight: 700;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.25; letter-spacing: -.02em;
  color: var(--ink-strong);
}
.sec-lede { margin: 14px 0 0; max-width: 62ch; color: var(--dim); font-size: 16px; line-height: 1.7 }
.grid3, .cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px }
.step, .cgrid a {
  padding: 20px 18px; border: 1px solid var(--ln); border-radius: var(--radius);
  background: var(--pn); position: relative; box-shadow: var(--shadow-sm);
}
.step::before, .cgrid a::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px;
  border-radius: 999px; background: var(--cy); opacity: .35;
}
.step .n { font: 600 12px/1 var(--mono); letter-spacing: .1em; color: var(--cy2) }
.step h3, .cgrid b, .faq h3 { margin: 12px 0 0; font-size: 16.5px; font-weight: 600; line-height: 1.35; color: var(--ink-strong) }
.step p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.7; color: var(--dim) }
.fmt { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px }
.fmt span {
  font: 500 13px/1 var(--mono); padding: 9px 11px; border: 1px solid var(--ln);
  border-radius: 9px; color: var(--tx); background: var(--pn);
}
.fmt span.out { border-color: var(--ln2); color: var(--cy2); background: #ecfdf8; font-weight: 600 }
.cgrid a { display: block; text-decoration: none; color: var(--tx); transition: border-color .16s, box-shadow .16s }
.cgrid a::before { opacity: 0; transition: opacity .16s }
.cgrid a:hover { border-color: var(--ln2); text-decoration: none; box-shadow: var(--shadow) }
.cgrid a:hover::before { opacity: .35 }
.cgrid span { display: block; font-size: 14px; line-height: 1.65; color: var(--dim); margin-top: 6px }
.faq { max-width: 780px }
.faq h3 { margin-top: 22px; margin-bottom: 6px }
.faq p { margin: 0; color: var(--dim); font-size: 15.5px; line-height: 1.75 }

/* article body */
main { padding: 10px 0 64px }
.wrap { width: auto; max-width: 1120px; margin: 0 auto; padding: 0 24px }
.wrap.prose { max-width: 720px; counter-reset: sec }
.prose h1 { margin-top: 0 }
.prose h2 {
  counter-increment: sec; font-size: 1.42rem; line-height: 1.25; letter-spacing: -.02em;
  font-weight: 700; margin: 56px 0 16px; padding-top: 18px; border-top: 1px solid var(--line);
}
.prose h2::before {
  content: counter(sec, decimal-leading-zero); font-family: var(--mono);
  font-size: 12px; letter-spacing: .06em; color: var(--accent-ink);
  margin-right: 12px; vertical-align: 3px; font-weight: 500;
}
.prose h2:first-child { margin-top: 34px }
.prose h3 { font-size: 1.06rem; font-weight: 600; margin: 28px 0 6px; letter-spacing: -.01em; color: var(--ink-strong) }
.prose p { margin: 0 0 15px }
.prose ol { counter-reset: step; list-style: none; padding-left: 0; margin: 0 0 8px }
.prose ol li { counter-increment: step; position: relative; padding-left: 40px; margin: 15px 0 }
.prose ol li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 3px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.prose ol li strong { display: block; margin-bottom: 2px; color: var(--ink-strong) }
.prose ul { padding-left: 22px }
.prose ul li { margin: 9px 0 }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0 8px; font-size: 14.5px }
.prose caption { caption-side: bottom; text-align: left; margin-top: 8px; font: 13px var(--mono); color: var(--muted) }
.prose th, .prose td { padding: 11px 12px; border-bottom: 1px solid var(--ln); text-align: left; vertical-align: top }
.prose thead th { border-bottom: 1px solid var(--ln2); font-weight: 600; color: var(--ink-strong); background: var(--pn2) }
.prose tbody th, .prose td:first-child { font: 500 13.5px var(--mono); color: var(--tx) }
.prose .tw { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; margin: 22px 0 8px }
.prose .tw > table { margin: 0 }
.faq-item { border-top: 1px solid var(--line); padding: 18px 0 }
.faq-item h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 600 }
.faq-item p { margin: 0; color: var(--dim) }
ul.related { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
ul.related li {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 14px 16px; margin: 0; transition: border-color .12s, box-shadow .12s;
}
ul.related li:hover { border-color: var(--ln2); box-shadow: var(--shadow-sm) }
ul.related a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; color: var(--ink-strong); text-decoration: none }
ul.related a:hover { color: var(--cy2); text-decoration: none }
ul.related span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; margin-top: 2px }
.updated { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line) }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 30px 0 0; max-width: 640px; border-top: 1px solid var(--line); border-bottom: 0; background: none }
.stat { padding: 14px 16px 0 0 }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 16px }
#tool, #result, #result .card, .prog { max-width: 640px }
.hero .viewer-wrap { height: 320px; max-width: 640px; border-radius: var(--radius) }

/* ---------------------------------------------------------------
   homepage language (added by _pair_homefeel.py structure pass)
   entry card, step cards, prose card grids, faq grid, link chips
   --------------------------------------------------------------- */
.tool.entry {
  padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
.tool.entry ul.entry-list { margin-top: 18px }
.hero .stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin: 30px 0 0; max-width: 100%; padding: 6px 0;
  border: 1px solid var(--ln2); border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 118, 110, .07), rgba(45, 212, 191, .16));
  box-shadow: var(--shadow-sm);
}
.hero .stat { padding: 14px 18px }
.hero .stat + .stat { border-left: 1px solid rgba(13, 148, 136, .18); padding-left: 18px }
.hero .stat b { font-size: clamp(24px, 3.4vw, 32px) }

/* reading column widens so the card grids breathe; paragraphs keep a 68ch measure */
.wrap.prose { max-width: 1020px }
.prose > p, .prose .pcard p, .prose ol li, .prose .faq-item p { max-width: 68ch }

/* how-to steps as cards */
.prose ol.steps {
  display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 8px;
}
.prose ol.steps li {
  flex: 1 1 280px;
  counter-increment: step; position: relative; margin: 0; padding: 20px 20px 22px;
  border: 1px solid var(--ln); border-radius: var(--radius-lg); background: var(--pn);
  box-shadow: var(--shadow-sm); font-size: 14.5px; line-height: 1.72; color: var(--dim);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.prose ol.steps li:hover { border-color: var(--ln2); box-shadow: var(--shadow); transform: translateY(-2px) }
.prose ol.steps li::before {
  content: counter(step, decimal-leading-zero); position: static; display: block;
  margin-bottom: 10px; font: 600 12px/1 var(--mono); letter-spacing: .12em; color: var(--cy);
}
.prose ol.steps li strong { margin: 0 0 7px; font-size: 16px; font-weight: 600; letter-spacing: -.015em }

/* explainer + limitation cards */
.pgrid {
  display: flex; flex-wrap: wrap; gap: 16px; margin: 26px 0 6px;
}
.pgrid + .pgrid { margin-top: 0 }
.pcard {
  flex: 1 1 300px;
  padding: 22px 22px 20px; border: 1px solid var(--ln); border-radius: var(--radius-lg);
  background: var(--pn); box-shadow: var(--shadow-sm); position: relative;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.pcard:hover { border-color: var(--ln2); box-shadow: var(--shadow); transform: translateY(-2px) }
.pcard h3 { margin: 0 0 9px; font-size: 16.5px; font-weight: 600; letter-spacing: -.015em; color: var(--ink-strong) }
.pcard p { margin: 0; font-size: 14.5px; line-height: 1.74; color: var(--dim) }
.pcard p + p { margin-top: 10px }
.pcard ul { margin: 8px 0 0; padding-left: 20px; font-size: 14.5px; color: var(--dim) }

/* spec tables as panels */
.prose .tw {
  margin: 24px 0 10px; padding: 4px 4px 0; border: 1px solid var(--ln);
  border-radius: var(--radius-lg); background: var(--pn); box-shadow: var(--shadow-sm);
}

/* faq as a two-column card grid, answers always visible */
.faq-grid {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px;
}
.faq-grid .faq-item {
  flex: 1 1 420px;
  padding: 18px 20px 20px; border: 1px solid var(--ln);
  border-radius: var(--radius-lg); background: var(--pn); box-shadow: var(--shadow-sm);
}
.faq-grid .faq-item:hover { border-color: var(--ln2) }
.faq-grid .faq-item h3 { font-size: 15.5px; line-height: 1.45 }
.faq-grid .faq-item p { font-size: 14px; line-height: 1.7 }

/* internal links as chips */
.prose ul.related {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 24px;
}
.prose ul.related li { padding: 0; border-radius: 12px; background: var(--pn) }
.prose ul.related a { padding: 0 16px; min-height: 46px; font-size: 14px; font-weight: 600 }
.prose ul.related.all { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px }
.prose ul.related.all li { background: var(--pn2); border-color: var(--ln) }
.prose ul.related.all a {
  min-height: 40px; padding: 0 12px; font: 500 12.5px/1 var(--mono);
  letter-spacing: .02em; color: var(--dim);
}
.prose ul.related.all a:hover { color: var(--cy2) }

@media (max-width: 960px) {
  .pgrid, .prose ol.steps, .faq-grid { gap: 12px }
  .pcard, .prose ol.steps li, .faq-grid .faq-item { flex-basis: 100% }
  .wrap.prose { max-width: 100% }
}
@media (max-width: 640px) {
  .hero { padding: 44px 0 54px }
  .hero-bg .b1 { width: 300px; height: 300px; top: -90px; right: -70px }
  .hero-bg .b2 { width: 240px; height: 240px; left: -80px }
  .hero-bg .grid { background-size: 40px 40px }
  h1 { font-size: 1.85rem }
  .tool.entry { padding: 0 }
  .dropzone { padding: 32px 18px 28px }
  .hero .stats { grid-template-columns: 1fr; padding: 4px 0 }
  .hero .stat { padding: 12px 16px }
  .hero .stat + .stat { border-left: 0; border-top: 1px solid rgba(13, 148, 136, .16) }
  .pcard, .prose ol.steps li { padding: 18px 16px 18px }
  .prose ul.related, .prose ul.related.all { grid-template-columns: 1fr 1fr }
  .prose ul.related a, .prose ul.related.all a { min-height: 44px }
  .prose ul.related.all a { font-size: 13px }
}

/* 961–1120 区间左栏被压到 370–509px，三格各剩 87–133px，长标签会单独折成两行（三条不等高）。
   该带改为竖排：每条一格，标签恒单行；≥1121 仍三格横排，此时最宽标签 123px < 可用 133px。 */
@media (min-width: 961px) and (max-width: 1120px) {
  .hero .stats { grid-template-columns: 1fr; padding: 4px 0 }
  .hero .stat { padding: 12px 16px }
  .hero .stat + .stat { border-left: 0; border-top: 1px solid rgba(13, 148, 136, .16) }
}

/* footer */
footer { border-top: 1px solid var(--ln); background: var(--pn); color: var(--muted); padding: 34px 0 38px; font-size: 14px }
footer h3 { margin: 0 0 10px }
footer p { margin: 0 0 12px; max-width: 820px; font-size: 13.5px; line-height: 1.8 }
footer a { color: var(--dim) }
footer a:hover { color: var(--cy2) }
footer .wrap > div { display: flex; flex-wrap: wrap; gap: 6px 18px }
footer .wrap > div a { display: inline-flex; align-items: center; min-height: 32px }
.f2cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px }
.foot-bot {
  margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--ln);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center;
  font: 500 12.5px var(--mono);
}
.foot-bot a { margin-right: 14px; display: inline-flex; align-items: center; min-height: 40px }

/* responsive */
@media (max-width: 960px) {
  .hero { padding: 38px 0 52px }
  .hero .wrap { grid-template-columns: 1fr; gap: 26px }
  .hero .wrap > .tool { grid-column: 1; grid-row: auto }
  /* one column: the entry panel goes directly under the H1 so its button stays in the first screen */
  .hero .wrap > .eyebrow { order: 1 }
  .hero .wrap > h1 { order: 2 }
  .hero .wrap > .tool { order: 3 }
  .hero .wrap > .answer { order: 4 }
  .hero .wrap > .lede { order: 5 }
  .hero .wrap > .stats { order: 6 }
  .grid3, .cgrid { grid-template-columns: 1fr }
  .stats .wrap { grid-template-columns: 1fr; gap: 18px }
  .f2cols { grid-template-columns: 1fr }
  .nav { gap: 14px }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px) }
  .wrap.prose { padding: 0 16px }
  .top .wrap { flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; padding-bottom: 10px }
  .brand { order: 1; min-height: 44px }
  .live { order: 2; margin-left: auto }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 4px 18px; flex-wrap: wrap }
  .nav a { min-height: 44px; font-size: 15px }
  .nav a.cta { min-height: 44px }
  h1 { font-size: 1.62rem }
  .lede { font-size: 15.5px }
  .tool { padding: 14px }
  .dropzone { padding: 28px 16px 24px; border-radius: var(--radius-lg) }
  .dz-ic { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 14px }
  .dz-ic svg { width: 26px; height: 26px }
  .dropzone b { font-size: 19px }
  .dz-cta { width: 100%; margin-top: 20px }
  ul.entry-list { gap: 8px }
  .entry-list li { font-size: 14px }
  .cm-action { flex-direction: column }
  .cm-go, .cm-cancel { width: 100% }
  #tool .viewer-wrap { height: 176px }
  .hero .viewer-wrap { height: 236px }
  body .viewer-tools button { min-height: 44px; padding: 8px 12px }
  .prose .tw { margin: 18px 0 6px }
  .prose table { font-size: 13.5px }
  .prose th, .prose td { padding: 9px; overflow-wrap: anywhere }
  section.blk { padding: 44px 0 }
  .prose h2 { font-size: 1.24rem; margin-top: 44px }
  main { padding: 6px 0 44px }
  .stats { grid-template-columns: 1fr; border-top: 0; margin-top: 26px }
  .stat { padding: 12px 0 0; border-top: 1px solid var(--line) }
  .stat + .stat { border-left: 0; padding-left: 0 }
  ul.related { grid-template-columns: 1fr }
  ul.related a { min-height: 44px }
  footer a, footer .wrap > div a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 6px }
  footer .wrap > div { display: flex; flex-wrap: wrap; gap: 0 14px }
  .foot-bot { flex-direction: column; align-items: flex-start }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
}
