/*
  Swellprint: surf and tide forecast (Screenery template)
  Full-bleed Edo woodblock triptych print meets precision surf forecast ledger.
  Washi ground with fibre grain, flat Prussian blue and indigo blocks, bokashi fades,
  key-block outlines, vertical title cartouches, vermilion sun and hanko seals.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Seals, cartouches, buttons, fields
   4. Header
   5. Hero triptych and live forecast ledger
   6. Forecast tool: controls, chart, window panel
   7. Break guides
   8. Alerts
   9. Plans sheet
  10. Questions
  11. Footer
  12. Motion
  13. Narrow screens
*/

/* === 1. Tokens === */
:root {
  /* Pigments */
  --washi: #f2e9d6;        /* warm fibrous paper ground */
  --washi-deep: #e6d8bc;   /* shaded paper, panels */
  --washi-hi: #f9f4e8;     /* foam white */
  --cartouche: #eedaa4;    /* pale gold cartouche fill */
  --sumi: #171a22;         /* key-block ink, text */
  --sumi-soft: #3b4052;    /* secondary text on washi (8.4:1) */
  --prussian: #19456b;     /* the blue block */
  --prussian-deep: #102e4a;
  --indigo: #1e284e;
  --aqua: #7ea8ba;         /* pale blue block */
  --aqua-pale: #c5dada;
  --slate: #465877;
  --vermilion: #b83228;    /* sun disc and seals */
  --vermilion-deep: #8f221a;
  --ochre: #9a6214;        /* cross-shore wind */

  /* On dark blocks */
  --on-blue: #f2e9d6;
  --on-blue-soft: #c5dada;

  /* Type */
  --f-display: "Kaisei Tokumin", "Hiragino Mincho ProN", Georgia, serif;
  --f-text: "Commissioner", "Segoe UI", system-ui, sans-serif;
  --fs-hero: clamp(2.55rem, 1.45rem + 3.5vw, 4.9rem);
  --fs-h2: clamp(1.9rem, 1.4rem + 1.6vw, 2.9rem);
  --fs-h3: 1.35rem;
  --fs-body: 1.0625rem;
  --fs-small: .875rem;

  /* Space and shape */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;
  --gutter: clamp(1rem, 3vw, 2.5rem);
  --max: 1340px;
  --r-1: 2px;
  --r-2: 4px;
  --key: 2px solid var(--sumi);    /* key-block outline */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-paper: 0 1px 0 rgba(23, 26, 34, .08), 0 14px 30px -18px rgba(16, 46, 74, .45);

  /* Washi fibres and grain, drawn as SVG noise */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  --fibres: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .22 0 0 0 .7 -.38'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23f)'/%3E%3C/svg%3E");
  --woodgrain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='18'%3E%3Cpath d='M0 5c26-4 54 4 80 0s54 4 80 0M0 13c30 3 60-3 90 1s50-1 70-1' fill='none' stroke='%23f9f4e8' stroke-opacity='.07' stroke-width='1.3'/%3E%3C/svg%3E");
}

/* === 2. Base and browser surfaces === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--washi);
  background-image: var(--grain), var(--fibres);
  color: var(--sumi);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: clip;
}
::selection { background: var(--prussian); color: var(--washi-hi); }
:root { accent-color: var(--vermilion); caret-color: var(--vermilion); scrollbar-color: var(--prussian) var(--washi-deep); }
:focus-visible { outline: 3px solid var(--vermilion); outline-offset: 3px; border-radius: var(--r-1); }
a { color: var(--prussian); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--vermilion-deep); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--sumi); color: var(--washi); padding: .6rem 1rem; }
.skip:focus { top: 1rem; }
.skip:hover { color: var(--washi-hi); }
.ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main > section:not(.hero) { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* === 3. Seals, cartouches, buttons, fields === */
/* Seal: a carved red square, the vermilion block. Glyphs are decorative. */
.seal {
  display: inline-grid; place-items: center;
  background: var(--vermilion); color: var(--washi-hi);
  font-family: var(--f-display); font-weight: 800; line-height: 1;
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px var(--vermilion), inset 0 0 0 3.5px var(--washi-hi);
  /* uneven ink: the seal is pressed, not printed */
  background-image: radial-gradient(circle at 30% 70%, rgba(255,255,255,.12) 0 18%, transparent 19%), radial-gradient(circle at 75% 25%, rgba(0,0,0,.12) 0 10%, transparent 11%);
}
.seal--logo { width: 2.1rem; height: 2.1rem; }
.seal--logo svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: var(--washi-hi); stroke-width: 2.8; stroke-linecap: round; }
.seal--small { width: 2.35rem; height: 2.35rem; font-size: 1.2rem; flex: none; }

