/* =========================================================
   China Trade Helper — design system
   Direction: trade-document stationery.
   Warm paper surfaces, ink text, one seal-red accent.
   Serif display (Source Serif 4), Plex text, Plex mono data.
   Sharp corners, ruled borders, hard offset shadows.
   ========================================================= */

:root {
  /* surfaces */
  --paper: #f6f4ec;
  --paper-2: #eeeadf;
  --card: #fffefa;
  /* ink */
  --ink: #20241e;
  --ink-2: #4d5148;
  --ink-3: #676b5e;
  /* rules */
  --line: #ddd8c6;
  --line-2: #c8c2ab;
  /* accent: seal red */
  --red: #b3271e;
  --red-deep: #8f1d15;
  --green: #38684a;
  /* type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", "Songti SC", serif;
  --sans: "IBM Plex Sans", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", Consolas, "SFMono-Regular", Menlo, "PingFang SC", "Microsoft YaHei", monospace;
  --radius: 2px;
  --maxw: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; font-weight: 700; }
a { color: var(--ink); text-decoration: none; }
::selection { background: #eed7cf; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- header: letterhead rule ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 236, .95); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: var(--radius);
  background: var(--red); color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4);
}
.logo-text { font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: -.2px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav-link {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-2); padding: 5px 0 4px; border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--line-2); text-decoration: none; }
.nav-link.active { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 9px 18px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 13px 26px; font-size: 15.5px; }

/* ---------- high-value links: red underline + arrow ---------- */
.link-arrow {
  font-weight: 600; color: var(--ink);
  border-bottom: 2px solid var(--red); padding-bottom: 1px;
}
.link-arrow::after {
  content: "→"; margin-left: 7px; color: var(--red);
  display: inline-block; transition: transform .12s ease;
}
.link-arrow:hover { color: var(--red); text-decoration: none; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- kickers ---------- */
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--red); }
.kicker-label {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--red);
}

/* ---------- hero ---------- */
.hero { padding: 78px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
}
.hero h1 {
  margin-top: 16px;
  font-size: 50px; line-height: 1.08; letter-spacing: -.8px; font-weight: 700;
}
.hero h1 em { font-style: italic; color: var(--red); }
.hero .sub { margin-top: 20px; font-size: 17px; color: var(--ink-2); max-width: 520px; }
.hero-cta { margin-top: 30px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-note {
  list-style: none;
  margin-top: 22px; display: flex; gap: 20px; flex-wrap: wrap;
}
.hero-note li {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.hero-note li::before { content: "✓"; color: var(--green); font-weight: 700; }

/* document mock + seal stamp */
.hero-visual { position: relative; }
.mock {
  background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 7px 7px 0 rgba(32, 36, 30, .07), 0 18px 40px rgba(32, 36, 30, .09);
}
.mock-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; border-bottom: 2px solid var(--ink);
}
.mock-doc { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; color: var(--ink); }
.mock-rev {
  font-family: var(--mono); font-size: 11px; color: var(--red);
  border: 1px solid var(--red); border-radius: var(--radius); padding: 1px 7px;
}
.mock-body { padding: 14px 18px 20px; }
.spec-line {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 2px; border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.spec-line:last-child { border-bottom: none; }
.spec-line b { font-weight: 600; }
.spec-line .cn { color: var(--ink-3); margin-left: 8px; font-size: 12px; font-weight: 400; }
.spec-line .val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.stamp {
  position: absolute; right: -10px; bottom: -28px;
  width: 120px; height: 120px;
  color: var(--red);
  transform: rotate(-12deg);
  opacity: .88;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.stamp text { fill: currentColor; }
.stamp .stamp-text { font-family: var(--sans); font-size: 9px; font-weight: 600; letter-spacing: 2px; }
.stamp .stamp-core { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: 1px; }

/* ---------- key facts strip ---------- */
.facts { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 24px; border-left: 1px solid var(--line); }
.fact:first-child { border-left: none; }
.fact b {
  display: block;
  font-family: var(--serif); font-size: 30px; font-weight: 700;
  letter-spacing: -.5px; line-height: 1.15; color: var(--ink);
}
.fact b.red { color: var(--red); }
.fact span { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

/* ---------- sections ---------- */
section.pad { padding: 78px 0; }
section.pad.alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 680px; margin: 0 auto 46px; }
.sec-head h2 { margin-top: 12px; font-size: 32px; letter-spacing: -.4px; }
.sec-head > p { margin-top: 12px; font-size: 16.5px; color: var(--ink-2); }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 26px 24px;
}
.card-tag {
  display: inline-block; margin-bottom: 14px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--red); border: 1px solid var(--red); border-radius: var(--radius);
  padding: 2px 8px;
}
.card h3 { font-size: 18px; letter-spacing: -.2px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--ink-2); }
.card.step .step-num {
  display: block;
  font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1;
  color: var(--red); margin-bottom: 12px;
}
.card.step .step-num::after { content: ""; display: block; width: 26px; height: 2px; background: var(--ink); margin-top: 12px; }

