:root {
  --blue: #003262;
  --blue-2: #1b4f8a;
  --gold: #fdb515;
  --green: #0f7660;
  --green-soft: #dfeee7;
  --ink: #22252b;
  --muted: #626a73;
  --paper: #fbfaf6;
  --white: #ffffff;
  --line: #d7ddd8;
  --note: #e8eef5;
  --max: 72rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Source Serif 4", serif;
  line-height: 1.62;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--blue);
  color: white;
  padding: .5rem .75rem;
  z-index: 10;
}
.skip-link:focus { left: 1rem; }
.home-return {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  min-height: 2.55rem;
  padding: .55rem .85rem;
  border-top: 4px solid var(--gold);
  background: var(--blue);
  color: white;
  box-shadow: 0 12px 28px rgba(0, 50, 98, .22);
  font: 900 .78rem Inter, Arial, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.home-return:hover,
.home-return:focus {
  background: var(--green);
}
.site-header {
  position: relative;
  min-height: clamp(34rem, 48vw, 45rem);
  border-top: 7px solid transparent;
  border-image: linear-gradient(90deg, var(--blue), var(--gold), var(--green)) 1;
  background:
    radial-gradient(circle at 78% 88%, rgba(15, 118, 96, .10), transparent 24rem),
    linear-gradient(100deg, rgba(255,255,255,.72), rgba(253, 181, 21, .10) 62%, rgba(15, 118, 96, .08));
  overflow: hidden;
  padding: clamp(3rem, 6vw, 7rem) max(1.5rem, calc((100vw - var(--max)) / 2 + 1.5rem)) 4.5rem;
}
.hero-left,
.hero-author,
.hero-availability {
  position: relative;
  z-index: 2;
}
.hero-left {
  max-width: 43rem;
}
.institution-line {
  margin: 0 0 1rem;
  color: var(--blue);
  font: 900 clamp(.78rem, 1.2vw, 1rem) Inter, Arial, sans-serif;
}
.institution-line span::before {
  content: "|";
  color: var(--gold);
  padding: 0 .65rem;
}
.hero-mark {
  margin: 0;
  color: var(--blue);
  font: 900 clamp(5.5rem, 11vw, 9rem)/.78 Inter, Arial, sans-serif;
  letter-spacing: 0;
}
.hero-left h1 {
  margin: .35rem 0 .25rem;
  color: var(--green);
  font: 900 clamp(2rem, 4vw, 3.4rem)/1.02 Inter, Arial, sans-serif;
}
.edition {
  margin: 0 0 1.8rem;
  color: #687281;
  font: 700 clamp(.9rem, 1.3vw, 1rem) Inter, Arial, sans-serif;
}
.hero-statement {
  max-width: 45rem;
  margin: 0 0 1.35rem;
  color: var(--ink);
  font-size: clamp(1.28rem, 1.9vw, 1.72rem);
  line-height: 1.25;
}
.hero-statement strong {
  color: var(--blue);
}
.hero-course {
  max-width: 34rem;
  margin: 0 0 1.35rem;
  color: #566171;
  font: 700 clamp(1rem, 1.35vw, 1.12rem)/1.48 Inter, Arial, sans-serif;
}
.hero-equation {
  margin: 0;
  color: #667081;
  font: 700 clamp(.92rem, 1.2vw, 1rem) Inter, Arial, sans-serif;
}
.hero-equation strong {
  color: var(--green);
  font-weight: 900;
}
.hero-author {
  position: absolute;
  top: clamp(4.5rem, 7vw, 6.5rem);
  right: max(1.5rem, calc((100vw - var(--max)) / 2 + 1.5rem));
  width: clamp(17rem, 24vw, 22rem);
}
.hero-author .byline {
  margin: 0 0 .2rem;
  color: #6d7480;
  text-align: center;
  font: 900 .85rem Inter, Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-author h2 {
  margin: 0 0 1rem;
  color: var(--blue);
  text-align: center;
  font: 900 clamp(1.8rem, 2.9vw, 2.6rem)/1 Inter, Arial, sans-serif;
}
.hero-author img {
  display: block;
  width: min(100%, 17.5rem);
  height: auto;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  box-shadow: 0 18px 36px rgba(0, 50, 98, .13);
}
.hero-author ul {
  margin: 0;
  padding: 0 0 0 1.35rem;
}
.hero-author li {
  color: #27313d;
  margin: 0 0 .75rem;
  font-size: .95rem;
  line-height: 1.32;
}
.hero-author li::marker {
  color: var(--green);
  font-size: 1.15rem;
}
.hero-line {
  position: absolute;
  z-index: 1;
  right: -7vw;
  bottom: 2.6rem;
  width: min(62rem, 60vw);
  height: 34rem;
  border-top: .34rem solid rgba(15, 118, 96, .42);
  border-left: .34rem solid rgba(0, 50, 98, .42);
  border-radius: 78% 0 0 22%;
  transform: translateY(calc(var(--hero-progress, 0) * -18px)) rotate(-17deg);
  transition: transform .12s linear;
}
.hero-line::after {
  content: "";
  position: absolute;
  left: 15%;
  top: -0.34rem;
  right: 35%;
  border-top: .34rem solid rgba(253, 181, 21, .55);
}
.node {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--paper);
}
.node-start {
  left: -0.7rem;
  bottom: 2rem;
  border: .27rem solid var(--blue);
}
.node-mid {
  left: 39%;
  top: -0.78rem;
  border: .27rem solid var(--gold);
}
.node-end {
  right: 21%;
  top: -0.78rem;
  border: .27rem solid var(--green);
  background: var(--green);
}
.hero-availability {
  position: absolute;
  left: 50%;
  bottom: 1.3rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.05rem;
  color: #687281;
  font: 800 .98rem Inter, Arial, sans-serif;
  white-space: nowrap;
}
.hero-availability strong {
  color: var(--blue);
}
.hero-availability span::before {
  content: "";
  display: inline-block;
  width: .25rem;
  height: .25rem;
  margin: 0 .85rem .2rem 0;
  border-radius: 50%;
  background: var(--gold);
}
.site-summary {
  max-width: var(--max);
  margin: 1.2rem auto 1.6rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.site-summary div {
  background: var(--white);
  border-top: 4px solid var(--gold);
  padding: .85rem 1rem;
  box-shadow: 0 12px 32px rgba(0, 50, 98, .06);
}
.site-summary span {
  display: block;
  color: var(--green);
  font: 800 .72rem Inter, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .18rem;
}
.site-summary strong {
  display: block;
  color: var(--ink);
  font: 700 .96rem Inter, Arial, sans-serif;
}
.kicker, .nav-label, .section-meta, dt {
  font-family: Inter, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 800;
}
.kicker { color: var(--green); margin: 0 0 .4rem; }
.ie-mark {
  margin: 0 0 .35rem;
  color: var(--blue);
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(4.2rem, 11vw, 9.5rem);
  font-weight: 900;
  line-height: .78;
  letter-spacing: 0;
}
.brand-block h1 {
  color: var(--blue);
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(1.9rem, 4vw, 4rem);
  line-height: 1;
  margin: 0;
  max-width: 17ch;
}
.brand-block p:not(.kicker):not(.ie-mark) {
  max-width: 42rem;
  font-size: 1.2rem;
  color: #3f4650;
}
.journey-line {
  display: flex;
  align-items: center;
  gap: .35rem;
  max-width: 34rem;
  margin-top: 2rem;
}
.journey-line:before, .journey-line:after {
  content: "";
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--green));
}
.journey-line span {
  width: .72rem;
  height: .72rem;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
}
.journey-line span:nth-child(n+3) { border-color: var(--gold); }
.journey-line span:nth-child(n+5) { border-color: var(--green); }
.header-panel {
  align-self: end;
  border-top: 4px solid var(--gold);
  background: var(--white);
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 50, 98, .08);
}
.header-panel dl { margin: 0; display: grid; gap: .9rem; }
.header-panel div { display: grid; gap: .1rem; }
dt { color: var(--green); }
dd { margin: 0; font-family: Inter, Arial, sans-serif; color: var(--ink); }
.header-actions { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
button, .header-actions a, .step-link, .section-download {
  appearance: none;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  text-decoration: none;
  font: 700 .9rem Inter, Arial, sans-serif;
  padding: .65rem .8rem;
  cursor: pointer;
}
.section-download {
  padding: .45rem .65rem;
  font-size: .78rem;
  line-height: 1;
  white-space: nowrap;
}
.header-actions a, .step-link:nth-child(1) { background: white; color: var(--blue); }
.download-link {
  background: var(--green);
  border-color: var(--green);
}
.app-shell {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}
.reader-nav {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow: auto;
  padding: 1rem 0 2rem;
}
.nav-tools {
  background: var(--white);
  border-left: 4px solid var(--green);
  padding: 1rem;
  margin-bottom: 1rem;
}
.nav-tools label {
  display: block;
  font: 800 .78rem Inter, Arial, sans-serif;
  color: var(--blue);
  margin-bottom: .45rem;
}
#searchBox {
  width: 100%;
  border: 1px solid var(--line);
  padding: .65rem;
  font: 1rem Inter, Arial, sans-serif;
}
.nav-group {
  border-top: 1px solid var(--line);
  padding: .8rem 0;
}
.nav-label { color: var(--muted); margin-bottom: .4rem; }
.nav-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
  padding: .45rem .5rem;
  border-left: 3px solid transparent;
  font-family: Inter, Arial, sans-serif;
  line-height: 1.25;
}
.nav-link:hover, .nav-link.active {
  background: rgba(15, 118, 96, .08);
  border-left-color: var(--green);
}
.nav-link small { color: var(--muted); }
.reader {
  min-width: 0;
}
.search-status {
  font: 700 .9rem Inter, Arial, sans-serif;
  color: var(--green);
  min-height: 1.5rem;
}
.book-section {
  background: var(--white);
  margin: 0 0 2rem;
  padding: 2.5rem clamp(1.2rem, 4vw, 4rem);
  border-top: 4px solid var(--gold);
  box-shadow: 0 18px 45px rgba(0, 50, 98, .07);
}
.section-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: .8rem;
  margin-bottom: 1.5rem;
}
.book-section h1,
.book-section h2,
.book-section h3 {
  font-family: Inter, Arial, sans-serif;
  line-height: 1.12;
}
.book-section h1 {
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 1.25rem;
}
.section-game h1 {
  color: var(--green);
  background: var(--green-soft);
  padding: .18em .35em;
}
.section-case h1, .section-case-lead h1 {
  border-top: 2px solid var(--gold);
  padding-top: .75rem;
}
.book-section h2 {
  color: var(--blue);
  font-size: 1.55rem;
  margin: 2rem 0 .4rem;
}
.book-section h3 {
  color: var(--green);
  font-size: 1.25rem;
  margin: 1.55rem 0 .35rem;
}
.book-section p, .book-section li {
  font-size: 1.06rem;
}
.book-section img {
  display: block;
  max-width: min(100%, 44rem);
  height: auto;
  margin: 1.2rem auto .4rem;
}
.book-section em { color: #4d5660; }
.book-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  display: table;
  font-family: Inter, Arial, sans-serif;
  font-size: .92rem;
}
.book-table th {
  background: var(--blue);
  color: white;
  text-align: left;
  padding: .6rem .7rem;
}
.book-table td {
  border: 1px solid var(--line);
  padding: .6rem .7rem;
  vertical-align: top;
}
.callout, .callout-example, .callout-note, .callout-purpose, .callout-evidence, .callout-contrast {
  display: table;
  background: var(--note);
  border-left: 4px solid var(--blue);
}
.callout-example { border-left-color: var(--gold); }
.callout-note, .callout-purpose, .callout-evidence { border-left-color: var(--green); }
.callout td, .callout-example td, .callout-note td, .callout-purpose td, .callout-evidence td, .callout-contrast td {
  border-color: transparent;
}
.section-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 2.2rem;
  padding-top: 1rem;
}
mark {
  background: rgba(253, 181, 21, .35);
  color: inherit;
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .site-summary { grid-template-columns: 1fr; }
  .reader-nav { position: static; max-height: none; }
  .site-header {
    min-height: auto;
    padding-bottom: 2.5rem;
  }
  .hero-author {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    max-width: 40rem;
    margin: 2.25rem 0 0;
    display: grid;
    grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
    gap: 1rem 1.4rem;
    align-items: center;
  }
  .hero-author .byline,
  .hero-author h2 {
    grid-column: 2;
    text-align: left;
  }
  .hero-author img {
    grid-row: 1 / span 3;
    margin: 0;
  }
  .hero-author ul {
    grid-column: 2;
  }
  .hero-line {
    width: 40rem;
    height: 20rem;
    right: -16rem;
    bottom: 14rem;
    opacity: .7;
  }
  .hero-availability {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin-top: 2rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    white-space: normal;
  }
}
@media (max-width: 600px) {
  .site-header {
    padding: 2rem 1.25rem 2.15rem;
  }
  .institution-line span::before {
    padding: 0 .38rem;
  }
  .hero-mark {
    font-size: clamp(4.4rem, 22vw, 6.5rem);
  }
  .hero-left h1 {
    font-size: clamp(1.75rem, 9vw, 2.55rem);
  }
  .hero-statement {
    font-size: 1.22rem;
  }
  .hero-course {
    font-size: .98rem;
  }
  .hero-author {
    grid-template-columns: 6.7rem minmax(0, 1fr);
    gap: .65rem .9rem;
  }
  .hero-author h2 {
    font-size: 1.55rem;
  }
  .hero-author .byline {
    font-size: .7rem;
  }
  .hero-author li {
    font-size: .83rem;
    margin-bottom: .42rem;
  }
  .hero-line {
    right: -22rem;
    bottom: 17rem;
  }
  .site-summary {
    margin-top: .9rem;
  }
  .book-section { padding: 1.5rem 1rem; }
  .section-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: .75rem;
  }
  .nav-link { grid-template-columns: 1fr; }
  .section-actions {
    flex-direction: column;
  }
  .home-return {
    right: .75rem;
    bottom: .75rem;
    min-width: 3.4rem;
    min-height: 2.3rem;
    padding: .45rem .7rem;
    font-size: .68rem;
  }
}
@media print {
  body { background: white; }
  .reader-nav, .header-actions, .search-status, .section-actions, .skip-link { display: none !important; }
  .site-header, .app-shell { display: block; max-width: none; padding: 0; }
  .book-section { box-shadow: none; page-break-before: always; }
}
