:root {
  --day: #f4ecdf;
  --day-2: #ebdfcb;
  --sand: #d9c4a1;
  --sand-deep: #b89a6c;
  --olive: #55642f;
  --olive-soft: #8d9a63;
  --ink: #2e2a24;
  --ink-soft: #565046;
  --line: #d8cbb4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 37rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--day); color: var(--ink);
  font: 1.125rem/1.7 var(--serif); overflow-wrap: break-word; overflow-x: hidden;
}
a { color: var(--olive); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--day); padding: .6rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; color: var(--day); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.small { font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); }

/* Nav */
.site-head { border-bottom: 1px solid var(--line); }
.nav { max-width: 72rem; margin: 0 auto; padding: .8rem 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between; align-items: center; font: .9rem var(--sans); }
.nav-title { color: var(--ink-soft); }
.nav-home { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--olive); padding: .3rem 0; }

/* Hero */
.hero { max-width: 64rem; margin: 0 auto; padding: 3.5rem 1rem 1.5rem; display: grid; gap: 1.5rem; align-items: end; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.2fr 1fr; padding-top: 5rem; } }
.kicker { font: .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--olive); margin: 0 0 .7rem; }
h1 { font-size: clamp(2.4rem, 8vw, 4.2rem); line-height: 1.02; font-weight: 500; letter-spacing: -.015em; margin: 0 0 1rem; }
.standfirst { font-size: 1.25rem; color: var(--ink-soft); margin: 0; max-width: 30rem; }
.still-life { width: 100%; max-width: 30rem; height: auto; justify-self: center; }
.shadow { fill: rgba(120, 95, 60, .12); }
.table { fill: var(--sand); }
.bottle { fill: var(--olive-soft); opacity: .85; }
.cork { fill: var(--sand-deep); }
.bowl { fill: #e9dcc4; stroke: var(--sand-deep); stroke-width: 2; }
.fruit { fill: #c98f4e; }
.fruit.alt { fill: #a9b07a; }
.cup { fill: #fbf7ef; stroke: var(--ink-soft); stroke-width: 2; }
.water { fill: #b9c6a0; opacity: .8; }
.fill-line { stroke: var(--olive); stroke-width: 1.5; stroke-dasharray: 4 4; }
.cup-handle { fill: none; stroke: var(--ink-soft); stroke-width: 2; }

/* Essay */
.essay { max-width: var(--measure); margin: 0 auto; padding: 1.5rem 1rem 1rem; }
.essay h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.25; margin: 3rem 0 .8rem; }
.essay h2::before { content: ""; display: block; width: 2.5rem; height: 2px; background: var(--olive); margin-bottom: 1rem; }
.essay p { margin: 0 0 1.15rem; }
.lede { font-size: 1.22rem; }

/* Map */
.map-wrap { max-width: 60rem; margin: 3rem auto 0; padding: 2.5rem 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-wrap > h2 { font-size: 1.8rem; font-weight: 500; margin: 0 0 .5rem; }
.map-intro { max-width: var(--measure); color: var(--ink-soft); margin: 0 0 .5rem; }
.skip-ex { font: .95rem var(--sans); margin: 0 0 1.5rem; }
.map { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .map { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .map-wrap { max-width: 68rem; } .map { grid-template-columns: repeat(4, 1fr); } }
.map > .small { grid-column: 1 / -1; margin: 0; }
.dim { margin: 0; padding: 1rem 1rem 1.1rem; border: 1px solid var(--line); border-radius: 6px; background: #f8f2e7; min-width: 0; }
.dim legend { font: 600 1.05rem var(--sans); padding: 0 .3rem; }
.dim-hint { font-size: .95rem; color: var(--ink-soft); margin: .2rem 0 .6rem; }
.choices { display: grid; gap: .25rem; }
.choices label { font: .95rem var(--sans); display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem; border-radius: 4px; cursor: pointer; min-height: 2.75rem; }
.choices label:hover { background: var(--day-2); }
.choices input { width: 1.15rem; height: 1.15rem; accent-color: var(--olive); flex: none; margin: 0; }
.choices label:has(input:checked) { background: #e6e3cf; }

/* Vessels: water level reflects the chosen state, never a score */
.vessel { display: block; width: 3.2rem; height: auto; margin: 0 0 .4rem; }
.v-cup { fill: none; stroke: var(--ink-soft); stroke-width: 2.5; stroke-linejoin: round; }
.v-water { fill: #b9c6a0; transform-origin: 30px 64px; transform: scaleY(0); transition: transform .5s ease; }
.v-line { stroke: var(--olive); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .35; }
.v-sprout { fill: none; stroke: var(--olive); stroke-width: 2.2; stroke-linecap: round; opacity: 0; transition: opacity .4s ease; }
.dim[data-state="not"] .v-water { transform: scaleY(.3); fill: var(--sand); }
.dim[data-state="not"] .v-line { opacity: 1; }
.dim[data-state="suff"] .v-water { transform: scaleY(1); }
.dim[data-state="suff"] .v-line { opacity: 1; }
.dim[data-state="grow"] .v-water { transform: scaleY(.7); }
.dim[data-state="grow"] .v-sprout { opacity: 1; }

.statement-box { margin-top: 1.8rem; max-width: 42rem; }
.st-label { display: block; font: 600 1.15rem var(--sans); }
textarea {
  width: 100%; font: 1.05rem/1.6 var(--serif); color: var(--ink);
  background: #fffcf6; border: 1px solid var(--sand-deep); border-radius: 4px;
  padding: .9rem 1rem; resize: vertical; margin-top: .4rem;
}
textarea::placeholder { color: #7a7266; }
.status { min-height: 1.5rem; font: .9rem var(--sans); margin: .4rem 0 .6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
button {
  font: 600 .95rem var(--sans); cursor: pointer; min-height: 2.75rem;
  background: var(--olive); color: #fffcf6; border: 2px solid var(--olive); border-radius: 4px; padding: .55rem 1.1rem;
}
button:hover { background: var(--ink); border-color: var(--ink); }
button.quiet { background: transparent; color: var(--ink); border-color: var(--sand-deep); }
button.quiet:hover { background: var(--day-2); }
button[hidden] { display: none; }

/* Ending: the horizon widens as the reader arrives */
.ending { margin: 3rem auto 0; }
.horizon { max-width: 80rem; margin: 0 auto; overflow: hidden; clip-path: inset(0 0 0 0); transition: clip-path 1.8s cubic-bezier(.2,.7,.2,1); }
.horizon svg { display: block; width: 100%; height: clamp(7rem, 18vw, 13rem); }
.horizon.narrow { clip-path: inset(0 32% 0 32% round 12px); }
.sky { fill: #efe3cc; }
.sun { fill: #e8c88f; }
.hill-far { fill: #c8c39a; }
.hill-near { fill: var(--olive-soft); }
.ground { fill: var(--sand); }
.ending-text { max-width: var(--measure); margin: 0 auto; padding: 2rem 1rem 1rem; }
.ending-text h2 { font-size: 1.6rem; font-weight: 600; margin: 0 0 .8rem; }
.ending-text p { margin: 0 0 1.15rem; }
.principle { font-size: 1.45rem; line-height: 1.45; color: var(--olive); border-left: 3px solid var(--olive); padding-left: 1rem; margin: 1.6rem 0 !important; }
.byline { font: .9rem var(--sans); color: var(--ink-soft); }

.return { max-width: var(--measure); margin: 0 auto; padding: 1rem 1rem 3rem; }
.return a { font-size: 1.35rem; font-weight: 600; }
.site-foot { border-top: 1px solid var(--line); padding: 1.5rem 1rem; text-align: center; font: .9rem var(--sans); color: var(--ink-soft); }
.site-foot p { margin: 0; }
.tiny { font-size: .8rem; margin-top: .4rem !important; font-style: italic; }
.lost { max-width: var(--measure); margin: 0 auto; padding: 4rem 1rem; }

.print-only { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  body.printing-statement > *:not(.print-only) { display: none !important; }
  body.printing-statement .print-only { display: block; padding: 2rem; }
  .print-title { font: 600 1.3rem var(--sans); margin: 0 0 1rem; }
  #print-body p { margin: 0 0 .8rem; font: 1.1rem/1.6 var(--serif); }
  body { background: #fff; }
  .nav, .map-wrap, .return, .skip, .horizon { display: none; }
}
