:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --ink: #101114;
  --muted: #5b6370;
  --dim: #8a93a3;
  --line: #dce2ea;
  --line-strong: #101114;
  --accent: #155eef;
  --red: #b42318;
  --green: #087443;
  --violet: #6941c6;
  --accent-soft: #eef4ff;
  --violet-soft: #f4f0ff;
  --green-soft: #ecfdf3;
  --orange: #b54708;
  --orange-soft: #fff4ed;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.56;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 850;
}

a:hover { text-decoration: underline; }

.shell {
  width: min(1180px, calc(100vw - 44px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line-strong);
}

.nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  color: var(--ink);
}

.mark {
  width: 38px;
  height: 3px;
  background: var(--ink);
  display: inline-block;
}

.navlinks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlinks a {
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.navlinks a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 330px;
  gap: 56px;
  align-items: center;
  padding: 54px 0 48px;
  border-bottom: 2px solid var(--line-strong);
}

.eyebrow {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0;
  font-size: 13px;
  margin-bottom: 16px;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 6.1vw, 70px);
  line-height: .95;
  letter-spacing: 0;
  font-weight: 950;
  max-width: 980px;
}

.deck {
  color: var(--muted);
  font-size: 18px;
  max-width: 760px;
  margin: 24px 0 0;
}

.hero-panel {
  background: var(--surface-2);
  border-left: 5px solid var(--line-strong);
  padding: 10px 22px;
}

.metric {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.metric:last-child { border-bottom: 0; }

.metric b {
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.metric span {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 850;
}

.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 42px;
  align-items: start;
  margin-bottom: 24px;
}

h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 950;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  max-width: 800px;
  font-size: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tile {
  background: var(--surface);
  padding: 24px 23px 26px;
  min-height: 176px;
}

.tile.tight { min-height: 0; }

.tile strong {
  color: var(--ink);
  font-weight: 950;
}

.tile .kicker,
.row .kicker,
.mission-card .kicker {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 900;
  margin-bottom: 10px;
}

.tile h3,
.mission-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 950;
}

.tile p,
.mission-card p {
  margin: 0;
  color: var(--muted);
}

.route {
  border-top: 2px solid var(--line-strong);
}

.row {
  display: grid;
  grid-template-columns: 150px 1.05fr 1.35fr 126px;
  gap: 22px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.row.asset-row {
  grid-template-columns: 145px 1.1fr 1.7fr 122px;
}

.row.no-action {
  grid-template-columns: 145px 1.1fr 1.7fr;
}

.row h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
  font-weight: 950;
}

.row p {
  margin: 0;
  color: var(--muted);
}

.row p strong {
  color: var(--ink);
}

.ddia-map {
  display: inline-block;
  margin-top: 6px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 850;
}

.status {
  color: var(--dim);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.reading-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--line-strong);
  counter-reset: reading;
}

.reading-list li {
  counter-increment: reading;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.reading-list li::before {
  content: counter(reading, decimal-leading-zero);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.reading-list a {
  color: var(--ink);
  font-size: 16px;
}

.reading-list a:hover {
  color: var(--accent);
}

.row h3 a {
  color: inherit;
}

.week-day-index {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 7px;
}

.outline-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.week-day-index a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.week-day-index a:hover {
  color: var(--accent);
}

.week-day-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
}

.week-day-index .outline-label {
  width: 100%;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 900;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.button:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  text-decoration: none;
}

.mission-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 26px;
}

.callout {
  background: var(--accent-soft);
  border-left: 5px solid var(--accent);
  padding: 18px 20px;
  margin: 20px 0;
  color: var(--ink);
  font-weight: 700;
}

.callout.orange {
  background: var(--orange-soft);
  border-left-color: var(--orange);
}

.callout.green {
  background: var(--green-soft);
  border-left-color: var(--green);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  background: var(--surface);
  border: 1px solid var(--line);
}

.matrix th,
.matrix td {
  border-bottom: 1px solid var(--line);
  padding: 12px 13px;
  text-align: left;
  vertical-align: top;
}

.matrix th {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  background: var(--surface-2);
}

.matrix td {
  color: var(--ink);
}

.matrix tr:last-child td { border-bottom: 0; }

.codeblock {
  background: #111318;
  color: #f7f9fc;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  margin: 18px 0;
}

.qa-list {
  display: grid;
  gap: 14px;
}

.qa-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px;
}

.qa-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.qa-card p {
  margin: 0;
  color: var(--muted);
}

.qa-card p + p { margin-top: 10px; }

.decision-chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.decision-chain article {
  min-height: 260px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.decision-chain article:last-child { border-right: 0; }

.decision-chain span,
.mock-round-head > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.decision-chain h3 {
  margin: 10px 0 9px;
  font-size: 19px;
  line-height: 1.16;
}

.decision-chain p,
.decision-chain b {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.decision-chain b {
  display: block;
  margin-top: 14px;
  color: var(--ink);
}

.mock-round {
  margin: 32px 0 48px;
  border-top: 2px solid var(--ink);
}

.mock-round-head {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.mock-round-head span { grid-row: auto; }

.mock-round-head h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.12;
}

.mock-round-head p {
  margin: 0;
  color: var(--muted);
}

.mock-nodes { display: grid; }

.mock-node {
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
}

.mock-node-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  margin-bottom: 15px;
}

.mock-node-head span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
}

