:root {
  color-scheme: light;
  --paper: #f7f8f4;
  --white: #fff;
  --ink: #17241e;
  --muted: #526358;
  --line: #d6e1d7;
  --green: #115b3b;
  --soft: #e4f0e6;
  --board: #163d2b;
  --lime: #d2ed9b;
  --radius: 18px;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: var(--green); }
button:focus-visible, a:focus-visible { outline: 3px solid #268555; outline-offset: 4px; }
button:disabled { opacity: .45; cursor: default; }
.shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.header-inner { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 1.22rem; font-weight: 780; }
.brand img { display: block; width: 104px; height: auto; }
.brand small { margin-left: 4px; color: var(--muted); font-size: .76rem; font-weight: 600; }
.site-header nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 30px); }
.site-header nav a { text-decoration: none; color: var(--muted); font-size: .88rem; font-weight: 650; }
.site-header nav .site-link { color: var(--green); }
.hero { display: grid; grid-template-columns: 1.12fr .88fr; gap: 58px; align-items: center; padding-block: 66px 56px; }
.eyebrow { margin: 0 0 10px; font: 700 .72rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .07em; color: var(--green); }
.signal { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #4e9b65; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: "Segoe UI", system-ui, sans-serif; font-size: clamp(2.4rem, 5.7vw, 5rem); line-height: .99; letter-spacing: -.06em; font-weight: 780; }
.hero-copy > p:not(.eyebrow) { color: var(--muted); max-width: 43ch; margin: 22px 0 26px; font-size: 1.08rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; padding: .66rem .98rem; min-height: 43px; border-radius: 9px; font-size: .9rem; font-weight: 730; border: 1px solid transparent; text-decoration: none; cursor: pointer; }
.primary { background: var(--green); color: var(--white); }
.primary:hover { background: #0d4b30; }
.quiet { color: var(--green); background: var(--white); border-color: var(--line); }
.quiet:hover { background: var(--soft); }
.hero-diagram { color: #edf8ed; background-color: var(--board); background-image: radial-gradient(#ffffff28 1px, transparent 1px); background-size: 18px 18px; padding: 24px; border-radius: 21px; box-shadow: 0 12px 35px #163d2b24; }
.board-title { display: flex; justify-content: space-between; gap: 8px; color: #c0d9c9; font: 700 .7rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .07em; margin-bottom: 22px; }
.board-live { color: var(--lime); }
.preview-start, .preview-end { width: max-content; max-width: 100%; min-height: 44px; margin-inline: auto; display: flex; gap: 10px; align-items: center; padding: 9px 13px; border: 1px solid #a0c1a6; border-radius: 10px; background: #214b36; font-size: .91rem; }
.preview-start span, .preview-end span { font: 700 .8rem/1 ui-monospace, Consolas, monospace; color: var(--lime); }
.preview-end { color: #143823; background: var(--lime); border-color: var(--lime); }
.preview-end span { color: #276243; }
.preview-options { display: flex; gap: 12px; justify-content: center; }
.preview-options span { text-align: center; display: grid; place-items: center; font-size: .76rem; font-weight: 650; min-height: 40px; padding: 5px 12px; width: 45%; border: 1px solid #779c83; border-radius: 8px; background: #244d38; }
.preview-branch { width: 47%; height: 31px; margin-inline: auto; background: linear-gradient(#a0c1a6,#a0c1a6) center top / 1px 50% no-repeat; position: relative; }
.preview-branch::after { content: ""; position: absolute; inset: 50% 0 0; border: 1px solid #a0c1a6; border-bottom: 0; border-radius: 5px 5px 0 0; }
.preview-branch.join { transform: rotate(180deg); }
.library { padding-block: 26px 42px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.1; letter-spacing: -.04em; }
.score { color: var(--green); background: var(--soft); font-size: .83rem; font-weight: 750; padding: 6px 11px; border-radius: 7px; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.filter { padding: 6px 12px; border-radius: 7px; background: var(--white); border: 1px solid var(--line); color: var(--muted); cursor: pointer; font-weight: 650; font-size: .82rem; min-height: 40px; }
.filter[aria-pressed="true"] { background: var(--green); color: var(--white); border-color: var(--green); }
.missions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.mission { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 15px; align-items: center; border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 15px; color: var(--ink); text-align: left; cursor: pointer; }
.mission:hover { border-color: #73a785; background: #fbfdf9; }
.mission-number { padding: 5px 8px; border-radius: 6px; color: var(--green); background: var(--soft); font: 750 .82rem/1.4 ui-monospace, Consolas, monospace; }
.mission-name { display: block; font-size: 1.03rem; line-height: 1.25; margin: 1px 0 3px; }
.mission-description, .mission-roles { display: block; font-size: .81rem; color: var(--muted); line-height: 1.35; }
.mission-roles { color: var(--green); margin-top: 6px; font-weight: 650; }
.mission-arrow { font-size: 1.17rem; color: var(--green); }
.play { padding-block: 26px 42px; }
.text-button { border: 0; padding: 5px 0; color: var(--green); background: transparent; cursor: pointer; font-size: .89rem; font-weight: 730; }
.text-button:hover { text-decoration: underline; }
.play-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 19px 0 16px; }
.play-heading h1 { font-size: clamp(2rem, 4vw, 3.6rem); }
.run-chip { background: var(--soft); color: var(--green); border-radius: 7px; padding: 5px 9px; white-space: nowrap; font-size: .77rem; font-weight: 700; }
.progress-track { background: var(--line); height: 4px; border-radius: 4px; overflow: hidden; margin-bottom: 18px; }
.progress-track span { background: #3b885a; display: block; height: 100%; transition: width .22s ease; }
.workspace { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 15px; align-items: start; }
.step, .map-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; min-width: 0; }
.step h2 { font-size: clamp(1.55rem, 2.75vw, 2.35rem); }
.step-summary { margin: 14px 0; color: var(--muted); }
.checklist { margin: 14px 0; padding: 12px 12px 12px 32px; border-radius: 9px; background: #f1f6f0; }
.checklist li + li { margin-top: 6px; }
.choice-list { display: grid; gap: 8px; margin-top: 18px; }
.choice { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 10px 12px; border: 1px solid #c5dac9; border-radius: 9px; background: var(--white); color: var(--green); font-weight: 720; text-align: left; cursor: pointer; }
.choice:hover { background: var(--soft); border-color: #86ac90; }
.choice.continue { background: var(--green); color: var(--white); }
.choice.continue:hover { background: #0d4b30; }
.read-links { display: flex; flex-wrap: wrap; gap: 9px 15px; margin-top: 16px; }
.read-links a { font-weight: 650; font-size: .85rem; text-underline-offset: 4px; }
.finish-note { margin: 16px 0 0; padding: 9px 12px; border-radius: 8px; background: var(--soft); color: var(--green); font-weight: 750; }
.map-heading { display: flex; justify-content: space-between; gap: 9px; align-items: end; }
.map-heading h2 { font-size: 1.44rem; }
.map-key { white-space: nowrap; color: var(--muted); font-size: .75rem; }
.map-key span { display: inline-block; vertical-align: middle; width: 14px; height: 3px; background: #298453; margin-right: 4px; }
.map-help { margin-top: 9px; font-size: .8rem; color: var(--muted); }
.map-scroll { background-color: #f2f6f0; background-image: radial-gradient(#c2d2c3 1px, transparent 1px); background-size: 15px 15px; border-radius: 11px; margin-top: 13px; overflow: auto; }
.graph { position: relative; display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 14px 22px; }
.graph-level { position: relative; z-index: 1; display: flex; justify-content: center; gap: 9px; width: 100%; }
.graph-node { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 48px; max-width: 200px; flex: 0 1 166px; min-width: 0; border: 1px solid #a6c1a9; padding: 6px 8px; border-radius: 8px; color: var(--ink); background: var(--white); font-size: .74rem; line-height: 1.23; font-weight: 670; cursor: pointer; overflow-wrap: anywhere; }
.graph-node:hover { border-color: var(--green); }
.graph-node.decision { background: #e9f2df; }
.graph-node.finish { background: #e2efdf; }
.graph-node.visited { border-color: #348357; }
.graph-node.current { background: var(--green); border-color: var(--green); color: var(--white); }
.graph-node.inspected { outline: 2px solid #648b4d; outline-offset: 2px; }
.graph-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.graph-arrow { stroke: #7b9a82; fill: none; stroke-width: 1.4; }
.graph-arrow.path { stroke: #24834f; stroke-width: 2.6; }
.play-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; }
.footer { border-top: 1px solid var(--line); padding-block: 19px 25px; color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; top: 8px; left: 8px; z-index: 5; background: var(--white); padding: 8px; }
.fallback { padding-block: 20px; }
@media (max-width: 900px) {
  .hero { gap: 25px; padding-block: 44px 37px; }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 58px; }
  .brand small { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 29px 26px; }
  .hero-copy > p:not(.eyebrow) { margin: 15px 0 16px; font-size: .96rem; }
  .hero-diagram { padding: 15px; }
  .board-title { margin-bottom: 12px; }
  .section-heading { align-items: flex-start; }
  .missions { grid-template-columns: 1fr; }
  .mission { padding: 12px; gap: 10px; }
  .play-heading { align-items: flex-start; }
  .run-chip { display: none; }
  .step, .map-panel { padding: 15px; }
  .graph { gap: 25px; padding: 10px 16px; }
  .graph-level { gap: 6px; }
  .graph-node { padding: 5px 4px; font-size: .67rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
