:root {
  --paper: #f6f8f3;
  --mist: #edf3e7;
  --sage: #e1ead8;
  --rule: #b9cbb2;
  --evergreen: #1b403c;
  --deep: #0f2f2c;
  --keel: #355b56;
  --muted: #485f53;
  --ink: #232323;
  --focus: #0c6258;
  --body: "Avenir Next", Avenir, "Helvetica Neue", "Segoe UI", sans-serif;
  --display: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  --measure: 82rem;
  --edge: clamp(1.25rem, 4vw, 4rem);
  --shell: min(var(--measure), calc(100% - 2 * var(--edge)));
  color: var(--ink);
  background: var(--paper);
  font: 100%/1.62 var(--body);
}
*, *::before, *::after { box-sizing: border-box; }
body { min-inline-size: 0; min-block-size: 100vh; margin: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
main { flex: 1 0 auto; }
a { color: var(--evergreen); text-underline-offset: .22em; }
button { font: inherit; color: inherit; }
button, summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible, main:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--evergreen); text-wrap: pretty; }
p { text-wrap: pretty; }
.skip-link { position: absolute; z-index: 3; inset-block-start: .5rem; inset-inline-start: var(--edge); padding: .6rem 1rem; color: white; background: var(--deep); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.section-shell, .hero, .hk-foot-inner { inline-size: var(--shell); margin-inline: auto; }
.section-shell > *, .hero > *, .site-header > *, .hk-foot-main > *, .hk-foot-base > * { min-inline-size: 0; }

/* Links wrap on small or script-free screens; only an enhanced menu collapses them. */
.site-header {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 0 .8rem; inline-size: var(--shell); margin-inline: auto; min-block-size: 4.5rem;
  padding-block: .55rem;
}
.text-lockup, .hk-foot-logo {
  display: inline-flex; align-items: center; justify-self: start; min-block-size: 44px;
  color: var(--evergreen); font: 700 1.55rem/1.15 var(--display); letter-spacing: -.065em; text-decoration: none;
}
.site-header nav { grid-column: 1/-1; grid-row: 2; }
.site-header nav, .hk-foot-main nav { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem clamp(.8rem, 2vw, 2rem); }
.site-header nav a, .hk-foot-main nav a, .hk-foot-base a { display: inline-flex; align-items: center; min-block-size: 44px; font-size: .94rem; text-decoration: none; }
.site-header nav a[aria-current="page"], .hk-foot-main nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
:is(.site-header, .hk-colophon, .route-index) a:hover { text-decoration: underline; }
.menu-button { display: none; min-block-size: 44px; border: 0; padding: .45rem .55rem; background: transparent; color: var(--evergreen); font-weight: 600; cursor: pointer; }
.site-header[data-menu-ready] .menu-button { display: inline-flex; align-items: center; justify-self: end; gap: .35rem; grid-column: 2; grid-row: 1; }
.site-header[data-menu-ready] nav:not([data-open="true"]) { display: none; }
.header-state { color: var(--muted); font-size: .875rem; }
.site-header > .header-state { grid-column: 1/-1; justify-self: start; }

/* At reading widths the two hero halves stack. Both keep natural text height. */
.hero { display: grid; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.kicker { margin: 0 0 1.15rem; color: var(--muted); font-size: .875rem; font-weight: 700; line-height: 1.45; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-inline-size: 14ch; font-size: clamp(2.5rem, 1.9rem + 2vw, 3.5rem); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.hero h1 em { display: block; color: var(--keel); font-style: normal; font-weight: inherit; }
.hero-lead { max-inline-size: 43ch; margin: 1.6rem 0 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: 2.1rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-block-size: 3.25rem; padding: .7rem 1.1rem; border: 1px solid transparent; border-radius: .7rem; font-size: .97rem; font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none; }
.button-primary { color: white; background: var(--evergreen); }
.button-primary:hover { background: var(--deep); }
.button-quiet { color: var(--evergreen); background: white; border-color: #8fa99a; }
.button-quiet:hover { background: var(--mist); }
.boundary-copy { max-inline-size: 55ch; margin: 1rem 0 0; color: var(--muted); font-size: .875rem; }
.question-field {
  position: relative; isolation: isolate; min-inline-size: 0; inline-size: min(100%, 36rem);
  padding: clamp(1.4rem, 3.2vw, 3rem); color: var(--evergreen);
}
.question-field::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sage);
  border-radius: 28% 3% 25% 3% / 14% 3% 14% 3%;
}
.question-field h2 { max-inline-size: 36ch; margin: 0 0 .9rem; font: 550 1rem/1.5 var(--body); }
.question-choices { display: none; flex-wrap: wrap; gap: 0 1.15rem; }
.question-field[data-enhanced] .question-choices { display: flex; }
.question-choices button { min-block-size: 44px; border: 0; border-block-end: 2px solid transparent; padding: .35rem .1rem; background: transparent; color: var(--muted); font-weight: 500; cursor: pointer; }
.question-choices button:is(:hover, [aria-pressed="true"]) { color: var(--evergreen); border-color: currentColor; }
.question-choices button[aria-pressed="true"] { font-weight: 700; }
.question-reading { margin-block-start: 1.45rem; }
.question-panel + .question-panel { margin-block-start: 2rem; }
.question-field[data-enhanced] .question-panel { min-block-size: 15rem; margin: 0; }
.question-context { margin: 0 0 .65rem; color: var(--muted); font-size: .875rem; }
.question-panel h3 { max-inline-size: 22ch; font: 400 clamp(1.65rem, 1.25rem + 1vw, 2.1rem)/1.24 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.question-note { max-inline-size: 40ch; margin: 1rem 0 .5rem; color: var(--muted); }
.question-link, .home-story-link, .section-heading a { display: inline-flex; align-items: center; gap: .65rem; min-block-size: 44px; font-weight: 550; }

.direction, .compact-map { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-heading, .compact-map { display: grid; gap: 1rem clamp(2rem, 7vw, 7rem); align-items: start; }
.section-heading h2, .compact-map h2, .reading-list h2 { font-size: clamp(1.5rem, 1.25rem + .8vw, 2rem); font-weight: 550; line-height: 1.2; letter-spacing: -.025em; }
.section-heading p { max-inline-size: 48ch; margin: 0; color: var(--muted); }
.page-map { color: var(--evergreen); background: var(--sage); }
.compact-map .kicker { margin-block-end: .5rem; }
.route-index { display: grid; }
.route-index a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-block-size: 44px; gap: 0 .8rem; padding-block: .6rem; text-decoration: none; }
.route-index a span:first-child { font-weight: 650; }
.route-index a span:nth-child(2) { grid-column: 1; color: var(--muted); font-size: .95rem; }
.route-index a::after { content: "→"; grid-column: 2; grid-row: 1/span 2; }

.interior-head { padding-block: clamp(2.75rem, 7vw, 6rem) clamp(1.75rem, 4vw, 3.4rem); }
.interior-head h1 { max-inline-size: 22ch; font-size: clamp(2rem, 1.55rem + 2vw, 3.1rem); font-weight: 600; line-height: 1.13; letter-spacing: -.035em; }
.interior-head p:not(.kicker) { max-inline-size: 65ch; color: var(--muted); font-size: 1.0625rem; margin-block: 1.1rem 0; }
.reading-list { max-inline-size: 68ch; padding-block-end: clamp(2.5rem, 6vw, 5rem); }
.reading-list article, .reading-list details { padding-block: 1.45rem; border-block-start: 1px solid var(--rule); }
.reading-list h3 { font-size: 1.22rem; line-height: 1.28; }
.reading-list p { margin-block: .7rem 0; }
.reading-list summary { min-block-size: 44px; padding-block: .4rem; color: var(--evergreen); font-weight: 650; cursor: pointer; }
.reading-list article[id], :is(h2, h3)[id] { scroll-margin-block-start: 1rem; }
.hk-colophon { color: var(--evergreen); background: var(--mist); }
.hk-foot-inner { padding-block: 1.5rem max(1.25rem, env(safe-area-inset-bottom)); }
.hk-foot-main, .hk-foot-base { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 2rem; }
.hk-foot-main { justify-content: space-between; }
.hk-foot-base { margin-block-start: .8rem; font-size: .875rem; color: var(--muted); }
.hk-foot-base p { margin: 0; }
.hk-credit { margin-inline-start: auto; }

/* Rejoin supporting labels alongside route names when room permits. */
@media (min-width: 39rem) {
  .route-index a { grid-template-columns: minmax(0, .55fr) minmax(0, 1fr) auto; gap: .7rem; }
  .route-index a span:nth-child(2), .route-index a::after { grid-column: auto; grid-row: auto; }
}
@media (min-width: 60.01rem) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); min-block-size: 5.4rem; }
  .site-header nav, .site-header[data-menu-ready] nav:not([data-open="true"]) { display: flex; grid-column: 2; grid-row: 1; }
  .site-header[data-menu-ready] .menu-button { display: none; }
  .site-header > .header-state { grid-column: 3; grid-row: 1; justify-self: end; }
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-field { inline-size: 100%; }
  .section-heading { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  .compact-map { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (forced-colors: active) {
  .button, .question-field, .question-choices button[aria-pressed="true"] { border: 1px solid CanvasText; }
  .question-choices button[aria-pressed="true"] { text-decoration: underline; }
  :focus-visible { outline-color: Highlight; }
}