.mock-node h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin: 0;
  padding-left: 68px;
}

.mock-grid > div { padding: 11px 0; }
.mock-grid .follow { border-left: 1px solid var(--line); padding-left: 18px; }

.mock-grid dt {
  color: var(--dim);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
}

.mock-grid dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
}

.mock-grid .red dt { color: var(--red); }
.mock-grid .red dd { color: var(--muted); }

.mock-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}

.mock-steps span {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.mock-steps span:last-child { border-right: 0; }

.prompt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.prompt-block {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  background: #111318;
  color: #f7f9fc;
  border-left: 5px solid var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.checkline {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.checkline::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  margin-top: 6px;
  background: var(--surface);
}

.small-note {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.section-split h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.section-split p {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.two-col > div {
  background: var(--surface);
  padding: 24px;
}

.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.compact-list li:last-child { border-bottom: 0; }

.box {
  width: 13px;
  height: 13px;
  border: 2px solid var(--line-strong);
  margin-top: 5px;
  background: var(--surface);
}

.day-hero {
  padding: 58px 0 34px;
  border-bottom: 2px solid var(--line-strong);
}

.day-hero h1 {
  font-size: 58px;
  line-height: 1;
  max-width: 1060px;
}

.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 900;
}

.day-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px 7px 12px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.day-meta span:nth-child(2) {
  border-left-color: var(--violet);
  background: var(--violet-soft);
}

.day-meta span:nth-child(3) {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.ops-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 28px;
}

.ops-grid > section {
  background: var(--surface);
  padding: 28px;
}

.ops-grid h2 {
  font-size: 25px;
  margin-bottom: 18px;
}

.source-block {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.source-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.source-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  font-weight: 950;
  letter-spacing: 0;
}

.source-title a { color: var(--ink); }

.source-title span {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
  white-space: nowrap;
}

.source-sections {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.source-sections li {
  color: var(--ink);
}

.source-sections li::before {
  content: "|";
  color: var(--accent);
  margin-right: 9px;
  font-weight: 950;
}

.proof {
  margin-top: 12px;
  color: var(--ink);
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 650;
}

.extension-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid var(--line-strong);
}

.mini-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.extension-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.extension-list li {
  color: var(--muted);
  font-size: 13px;
}

.extension-list a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.rubric {
  width: 100%;
  border-collapse: collapse;
}

.rubric th,
.rubric td {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  text-align: left;
  vertical-align: top;
}

.rubric th {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 950;
  width: 134px;
  padding-right: 18px;
}

.rubric td {
  color: var(--ink);
}

.algo-pack {
  border-top: 2px solid var(--line-strong);
  padding-top: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.tag-row span:nth-child(2) {
  background: var(--surface-2);
  border-left-color: var(--line-strong);
}

.algo-why {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.algo-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 12px;
}

.algo-line a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 900;
}

.footer {
  padding: 34px 0 52px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 850;
}

@media (max-width: 860px) {
  .shell { width: min(100vw - 28px, 1180px); }
  .hero, .section-head, .ops-grid, .two-col, .grid-2, .grid-4, .section-split { grid-template-columns: 1fr; }
  .hero { gap: 32px; min-height: 0; padding-top: 52px; }
  h1 { font-size: 44px; }
  .day-hero h1 { font-size: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .row, .row.asset-row, .row.no-action { grid-template-columns: 1fr; gap: 8px; }
  .nav {
    height: auto;
    padding: 11px 0 8px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .navlinks {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  .navlinks::-webkit-scrollbar { display: none; }
  .navlinks a { flex: 0 0 auto; }
  .decision-chain, .mock-grid, .mock-steps { grid-template-columns: 1fr; }
  .decision-chain article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .mock-round-head { grid-template-columns: 1fr; }
  .mock-round-head span { grid-row: auto; }
  .mock-node-head { grid-template-columns: 42px minmax(0, 1fr); }
  .mock-grid { padding-left: 0; }
  .mock-grid .follow { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .mock-steps span { border-right: 0; border-bottom: 1px solid var(--line); }
  .mock-steps span:last-child { border-bottom: 0; }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11px;
  }
  .topbar {
    position: static;
    background: #fff;
    border-bottom: 1px solid #000;
  }
  .hero, .section, .day-hero { border-color: #000; }
  .tile, .mission-card, .two-col > div, .ops-grid > section, .hero-panel {
    background: #fff;
    color: #000;
  }
  .grid-3, .two-col, .ops-grid {
    border-color: #000;
    background: #000;
  }
  .section { padding: 28px 0; }
  h1 { font-size: 42px; }
  h2 { font-size: 24px; }
  .day-hero h1 { font-size: 38px; }
  .deck, .section-copy, .tile p, .mission-card p, .row p, .source-sections li, .rubric td, .compact-list li {
    color: #111;
  }
  .button {
    color: #000;
    border-color: #000;
  }
}