/* Section heading: a horizontal cartouche with a double rule */
.cart-h {
  display: inline-block;
  font-size: var(--fs-h2); font-weight: 800; letter-spacing: -.01em;
  background: var(--cartouche); color: var(--sumi);
  padding: .3em .7em .35em;
  border: var(--key);
  box-shadow: 0 0 0 4px var(--washi), 0 0 0 6px var(--sumi);
  margin: 6px;
  justify-self: start;
}
.cart-h--light { box-shadow: 0 0 0 4px var(--indigo), 0 0 0 6px var(--cartouche); border-color: var(--sumi); }
.sec-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-6); max-width: 60rem; }
.sec-head--row { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.sec-head__lede { max-width: 62ch; color: var(--sumi-soft); }

/* Buttons */
.btn {
  --bg: var(--washi-hi); --fg: var(--sumi); --bd: var(--sumi);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.25rem;
  background: var(--bg); color: var(--fg);
  border: 2px solid var(--bd); border-radius: var(--r-2);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 2px 0 rgba(23,26,34,.18), 0 8px 16px -10px rgba(16,46,74,.6);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 rgba(23,26,34,.18), 0 12px 20px -10px rgba(16,46,74,.6); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(23,26,34,.18); }
.btn--ink { --bg: var(--prussian-deep); --fg: var(--washi-hi); --bd: var(--sumi); }
.btn--ink:hover { --bg: var(--indigo); color: var(--washi-hi); }
.btn--seal { --bg: var(--vermilion); --fg: var(--washi-hi); --bd: var(--vermilion-deep); }
.btn--seal:hover { --bg: var(--vermilion-deep); color: var(--washi-hi); }
.btn--paper { --bg: rgba(249, 244, 232, .94); --fg: var(--sumi); --bd: var(--sumi); }
.btn--paper:hover { --bg: var(--washi-hi); color: var(--prussian-deep); }
.btn--line { --bg: transparent; }
.btn--line:hover { --bg: var(--washi-hi); color: var(--sumi); }
.btn--sm { min-height: 44px; padding: .5rem .95rem; font-size: .95rem; }
.btn--lg { min-height: 54px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { cursor: progress; opacity: .85; transform: none; }

/* Fields */
.field { display: grid; align-content: start; gap: .4rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: .95rem; padding: 0; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-4); }
input[type=email], .select select {
  width: 100%; min-height: 48px; padding: .65rem .85rem;
  background: var(--washi-hi); border: 2px solid var(--sumi); border-radius: var(--r-2);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: #545968; }
input[type=email]:focus-visible, .select select:focus-visible { outline: none; border-color: var(--prussian); box-shadow: 0 0 0 3px var(--aqua); }
[aria-invalid=true] { border-color: var(--vermilion) !important; background: #fbefe8 !important; }
.select { position: relative; }
.select select { appearance: none; padding-right: 2.4rem; cursor: pointer; }
.select::after { content: ""; position: absolute; right: .95rem; top: 50%; width: .5rem; height: .5rem; border: solid var(--sumi); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.err { color: var(--vermilion-deep); font-size: .9rem; font-weight: 600; min-height: 0; }
.err:empty { display: none; }

/* Chip checkboxes, radios and segmented controls share one carved style */
.chips, .radios { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips label, .radios label, .seg label { position: relative; cursor: pointer; }
.chips input, .radios input, .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span, .radios span, .seg span {
  display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .9rem;
  border: 2px solid var(--sumi); border-radius: var(--r-2); background: var(--washi-hi);
  font-weight: 600; font-size: .95rem; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.chips input:checked + span, .radios input:checked + span, .seg input:checked + span { background: var(--prussian); color: var(--washi-hi); }
.chips input:focus-visible + span, .radios input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--vermilion); outline-offset: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg span { border-radius: 0; margin-left: -2px; }
.seg label:first-child span { border-radius: var(--r-2) 0 0 var(--r-2); margin-left: 0; }
.seg label:last-child span { border-radius: 0 var(--r-2) var(--r-2) 0; }
.check { display: flex; gap: .65rem; align-items: center; cursor: pointer; min-height: 44px; font-weight: 500; }
.check input { width: 1.5rem; height: 1.5rem; flex: none; }

.note { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border: 2px solid var(--vermilion); background: #f8e4da; border-radius: var(--r-2); }
.note .ico { color: var(--vermilion-deep); margin-top: .2rem; }
.note[hidden] { display: none; }

/* === 4. Header === */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--prussian-deep) var(--woodgrain);
  color: var(--on-blue);
  border-bottom: 2px solid var(--sumi);
}
.top__in { max-width: var(--max); margin: auto; padding: .45rem var(--gutter); display: flex; align-items: center; gap: var(--s-5); }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--washi-hi); text-decoration: none; }
.brand:hover { color: var(--washi-hi); }
.brand__name { font-family: var(--f-display); font-weight: 800; font-size: 1.38rem; letter-spacing: .01em; }
.brand__coast {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-blue-soft); padding-left: .7rem; border-left: 1px solid rgba(242,233,214,.28);
}
.nav { display: flex; gap: var(--s-1); margin-left: auto; }
.nav a { color: var(--on-blue); text-decoration: none; font-weight: 500; padding: .6rem .8rem; border-radius: var(--r-1); }
.nav a:hover { color: var(--washi-hi); background: rgba(242,233,214,.1); }
.top .btn--seal { box-shadow: none; border-color: var(--sumi); }

/* === 5. Hero: Full-bleed Edo woodblock triptych + ruled live forecast ledger === */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: calc(100svh - 60px);
  max-height: 920px;
  border-bottom: 3px solid var(--sumi);
  background: var(--washi);
}