/* key content box: red rule + CTA */
.keybox {
  margin-top: 36px;
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.kb-label {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.kb-copy p { font-size: 15px; color: var(--ink-2); max-width: 620px; }
.kb-copy b { color: var(--ink); }

/* ---------- pricing teaser table ---------- */
.compare-card { max-width: 720px; margin: 0 auto; padding: 10px 24px 4px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.compare th, .compare td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
  border-bottom: 2px solid var(--ink);
}
.compare .pro-col { color: var(--red); border-bottom-color: var(--red); }
.compare td:first-child { color: var(--ink-2); font-weight: 500; }
.compare .yes { color: var(--green); font-weight: 700; }
.center-row { text-align: center; margin-top: 30px; display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.fine-print { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }

/* ---------- pricing page ---------- */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 780px; margin: 0 auto; }
.price-card {
  background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 30px; position: relative;
}
.price-card.pro { border: 2px solid var(--red); }
.price-card .tag {
  position: absolute; top: -12px; left: 24px;
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius);
}
.price-card h3 { font-size: 19px; }
.price-card .price { font-family: var(--serif); font-size: 40px; font-weight: 700; letter-spacing: -1px; margin: 10px 0 2px; }
.price-card .price span { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.price-card ul { list-style: none; margin-top: 18px; }
.price-card li { padding: 8px 0; font-size: 14.5px; color: var(--ink-2); border-bottom: 1px dashed var(--line); }
.price-card li::before { content: "✓"; color: var(--green); font-weight: 700; margin-right: 9px; }
.price-card li:last-child { border-bottom: none; }
.price-card li b { color: var(--ink); font-weight: 600; }
.price-card li.no { color: var(--ink-3); }
.price-card li.no::before { content: "—"; color: var(--ink-3); font-weight: 400; }
.price-card .btn { width: 100%; text-align: center; margin-top: 20px; }
.launch-note {
  max-width: 780px; margin: 26px auto 0;
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 16px 20px; font-size: 13.5px; color: var(--ink-2);
}
.launch-note b { color: var(--red); }

/* ---------- FAQ: ruled, not boxed ---------- */
.faq { max-width: 760px; margin: 0 auto; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  padding: 17px 2px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 19px; color: var(--red); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 2px 20px; font-size: 14.5px; color: var(--ink-2); max-width: 680px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--paper); padding: 72px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: 32px; letter-spacing: -.3px; }
.cta-band p { margin: 14px auto 28px; max-width: 540px; color: #b9bdb0; font-size: 16px; }
.cta-band .btn-primary:hover { background: #d0382c; border-color: #d0382c; }
.cta-alt { margin-top: 20px; font-size: 13.5px; color: #8d9184; }
.cta-alt a { color: var(--paper); font-weight: 600; border-bottom: 2px solid var(--red); padding-bottom: 1px; }
.cta-alt a:hover { color: #fff; text-decoration: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--paper); }
.foot-grid {
  max-width: var(--maxw); margin: 0 auto;
  padding: 54px 24px 38px;
  display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 40px;
}
.foot-brand p { margin-top: 14px; font-size: 14px; color: var(--ink-2); max-width: 300px; }
.foot-col h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 14px;
}
.foot-col a { display: block; padding: 4px 0; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.foot-col a:hover { color: var(--red); text-decoration: none; }
.foot-col .mail {
  display: inline-block;
  color: var(--red); font-weight: 600;
  border-bottom: 2px solid var(--red); padding-bottom: 1px;
}
.foot-note { display: block; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.foot-base {
  max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--ink-3);
}

/* =========================================================
   Builder app
   ========================================================= */
.app-shell { display: grid; grid-template-columns: 432px 1fr; min-height: calc(100vh - 66px); }
.pane-form {
  border-right: 1px solid var(--line-2);
  background: var(--paper-2);
  overflow-y: auto; max-height: calc(100vh - 66px);
  padding: 22px;
}
.pane-preview {
  padding: 28px;
  overflow-y: auto; max-height: calc(100vh - 66px);
  background: var(--paper);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
}
.f-group {
  background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.f-group > h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.f-group > h3::before { content: ""; width: 8px; height: 8px; background: var(--red); flex-shrink: 0; }
.f-row { display: flex; gap: 10px; margin-bottom: 10px; }
.f-row > * { flex: 1; }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input.f, select.f, textarea.f {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  font-size: 13.5px; font-family: var(--sans);
  background: #fff; color: var(--ink);
}
input.f:focus, select.f:focus, textarea.f:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(179, 39, 30, .14);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .cert-chip {
  padding: 6px 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #fff; font-family: var(--sans);
  font-size: 12.5px; cursor: pointer; color: var(--ink-2);
  transition: border-color .1s ease, background .1s ease, color .1s ease;
}
.chip:hover, .cert-chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on, .cert-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.row-tools { display: flex; gap: 4px; }
.row-tools button {
  border: 1px solid var(--line-2); background: #fff; border-radius: var(--radius);
  cursor: pointer; width: 26px; height: 26px; line-height: 1;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
}
.row-tools button:hover { border-color: var(--red); color: var(--red); }
.add-row {
  width: 100%; padding: 9px;
  border: 1px dashed var(--line-2); border-radius: var(--radius);
  background: none; font-family: var(--sans);
  font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.add-row:hover { border-color: var(--red); color: var(--red); }
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.privacy-note {
  font-size: 12px; line-height: 1.6; color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line-2); border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 4px;
}
.privacy-note b { color: var(--ink); }

/* A4 sheet preview */
.sheet-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sheet-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sheet-hint { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.sheet {
  width: 794px; min-height: 1060px;
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 34px rgba(32, 36, 30, .13);
  padding: 48px 54px; font-size: 13px; position: relative;
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 3px double var(--ink); padding-bottom: 14px;
}
.sheet-head h1 { font-family: var(--mono); font-size: 15.5px; font-weight: 600; letter-spacing: .08em; }
.sheet-head .cn-title { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.sheet-head .meta { text-align: right; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.sheet-head .meta b { color: var(--ink); }
.sheet h2 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
  margin: 22px 0 8px; padding-bottom: 5px;
  border-bottom: 1.5px solid var(--ink);
}
.sheet h2::before { content: ""; width: 8px; height: 8px; background: var(--red); flex-shrink: 0; }
table.spec { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.spec th, table.spec td { border: 1px solid #d9d4c2; padding: 7px 10px; text-align: left; vertical-align: top; }
table.spec th {
  background: var(--paper-2);
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2);
}
table.spec td .cn { display: block; color: var(--ink-3); font-size: 10.5px; margin-top: 1px; }
table.spec td.mono { font-family: var(--mono); font-size: 12px; }
.sheet-foot {
  margin-top: 26px; border-top: 1.5px solid var(--ink); padding-top: 10px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9.8px; color: var(--ink-3);
}
.sig-row { display: flex; gap: 30px; margin-top: 30px; }
.sig-row div { flex: 1; border-top: 1px solid var(--ink); padding-top: 6px; font-size: 11.5px; color: var(--ink-2); }
.wm { position: absolute; bottom: 18px; right: 26px; font-family: var(--mono); font-size: 10px; color: #a39e8c; }
.wm b { color: var(--red); font-weight: 500; }

/* status pipeline chips */
.status-row { display: flex; flex-wrap: wrap; gap: 8px; }
.status-chip {
  padding: 6px 10px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #fff; font-family: var(--sans);
  font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2);
  transition: border-color .1s ease, background .1s ease, color .1s ease;
}
.status-chip:hover { border-color: var(--ink); color: var(--ink); }
.status-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-chip.on[data-status="approved"] { background: var(--green); border-color: var(--green); }
.status-chip.on[data-status="rejected"] { background: var(--red); border-color: var(--red); }

/* revision + decision logs */
.rev-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; }
.rev-hint { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.cn-hint { margin: 6px 0 10px; font-family: var(--mono); font-size: 10.5px; color: var(--red); }
.log-list { margin-top: 4px; }
.log-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 2px; border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.log-item:last-child { border-bottom: none; }
.log-v {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--red); border: 1px solid var(--red); border-radius: var(--radius);
  padding: 0 5px; flex-shrink: 0;
}
.log-date { font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex-shrink: 0; }
.log-note { flex: 1; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.log-del, .decision-del {
  border: none; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  padding: 2px 4px; flex-shrink: 0;
}
.log-del:hover, .decision-del:hover { color: var(--red); }

/* preview view tabs */
.view-tabs { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.view-tab {
  border: none; background: var(--card); cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 8px 16px;
}
.view-tab + .view-tab { border-left: 1px solid var(--line-2); }
.view-tab:hover { color: var(--ink); }
.view-tab.on { background: var(--ink); color: #fff; }

/* inspection brief document blocks */
.b-buildto {
  margin-top: 18px; padding: 12px 16px;
  border: 1.5px solid var(--red); border-left: 5px solid var(--red); border-radius: var(--radius);
  background: #fdf6f3; font-size: 12.5px; line-height: 1.7; color: var(--ink);
}
.b-buildto b { color: var(--red); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.b-warn {
  margin-top: 12px; padding: 10px 16px;
  border: 1px solid var(--line-2); border-left: 4px solid #b98a1c; border-radius: var(--radius);
  background: #faf5e6; font-size: 12.5px; line-height: 1.65; color: var(--ink);
}
.b-warn.b-crit { border-color: var(--red); border-left-color: var(--red); background: #fdf0ee; }
.b-ok {
  margin-top: 12px; padding: 10px 16px;
  border: 1px solid var(--line-2); border-left: 4px solid var(--green); border-radius: var(--radius);
  background: #eef4ec; font-size: 12.5px; line-height: 1.65; color: var(--ink);
}
.b-note { margin-top: 8px; font-family: var(--mono); font-size: 10.5px; line-height: 1.7; color: var(--ink-2); }
.b-note b { color: var(--ink); }
.b-result { min-width: 120px; background: repeating-linear-gradient(transparent, transparent 26px, #e8e4d4 27px); }

/* verification / scope / hold blocks — text labels survive monochrome printing */
.b-beta {
  margin-top: 14px; padding: 9px 14px;
  border: 1px dashed var(--red); background: #fdf6f3;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.65; color: var(--ink);
}
.b-beta b { color: var(--red); }
.b-scope {
  margin-top: 10px; padding: 9px 14px;
  border: 1px solid var(--line-2); background: var(--paper-2);
  font-family: var(--mono); font-size: 10px; line-height: 1.7; color: var(--ink-2);
}
.b-stamp { border-width: 2px; font-weight: 600; }
.cn-missing { color: var(--red) !important; font-weight: 600; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .25s; z-index: 99;
}
.toast.show { opacity: .96; }

/* ---------- print ----------
   The previous build hid everything with visibility:hidden and absolutely
   positioned .sheet, which silently truncated multi-page briefs. Here the
   document is a normal flow block: hidden chrome uses display:none, rows and
   notices avoid page breaks, and status labels survive monochrome output. */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; }
  .site-header, .pane-form, .sheet-actions, .toast, .site-footer,
  .hero, .facts, .cta-band, .faq, .price-grid, .launch-note, .center-row {
    display: none !important;
  }
  .app-shell, .pane-preview, .sheet-wrap, .wrap {
    display: block !important; max-height: none !important; overflow: visible !important;
    padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important;
  }
  .sheet {
    position: static !important; width: 100% !important; min-height: auto !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 !important;
  }
  table.spec thead { display: table-header-group; }
  table.spec tr, .sheet h2, .sheet-head, .sig-row, .sheet-foot,
  .b-buildto, .b-warn, .b-ok, .b-beta, .b-scope, .b-note {
    break-inside: avoid; page-break-inside: avoid;
  }
  .b-buildto, .b-warn, .b-ok, .b-beta, .b-scope {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    border: 2px solid #333;
  }
  .wm { position: static !important; display: block; text-align: right; margin-top: 10px; }
  .b-result { background: none !important; border-bottom: 1px solid #bbb; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: none; }
  .fact { border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: none; }
  .app-shell { grid-template-columns: 1fr; }
  .pane-form { max-height: none; border-right: none; border-bottom: 1px solid var(--line-2); }
  .pane-preview { max-height: none; }
  .sheet { width: 100%; min-height: auto; padding: 28px; }
  .nav .hide-sm { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .price-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .logo-text { display: none; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 34px; }
  .sec-head h2, .cta-band h2 { font-size: 26px; }
}
