:root {
  --ink: #132331;
  --ink-soft: #38505e;
  --paper: #edf2f1;
  --paper-deep: #dbe5e3;
  --line: #b7c7c7;
  --navy: #1a3b58;
  --blue: #3d769d;
  --aqua: #7fc4bd;
  --amber: #dc9530;
  --rust: #c45f43;
  --white: #fbfcf9;
  --font-display: "Bahnschrift SemiCondensed", "Arial Narrow", "Microsoft YaHei", sans-serif;
  --font-body: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
}

button, a { font: inherit; }

a { color: inherit; text-decoration: none; }

button { cursor: pointer; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 12px;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-140%);
}

.skip-link:focus { transform: translateY(0); }

.site-shell { overflow: hidden; }

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: 76px;
  padding: 0 clamp(22px, 5vw, 92px);
  border-bottom: 1px solid var(--line);
  background: rgba(237, 242, 241, 0.95);
}

.brand, .nav, .hero-actions, .mode-pill, .route-topline, .route-output,
.console-head, .console-foot, .entity-switcher, .report-meta, .stack-labels,
.footer, .proof-strip, .boundary-columns { display: flex; align-items: center; }

.brand { gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--white);
  background: var(--navy);
}

.brand-mark svg { width: 20px; height: 20px; }

.nav { gap: 26px; justify-content: center; font-size: 13px; color: var(--ink-soft); }
.nav a { position: relative; padding: 26px 0 22px; }
.nav a::after { position: absolute; right: 0; bottom: 17px; left: 0; height: 2px; content: ""; background: var(--amber); transform: scaleX(0); transition: transform 180ms ease; }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

.mode-pill { justify-self: end; gap: 8px; font-size: 12px; color: var(--navy); }
.mode-dot { width: 8px; height: 8px; background: var(--aqua); border: 1px solid var(--navy); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(460px, 0.93fr);
  gap: clamp(40px, 7vw, 120px);
  min-height: 648px;
  padding: clamp(72px, 10vw, 150px) clamp(22px, 9vw, 152px) clamp(60px, 9vw, 126px);
  position: relative;
}

.hero::before {
  position: absolute;
  top: 0;
  right: 8vw;
  bottom: 0;
  width: 1px;
  content: "";
  background: var(--line);
  opacity: 0.55;
}

