:root {color-scheme:light;--ink:#1e3240;--night:#173c50;--blue:#195779;--gold:#f5cf7b;--tint:#e5eef0;--paper:white;--line:#69767a;--serif:Georgia,"Times New Roman",serif;--sans:system-ui,"Segoe UI",Arial,sans-serif}
* {box-sizing:border-box}
body {margin:0;color:var(--ink);background:var(--tint);font:1.05rem/1.5 var(--sans)}
h1,h2,h3 {font-family:var(--serif);line-height:1.08;letter-spacing:-.026em;text-wrap:balance}
h1,.paper-title {font-size:clamp(2.15rem,5.2vw,3.6rem)}
h2 {font-size:clamp(1.55rem,3vw,2.35rem)}
h3 {font-size:1.35rem}
h1,h2,h3,p,figure {margin-top:0}
p {margin-bottom:.8em}
a {color:var(--blue);text-underline-offset:.18em}
a:focus-visible,button:focus-visible,select:focus-visible,input:focus-visible {outline:3px solid #af4f19;outline-offset:3px}
[hidden] {display:none!important}
.sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip {position:absolute;left:1rem;top:-8rem;z-index:4;padding:.6rem;background:white}
.skip:focus {top:.4rem}
.nav,footer {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.45rem 1.5rem;padding:.9rem max(4vw,1rem);color:white;background:var(--night)}
.nav a,footer a {color:inherit}
.wordmark {font:bold 1.3rem var(--serif);text-decoration:none}
.nav nav {display:flex;flex-wrap:wrap;gap:clamp(.65rem,2.5vw,2rem)}
.nav nav a {padding:.3rem 0;text-decoration:none}
.nav nav a:hover,.nav a[aria-current] {text-decoration:underline}
footer {font-size:.96rem;padding-block:1.25rem}
.home {background:var(--night)}
.home main {max-width:1450px;margin:auto;padding:.65rem max(3.5vw,1rem) 2.3rem}
.cover {display:grid;grid-template-columns:.85fr 1.55fr;background:var(--paper)}
.cover-text {align-self:center;padding:clamp(1.6rem,2.75vw,2.9rem)}
.cover h1 {font-size:clamp(1.9rem,3.65vw,3.7rem);margin-bottom:.5em}
.cover p {max-width:30ch;font-size:clamp(1rem,1.3vw,1.18rem);margin:1.1rem 0 1.35rem}
.cover>img {display:block;width:100%;height:100%;min-height:375px;object-fit:cover}
.button,button {display:inline-block;background:var(--blue);color:white;padding:.7rem 1rem;border:0;font:650 1rem var(--sans);text-decoration:none;cursor:pointer}
.button:hover,button:not(:disabled):hover {background:#123e56}
button:disabled {background:#d6dddf;color:#465158;cursor:default}
.plain {display:inline-block;margin:.85rem .6rem}
.print-table,.offline {background:white;padding:clamp(1.5rem,4.5vw,4rem);margin-top:1.1rem}
.print-table {display:grid;grid-template-columns:1fr 1.2fr;gap:2rem}
.print-table p {max-width:36ch}
.print-table table {width:100%;border-collapse:collapse;align-self:start}
.print-table th,.print-table td {padding:.62rem .3rem;text-align:left;vertical-align:top}
.print-table thead th {padding-top:0}
.print-table tr+tr {border-top:1px solid #c3cdcf}
.print-table small {display:block;font-size:.85rem;font-weight:400}
.offline {background:#e7ebdc}
.sheet,.workspace,.tools {max-width:880px;margin:1rem auto;background:white;padding:clamp(1.3rem,4.3vw,3.5rem)}
.workspace {max-width:1060px}
.tools {padding:1rem 1.5rem}
.sheet h1,.sheet .paper-title,.read h2,.workspace h1 {margin-bottom:.44em}
.folio {color:#3d5864;font-size:.91rem;font-weight:620;margin-bottom:.55rem}
.read>p:not(.folio) {font:clamp(1.25rem,2.1vw,1.62rem)/1.42 var(--serif)}
.painting {display:block;width:100%;height:auto;margin:0 0 1.2rem}
.ink-scene {display:none}
.whale-icon {display:block;width:3.4rem;height:auto}
.turn {display:inline-block;margin-top:.4rem;font-weight:650}
.bookings {display:grid;grid-template-columns:1fr 1fr;gap:.8rem;margin:1.2rem 0}
.booking-card,.ticket {padding:.9rem 1.1rem;background:#fbebbf}
.booking-card p,.ticket p {margin:0}
.booking-card h3 {margin:0 0 .35em}
.ticket {max-width:32rem;margin:.7rem 0}
.ticket strong {display:block;font:700 1.35rem var(--serif);margin-bottom:.2em}
.workspace :is(label,legend) {display:block;font-weight:650;margin:.8rem 0 .25rem}
.workspace select,.workspace input {font:inherit;color:var(--ink);background:white;border:1px solid var(--line);padding:.5rem .65rem}
.workspace input[type=number] {width:6rem}
.workspace select {max-width:100%}
.workspace button:not(.day) {margin:.5rem .4rem .4rem 0}
.workspace section {margin:1.6rem 0}
.workspace p {max-width:72ch}
.interactive .no-script-bookings,.interactive .calendar .date-label {display:none}
.calendar-pair {display:grid;grid-template-columns:1fr 1fr;gap:clamp(.8rem,1.8vw,1.4rem);align-items:start;margin:1.2rem 0}
.calendar {width:100%;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums}
.calendar caption {text-align:left;font:bold 1.55rem var(--serif);padding-bottom:.35rem}
.calendar th {padding:.32rem .12rem;background:var(--night);color:white;font-weight:600;font-size:.95rem}
.calendar abbr {text-decoration:none}
.calendar td {border:1px solid var(--line);vertical-align:top;text-align:left;padding:0;height:3.95rem;background:white}
.calendar .outside {background:#e9eef0}
.date-label {display:block;padding:.35rem}
.day {display:block;position:relative;width:100%;height:100%;min-height:3.9rem;padding:.24rem;color:var(--ink);background:white;text-align:left;line-height:1.05;vertical-align:top}
.day span {display:block;position:absolute;top:.3rem;left:.3rem}
.day small {display:block;position:absolute;bottom:.3rem;left:.3rem;font:700 .75rem var(--sans)}
.day:disabled {background:white;color:var(--ink)}
.day:not(:disabled):hover {background:#e4eef0;color:var(--ink)}
.day.travelled {background:#f6e3a6}
.day.current {box-shadow:inset 0 0 0 3px var(--night);background-color:#f5d585;background-image:url("assets/whale-ticket.svg");background-repeat:no-repeat;background-position:93% 14%;background-size:42% auto}
.day.current:not(:disabled):hover {background-color:#f5d585}
.live-controls {display:flex;flex-wrap:wrap;gap:.1rem .25rem}
#live-state,#comparison-result,#arrival-result {font-weight:600;min-height:1.3em}
.comparison,.detachable {padding:1rem 1.1rem;background:var(--tint)}
.cal-stock .calendar td {height:5.15rem}
.cal-stock .calendar caption {margin-top:1rem}
.mat-foot {margin-top:.8rem}
.measure {margin:.5rem 0 1.2rem}
.short-line {display:inline-block;min-width:4rem;border-bottom:1px solid var(--line)}
.answer-space {height:4rem;border:1px solid var(--line);margin:.4rem 0 1rem}
.marker-stock {display:flex;align-items:center;gap:1rem}
.marker-stock p {margin:0;font-size:.9rem}
.cut-whale {display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:18mm;height:13mm;border:1px dashed var(--line)}
.cut-whale .whale-icon {width:14mm}
.detachable {margin:1rem 0;border:1px dashed var(--line);background:white}
.guide h2:not(.paper-title) {font-size:1.6rem;margin:1em 0 .35em}
.sources {font-size:.94rem}
@media(max-width:820px) {
  .cover,.print-table {grid-template-columns:1fr}
  .cover-text {padding:1.6rem 1.4rem}
  .cover h1 {font-size:clamp(2.5rem,6.4vw,3.45rem)}
  .cover p {max-width:56ch}
  .cover>img {height:auto;min-height:0}
  .calendar-pair {grid-template-columns:1fr}
}
@media(max-width:510px) {
  .nav {align-items:flex-start;flex-direction:column}
  .nav nav {width:100%;justify-content:space-between;gap:.5rem;font-size:.96rem}
  .home main {padding-top:.25rem}
  .plain {display:block;margin:.8rem 0 0}
  .sheet,.workspace,.tools {padding:1.25rem 1rem;margin:.6rem auto}
  .bookings {grid-template-columns:1fr}
  .calendar th {font-size:.87rem}
  .day small {font-size:.67rem}
}
@page {size:auto;margin:12mm}
@media print {
  html,body {margin:0;background:white;color:#20272d;font:12pt/1.34 Arial,sans-serif;print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .nav,footer,.skip,.tools,.turn {display:none!important}
  .sheet,.workspace {max-width:100%;width:181mm;margin:0 auto;padding:1mm 1.8mm;break-after:page}
  .sheet:last-of-type,.workspace {break-after:auto}
  .sheet h1,.sheet .paper-title,.read h2 {font:bold 26pt/1.08 Georgia,serif;margin:0 0 3.5mm}
  .folio {margin:0 0 2.5mm;color:#35464f;font:9.5pt/1.2 Arial,sans-serif}
  .read>p:not(.folio) {font:17pt/1.36 Georgia,serif;margin:0 0 3.5mm}
  .painting {margin:0 0 4mm}
  .low-ink .painting {display:none}
  .low-ink .ink-scene {display:block;text-align:center;margin:2mm auto 5mm}
  .ink-scene .whale-icon {width:75mm;margin:auto}
  .ink-scene figcaption {font:11pt Arial,sans-serif}
  .bookings {display:grid;grid-template-columns:1fr 1fr;gap:4mm;margin:4mm 0}
  .booking-card,.ticket {padding:3mm 4mm;background:#f2f3f1}
  .booking-card h3,.pupil h3 {font:bold 15pt/1.1 Georgia,serif;margin:3mm 0 1.6mm}
  .booking-card h3 {margin:0 0 1.4mm}
  .booking-card p {font-size:12pt}
  .low-ink .booking-card,.pupil .booking-card {background:white;border:.28mm solid #49565a}
  .cal-stock .calendar caption {margin:0;padding:2mm 0;font:bold 20pt Georgia,serif}
  .calendar th {font:700 12pt Arial,sans-serif;background:white;color:black;border:.24mm solid #56646b;padding:2mm}
  .cal-stock .calendar td {height:23mm;border:.24mm solid #56646b}
  .cal-stock .date-label {display:block;padding:1.6mm 2mm;font:bold 14pt Arial,sans-serif}
  .calendar .outside {background:#f2f2f2}
  .mat-foot {font-size:11pt;margin:3.8mm 0 0}
  .pupil p,.guide p {margin:0 0 2.5mm}
  .pupil .booking-card {margin:1.8mm 0}
  .pupil .booking-card p {margin:0}
  .measure {font-size:11.5pt;margin:2mm 0 3mm}
  .short-line {min-width:23mm}
  .answer-space {height:22mm;margin:1.7mm 0 2.5mm}
  .marker-stock {margin-top:3mm;gap:4mm}
  .marker-stock p {font:10pt/1.28 Arial,sans-serif;margin:0}
  .cut-whale {width:18mm;height:13mm;border:.27mm dashed #414d54}
  .cut-whale .whale-icon {width:14mm;height:9mm}
  .detachable {border:.3mm dashed #414d54;padding:4mm 5mm;margin:3.5mm 0;min-height:48mm}
  .detachable h3 {margin:0 0 4mm}
  .detachable p {margin:3mm 0;font-size:14pt}
  .guide {font:12.2pt/1.42 Arial,sans-serif}
  .guide h2:not(.paper-title) {font:bold 16pt Georgia,serif;margin:5mm 0 1.8mm}
  .guide .sources {font:10pt/1.32 Arial,sans-serif}
  .visitor-mode .workspace>*:not(#public-ticket),.visitor-mode #public-ticket>*:not(.ticket) {display:none!important}
  .visitor-mode #public-ticket,.visitor-mode .workspace {margin:0;padding:0}
  .visitor-mode .ticket {background:white;border:.3mm dashed black;margin:0;padding:7mm;width:154mm;min-height:52mm}
  .visitor-mode .ticket strong {font:bold 20pt Georgia,serif}
  .visitor-mode .ticket p {font:16pt Arial,sans-serif}
}