.triptych {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 540px;
}

.triptych__art {
  position: absolute;
  inset: 0;
  margin: 0;
  background: var(--washi);
}

.triptych__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Fibrous washi paper grain overlaid across the entire woodblock impression */
.triptych__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grain), var(--fibres);
  mix-blend-mode: multiply;
  opacity: .72;
  pointer-events: none;
}

/* Subtle Edo triptych panel seams (three joined oban sheets) */
.triptych__seams {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  pointer-events: none;
  z-index: 2;
}
.triptych__seams span {
  border-right: 1px solid rgba(23, 26, 34, .22);
  box-shadow: inset -1px 0 0 rgba(249, 244, 232, .35);
}

/* Vertical title cartouches and crimson hanko seal */
.cartouche {
  position: absolute;
  z-index: 3;
  border: 2px solid var(--sumi);
  background: var(--cartouche);
  box-shadow: inset 0 0 0 3px var(--cartouche), inset 0 0 0 4.5px var(--sumi), 0 10px 24px -14px rgba(16,46,74,.65);
}
.cartouche--title {
  right: clamp(1rem, 2.6vw, 2.5rem);
  top: clamp(1rem, 2.8vw, 2.2rem);
  writing-mode: vertical-rl;
  padding: 1.15rem .55rem;
}
.cartouche__main {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 1.9vw, 1.95rem);
  letter-spacing: .09em;
  line-height: 1;
  color: var(--sumi);
}
.cartouche--sub {
  right: calc(clamp(1rem, 2.6vw, 2.5rem) + clamp(3.1rem, 4.4vw, 4.2rem));
  top: clamp(1rem, 2.8vw, 2.2rem);
  writing-mode: vertical-rl;
  padding: .8rem .35rem;
  background: #f5ebd2;
}
.cartouche--sub span {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(.72rem, .88vw, .86rem);
  letter-spacing: .05em;
  color: var(--sumi);
}
.seal--print {
  position: absolute;
  z-index: 3;
  right: clamp(1rem, 2.6vw, 2.5rem);
  bottom: clamp(1rem, 2.4vw, 1.8rem);
  width: clamp(2.8rem, 3.8vw, 3.6rem);
  height: clamp(2.8rem, 3.8vw, 3.6rem);
  font-size: clamp(.95rem, 1.3vw, 1.25rem);
  line-height: 1.05;
  text-align: center;
}

/* Harmonious editorial overlay nestled in the upper-left bokashi mist */
.hero__overlay {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(2rem, 5.5vh, 3.8rem) var(--gutter) clamp(6rem, 15vh, 9.5rem);
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.hero__copy {
  display: grid;
  gap: var(--s-4);
  max-width: 36rem;
  pointer-events: auto;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--prussian-deep);
}
.hero__dot {
  width: .55rem;
  height: .55rem;
  background: var(--vermilion);
  border-radius: 1px;
  transform: rotate(45deg);
  flex: none;
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.03;
  color: var(--sumi);
  text-shadow: 2px 2px 0 rgba(242, 233, 214, .85), 4px 3px 0 rgba(25, 69, 107, .16);
}

.hero__lede {
  font-size: 1.12rem;
  line-height: 1.58;
  max-width: 48ch;
  color: var(--sumi);
  font-weight: 450;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

/* Woodblock-ruled live forecast ledger anchored across the bottom of the hero */
.ledger-bar {
  position: relative;
  z-index: 5;
  background: var(--washi-hi);
  background-image: var(--grain);
  border-top: 3px solid var(--sumi);
}

.today.ledger {
  max-width: var(--max);
  margin-inline: auto;
  padding: .9rem var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-5);
  color: var(--sumi);
  text-decoration: none;
  transition: background-color .25s var(--ease);
}
.today.ledger:hover {
  background: rgba(238, 218, 164, .32);
  color: var(--sumi);
}