.hero-copy { position: relative; z-index: 1; min-width: 0; max-width: 720px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 { font-family: var(--font-display); }

h1 {
  max-width: 700px;
  margin-bottom: 24px;
  font-size: clamp(53px, 6.1vw, 102px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

h1 em { color: var(--navy); font-style: normal; }

.hero-lede { max-width: 590px; color: var(--ink-soft); font-size: 18px; line-height: 1.8; }

.hero-actions { gap: 12px; margin: 32px 0 18px; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--navy);
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover { transform: translate(-2px, -2px); }
.button:focus-visible, .text-button:focus-visible, .entity-tab:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.button-primary { color: var(--white); background: var(--navy); }
.button-primary:hover { background: var(--blue); }
.button-secondary { color: var(--navy); background: transparent; }
.button-secondary:hover { background: var(--paper-deep); }

.safety-line { max-width: 500px; margin: 0; color: var(--ink-soft); font-size: 12px; }

.route-panel {
  position: relative;
  align-self: center;
  min-width: 0;
  width: 100%;
  padding: 18px;
  color: var(--white);
  background: var(--navy);
  box-shadow: 13px 13px 0 var(--amber);
}

.route-topline { gap: 12px; justify-content: space-between; padding: 6px 2px 18px; border-bottom: 1px solid rgba(255,255,255,0.28); color: #c7dce5; font-size: 11px; letter-spacing: 0.08em; }
.route-topline > * { min-width: 0; }
.route-topline strong { color: var(--white); font-size: 13px; letter-spacing: 0; text-align: right; overflow-wrap: anywhere; }

.route-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 0; }

.route-lane { min-height: 210px; padding: 13px; border: 1px solid rgba(255,255,255,0.35); }
.route-lane-a { background: rgba(77, 135, 164, 0.34); }
.route-lane-b { background: rgba(70, 139, 126, 0.34); }
.route-lane header { display: flex; gap: 9px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.26); font-size: 12px; font-weight: 700; }
.lane-code { display: grid; width: 22px; height: 22px; place-items: center; color: var(--navy); background: var(--white); font-weight: 900; }
.route-lane ol { padding: 14px 0 0 29px; margin: 0; color: #e4eef1; font-size: 12px; line-height: 2; }
.route-output { gap: 8px; justify-content: center; min-height: 48px; color: #d8e5e7; border-top: 1px solid rgba(255,255,255,0.28); font-size: 12px; }
.route-arrow { color: var(--amber); font-size: 19px; }

.proof-strip {
  align-items: stretch;
  justify-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #e2eae8;
}

.proof-strip > div { width: min(33.33%, 460px); min-height: 132px; padding: 25px 36px; border-right: 1px solid var(--line); }
.proof-strip > div:first-child { border-left: 1px solid var(--line); }
.proof-index { display: block; margin-bottom: 8px; color: var(--rust); font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.proof-strip strong { display: block; font-size: 15px; }
.proof-strip p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }

.section { padding: clamp(72px, 9vw, 135px) clamp(22px, 9vw, 152px); }

.section-heading { max-width: 750px; }
.section-heading h2, .boundary-intro h2, .final-callout h2 { margin-bottom: 22px; font-size: clamp(38px, 4.1vw, 66px); line-height: 1.04; letter-spacing: -0.055em; }
.section-heading > p:not(.eyebrow), .boundary-intro > p:not(.eyebrow) { max-width: 620px; color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.compact-heading { margin-bottom: 42px; }

.workflow-section { background: var(--white); }

.demo-console { max-width: 1010px; margin-top: 52px; border: 1px solid var(--ink); background: #f3f6f4; }
.console-head { min-height: 51px; justify-content: space-between; padding: 0 18px; color: var(--white); background: var(--ink); font-size: 12px; }
.console-window-label { display: flex; gap: 9px; align-items: center; letter-spacing: 0.05em; }
.window-signal { width: 8px; height: 8px; background: var(--aqua); border-radius: 50%; }
.console-state { color: #b8d7d3; }

.stage-list { padding: 10px 18px; }
.stage { display: grid; grid-template-columns: 66px 1fr 94px; gap: 16px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--line); color: #6a7c86; transition: background 260ms ease, color 260ms ease; }
.stage:last-child { border-bottom: 0; }
.stage-number { color: #94a5ac; font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.stage-label { font-size: 14px; font-weight: 700; }
.stage-status { justify-self: end; font-size: 12px; }
.stage.active { color: var(--navy); background: #dfebe7; }
.stage.active .stage-number { color: var(--blue); }
.stage.running { color: var(--navy); background: #f9e4c5; }
.stage.running .stage-status::before { display: inline-block; width: 8px; height: 8px; margin-right: 6px; content: ""; background: var(--amber); border-radius: 50%; animation: pulse 1s infinite alternate; }
.stage.complete { color: var(--ink); }
.stage.complete .stage-status { color: #22715f; font-weight: 800; }
.stage.complete .stage-status::before { margin-right: 6px; content: "✓"; }

@keyframes pulse { to { transform: scale(1.45); opacity: 0.48; } }

.console-foot { justify-content: space-between; min-height: 64px; padding: 0 18px; border-top: 1px solid var(--line); }
.console-foot p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.text-button { padding: 4px 0; border: 0; color: var(--navy); background: transparent; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--rust); }

.output-section { background: #dce6e4; }
.sample-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr); gap: 20px; align-items: stretch; }
.output-panel { padding: 26px; border: 1px solid var(--line); background: var(--white); }
.entity-switcher { gap: 0; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.entity-tab { padding: 9px 14px 11px; border: 0; color: var(--ink-soft); background: transparent; font-size: 13px; font-weight: 800; }
.entity-tab.selected { color: var(--navy); border-bottom: 3px solid var(--amber); }
.report-meta { justify-content: space-between; margin-bottom: 15px; color: var(--ink-soft); font-size: 12px; }
.sample-badge { padding: 3px 7px; border: 1px solid var(--line); color: var(--rust); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th, .report-table td { padding: 12px 9px; border-bottom: 1px solid #d5dedb; text-align: right; }
.report-table th:first-child, .report-table td:first-child { text-align: left; }
.report-table th { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.report-table td { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.report-table td:first-child { font-family: var(--font-body); font-size: 13px; font-weight: 700; }
.output-rule { margin-top: 20px; padding: 12px 14px; border-left: 4px solid var(--amber); color: var(--ink-soft); background: #f6f1e7; font-size: 12px; }

.insight-rail { display: grid; grid-template-rows: 1fr 1fr auto; gap: 20px; }
.insight-card, .mini-stack { padding: 20px; border: 1px solid var(--line); background: var(--navy); color: var(--white); }
.insight-card:nth-child(2) { background: var(--blue); }
.card-kicker { display: block; margin-bottom: 16px; color: #b9d3d4; font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.insight-card strong { display: block; margin-bottom: 9px; font-family: var(--font-display); font-size: 28px; letter-spacing: -0.045em; }
.insight-card p { margin: 0; color: #d8e7e6; font-size: 12px; line-height: 1.7; }
.mini-stack { background: #edf3ef; color: var(--ink); }
.mini-stack .card-kicker { color: var(--ink-soft); }
.stack-bar { display: flex; height: 18px; overflow: hidden; border: 1px solid var(--ink); }
.stack-bar span { height: 100%; transition: width 320ms ease; }
#stack-a { width: 45%; background: var(--blue); }
#stack-b { width: 27%; background: var(--aqua); }
#stack-c { width: 28%; background: var(--amber); }
.stack-labels { justify-content: space-between; margin-top: 7px; color: var(--ink-soft); font-size: 10px; }

.rule-section { background: var(--white); }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--ink); background: var(--ink); }
.rule-card { min-height: 328px; padding: clamp(26px, 4vw, 54px); background: var(--white); }
.replenish-card { border-top: 8px solid var(--amber); }
.slow-card { border-top: 8px solid var(--rust); }
.rule-flag { display: inline-block; margin-bottom: 34px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; }
.rule-card h3 { margin-bottom: 18px; font-size: clamp(29px, 3.1vw, 47px); line-height: 1.03; letter-spacing: -0.052em; }
.rule-card h3 b { color: var(--rust); font-weight: 800; }
.replenish-card h3 b { color: #bc7620; }
.rule-card p { max-width: 455px; color: var(--ink-soft); font-size: 14px; }
.rule-formula { display: inline-block; margin-top: 12px; padding: 7px 8px; color: var(--navy); background: #e6efec; font-family: "Cascadia Mono", Consolas, monospace; font-size: 11px; }

.boundary-section { display: grid; grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr); gap: clamp(44px, 8vw, 160px); color: var(--white); background: var(--ink); }
.boundary-intro .eyebrow { color: var(--aqua); }
.boundary-intro h2 { color: var(--white); }
.boundary-intro > p:not(.eyebrow) { color: #cad6d9; }
.boundary-columns { align-items: stretch; gap: 1px; background: #5a7280; }
.boundary-columns article { flex: 1; padding: 25px 24px; background: #203847; }
.boundary-columns .no-go { background: #284656; }
.boundary-columns h3 { margin-bottom: 20px; font-size: 23px; letter-spacing: -0.03em; }
.boundary-columns ul { padding: 0; margin: 0; list-style: none; }
.boundary-columns li { position: relative; padding: 0 0 13px 19px; color: #d4e0e1; font-size: 13px; line-height: 1.6; }
.boundary-columns li::before { position: absolute; left: 0; color: var(--aqua); content: "—"; }
.boundary-columns .no-go li::before { color: #e38a70; }

.final-callout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: clamp(58px, 7vw, 105px) clamp(22px, 9vw, 152px); background: var(--amber); }
.final-callout .eyebrow { color: var(--navy); }
.final-callout h2 { margin-bottom: 0; color: var(--navy); }
.callout-copy { align-self: end; max-width: 500px; }
.callout-copy p { margin-bottom: 9px; color: #473218; font-size: 16px; }
.audit-stamp { display: inline-block; margin-top: 16px; padding: 7px 9px; border: 1px solid var(--navy); color: var(--navy); font-family: "Cascadia Mono", Consolas, monospace; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }

.footer { justify-content: space-between; min-height: 74px; padding: 0 clamp(22px, 9vw, 152px); color: #bed0d0; background: #10232d; font-size: 11px; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .hero, .boundary-section, .final-callout { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero::before { display: none; }
  .route-panel { max-width: 620px; }
  .sample-grid { grid-template-columns: 1fr; }
  .insight-rail { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .mini-stack { grid-column: 1 / -1; }
  .boundary-columns { gap: 16px; background: transparent; }
  .boundary-columns article { border: 1px solid #5a7280; }
}

@media (max-width: 620px) {
  .topbar { min-height: 64px; padding: 0 18px; }
  .mode-pill { font-size: 10px; }
  .hero, .section, .final-callout { padding-right: 20px; padding-left: 20px; }
  .hero { padding-top: 65px; }
  .route-topline { display: block; }
  .route-topline strong { display: block; padding-top: 6px; text-align: left; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .route-lanes, .rule-grid, .boundary-columns { grid-template-columns: 1fr; }
  .proof-strip { align-items: stretch; flex-direction: column; }
  .proof-strip > div, .proof-strip > div:first-child { width: 100%; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); border-left: 0; }
  .proof-strip > div:last-child { border-bottom: 0; }
  .stage { grid-template-columns: 40px 1fr; gap: 10px; padding: 9px 0; }
  .stage-status { grid-column: 2; justify-self: start; }
  .console-foot { align-items: flex-start; flex-direction: column; gap: 9px; padding: 14px 18px; }
  .output-panel { padding: 16px; overflow-x: auto; }
  .report-table { min-width: 485px; }
  .insight-rail { grid-template-columns: 1fr; }
  .mini-stack { grid-column: auto; }
  .boundary-columns { display: grid; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; padding: 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
