/* Per view styles */

.icon {
  width: 2rem; height: 2rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- home: the night crossing ---------- */
.hero { height: 260vh; position: relative; background: var(--kapa); }
.hero__stage {
  --horizon: 58%;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); height: calc(100svh - var(--nav-h));
  min-height: 34rem; overflow: hidden; color: var(--kapa);
}
.hero__stage > * { position: absolute; }
.hero__sky { inset: 0 0 calc(100% - var(--horizon)) 0; }
.hero__sky--night { background: linear-gradient(#040A15 0%, #081528 45%, #10294A 82%, #214468 100%); }
.hero__sky--dawn { opacity: 0; background: linear-gradient(#2B5C7E 0%, #6FA3AE 38%, #E9C98A 76%, #F1B04C 100%); }
.hero__stars { left: 0; top: 0; width: 100%; }
.hero__compass { left: 0; top: 0; width: 100%; height: var(--horizon); stroke: var(--kapa); stroke-width: 1; fill: none; opacity: 0.07; }
.hero__sun {
  left: 50%; top: var(--horizon); width: min(30vw, 16rem); aspect-ratio: 1; margin: calc(min(30vw, 16rem) / -2);
  margin-top: calc(min(30vw, 16rem) / -2); border-radius: 50%; background: #FFF3D2;
  transform: translateY(60%);
}
.hero__water { inset: var(--horizon) 0 0 0; background: linear-gradient(#0E2748 0%, var(--kai-deep) 55%); border-top: 1px solid rgb(255 255 255 / 0.22); }
.hero__water > * { position: absolute; inset: 0; }
.hero__water-dawn { opacity: 0; background: linear-gradient(#E7B65C 0%, #3F8C99 22%, #175566 100%); }
.hero__water-stamp {
  background: var(--kapa); opacity: 0.05;
  -webkit-mask: var(--pat-chevron) repeat 0 0 / 36px; mask: var(--pat-chevron) repeat 0 0 / 36px;
}
.hero__waa-track { left: 0; right: 0; top: var(--horizon); height: 0; }
.hero__waa { width: clamp(5.5rem, 9vw, 9rem); color: #02060C; position: absolute; left: 0; bottom: -0.55rem; }
.hero__copy {
  left: 0; right: 0; top: var(--horizon); bottom: 0; z-index: 3;
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-4);
  padding-block: var(--s-4); --fg: var(--kapa); --bg: var(--kai-deep); --accent: var(--olena);
}
.hero__copy h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.2rem); max-width: 18ch; }
.hero__copy p { max-width: 56ch; color: #D5DBE2; }

.hero__names { inset: 0; z-index: 2; pointer-events: none; visibility: hidden; }
.hero--ready .hero__names { visibility: visible; }
.hero__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__lines polyline { fill: none; stroke: var(--olena); stroke-width: 1; opacity: 0.28; }
.hero__names ul { list-style: none; margin: 0; padding: 0; }
.hero__names li { position: absolute; transform: translate(-0.3em, -50%); white-space: nowrap; }
.hero__names a {
  pointer-events: auto; display: flex; align-items: center; gap: 0.45em;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(0.78rem, 0.6rem + 0.62vw, 1.2rem);
  color: var(--kapa); text-decoration: none; padding: 0.35em 0.2em;
}
.hero__names a::before {
  content: ""; width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--olena); flex: none;
  animation: twinkle 5s ease-in-out var(--tw, 0s) infinite;
}
.hero__names a:hover, .hero__names a:focus-visible { color: var(--olena); }
@keyframes twinkle { 50% { opacity: 0.35; } }
.hero__kapa { inset: 0; z-index: 4; background: var(--kapa); opacity: 0; pointer-events: none; }

/* still version: reduced motion, or the animation library did not load */
.hero--still { height: auto; }
.hero--still .hero__stage { position: relative; top: 0; }
.hero--still .hero__waa-track { transform: translateX(12%); }
.hero--still .hero__names a::before { animation: none; }

@media (max-width: 40rem) {
  .hero__stage { --horizon: 50%; }
  .hero__copy p { font-size: 1rem; line-height: 1.45; }
  .hero__copy .btn { padding: 0.7em 1em; }
}
@media (max-height: 40rem) and (min-width: 40rem) {
  .hero__copy p { display: none; }
}

/* what is a canoe plant */
.what { display: grid; gap: var(--s-7); }
.reasons { display: grid; gap: var(--s-5) var(--s-6); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.reasons li { border-top: 3px solid var(--kukui); padding-top: var(--s-4); }
.reasons .icon { width: 2.6rem; height: 2.6rem; color: var(--lau); margin-bottom: var(--s-3); }
.reasons h3 { font-size: var(--step-2); margin-bottom: var(--s-2); }
@media (min-width: 64rem) {
  .what { grid-template-columns: 5fr 6fr; align-items: start; }
  .reasons { grid-template-columns: 1fr 1fr; }
}

.progress-strip { padding-bottom: var(--s-7); display: grid; gap: var(--s-3); }
.progress-strip__bar { display: flex; gap: 3px; max-width: 40rem; }
.progress-strip__bar i { flex: 1; height: 0.9rem; border: var(--edge) solid var(--kukui); }
.progress-strip__bar i.is-met { background: var(--olena); }

/* plant of the day */
.featured { display: grid; }
.featured__photo, .featured__photo picture { display: block; height: 100%; }
.featured__photo img { width: 100%; height: 100%; min-height: 18rem; max-height: 80vh; object-fit: cover; }
.featured__text { padding: var(--s-7) var(--gutter); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--s-3); }
.featured__text h2 { font-size: var(--step-5); line-height: 0.95; }
.featured__common { font-size: var(--step-1); color: var(--muted); }
.featured__fact { font-size: var(--step-1); line-height: 1.4; max-width: 34ch; margin-block: var(--s-3) var(--s-4); }
@media (min-width: 60rem) { .featured { grid-template-columns: 55fr 45fr; } }

/* doorways */
.doorways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.doorway {
  display: flex; flex-direction: column; gap: var(--s-3); min-height: 20rem;
  padding: var(--s-7) var(--gutter); text-decoration: none; color: var(--fg);
}
.doorway h2 { font-size: var(--step-3); }
.doorway p { max-width: 32ch; color: var(--muted); flex: 1; }
.doorway__cta { font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 2px; color: var(--accent); }
.doorway:hover .doorway__cta { text-decoration-thickness: 4px; }
.doorway:focus-visible { outline-offset: -6px; }
@media (min-width: 84rem) { .doorways { grid-template-columns: repeat(4, 1fr); } }

/* ---------- the plants: explorer ---------- */
.explorer-controls { display: grid; gap: var(--s-4); padding-bottom: var(--s-5); }
.explorer-controls__row { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between; }
.explorer-controls__row .field[type="search"] { flex: 1 1 18rem; max-width: 34rem; }
.explorer-sort { display: flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
.explorer-count { font-weight: 600; }
.filters summary { cursor: pointer; font-weight: 600; padding: var(--s-2) 0; width: fit-content; }
.filters__body { display: grid; gap: var(--s-4); padding-top: var(--s-3); }
.chip-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.chip-group legend { padding: 0; margin-bottom: var(--s-2); color: var(--muted); font-size: var(--step--1); }
@media (min-width: 64rem) { .filters__body { grid-template-columns: auto auto auto; justify-content: start; gap: var(--s-6); } }

.plant-wall {
  display: grid; gap: 3px; padding: 3px 0 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}
.plant-wall__empty { padding-block: var(--s-7); font-size: var(--step-1); }
.tile {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--kukui-lift); color: var(--kapa-light); text-decoration: none;
}
.tile picture, .tile img { width: 100%; height: 100%; }
.tile img { object-fit: cover; transition: transform 0.5s ease; }
.tile__text {
  position: absolute; inset: auto 0 0 0; display: grid; gap: 0.1rem;
  padding: 5rem var(--s-4) var(--s-4);
  background: linear-gradient(transparent, rgb(12 9 5 / 0.82) 55%);
}
.tile__name { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); line-height: 1; }
.tile__common { color: #E4DAC4; }
.tile__status { justify-self: start; background: var(--olena); color: var(--kukui); font-size: var(--step--1); font-weight: 600; padding: 0.1em 0.5em; margin-bottom: 0.35rem; }
.tile__hook { color: var(--olena); font-weight: 600; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.25s ease, opacity 0.25s ease; }
.tile:hover .tile__hook, .tile:focus-visible .tile__hook { max-height: 4em; opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile:focus-visible { outline-offset: -5px; }
.tile__met { position: absolute; top: var(--s-3); right: var(--s-3); background: rgb(12 9 5 / 0.7); border: 1px solid var(--olena); color: var(--olena); font-size: var(--step--1); padding: 0.05em 0.5em; }
@media (hover: none) { .tile__hook { max-height: 4em; opacity: 1; } }

/* ---------- plant page: the field guide ---------- */
.plant-hero__photo img { width: 100%; height: clamp(18rem, 72vh, 52rem); object-fit: cover; }
.plant-hero__label {
  position: relative; background: var(--kapa); width: fit-content; max-width: 100%;
  margin-top: clamp(-7rem, -9vw, -3rem); margin-left: calc(var(--gutter) * -1);
  padding: var(--s-5) var(--s-6) 0 var(--gutter);
}
.plant-hero__label--bare { margin-top: 0; padding-top: var(--s-7); }
.plant-name { font-size: var(--step-name); line-height: 0.92; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.plant-say { margin-top: var(--s-4); font-size: var(--step-1); display: flex; flex-wrap: wrap; gap: 0.2em 0.6em; align-items: baseline; }
.plant-say__guide { color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0.3em 0; color: var(--link); text-decoration: underline; text-underline-offset: 0.18em; font-size: var(--step-0); }
.say-popover {
  background: var(--kapa-light); color: var(--kukui); border: var(--edge) solid var(--kukui);
  padding: var(--s-5); width: min(30rem, 100% - 2rem);
}
.say-popover::backdrop { background: rgb(7 20 36 / 0.6); }
.say-popover h2 { font-size: var(--step-2); }
.say-popover > * + * { margin-top: var(--s-3); }

.plant-id { padding-top: var(--s-6); display: grid; gap: var(--s-5); }
.plant-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-4) var(--s-6); border-top: 3px solid var(--kukui); padding-top: var(--s-4); }
.plant-names dt, .grow dt { font-size: var(--step--1); color: var(--muted); }
.plant-names dd { font-size: var(--step-1); line-height: 1.3; }
.plant-why h2 { margin-bottom: var(--s-4); }
.plant-why .lede { max-width: 52ch; }

.uses { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-top: var(--s-6); }
.uses > li { border-top: var(--edge) solid var(--rule); padding-top: var(--s-4); }
.uses .icon { width: 2.8rem; height: 2.8rem; color: var(--accent); }
.uses h3 { font-size: var(--step-2); margin-block: var(--s-2) var(--s-3); }
.uses ul { padding-left: 1.1em; margin: 0; }
.uses ul li + li { margin-top: var(--s-2); }

.facts { list-style: none; margin: var(--s-6) 0 0; padding: 0; counter-reset: fact; display: grid; gap: var(--s-6) var(--s-7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.facts li { counter-increment: fact; display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; border-top: 3px solid var(--kukui); padding-top: var(--s-3); }
.facts li::before { content: counter(fact); font-family: var(--font-display); font-weight: 800; font-size: var(--step-5); line-height: 0.8; min-width: 0.6em; }
.facts p { font-size: var(--step-1); line-height: 1.4; max-width: 36ch; }

.plant-moolelo__label { color: var(--muted); margin-bottom: var(--s-3); }
.plant-moolelo h2 { margin-bottom: var(--s-5); }
.plant-moolelo .prose p { font-size: var(--step-1); line-height: 1.55; }
.plant-moolelo__kinolau { margin-top: var(--s-5); border-left: 6px solid var(--lau); padding-left: var(--s-4); }

.plant-now { display: grid; gap: var(--s-7); }
.plant-now h2 { margin-bottom: var(--s-4); }
@media (min-width: 60rem) { .plant-now { grid-template-columns: 1fr 1fr; } }
.grow > div { display: grid; grid-template-columns: 6rem 1fr; gap: var(--s-3); padding-block: var(--s-3); border-top: var(--edge) solid var(--rule); }
.grow > div:last-child { border-bottom: var(--edge) solid var(--rule); }
.grow dt { padding-top: 0.2em; }

.plant-gallery h2, .plant-sources h2 { font-size: var(--step-2); margin-bottom: var(--s-4); }
.source-list { padding-left: 1.1em; margin: 0; font-size: var(--step--1); }
.source-list li + li { margin-top: var(--s-2); }
.source-list li { max-width: 80ch; }

.plant-related h2 { margin-bottom: var(--s-5); }
.related { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5) var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.related a { display: grid; gap: var(--s-2); text-decoration: none; color: var(--fg); }
.related img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--kukui-lift); }
.related__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.05; margin-top: var(--s-1); }
.related a:hover .related__name { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
.related__why { color: var(--muted); max-width: 32ch; }
.related a:focus-visible { outline-offset: 4px; }

.plant-foot { padding-block: var(--s-6) var(--s-8); display: grid; gap: var(--s-6); }
.plant-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s-4); border-top: 3px solid var(--kukui); padding-top: var(--s-4); }
.plant-pager a { display: grid; text-decoration: none; color: inherit; }
.plant-pager a:last-child { text-align: right; }
.plant-pager a:nth-child(2) { text-align: center; }
.plant-pager__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; }
.plant-pager a:hover .plant-pager__name { text-decoration: underline; text-decoration-thickness: 3px; }
@media (max-width: 36rem) { .plant-pager a:nth-child(2) { display: none; } .plant-pager { grid-template-columns: 1fr 1fr; } }

/* ---------- the voyage ---------- */
.map-scroll { overflow-x: auto; background: var(--kai-deep); border-block: var(--edge) solid var(--kai-lift); }
.pacific { width: 100%; min-width: 50rem; height: auto; max-height: 82vh; margin-inline: auto; }
.pacific__land { fill: #1D3A5C; stroke: #2B4F78; stroke-width: 0.6; }
.route { fill: none; stroke: var(--olena); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s ease-in-out, opacity 0.3s; }
.route.is-drawn { stroke-dashoffset: 0; }
.route--alt { stroke: var(--wai-pale); }
.route--faint { stroke-width: 1.5; opacity: 0.7; }
.route--pause { stroke-width: 6; opacity: 0.45; }
.place-dot { fill: var(--kapa); }
.place-star { fill: var(--olena); }
.place-label { fill: var(--kapa); font-size: 12px; font-family: var(--font-text); paint-order: stroke; stroke: var(--kai-deep); stroke-width: 3px; }
.place-label--star { font-family: var(--font-display); font-weight: 800; font-size: 17px; fill: var(--olena); }
.origin { cursor: pointer; }
.origin circle { fill: var(--kai-deep); stroke: var(--olena); stroke-width: 2; transition: fill 0.2s; }
.origin text { fill: var(--olena); font-size: 13px; font-weight: 600; transition: fill 0.2s; }
.origin:hover circle, .origin.is-on circle { fill: var(--olena); }
.origin:hover text, .origin.is-on text { fill: var(--kukui); }
.map-key { padding-top: var(--s-3); display: flex; gap: var(--s-2); align-items: center; }
.map-key__dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 2px solid var(--olena); flex: none; }

.voyage-controls { display: grid; gap: var(--s-6); padding-block: var(--s-6) var(--s-8); }
.voyage-controls h2 { font-size: var(--step-2); margin-bottom: var(--s-4); }
.voyage-list { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.voyage-list button {
  width: 100%; display: flex; gap: var(--s-3); align-items: center; text-align: left;
  background: none; border: 0; border-top: var(--edge) solid var(--rule); padding: var(--s-3) var(--s-2); line-height: 1.3;
}
.voyage-list button:hover { background: var(--panel); }
.voyage-list button[aria-pressed="true"] { background: var(--panel); border-left: 5px solid var(--olena); }
.voyage-list__n { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); width: 1.6em; text-align: center; flex: none; }
.voyage-list__n--gold { color: var(--olena); }
.voyage-detail { align-self: start; position: sticky; top: calc(var(--nav-h) + 1rem); }
.voyage-detail > * + * { margin-top: var(--s-3); }
.voyage-detail h2 { font-size: var(--step-3); margin-bottom: 0; }
.origin-plants { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.origin-plants a { display: block; border: var(--edge) solid var(--rule); padding: 0.3em 0.7em; text-decoration: none; color: var(--fg); }
.origin-plants a:hover { border-color: var(--olena); }
.origin-plants [lang="haw"] { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
@media (min-width: 64rem) { .voyage-controls { grid-template-columns: 1fr 1fr 1.3fr; } }

.timeline { list-style: none; margin: var(--s-6) 0 0; padding: 0; }
.timeline li { display: grid; gap: var(--s-2) var(--s-6); padding-block: var(--s-5); border-top: 3px solid var(--kukui); }
.timeline__when { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 1.05; color: var(--olena-deep); }
.timeline h3 { font-size: var(--step-2); margin-bottom: var(--s-2); }
.timeline p, .how-know p { max-width: var(--measure); }
.cite { margin-top: var(--s-2); }
@media (min-width: 52rem) { .timeline li { grid-template-columns: 17rem 1fr; } }
.how-know { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.how-know li { border-top: 3px solid var(--kukui); padding-top: var(--s-4); }
.how-know h3 { font-size: var(--step-2); margin-bottom: var(--s-2); }

/* ---------- glossary ---------- */
.glossary-search { display: grid; gap: var(--s-2); padding-bottom: var(--s-6); max-width: 40rem; margin-left: max(var(--gutter), (100% - var(--wrap)) / 2); }
.glossary-search label { font-weight: 600; }
.glossary { margin-block: 0; padding-bottom: var(--s-8); columns: 24rem 2; column-gap: var(--s-7); }
.glossary__item { break-inside: avoid; border-top: var(--edge) solid var(--rule); padding-block: var(--s-4); }
.glossary__term { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.1; }
.glossary__say { color: var(--muted); margin-left: 0.4em; }
.glossary dd { margin-top: var(--s-1); max-width: 56ch; }

/* ---------- companions ---------- */
.companion__inner { display: grid; gap: var(--s-6); padding-block: var(--s-7); align-items: center; }
.companion__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.companion__text > * + * { margin-top: var(--s-3); }
.companion__text h2 { font-size: var(--step-5); line-height: 0.95; }
.companion__names { font-size: var(--step-1); }
.companion__hook { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); line-height: 1.15; color: var(--lau); }
.companion__text ul { padding-left: 1.1em; max-width: var(--measure); }
.companion__text li + li { margin-top: var(--s-2); }
.companion summary { cursor: pointer; width: fit-content; }
@media (min-width: 60rem) {
  .companion__inner { grid-template-columns: 1fr 1fr; gap: var(--s-7); }
  .companion:nth-of-type(even) .companion__photo { order: 2; }
}

/* ---------- myth busters ---------- */
.myth-game { --panel: var(--lau-deep); padding: var(--s-6); max-width: 44rem; margin-left: max(var(--gutter), (100% - var(--wrap)) / 2); }
.myth-game h2 { font-size: var(--step-2); margin-bottom: var(--s-4); }
.myth-game > div > * + * { margin-top: var(--s-3); }
.myth-game__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-5); line-height: 1; }
.myth-game__btns { margin-top: var(--s-5) !important; }
.verdict { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); }
.verdict--right { color: #F0C95A; }
.verdict--wrong { color: #FFB4A3; }
.myths { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.myths li { border-top: 3px solid var(--fg); padding-top: var(--s-3); }
.myths h3 { font-size: var(--step-3); line-height: 1; }
.myth__sub { color: var(--muted); margin-top: var(--s-1); }
.myth__tag { display: inline-block; background: var(--panel); padding: 0.1em 0.6em; font-size: var(--step--1); margin-block: var(--s-2); }

/* ---------- teachers ---------- */
.lessons { list-style: none; padding: 0; margin: var(--s-6) 0 var(--s-8); counter-reset: lesson; display: grid; gap: var(--s-6); }
.lessons > li { counter-increment: lesson; display: grid; gap: var(--s-2); border-top: 3px solid var(--kukui); padding-top: var(--s-4); max-width: 60rem; }
.lessons > li > * { max-width: var(--measure); }
.lessons h3 { font-size: var(--step-2); }
.lessons h3::before { content: counter(lesson) ". "; color: var(--olena-deep); }
.lessons h4 { margin: var(--s-3) 0 0; font-size: var(--step-0); }
.lessons ul { margin: 0; padding-left: 1.1em; }
.sheet-links { list-style: none; padding: 0 0 var(--s-8); margin-top: calc(var(--s-7) * -1); display: grid; gap: 0 var(--s-5); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.sheet-links a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-3) 0; border-top: var(--edge) solid var(--rule); text-decoration: none; color: var(--fg); }
.sheet-links [lang="haw"] { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
.sheet-links a:hover [lang="haw"] { text-decoration: underline; text-decoration-thickness: 3px; }

/* ---------- credits ---------- */
.credit-groups { columns: 26rem 2; column-gap: var(--s-7); padding-top: var(--s-5); font-size: var(--step--1); }
.credit-groups section { break-inside: avoid; padding-block: var(--s-3); border-top: var(--edge) solid var(--rule); }
.credit-groups h3 { font-size: var(--step-1); }
.credit-groups ul { margin: var(--s-2) 0 0; padding-left: 1.1em; }

/* ---------- pack the canoe ---------- */
.pack { padding-bottom: var(--s-8); }
.pack__board { display: grid; gap: var(--s-6); }
.pack__canoe { position: sticky; top: var(--nav-h); z-index: 5; background: var(--bg); padding-block: var(--s-3); display: grid; gap: var(--s-3); border-bottom: var(--edge) solid var(--rule); }
/* the waʻa, seen from above. A single hull with room for eight bundles. */
.canoe { max-width: 60rem; background: var(--kukui); padding: 0.55rem 7%; clip-path: polygon(0 50%, 7% 0, 93% 0, 100% 50%, 93% 100%, 7% 100%); }
.canoe__deck { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.canoe__deck li {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border: var(--edge) dashed rgb(239 228 204 / 0.45); background: rgb(239 228 204 / 0.07);
  display: grid; align-items: end;
}
.canoe__deck li.is-full { border: 2px solid var(--olena); background: var(--kukui-lift); }
.canoe__deck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.canoe__deck li span {
  position: relative; padding: 0.15rem 0.25rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(0.62rem, 0.4rem + 0.8vw, 0.9rem); line-height: 1;
  color: var(--kapa-light); background: rgb(12 9 5 / 0.72); overflow-wrap: anywhere;
}
.pack__count { font-weight: 600; }
@media (max-width: 40rem) { .canoe { padding-inline: 9%; clip-path: polygon(0 50%, 10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%); } .canoe__deck { grid-template-columns: repeat(4, 1fr); } }
.pack__plants { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
.pack-tile { width: 100%; height: 100%; display: grid; grid-template-rows: auto auto 1fr; text-align: left; padding: 0 0 var(--s-2); background: var(--panel); border: 3px solid transparent; color: var(--fg); }
.pack-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pack-tile__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); line-height: 1.1; padding: var(--s-2) var(--s-2) 0; }
.pack-tile__sub { font-size: var(--step--1); color: var(--muted); padding-inline: var(--s-2); }
.pack-tile:hover:not(:disabled) { border-color: var(--rule); }
.pack-tile[aria-pressed="true"] { border-color: var(--olena); background: var(--olena); color: var(--kukui); }
.pack-tile[aria-pressed="true"] .pack-tile__sub { color: var(--kukui); }
.pack-tile:disabled { opacity: 0.4; cursor: not-allowed; }
.pack__sea { height: 14rem; position: relative; overflow: hidden; border-bottom: 3px solid var(--kapa); background: linear-gradient(transparent 60%, rgb(7 20 36 / 0.35) 60%); }
.pack__boat {
  position: absolute; bottom: 38%; left: 0; width: 8rem; height: 5.5rem; background: var(--kukui);
  -webkit-mask: url("../assets/svg/waa.svg") center / contain no-repeat; mask: url("../assets/svg/waa.svg") center / contain no-repeat;
  animation: crossing 3.6s ease-in-out forwards;
}
@keyframes crossing { from { transform: translateX(-9rem) rotate(-1deg); } 50% { transform: translateX(45vw) rotate(1.5deg); } to { transform: translateX(100vw) rotate(-1deg); } }
.pack__report:focus { outline: none; }
.pack__report > * + * { margin-top: var(--s-4); }
.pack__verdict { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 1.1; color: var(--accent); max-width: 24ch; }
.needs { list-style: none; padding: 0; margin-block: var(--s-6) !important; display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.need { border-top: 3px solid var(--fg); padding-top: var(--s-3); display: grid; gap: var(--s-2); align-content: start; }
.need h3 { font-size: var(--step-1); }
.need__bar { display: flex; gap: 3px; }
.need__bar i { height: 0.8rem; flex: 1; border: var(--edge) solid var(--fg); }
.need__bar i.on { background: var(--olena); border-color: var(--olena); }
.need--miss { border-top-color: #FFB4A3; }
.need--miss h3 { color: #FFB4A3; }
.pack__reveal { background: var(--panel); border-left: 6px solid var(--olena); padding: var(--s-6); margin-block: var(--s-6) !important; }
.pack__reveal > * + * { margin-top: var(--s-3); }
.pack__reveal p { max-width: var(--measure); }

/* ---------- quiz ---------- */
.quiz { min-height: 70vh; padding-bottom: var(--s-8); --verdict-right: var(--lau); --verdict-wrong: var(--alaea); }
.quiz .verdict--right { color: var(--lau); }
.quiz .verdict--wrong { color: var(--alaea); }
.quiz__meta { display: flex; justify-content: space-between; font-weight: 600; }
.quiz__bar { display: flex; gap: 3px; margin-block: var(--s-2) var(--s-5); }
.quiz__bar i { flex: 1; height: 0.5rem; border: var(--edge) solid var(--kukui); }
.quiz__bar i.done { background: var(--kukui); }
.quiz__bar i.now { background: var(--olena); }
.quiz__photo img { width: 100%; height: clamp(11rem, 38vh, 20rem); object-fit: cover; margin-bottom: var(--s-5); }
.quiz__q { font-size: var(--step-3); }
.quiz__q:focus, .quiz__final:focus { outline: none; }
.quiz__choices { list-style: none; padding: 0; margin: var(--s-5) 0; display: grid; gap: var(--s-2); }
@media (min-width: 40rem) { .quiz__choices { grid-template-columns: 1fr 1fr; } }
.choice { width: 100%; height: 100%; text-align: left; padding: 0.9em 1.1em; background: var(--kapa-light); border: var(--edge) solid var(--kukui); border-radius: 2px; font-size: var(--step-1); line-height: 1.25; }
.choice:hover:not(:disabled) { background: var(--olena); }
.choice:disabled { cursor: default; color: var(--muted); }
.choice.is-right { background: var(--lau); border-color: var(--lau); color: var(--kapa-light); font-weight: 600; }
.choice.is-wrong { background: var(--alaea); border-color: var(--alaea); color: var(--kapa-light); }
.quiz__after > * + * { margin-top: var(--s-3); }
.quiz__after p { max-width: var(--measure); }
.quiz__final { font-size: var(--step-5); margin-bottom: var(--s-4); }

.photo-note { padding-block: var(--s-5); }
.pack + .photo-note, .quiz + .photo-note { padding-top: 0; }
