.illustrated {
  --accent: #205a4f;
  --well: #e5ece2;
  --cover: #1d4039;
  --cover-light: #f7edcd;
  --art-rule: #bfbaa8;
}
.illustrated.harbor {
  --accent: #904a32;
  --well: #eee4d3;
  --cover: #283a40;
  --cover-light: #f6e3bd;
}
.illustrated .sr-only, .switcher > input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.story-cover { display: grid; grid-template-columns: .86fr 1.18fr; color: #fcf3dd; background: var(--cover); }
.cover-words { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(24px, 3.7vw, 55px); }
.cover-words .eyebrow { color: var(--cover-light); margin-bottom: clamp(19px, 2.4vw, 32px); }
.cover-words h1 { font-size: clamp(49px, 5.8vw, 84px); line-height: .95; letter-spacing: -.055em; }
.cover-words h1 em { display: block; color: var(--cover-light); font-weight: 400; }
@media (min-width: 651px) {
  .harbor .story-cover { grid-template-columns: 1fr 1.12fr; }
  .harbor .cover-words h1 { font-size: clamp(41px, 4.8vw, 66px); }
}
.cover-words p { max-width: 36ch; margin-top: 21px; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.38; }
.cover-art { align-self: stretch; min-width: 0; position: relative; }
.cover-art img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; position: absolute; inset: 0; }
.cover-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin-top: clamp(17px, 2.4vw, 33px); }
.cover-links a { display: inline-flex; gap: 9px; align-items: center; min-height: 44px; font: 600 14px/1.35 var(--font-ui); }
.cover-start { text-decoration: none; padding: 9px 13px; background: var(--cover-light); color: var(--cover); }
.cover-start:hover { text-decoration: underline; }
.story-credit { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); padding: 10px 0 13px; border-bottom: 1px solid var(--rule); font: 500 13px/1.45 var(--font-ui); }
.scene { margin-top: clamp(44px, 6vw, 86px); scroll-margin-top: 22px; }
.scene-heading { border-top: 1px solid var(--art-rule); padding-top: 15px; }
.scene-heading .eyebrow { color: var(--accent); margin-bottom: 10px; }
.scene-heading h2 { font-size: clamp(34px, 4.35vw, 61px); line-height: 1.03; max-width: 29ch; }
.story-credit + .scene .scene-heading { border: 0; padding-top: 0; }
.scene-intro, .comparison-intro { margin-top: 14px; }
.scene-intro { max-width: 74ch; }
.scene-spread, .chart-spread { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(16px, 3.25vw, 48px); align-items: start; margin-top: 24px; }
.art-figure img, .chart-aside img { width: 100%; height: auto; }
.art-figure figcaption, .chart-aside figcaption { max-width: 68ch; margin-top: 9px; font-size: 15px; line-height: 1.45; }
.diagram-board, .obligation-board, .trial-plan { background: var(--well); padding: clamp(18px, 2.3vw, 34px); }
.switcher { border: 0; padding: 0; margin: 0; min-width: 0; color: var(--ink); }
.switcher legend, .obligation-row h3, .trial-plan figcaption { padding: 0; margin: 0 0 14px; font: 500 clamp(23px, 2.3vw, 35px)/1.12 var(--font-main); letter-spacing: -.03em; color: var(--ink); }
.switcher > label { display: inline-flex; align-items: center; min-height: 43px; border: 1px solid var(--accent); color: var(--accent); cursor: pointer; padding: 6px 12px; margin: 0 3px 4px 0; font: 600 14px/1.35 var(--font-ui); }
.switcher > input:checked + label { color: white; background: var(--accent); }
.switcher > input:focus-visible + label { outline: 3px solid #ae592f; outline-offset: 3px; }
.switcher > label:hover { text-decoration: underline; text-underline-offset: 3px; }
.switch-panel { display: none; margin-top: 17px; }
.switch-a:checked ~ .is-a, .switch-b:checked ~ .is-b { display: block; }
.pathway { margin: 0; padding: 0; list-style: none; }
.pathway li { position: relative; padding: 7px 0 12px 32px; font: 600 clamp(15px, 1.45vw, 19px)/1.4 var(--font-ui); }
.pathway li::before { content: ""; position: absolute; top: 13px; left: 3px; width: 11px; height: 11px; background: var(--well); border: 2px solid var(--accent); border-radius: 50%; z-index: 1; }
.pathway li:first-child::before { background: var(--accent); }
.pathway li:not(:last-child)::after { content: ""; position: absolute; top: 19px; left: 8px; height: 100%; border-left: 1px solid var(--accent); }
.path-ending { padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--art-rule); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.38; }
.source-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 22px; margin-top: 13px; }
.source-link { display: inline-block; color: var(--muted); padding: 5px 0; font: 550 13px/1.4 var(--font-ui); }
.field-notes { border-block: 1px solid var(--art-rule); margin-top: 18px; }
.field-notes summary { color: var(--accent); }
.field-notes table { table-layout: fixed; }
.field-notes :is(th, td) { text-align: left; vertical-align: top; padding: 8px 6px; }
.field-notes th { font-weight: 650; }
.field-notes tbody th small { display: block; margin-top: 3px; color: var(--muted); font-weight: 450; }
.chart-spread { grid-template-columns: minmax(0, 1.72fr) minmax(0, .85fr); }
.chart-board { background: #f2eee3; padding: clamp(12px, 2vw, 26px); }
.chart-board > figcaption { color: var(--ink); margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 5px 14px; flex-wrap: wrap; font: 500 clamp(22px, 2.4vw, 33px)/1.1 var(--font-main); }
.chart-board > figcaption span { color: var(--muted); font: 600 12px/1.4 var(--font-ui); }
.plot-legend { display: flex; gap: 5px 17px; flex-wrap: wrap; margin-top: 10px; font: 600 13px/1.4 var(--font-ui); }
.plot-legend span::before { content: ""; display: inline-block; width: 18px; margin-right: 7px; vertical-align: .22em; border-top: 3px solid #176052; }
.plot-legend .refuses::before { border-top: 3px dashed #9b4428; }
.plot-area { position: relative; margin-top: 4px; }
.plot-area img { width: 100%; height: auto; }
.week-markers { position: absolute; left: 9%; right: 2%; top: 6%; bottom: 15.5%; display: grid; grid-template-columns: repeat(12, 1fr); pointer-events: none; }
.week-markers span.selected::before { content: ""; display: block; height: 100%; margin-left: 50%; border-left: 1px dotted #49463a; }
.week-controls { display: grid; align-items: center; gap: 5px 12px; grid-template-columns: auto 1fr; }
.week-controls[hidden] { display: none; }
.week-controls label { font: 650 15px/1.3 var(--font-ui); }
.week-controls input { width: 100%; min-height: 41px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.week-controls input:focus-visible { outline-offset: -2px; }
.week-controls p { grid-column: 1/-1; color: var(--accent); font: 650 15px/1.4 var(--font-ui); font-variant-numeric: tabular-nums; }
.data-drawer { margin-top: 14px; border-top: 1px solid var(--art-rule); border-bottom: 0; }
.data-drawer summary { padding: 11px 0 1px; font-size: 14px; }
.data-drawer table { table-layout: fixed; width: 100%; margin: 12px 0 0; }
.data-drawer table th, .data-drawer table td { padding: 5px 2px; font-size: 13px; overflow-wrap: anywhere; }
.data-drawer table :is(th, td):first-child { width: 11%; }
.data-drawer table :is(th, td):nth-child(2) { text-align: left; width: 28%; }
.chart-aside figcaption strong { display: block; margin: 12px 0 5px; color: var(--ink); font: 500 clamp(22px, 2.3vw, 32px)/1.12 var(--font-main); }
.closing-spread { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.trial-plan { margin-top: 18px; }
.paired-conditions { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--art-rule); margin: 14px 0 10px; }
.paired-conditions > div { display: grid; gap: 4px; padding: 10px 12px 10px 0; }
.paired-conditions > div + div { padding-left: 12px; border-left: 1px solid var(--art-rule); }
.paired-conditions b, .paired-conditions span, .held-constant, .trial-measure { font: 500 15px/1.45 var(--font-ui); }
.paired-conditions b { font-weight: 700; color: var(--accent); }
.trial-measure { margin-top: 13px; padding-left: 12px; border-left: 3px solid var(--accent); font-weight: 650; }
.comparison-intro { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 4vw, 58px); row-gap: 10px; }
.authority-plate { background: #f0eadd; padding: clamp(9px, 1.8vw, 24px); margin-top: 22px; }
.authority-plate table { margin: 0; table-layout: fixed; }
.authority-plate thead th { color: var(--ink); font: 500 clamp(21px, 2.6vw, 36px)/1.1 var(--font-main); vertical-align: bottom; }
.authority-plate :is(td, th) { text-align: left; vertical-align: middle; padding: 8px clamp(5px, 1.25vw, 17px); border-color: #c9bcaa; width: 33.33%; }
.authority-plate tbody th { font: 600 15px/1.35 var(--font-ui); }
.authority-plate tbody td { font: 400 clamp(16px, 1.6vw, 22px)/1.3 var(--font-main); }
.authority-plate tbody tr:last-child > * { border-bottom: 0; }
.bowl-mark, .book-mark { display: block; position: relative; margin: 7px 0 14px; }
.bowl-mark { border-radius: 12% 12% 50% 50% / 12% 12% 90% 90%; background: #a05c3b; width: 58px; height: 26px; border-top: 4px solid #6e3b2b; }
.bowl-mark::before { content: ""; position: absolute; border-radius: 50%; height: 7px; background: #e4b586; top: -5px; left: 2px; right: 2px; border: 1px solid #76452e; }
.bowl-mark::after { content: ""; position: absolute; width: 13px; height: 4px; border-radius: 50%; background: #923f30; left: 26px; top: -2px; }
.book-mark { height: 30px; width: 45px; border: 2px solid #38474a; border-left-width: 6px; transform: rotate(-4deg); background: repeating-linear-gradient(0deg, #e9e1cd 0 5px, #a69879 5px 6px); }
.obligation-row + .obligation-row { border-top: 1px solid var(--art-rule); padding-top: 15px; margin-top: 17px; }
.powers, .inward { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.powers span, .inward span { display: inline-block; border: 1px solid #ac927d; padding: 4px 10px; font: 650 14px/1.4 var(--font-ui); }
.converge { color: var(--accent); display: block; line-height: 1.05; margin-top: 3px; }
.inward i { font-style: normal; color: var(--accent); }
.obligation-row p { margin-top: 6px; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.38; }
.harbor-map { height: clamp(108px, 12vw, 150px); overflow: hidden; position: relative; isolation: isolate; color: #f4f3df; background: repeating-linear-gradient(177deg, transparent 0 12px, #e0f3eb22 13px 14px, transparent 15px 20px), #3f6265; }
.harbor-map::before { content: ""; z-index: -1; position: absolute; inset: 0 auto 0 0; width: 23%; border-right: 4px solid #645b47; background: repeating-linear-gradient(15deg, #dcc59b 0 11px, #c8ad7d 12px 13px); }
.quay-label, .sea-label { position: absolute; top: 9px; font: 650 12px/1.4 var(--font-ui); }
.quay-label { left: 6px; background: #ddc599; color: #382f22; }
.sea-label { right: 8px; }
.pier { position: absolute; left: 16%; top: 70%; width: 27%; height: 9px; background: repeating-linear-gradient(90deg, #e0bd86 0 8px, #927551 9px 10px); box-shadow: 0 2px #3d4b45; }
.fleet { position: absolute; top: 39%; width: 85px; display: flex; gap: 2px; }
.tied .fleet { left: 24%; }
.fishing .fleet { right: 8%; top: 52%; }
.fleet i, .boat-icon { position: relative; display: inline-block; width: 25px; height: 22px; }
.fleet i::before, .boat-icon::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #f0c079; clip-path: polygon(0 0, 100% 0, 76% 100%, 18% 100%); }
.fleet i::after, .boat-icon::after { content: ""; position: absolute; top: 0; left: 3px; width: 17px; height: 15px; background: #f5eacb; clip-path: polygon(70% 0, 70% 100%, 0 100%); }
.fishing .fleet i:nth-child(2) { transform: translateY(-12px); }
.fishing .fleet i:nth-child(3) { transform: translateY(8px); }
.boat-entry { border-top: 1px solid var(--art-rule); display: grid; grid-template-columns: 26px 1fr auto; align-items: center; column-gap: 10px; padding: 13px 5px; }
.boat-entry.assigned { border-left: 3px solid var(--accent); padding-left: 7px; background: #f7efdf; }
.boat-icon::before { background: #8d5132; }
.boat-icon::after { background: #314f52; }
.boat-entry b, .boat-entry div span { display: block; }
.boat-entry b { font: italic 500 24px/1.1 var(--font-main); }
.boat-entry div span { color: #554d41; font: 500 13px/1.4 var(--font-ui); margin-top: 3px; }
.boat-entry strong { max-width: 8ch; text-align: right; font: 650 13px/1.35 var(--font-ui); }
.boat-entry.assigned strong { color: var(--accent); }
.afterword { margin-top: 19px; border-top: 1px solid var(--rule); }
.afterword p { max-width: 72ch; font-size: 18px; margin-bottom: 15px; }
.story-sources { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px clamp(20px, 5vw, 72px); margin-top: clamp(42px, 6vw, 80px); padding-top: 20px; border-top: 1px solid var(--art-rule); }
.story-sources h2 { font-size: clamp(28px, 3.2vw, 42px); }
.story-sources p { font: 450 15px/1.5 var(--font-ui); color: var(--muted); margin-top: 12px; }
.story-sources nav a { display: block; padding: 7px 0 10px; margin-bottom: 3px; border-bottom: 1px solid var(--rule); font-size: 20px; }
.story-sources nav a span { display: block; font: 500 13px/1.45 var(--font-ui); color: var(--muted); }
.story-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(15px, 3vw, 44px); }
.story-card { display: flex; flex-direction: column; background: #283a40; color: #f6e3bd; }
.story-card.classroom-card { background: #1d4039; color: #f7edcd; }
.story-card img { width: 100%; height: auto; }
.story-card > div { padding: clamp(18px, 2.4vw, 32px); }
.story-card h2 { font-size: clamp(31px, 4vw, 52px); margin: 8px 0 10px; }
.story-card p { color: #faf3e5; font-size: clamp(16px, 1.8vw, 21px); }
.story-card .entry-link { margin-top: 15px; }
@media (max-width: 780px) {
  .cover-words { padding: 23px; }
  .cover-words h1 { font-size: clamp(42px, 6.2vw, 56px); }
  .cover-words .eyebrow { font-size: 11px; margin-bottom: 14px; }
  .chart-spread { grid-template-columns: 1.5fr .8fr; gap: 15px; }
  .scene-spread { gap: 15px; }
}
@media (max-width: 650px) {
  .story-cover, .scene-spread, .chart-spread, .comparison-intro, .story-sources, .story-gallery { grid-template-columns: 1fr; }
  .cover-art { grid-row: 1; }
  .cover-art img { position: static; width: 100%; height: auto; max-height: 48vh; object-fit: cover; }
  .cover-words { padding: 20px clamp(16px, 5vw, 30px) 21px; }
  .cover-words h1 { font-size: clamp(42px, 10vw, 58px); }
  .cover-words h1 em { display: inline; }
  .cover-words p { font-size: 18px; margin-top: 12px; }
  .cover-links { margin-top: 12px; }
  .story-credit { font-size: 12px; }
  .scene-heading h2 { font-size: clamp(33px, 7.8vw, 46px); }
  .scene-spread, .chart-spread { margin-top: 16px; }
  .scene-intro, .comparison-intro p, .experiment > p { font-size: 18px; }
  .chart-board { padding: 13px; }
  .authority-plate { padding: 8px 3px; }
  .authority-plate :is(td, th) { padding: 7px 5px; }
  .authority-plate tbody th { font-size: 13px; }
  .authority-plate tbody td { font-size: 15px; }
  .story-gallery { gap: 24px; }
}
@media print {
  .cover-links, .week-controls, .switcher > label, .week-markers { display: none; }
  .switch-panel { display: block; }
  .art-figure, .chart-board, .switch-panel, .authority-plate { break-inside: avoid; }
}
