:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #66747b;
  --line: #d9e0e3;
  --line-strong: #bdc9cd;
  --paper: #ffffff;
  --surface: #f4f7f7;
  --surface-strong: #eaf0f1;
  --teal: #087f73;
  --teal-dark: #05665d;
  --teal-soft: #ddf3ef;
  --red: #b83a36;
  --red-soft: #fff0ef;
  --amber: #9a6400;
  --amber-soft: #fff5d9;
  --green: #217653;
  --green-soft: #e6f5ed;
  --shadow: 0 18px 50px rgba(30, 50, 58, 0.12);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}

button, input, select { font: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; stroke-width: 1.8; flex: 0 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner,
.section-inner,
.workspace-heading,
.workspace-grid,
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
}
.brand strong { display: block; font-size: 18px; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 11px; }

nav { display: flex; align-items: center; gap: 28px; }
nav a { color: #405057; font-size: 14px; }
nav a:hover { color: var(--teal); }

.header-action { justify-self: end; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.25;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.46; cursor: not-allowed; transform: none; }
.button-primary { color: white; background: var(--teal); border-color: var(--teal); }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); border-color: var(--teal-dark); }
.button-secondary { background: white; border-color: var(--line-strong); color: var(--ink); }
.button-secondary:hover { border-color: var(--teal); color: var(--teal); }
.button-quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
.button-quiet:hover { background: var(--surface-strong); }