.ledger__stamp {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-right: var(--s-5);
  border-right: 1.5px solid rgba(23, 26, 34, .28);
}

.today__label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--sumi-soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  line-height: 1.3;
}

.ledger__cells {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem 1.4rem;
  font-variant-numeric: tabular-nums;
}

.today__when {
  font-family: var(--f-display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--sumi);
}

.today__what {
  font-size: .96rem;
  font-weight: 600;
  color: var(--prussian-deep);
  letter-spacing: .01em;
}

.ledger__cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .85rem;
  border: 1.5px solid var(--sumi);
  border-radius: var(--r-2);
  background: var(--washi);
  font-size: .88rem;
  font-weight: 700;
  color: var(--sumi);
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.today.ledger:hover .ledger__cta {
  background: var(--vermilion);
  border-color: var(--vermilion-deep);
  color: var(--washi-hi);
}
.today__go { width: 1.15rem; height: 1.15rem; color: var(--vermilion); transition: transform .2s var(--ease), color .2s var(--ease); }
.today.ledger:hover .today__go { color: var(--washi-hi); transform: translateX(2px); }

/* === 6. Forecast tool === */
.forecast { padding-block: var(--s-8) var(--s-8); }
.controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5) var(--s-6); margin-bottom: var(--s-5); }
.ctl { border: 0; padding: 0; margin: 0; min-width: 0; }
.ctl legend { font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sumi-soft); margin-bottom: .55rem; padding: 0; }
.ctl--days { grid-column: 1 / -1; }
.breaks-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.tab {
  display: grid; gap: 0; text-align: left; min-height: 56px; padding: .5rem .9rem;
  border: 2px solid var(--sumi); border-radius: var(--r-2); background: var(--washi-hi); cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.tab b { font-family: var(--f-display); font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.tab small { font-size: .8rem; color: var(--sumi-soft); }
.tab:hover { transform: translateY(-1px); }
.tab.is-on, .tab[aria-checked=true] { background: var(--prussian) var(--woodgrain); color: var(--washi-hi); }
.tab[aria-checked=true] small { color: var(--on-blue-soft); }
.tab.is-dim small { color: var(--vermilion-deep); font-weight: 600; }
.tab.is-dim[aria-checked=true] small { color: #f6c9bd; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.day {
  position: relative; display: grid; gap: .1rem; justify-items: center; padding: .55rem .3rem .75rem; min-height: 72px;
  border: 2px solid var(--sumi); border-radius: var(--r-2); background: var(--washi-hi); cursor: pointer;
  font-variant-numeric: tabular-nums; transition: background-color .25s var(--ease), color .25s var(--ease);
}
.day__d { font-weight: 700; font-size: .95rem; }
.day__h { font-size: .85rem; color: var(--sumi-soft); }
.day__mark { position: absolute; bottom: -7px; width: 14px; height: 14px; background: var(--vermilion); border: 2px solid var(--washi-hi); border-radius: 2px; transform: rotate(45deg); }
.day[aria-checked=true] { background: var(--indigo) var(--woodgrain); color: var(--washi-hi); }
.day[aria-checked=true] .day__h { color: var(--on-blue-soft); }

.fc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: var(--s-5); align-items: start; }
.chart-wrap {
  background: var(--washi-hi);
  border: var(--key);
  border-radius: var(--r-2);
  padding: var(--s-5);
  box-shadow: inset 0 0 0 4px var(--washi-hi), inset 0 0 0 5px rgba(23,26,34,.18), var(--shadow-paper);
  min-width: 0;
}
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; margin-bottom: var(--s-3); }
.chart-title { font-size: var(--fs-h3); }
.chart-hint { font-size: .85rem; color: var(--sumi-soft); }
.chart-scroll { position: relative; overflow-x: auto; overscroll-behavior-x: contain; margin-inline: calc(var(--s-2) * -1); padding-inline: var(--s-2); }
.chart { width: 100%; min-width: 680px; height: auto; font-family: var(--f-text); font-variant-numeric: tabular-nums; cursor: crosshair; touch-action: pan-x; }
.chart:focus-visible { outline-offset: 4px; }
.chart .ch-empty { font-size: 18px; fill: var(--sumi-soft); }
/* the printing pass when data changes: a baren wipe across the bands */
.chart.is-printing .bands { animation: baren .7s var(--ease) both; }
@keyframes baren { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.ch-lab { font-size: 13px; fill: var(--sumi-soft); font-weight: 600; }
.ch-reg { font-size: 12px; fill: var(--sumi); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ch-num { font-size: 13px; fill: var(--sumi); font-weight: 600; text-anchor: middle; }
.ch-hour { font-size: 13px; fill: var(--sumi-soft); text-anchor: middle; font-weight: 600; }
.ch-tide-lab { font-size: 12px; font-weight: 700; text-anchor: middle; fill: var(--sumi); }
.ch-win-lab { font-size: 13px; font-weight: 800; fill: var(--washi-hi); font-family: var(--f-display); }

.tides { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; font-variant-numeric: tabular-nums; }
.tides li { display: flex; gap: .5rem; align-items: baseline; padding: .35rem .75rem; border: 1.5px solid var(--sumi); border-radius: var(--r-2); background: var(--washi); font-size: .92rem; }
.tides b { font-weight: 700; }
.tides .is-high b { color: var(--prussian); }
.tides .is-low b { color: var(--sumi-soft); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: var(--s-4); font-size: .85rem; color: var(--sumi-soft); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.sw { width: 18px; height: 12px; border: 1.5px solid var(--sumi); display: inline-block; }
.sw--1 { background: var(--aqua-pale); } .sw--2 { background: var(--aqua); } .sw--3 { background: var(--prussian); } .sw--4 { background: var(--indigo); }
.sw--off { background: var(--prussian); border-radius: 50%; width: 12px; } .sw--cross { background: var(--ochre); border-radius: 50%; width: 12px; } .sw--on { background: var(--vermilion); border-radius: 50%; width: 12px; }

/* Window panel */
.window { display: grid; gap: var(--s-4); position: sticky; top: 5.5rem; }
.chart-wrap .readout { margin-top: var(--s-4); background: var(--washi); }
.chart-wrap .readout .ro { grid-template-columns: auto 1fr auto auto 1fr auto; }
.window__plate {
  position: relative; padding: var(--s-5);
  background: var(--prussian) var(--woodgrain); color: var(--washi-hi);
  border: var(--key); border-radius: var(--r-2); box-shadow: var(--shadow-paper);
}
.window__plate[hidden], .window__empty[hidden] { display: none; }
.seal--window { position: absolute; right: 1rem; top: 1rem; width: 2.6rem; height: 2.6rem; font-size: 1.3rem; }
.window__label { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--on-blue-soft); }
.window__when { font-family: var(--f-display); font-weight: 800; font-size: 2rem; line-height: 1.15; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.window__what { color: var(--on-blue-soft); font-variant-numeric: tabular-nums; margin-top: .3rem; }
.window__empty { padding: var(--s-5); background: var(--washi-deep); border: 2px dashed var(--sumi); border-radius: var(--r-2); display: grid; gap: .6rem; }
.window__none { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; }
.window__try { display: flex; flex-wrap: wrap; gap: .4rem; }
.window__try .btn { min-height: 44px; padding: .4rem .8rem; font-size: .9rem; }
.rules, .readout { background: var(--washi-hi); border: var(--key); border-radius: var(--r-2); padding: var(--s-4) var(--s-5); }
.rules h4, .readout h4 { font-size: 1.1rem; margin-bottom: .5rem; }
.rules__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; counter-reset: r; }
.rules__list li { counter-increment: r; display: grid; grid-template-columns: 1.6rem 1fr; gap: .4rem; font-size: .93rem; line-height: 1.45; }
.rules__list li::before { content: counter(r); display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1.5px solid var(--sumi); border-radius: 50%; font-size: .78rem; font-weight: 700; margin-top: .05rem; }
.rules__note { font-size: .85rem; color: var(--sumi-soft); margin-top: .7rem; }
.ro { display: grid; grid-template-columns: auto 1fr auto; gap: .35rem .7rem; margin: 0; font-size: .93rem; font-variant-numeric: tabular-nums; align-items: center; }
.ro dt { font-weight: 600; color: var(--sumi-soft); }
.ro dd { margin: 0; }
.ro .pass, .ro .fail { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 700; justify-self: end; }
.ro .pass { color: var(--prussian); }
.ro .fail { color: var(--vermilion-deep); }

/* === 7. Break guides === */
.breaks { padding-block: var(--s-8); }
.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
/* the cards hang at slightly different heights, like prints pinned along a wall */
.guide:nth-child(3n+2) { margin-top: var(--s-6); }
.guide:nth-child(3n+3) { margin-top: var(--s-3); }
.guide { display: grid; grid-template-rows: auto 1fr; background: var(--washi-hi); border: var(--key); box-shadow: var(--shadow-paper); border-radius: var(--r-1); }
.guide__art { position: relative; border-bottom: var(--key); overflow: hidden; }
.guide__art svg { width: 100%; height: auto; }
.guide__art::after { content: ""; position: absolute; inset: 0; background: var(--grain); mix-blend-mode: multiply; pointer-events: none; }
.vcart { position: absolute; right: .7rem; top: .7rem; writing-mode: vertical-rl; font-family: var(--f-display); font-weight: 700; font-size: .95rem; letter-spacing: .04em; padding: .6rem .3rem; background: var(--cartouche); border: 1.5px solid var(--sumi); box-shadow: inset 0 0 0 2px var(--cartouche), inset 0 0 0 3px var(--sumi); color: var(--sumi); }
.guide__body { display: grid; gap: .65rem; align-content: start; padding: var(--s-5); }
.guide__body h3 { font-size: 1.45rem; }
.guide__type { font-size: .88rem; font-weight: 700; color: var(--vermilion-deep); letter-spacing: .03em; }
.guide__body > p:not(.guide__type) { font-size: .98rem; color: var(--sumi-soft); }
.facts { margin: .2rem 0 .4rem; display: grid; gap: .3rem; font-size: .9rem; border-top: 1.5px solid var(--sumi); padding-top: .6rem; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--sumi-soft); }
.guide .btn { justify-self: start; }
/* vignette inks */
.v-sea { fill: var(--prussian); }
.v-land { fill: #d9c59a; }
.v-sand { fill: #e8d6a8; }
.v-rock { fill: #46506b; }
.v-paper { fill: var(--washi-hi); }
.v-ink { fill: var(--indigo); }
.v-red { fill: var(--vermilion); stroke: var(--washi-hi); stroke-width: 2; }
.v-key { fill: none; stroke: var(--sumi); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.v-foam { fill: none; stroke: var(--washi-hi); stroke-width: 4; stroke-linecap: round; }
.v-reef path { fill: var(--indigo); }
.v-bar { fill: var(--aqua); opacity: .6; }
.v-arrow { stroke: var(--cartouche); stroke-width: 3; stroke-dasharray: 6 6; }
.v-lip { fill: none; stroke: var(--washi-hi); stroke-width: 12; stroke-linecap: round; }

/* === 8. Alerts === */
.alerts {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start;
  background: var(--indigo) var(--woodgrain); color: var(--on-blue);
  border: 3px solid var(--sumi);
  padding: var(--s-8) clamp(1.25rem, 4vw, 4rem) !important;
  margin-block: var(--s-7);
  max-width: calc(var(--max) - 2 * var(--gutter)) !important;
  position: relative;
}
/* bokashi band across the top of the block */
.alerts::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9rem; background: linear-gradient(var(--prussian-deep), transparent); pointer-events: none; }
.alerts > * { position: relative; }
.alerts__copy { display: grid; gap: var(--s-5); align-content: start; }
.alerts__copy > p { max-width: 46ch; color: var(--on-blue); font-size: 1.08rem; }
.letter { position: relative; background: var(--washi-hi); color: var(--sumi); padding: var(--s-5); border: var(--key); max-width: 26rem; transform: rotate(-1.5deg); box-shadow: 0 20px 30px -20px rgba(0,0,0,.6); }
.letter__head { font-size: .85rem; font-weight: 700; color: var(--sumi-soft); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
.letter__body { font-size: .98rem; font-variant-numeric: tabular-nums; padding-right: 2.5rem; }
.seal--letter { position: absolute; right: .9rem; bottom: .9rem; width: 2.4rem; height: 2.4rem; font-size: 1.2rem; transform: rotate(4deg); }
.alert-card { background: var(--washi); background-image: var(--grain); color: var(--sumi); border: var(--key); border-radius: var(--r-2); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: 0 30px 50px -30px rgba(0,0,0,.7); }
.aform { display: grid; gap: var(--s-5); }
.aform[hidden] { display: none; }
.aform__plan { font-size: .93rem; padding: .6rem .85rem; background: var(--cartouche); border: 1.5px solid var(--sumi); border-radius: var(--r-2); }
.aform__plan a { color: var(--sumi); font-weight: 700; display: inline-flex; align-items: center; min-height: 28px; padding: 2px 4px; }
.btn__spin { display: none; width: 1.1rem; height: 1.1rem; border: 2.5px solid rgba(249,244,232,.35); border-top-color: var(--washi-hi); border-radius: 50%; }
.is-loading .btn__spin { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.slip { display: grid; gap: var(--s-4); justify-items: start; position: relative; padding-top: var(--s-2); }
.slip[hidden] { display: none; }
.slip h3 { font-size: 2rem; font-weight: 800; }
.slip p { max-width: 48ch; }
.slip h3, .slip [data-done-text] { padding-right: 5.5rem; }
.slip__ref { font-variant-numeric: tabular-nums; color: var(--sumi-soft); }
.slip__ref b { color: var(--sumi); letter-spacing: .04em; }
.slip:focus { outline: none; }
.seal--stamp { position: absolute; right: 0; top: 0; width: 4.5rem; height: 4.5rem; font-size: 2.2rem; transform: rotate(-8deg); }

/* === 9. Plans sheet === */
.plans { padding-block: var(--s-8); }
.seg--bill span { background: var(--washi-hi); }
.sheet-scroll { position: relative; overflow-x: auto; border: var(--key); background: var(--washi-hi); box-shadow: var(--shadow-paper); border-radius: var(--r-2); }
.sheet { width: 100%; min-width: 640px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { position: relative; padding: .85rem 1.1rem; text-align: left; vertical-align: middle; border-bottom: 1.5px solid rgba(23,26,34,.25); }
.sheet tbody th { font-weight: 600; width: 30%; }
.sheet thead th { vertical-align: top; padding-top: 1.4rem; border-bottom: var(--key); width: 23.3%; }
.sheet thead .is-pick, .sheet tbody td:nth-child(3), .sheet tfoot td:nth-child(3) { background: rgba(126,168,186,.2); }
.sheet__name { display: block; font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; }
.sheet__price { display: block; margin-top: .3rem; }
.sheet__price b { font-family: var(--f-display); font-weight: 800; font-size: 2.4rem; color: var(--prussian); line-height: 1; }
.sheet__per { display: block; font-size: .88rem; font-weight: 500; color: var(--sumi-soft); margin-top: .2rem; }
.sheet tfoot td { border-bottom: 0; padding-block: 1.1rem 1.4rem; }
.sheet .ok { color: var(--prussian); width: 1.3rem; height: 1.3rem; stroke-width: 2; }
.sheet .no { color: #5b6070; width: 1.1rem; height: 1.1rem; }
.plans__fine { margin-top: var(--s-4); font-size: .9rem; color: var(--sumi-soft); }

/* === 10. Questions === */
.faq { padding-block: var(--s-7) var(--s-9); }
.faq__list { max-width: 52rem; border-top: var(--key); }
.faq details { border-bottom: var(--key); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; padding: 1.05rem .2rem; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; border: solid var(--vermilion); border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq summary:hover { color: var(--prussian); }
.faq details p { padding: 0 .2rem 1.3rem; max-width: 66ch; color: var(--sumi-soft); }

/* === 11. Footer === */
.foot { background: var(--prussian-deep) var(--woodgrain); color: var(--on-blue); border-top: 3px solid var(--sumi); }
.foot__in { max-width: var(--max); margin: auto; padding: var(--s-8) var(--gutter) var(--s-6); display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: var(--s-6); }
.foot__mark { display: grid; gap: var(--s-3); align-content: start; }
.seal--foot { width: 4rem; height: 4rem; font-size: 1.35rem; line-height: 1.05; text-align: center; }
.foot__name { font-family: var(--f-display); font-weight: 800; font-size: 2rem; }
.foot__line { max-width: 44ch; color: var(--on-blue-soft); }
.foot__nav { display: grid; gap: .2rem; align-content: start; }
.foot__nav h3 { font-size: 1.05rem; margin-bottom: .4rem; color: var(--cartouche); }
.foot__nav a { color: var(--on-blue); text-decoration: none; padding: .4rem 0; }
.foot__nav a:hover { color: var(--washi-hi); text-decoration: underline; }
.foot__nav p { color: var(--on-blue-soft); padding: .4rem 0; }
.foot__colophon { max-width: var(--max); margin: auto; padding: var(--s-5) var(--gutter) var(--s-6); border-top: 1px solid rgba(242,233,214,.2); font-size: .88rem; color: var(--on-blue-soft); }

/* === 12. Motion === */
/* Signature: woodblocks arrive slightly out of register and settle one impression after another; the seal presses last. */
@media (prefers-reduced-motion: no-preference) {
  .ly--sky { animation: register 1.35s var(--ease) .05s both; --dx: -8px; --dy: 5px; }
  .ly--far { animation: register 1.35s var(--ease) .22s both; --dx: 10px; --dy: -4px; }
  .ly--red { animation: register 1.35s var(--ease) .38s both; --dx: -6px; --dy: -7px; }
  .ly--midwave { animation: register 1.45s var(--ease) .3s both; --dx: 8px; --dy: 5px; }
  .ly--wave { animation: register 1.55s var(--ease) .42s both; --dx: -10px; --dy: 7px; }
  .ly--sea { animation: register 1.4s var(--ease) .56s both; --dx: 7px; --dy: 6px; }
  .seal--print { animation: press .7s var(--ease) 1.15s both; }
  .cartouche { animation: register 1.2s var(--ease) .68s both; --dx: 0px; --dy: -6px; }
  .spray { animation: drift 7s ease-in-out 2s infinite alternate; }
  .slip:not([hidden]) .seal--stamp { animation: stamp .6s var(--ease) both; }
  .window__plate { transition: background-color .3s var(--ease); }
}
@keyframes register { from { transform: translate(var(--dx), var(--dy)); } to { transform: translate(0, 0); } }
@keyframes press { 0% { transform: scale(1.25) rotate(-6deg); opacity: .4; } 60% { transform: scale(.96) rotate(0); opacity: 1; } 100% { transform: scale(1); } }
@keyframes drift { to { transform: translate(-6px, -4px); } }
@keyframes stamp { 0% { transform: scale(1.6) rotate(-20deg); opacity: 0; } 70% { transform: scale(.94) rotate(-8deg); opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) {
  .chart.is-printing .bands { animation: none; }
  .btn, .tab, .today, .ledger__cta, .today__go { transition: none; }
}

/* === 13. Narrow screens === */
@media (max-width: 1080px) {
  .brand__coast { display: none; }
  .hero { min-height: auto; max-height: none; overflow-x: clip; }
  .triptych { min-height: 560px; }
  .hero__overlay { align-items: flex-start; padding-block: 2.5rem 8rem; }
  .hero__copy {
    max-width: 36rem;
    background: rgba(242, 233, 214, .92);
    padding: 1.5rem 1.75rem;
    border: 2px solid var(--sumi);
    box-shadow: 0 14px 30px -18px rgba(16, 46, 74, .55);
  }
  .today.ledger { grid-template-columns: 1fr auto; gap: .75rem 1.25rem; }
  .ledger__stamp { grid-column: 1 / -1; border-right: 0; padding-right: 0; border-bottom: 1px solid rgba(23, 26, 34, .2); padding-bottom: .6rem; }
  .fc-grid { grid-template-columns: minmax(0, 1fr); }
  .window { position: static; grid-template-columns: 1fr 1fr; }
  .window__plate, .window__empty { grid-column: 1 / -1; }
  .window > .btn { grid-column: 1 / -1; }
  .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide:nth-child(n) { margin-top: 0; }
  .guide:nth-child(2n) { margin-top: var(--s-6); }
  .alerts { grid-template-columns: 1fr; }
  .controls { grid-template-columns: minmax(0, 1fr); }
  .days { grid-template-columns: repeat(7, minmax(4.2rem, 1fr)); overflow-x: auto; padding-bottom: 10px; }
}

@media (max-width: 760px) {
  .nav, .brand__coast { display: none; }
  .top__in { justify-content: space-between; }
  .brand__name { font-size: 1.25rem; }
  .triptych {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .triptych__art {
    position: relative;
    aspect-ratio: 16 / 10;
    min-height: 240px;
    border-bottom: 2px solid var(--sumi);
  }
  .triptych__seams { opacity: .6; }
  .hero__overlay {
    padding: 1.5rem var(--gutter) 1.75rem;
    pointer-events: auto;
  }
  .hero__copy {
    max-width: none;
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .today.ledger { grid-template-columns: 1fr; gap: .7rem; }
  .ledger__cta { justify-self: start; }
  .window { grid-template-columns: 1fr; }
  .guides { grid-template-columns: 1fr; }
  .breaks-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-wrap .readout .ro { grid-template-columns: auto 1fr auto; }
  .guide:nth-child(n) { margin-top: 0; }
  .field-row { grid-template-columns: 1fr; }
  .sec-head--row { grid-template-columns: 1fr; }
  .days { grid-template-columns: repeat(7, minmax(4.2rem, 1fr)); overflow-x: auto; padding-bottom: 10px; }
  .foot__in { grid-template-columns: 1fr 1fr; }
  .foot__mark { grid-column: 1 / -1; }
  .alerts { margin-inline: var(--gutter); }
  .sheet { min-width: 560px; font-size: .92rem; }
  .sheet th, .sheet td { padding: .7rem .7rem; }
  .sheet tbody th, .sheet thead td, .sheet tfoot td:first-child { position: sticky; left: 0; z-index: 1; background: var(--washi-hi); width: 7.5rem; box-shadow: 2px 0 0 rgba(23,26,34,.25); }
  .sheet__price b { font-size: 1.9rem; }
  .plans__fine::before { content: "Swipe the sheet sideways to compare all three plans. "; }
  .chart-wrap { padding: var(--s-4); }
}

@media (max-width: 560px) {
  .cartouche--sub { display: none; }
  .cartouche--title { padding: .65rem .38rem; }
  .cartouche__main { font-size: 1.05rem; }
  .seal--print { width: 2.4rem; height: 2.4rem; font-size: .85rem; }
  .chart-hint::after { content: " Swipe the chart sideways for the evening."; }
}

@media (max-width: 420px) {
  .top .btn--seal { padding-inline: .7rem; font-size: .9rem; }
  .seg--bill span, .ctl--skill .seg span { padding-inline: .7rem; font-size: .9rem; }
  .foot__in { grid-template-columns: 1fr; }
}
