:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #5b6472;
  --line: #d8dde4;
  --paper: #f8f9fb;
  --surface: #ffffff;
  --teal: #007a73;
  --teal-dark: #005c57;
  --raspberry: #b4235f;
  --gold: #b87900;
  --violet: #5a4fcf;
  --green: #267448;
  --shadow: 0 18px 40px rgba(20, 23, 31, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f2f4f7;
  color: #262a31;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
  padding: 0.12rem 0.34rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  border-bottom: 1px solid rgba(216, 221, 228, 0.85);
  background: rgba(248, 249, 251, 0.94);
  padding: 0.8rem clamp(1rem, 3vw, 2rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.nav a,
.button,
.choice-row button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  border-color: var(--teal);
  color: var(--teal-dark);
  outline: none;
}

.band {
  padding: clamp(2.6rem, 6vw, 5rem) clamp(1rem, 4vw, 4rem);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  min-height: calc(100vh - 72px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--teal-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.front-door-note {
  display: inline-flex;
  max-width: 58ch;
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #eef8f6;
  color: var(--teal-dark);
  font-weight: 800;
  padding: 0.8rem 1rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  font-weight: 750;
}

.button svg,
.icon-button svg,
.type-card svg,
.step-card svg,
.map-node svg,
.screen-card svg,
.now-panel li svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.system-map {
  display: grid;
  gap: 1rem;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(1rem, 3vw, 1.6rem);
  box-shadow: var(--shadow);
}

.map-node {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 112px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.map-node strong,
.map-node span {
  display: block;
}

.map-node span {
  color: var(--muted);
}

.map-node.human {
  border-color: var(--teal);
}

.map-node.core {
  border-color: var(--raspberry);
}

.map-node.small {
  min-height: 120px;
}

.map-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  min-height: 46px;
}

.map-rail.secondary {
  grid-template-columns: repeat(2, 1fr);
}

.map-rail span {
  border: 1px dashed var(--line);
  border-radius: 999px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.section-head {
  max-width: 760px;
  margin-bottom: 1.4rem;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.step-grid,
.memory-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.memory-types {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-card,
.type-card {
  position: relative;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.2rem;
}

.step-card p,
.type-card p {
  color: var(--muted);
}

.step-number {
  position: absolute;
  right: 1rem;
  top: 0.85rem;
  color: #c2c8d1;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.step-card svg {
  color: var(--teal);
}

.tasks-explainer {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.now-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.now-panel {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1.2rem;
}

.now-panel.priority {
  border-color: var(--teal);
  background: #eef8f6;
}

.now-panel.muted-panel {
  background: #fafafa;
}

.file-chip {
  display: inline-flex;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
}

.now-panel p {
  color: var(--muted);
}

.now-panel ul {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.now-panel li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: #343944;
  font-weight: 700;
}

.now-panel li svg {
  flex: 0 0 auto;
  color: var(--teal-dark);
}

.truth-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  border-left: 5px solid var(--raspberry);
  border-radius: 8px;
  background: #fff4f7;
  color: #5b1730;
  padding: 0.9rem 1rem;
}

.truth-strip strong {
  font-weight: 900;
}

.screen-guide {
  border-bottom: 1px solid var(--line);
  background: #f5f7fb;
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.screen-card {
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1.2rem;
}

.screen-card svg {
  color: var(--teal-dark);
}

.screen-card p {
  margin-bottom: 0.65rem;
  color: var(--muted);
}

.screen-card p:last-child {
  margin-bottom: 0;
}

.screen-card strong {
  color: var(--ink);
}

.quiet-card {
  background: #fbfbfc;
}

.capture {
  border-top: 1px solid var(--line);
  background: #f7fbff;
}

.capture-shell {
  display: grid;
  gap: 1rem;
}

.tab-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.tab-button svg {
  width: 19px;
  height: 19px;
}

.tab-button.active {
  border-color: var(--teal);
  background: #eef8f6;
  color: var(--teal-dark);
}

.tab-button:focus-visible {
  border-color: var(--teal-dark);
  outline: 3px solid rgba(0, 122, 115, 0.18);
}

.tab-panels {
  min-height: 220px;
}

.tab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel p {
  max-width: 72ch;
  color: var(--muted);
}

.tab-panel strong {
  color: var(--teal-dark);
}

.type-card[data-kind="capture"] svg {
  color: var(--violet);
}

.type-card[data-kind="todo"] svg {
  color: var(--raspberry);
}

.type-card[data-kind="lesson"] svg {
  color: var(--gold);
}

.type-card[data-kind="qa"] svg {
  color: var(--green);
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.closeout {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.closeout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.closeout-card {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1.2rem;
}

.closeout-card.important {
  border-color: var(--teal);
  background: #eef8f6;
}

.closeout-card svg {
  width: 22px;
  height: 22px;
  color: var(--teal-dark);
}

.closeout-card p {
  color: var(--muted);
}

.sticky-head {
  align-self: start;
}

.tools {
  background: #f0f7f6;
}

.builder,
.practice-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(1rem, 3vw, 1.5rem);
}

.builder {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 700;
}

.field select,
.field input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 0.75rem;
}

.text-field {
  min-width: 0;
}

.command-output {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 0.65rem;
  align-items: stretch;
}

.command-output code {
  display: flex;
  align-items: center;
  min-height: 54px;
  overflow-x: auto;
  padding: 0.7rem 0.9rem;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  place-items: center;
  cursor: pointer;
}

.practice-panel {
  display: grid;
  gap: 1rem;
}

#scenarioText {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.choice-row button {
  padding: 0.7rem;
  font-weight: 800;
}

.choice-row button.correct {
  border-color: var(--green);
  background: #e9f6ef;
}

.choice-row button.incorrect {
  border-color: var(--raspberry);
  background: #fbecf2;
}

.practice-result {
  min-height: 2rem;
  color: var(--muted);
  font-weight: 700;
}

.button.next {
  justify-self: start;
}

.roadmap {
  background: #fff7e8;
}

.timeline {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.timeline strong {
  color: var(--gold);
}

.timeline span {
  color: var(--muted);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem clamp(1rem, 4vw, 4rem);
  color: var(--muted);
}

.footer a {
  color: var(--teal-dark);
  font-weight: 800;
}

@media (max-width: 900px) {
  .intro,
  .split {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
  }

  h1 {
    max-width: 12ch;
  }

  .step-grid,
  .memory-types,
  .now-board,
  .screen-grid,
  .builder,
  .tab-list,
  .tab-panel,
  .closeout-grid,
  .choice-row,
  .map-grid {
    grid-template-columns: 1fr;
  }

  .tab-panel .button {
    justify-self: start;
  }

  .system-map {
    min-height: auto;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
    width: 100%;
  }

  .nav a {
    flex: 1;
    justify-content: center;
  }

  .band {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 3.15rem;
  }

  .action-row .button {
    width: 100%;
  }
}