.workspace-band { padding: 44px 0 56px; background: var(--surface); border-bottom: 1px solid var(--line); }
.workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 28px; }
.workspace-heading h1 { max-width: 760px; margin: 3px 0 8px; font-size: 34px; line-height: 1.2; letter-spacing: 0; }
.workspace-heading p:last-child { margin: 0; color: var(--muted); max-width: 680px; }
.eyebrow { margin: 0; color: var(--teal); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.status-line { display: flex; align-items: center; gap: 9px; color: #405057; white-space: nowrap; padding-bottom: 5px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-line.building .status-dot { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }

.workspace-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 320px;
  background: white;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  min-height: 660px;
}

.process-rail { padding: 28px 22px; border-right: 1px solid var(--line); background: #fbfcfc; }
.process-rail ol { list-style: none; padding: 0; margin: 0; }
.process-rail li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 0 0 25px; position: relative; color: #7b898e; }
.process-rail li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 4px; width: 1px; background: var(--line); }
.process-rail li > span { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; background: white; z-index: 1; }
.process-rail li strong { display: block; font-size: 13px; color: #536269; }
.process-rail li small { display: block; font-size: 11px; line-height: 1.35; }
.process-rail li.active > span { background: var(--teal); color: white; border-color: var(--teal); }
.process-rail li.active strong { color: var(--ink); }
.rail-note { margin-top: 18px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.rail-note svg { color: var(--teal); }
.rail-note p { margin: 8px 0 0; font-size: 12px; }
.rail-note strong { color: var(--ink); }

.intake-form { padding: 30px 34px; min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
legend, .field > span { display: block; margin-bottom: 10px; font-weight: 800; font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 140px; gap: 16px; margin-bottom: 26px; }
.field select, .field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
}
.field select:focus, .field input:focus { outline: 3px solid var(--teal-soft); border-color: var(--teal); }
.field small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.scope-declaration-field { display: block; margin-bottom: 26px; }
.task-sku-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.task-sku-field span { margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.task-rule { margin: 10px 0 0; }

.segmented { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; min-width: 108px; padding: 8px 16px; text-align: center; background: white; color: var(--muted); }
.segmented label + label span { border-left: 1px solid var(--line-strong); }
.segmented input:checked + span { background: var(--ink); color: white; }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.check-choice input { position: absolute; opacity: 0; }
.check-choice span { display: block; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 5px; cursor: pointer; background: white; }
.check-choice input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.check-grid label { display: flex; align-items: flex-start; gap: 9px; color: #405057; cursor: pointer; }
.check-grid input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--teal); flex: 0 0 auto; }
.sensitive-fieldset { padding-top: 20px; border-top: 1px solid var(--line); }
.field-help { margin: -6px 0 12px; color: var(--muted); font-size: 12px; }
.danger-checks input { accent-color: var(--red); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.local-only { display: flex; gap: 7px; align-items: center; margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.local-only svg { width: 15px; height: 15px; }

.result-panel { padding: 28px 24px; border-left: 1px solid var(--line); background: #fbfcfc; min-width: 0; }
.result-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.result-head h2 { margin: 3px 0 0; font-size: 19px; line-height: 1.3; }
.result-state { border-radius: 4px; padding: 4px 8px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.result-state.neutral { color: var(--muted); background: var(--surface-strong); }
.result-state.safe { color: var(--green); background: var(--green-soft); }
.result-state.caution { color: var(--amber); background: var(--amber-soft); }
.result-state.blocked { color: var(--red); background: var(--red-soft); }
.recommendation { min-height: 415px; padding: 20px 0; color: #405057; }
.recommendation p { margin: 0 0 12px; }
.recommendation ul { padding-left: 20px; margin: 0; }
.recommendation li { margin-bottom: 8px; }
.recommendation h3 { margin: 0 0 8px; color: var(--ink); font-size: 16px; }
.recommendation .package { padding: 14px 0; border-bottom: 1px solid var(--line); }
.recommendation .package strong { display: block; color: var(--teal-dark); font-size: 18px; }
.recommendation .warning-box { margin: 16px 0; padding: 12px; border-left: 3px solid var(--red); background: var(--red-soft); color: #7e2b28; }
.recommendation .ready-box { margin: 16px 0; padding: 12px; border-left: 3px solid var(--green); background: var(--green-soft); color: #185c40; }
.result-actions { display: grid; gap: 9px; }

.sample-band, .services-band, .contact-band, .privacy-band { padding: 76px 0; border-bottom: 1px solid var(--line); }
.sample-band { background: white; }
.services-band { background: var(--surface); }
.contact-band { background: white; }
.privacy-band { background: #10272a; color: white; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 60px; align-items: end; margin-bottom: 36px; }
.section-heading h2, .privacy-layout h2 { margin: 5px 0 0; font-size: 30px; line-height: 1.25; letter-spacing: 0; }
.section-heading > p { margin: 0; color: var(--muted); }
.sample-intro p { margin: 0 0 12px; color: var(--muted); }
.light-link { color: var(--teal-dark); font-size: 13px; }

.sample-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr); gap: 38px; align-items: start; }
.report-sheet { min-height: 620px; padding: 34px; background: white; border: 1px solid var(--line-strong); box-shadow: 0 16px 40px rgba(30,50,58,.13); }
.report-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); color: var(--muted); font-size: 12px; }
.report-topline > div { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.report-logo { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--ink); border-radius: 4px; font-size: 10px; font-weight: 800; }
.report-title { padding: 34px 0 28px; }
.report-title p { margin: 0; color: var(--teal); font-weight: 800; font-size: 12px; }
.report-title h3 { margin: 4px 0 7px; font-size: 27px; }
.report-title span { color: var(--muted); font-size: 12px; }
.report-metrics { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); margin-bottom: 30px; }
.report-metrics div { padding: 15px; }
.report-metrics div + div { border-left: 1px solid var(--line); }
.report-metrics strong { display: block; font-size: 24px; }
.report-metrics span { display: block; color: var(--muted); font-size: 11px; }
.mini-table { border-top: 1px solid var(--line-strong); }
.mini-row { display: grid; grid-template-columns: 90px minmax(0,1fr) 78px; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 11px; align-items: center; }
.mini-head { color: var(--muted); font-weight: 700; }
.risk { display: inline-block; min-width: 34px; margin-right: 5px; padding: 2px 5px; border-radius: 3px; font-size: 9px; text-align: center; }
.risk.red { background: var(--red-soft); color: var(--red); }
.risk.amber { background: var(--amber-soft); color: var(--amber); }
.risk.green { background: var(--green-soft); color: var(--green); }
.risk.blue { background: #e8f2fb; color: #2166a5; }
.risk.gray { background: #edf1f2; color: #526068; }
.report-foot { margin: 34px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

.risk-list { display: grid; gap: 14px; }
.risk-card { padding: 22px 24px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.risk-card.red-card { border-left: 4px solid var(--red); }
.risk-card.amber-card { border-left: 4px solid var(--amber); }
.risk-card.provided-card { border-left: 4px solid #2166a5; }
.risk-card.unknown-card { border-left: 4px solid #526068; }
.risk-card.na-card { border-left: 4px solid #7c858a; background: #fafbfb; }
.risk-card-head { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
.red-card .risk-card-head b { color: var(--red); }
.amber-card .risk-card-head b { color: var(--amber); }
.provided-card .risk-card-head b { color: #2166a5; }
.unknown-card .risk-card-head b { color: #526068; }
.na-card .risk-card-head b { color: #626c71; }
.risk-card h3 { margin: 8px 0 6px; font-size: 17px; }
.risk-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.risk-card dl { display: grid; grid-template-columns: 1.3fr .6fr 1.2fr; gap: 12px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.risk-card dl div { min-width: 0; }
.risk-card dt { color: var(--muted); font-size: 10px; }
.risk-card dd { margin: 2px 0 0; color: #405057; font-size: 11px; overflow-wrap: anywhere; }

.service-table { border-top: 1px solid var(--line-strong); }
.service-row { display: grid; grid-template-columns: 1fr 1.3fr 1.4fr .6fr; gap: 20px; align-items: center; padding: 20px 12px; border-bottom: 1px solid var(--line); background: transparent; }
.service-row span { color: var(--muted); }
.service-head { padding-top: 11px; padding-bottom: 11px; font-size: 11px; font-weight: 800; color: var(--muted); }
.service-row.featured { background: white; border-left: 3px solid var(--teal); }
.service-row b { text-align: right; color: var(--teal-dark); font-size: 17px; }
.scope-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.scope-strip > div { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.scope-strip > div:first-child svg { color: var(--green); }
.scope-strip > div:last-child svg { color: var(--red); }
.scope-strip strong { color: var(--ink); }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 80px; align-items: center; }
.contact-copy h2 { max-width: 720px; margin: 5px 0 14px; font-size: 30px; line-height: 1.25; }
.contact-copy > p:not(.eyebrow):not(.contact-note) { max-width: 720px; margin: 0; color: var(--muted); }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.contact-note { display: flex; align-items: center; gap: 7px; margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.contact-note svg { width: 16px; color: var(--teal); }
.contact-qr { justify-self: end; width: 240px; margin: 0; text-align: center; }
.contact-qr img { display: block; width: 100%; height: auto; padding: 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; }
.contact-qr figcaption { display: block; margin-top: 12px; }
.contact-qr strong, .contact-qr span { display: block; }
.contact-qr strong { font-size: 14px; }
.contact-qr span { color: var(--muted); font-size: 11px; }

.privacy-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; align-items: center; }
.privacy-layout .eyebrow { color: #6ee7d3; }
.privacy-copy { color: #b8c8cb; max-width: 570px; }
.privacy-actions { display: flex; gap: 20px; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.privacy-actions .button-secondary { background: transparent; color: white; border-color: #527075; }
.privacy-actions .button-secondary:hover { border-color: #6ee7d3; color: #6ee7d3; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: #6ee7d3; font-weight: 700; }
.text-link svg { width: 15px; height: 15px; }
.data-matrix { border-top: 1px solid #385459; }
.matrix-row { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid #385459; }
.matrix-row > span { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.matrix-row p { margin: 0; color: #b8c8cb; }
.matrix-row.allow > span { color: #6ee7a4; }
.matrix-row.caution > span { color: #ffd36f; }
.matrix-row.deny > span { color: #ff8e88; }

footer { padding: 26px 0; background: #0b1a1c; color: #8fa6aa; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 35px; font-size: 11px; }
.footer-inner > div { display: flex; align-items: center; gap: 15px; }
.footer-inner strong { color: white; font-size: 14px; }
.footer-inner p { max-width: 620px; margin: 0; text-align: right; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 15px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1020px) {
  .header-inner { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .workspace-grid { grid-template-columns: 150px minmax(0,1fr); }
  .result-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .recommendation { min-height: 0; }
  .result-actions { grid-template-columns: 1fr 1fr; }
  .sample-layout { grid-template-columns: 1fr; }
  .report-sheet { min-height: 0; }
  .contact-layout { gap: 40px; }
  .privacy-layout { gap: 40px; }
}

@media (max-width: 720px) {
  .header-inner, .section-inner, .workspace-heading, .workspace-grid, .footer-inner { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 64px; gap: 10px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 16px; }
  .header-action { min-width: 0; padding: 0 12px; font-size: 13px; white-space: nowrap; }
  .header-action svg { margin: 0; }
  .workspace-band { padding: 30px 0 36px; }
  .workspace-heading { display: block; }
  .workspace-heading h1 { font-size: 28px; }
  .status-line { margin-top: 16px; white-space: normal; }
  .workspace-grid { grid-template-columns: 1fr; box-shadow: none; }
  .process-rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 10px; overflow: hidden; }
  .process-rail ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-width: 0; }
  .process-rail li { width: auto; grid-template-columns: 1fr; justify-items: center; gap: 6px; padding: 0; text-align: center; }
  .process-rail li:not(:last-child)::after { left: 50%; top: 13px; bottom: auto; width: 100%; height: 1px; }
  .process-rail li > span { width: 26px; height: 26px; }
  .process-rail li strong { font-size: 10px; line-height: 1.25; }
  .process-rail li small { display: none; }
  .rail-note { display: none; }
  .intake-form { padding: 24px 18px; }
  .field-row, .check-grid, .task-sku-list { grid-template-columns: 1fr; }
  .segmented { display: grid; width: 100%; }
  .segmented span { min-width: 0; }
  .form-actions { display: grid; grid-template-columns: 1fr; }
  .result-panel { padding: 23px 18px; }
  .result-actions { grid-template-columns: 1fr; }
  .sample-band, .services-band, .contact-band, .privacy-band { padding: 54px 0; }
  .section-heading { display: block; }
  .section-heading h2, .privacy-layout h2 { font-size: 25px; }
  .section-heading > p { margin-top: 14px; }
  .sample-intro { margin-top: 14px; }
  .sample-layout { display: block; }
  .report-sheet { padding: 22px 18px; margin-bottom: 24px; overflow: hidden; }
  .report-topline { align-items: flex-start; }
  .report-title h3 { font-size: 23px; }
  .report-metrics div { padding: 11px; }
  .mini-row { grid-template-columns: 72px minmax(0,1fr) 62px; gap: 8px; }
  .risk-card { padding: 18px; }
  .risk-card dl { grid-template-columns: 1fr; }
  .service-table { border-top: 0; }
  .service-head { display: none; }
  .service-row { grid-template-columns: 1fr auto; gap: 4px 14px; padding: 18px 14px; border: 1px solid var(--line); margin-bottom: 10px; background: white; }
  .service-row strong { grid-column: 1; }
  .service-row b { grid-column: 2; grid-row: 1; }
  .service-row span { grid-column: 1 / -1; }
  .scope-strip, .contact-layout, .privacy-layout { grid-template-columns: 1fr; }
  .contact-layout { gap: 36px; }
  .contact-copy h2 { font-size: 25px; }
  .contact-actions { display: grid; grid-template-columns: 1fr; }
  .contact-note { align-items: flex-start; }
  .contact-qr { justify-self: center; width: min(240px, 100%); }
  .privacy-layout { gap: 42px; }
  .matrix-row { grid-template-columns: 1fr; gap: 8px; }
  .footer-inner { display: block; }
  .footer-inner > div { display: block; }
  .footer-inner span { display: block; }
  .footer-inner p { text-align: left; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
