/* Hawaiianly — direction C: big type + topic filter, refined.
   Display: Bagel Fat One · UI: Fredoka · Reading: Newsreader
   Type roles (Learn UI responsive guidelines): display hero (deliberate exception), title 32→48,
   subhead 24→28, default UI 17 / reading 18→20, secondary −2px, label 13. */

:root {
  --ink: #1d1d1f;
  --ink-2: #55555b;          /* ≈70% strength secondary, 7.3:1 on white */
  --line: rgba(29, 29, 31, .12);
  --line-strong: rgba(29, 29, 31, .26);
  --white: #ffffff;
  --mist: #f6f7f9;
  --sky: #4ec4c9;
  --sky-soft: #e4f6f7;
  --sun: #f2c230;
  --orange: #ec5a24;
  --orange-deep: #c7431a;    /* white text on it: 4.95:1 */
  --sea: #2b6f9e;

  --f-display: "Bagel Fat One", "Arial Rounded MT Bold", "Arial Black", sans-serif;
  --f-ui: "Fredoka", "Avenir Next", system-ui, sans-serif;
  --f-read: "Newsreader", "Iowan Old Style", Georgia, serif;

  --fs-display: clamp(2.75rem, 1.55rem + 5vw, 5.75rem);
  --fs-title: clamp(2rem, 1.55rem + 1.9vw, 3rem);
  --fs-sub: clamp(1.5rem, 1.35rem + .6vw, 1.75rem);
  --fs-read: 1.125rem;
  --fs-read-2: 1rem;
  --fs-ui: 1.0625rem;
  --fs-small: .9375rem;
  --fs-label: .8125rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r-card: 22px; --pad-card: 8px; --r-media: 14px;   /* concentric: 14 + 8 = 22 */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header: 64px;

  --ease-out: cubic-bezier(.2, 0, 0, 1);
  --pop: 5px 5px 0 var(--ink);
  --soft: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px -18px rgba(16, 24, 40, .28);
}
@media (min-width: 768px) { :root { --fs-read: 1.25rem; --fs-read-2: 1.125rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 72px); }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font: 400 var(--fs-ui)/1.55 var(--f-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--sky); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }
.label { font: 500 var(--fs-label)/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 var(--s3); }
.ic { flex: none; display: block; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tdot, var(--ink)); flex: none; box-shadow: 0 0 0 2px var(--tbg, transparent); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); transition: border-color .2s var(--ease-out); }
.is-scrolled .site-header { border-bottom-color: var(--line-strong); }
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header); gap: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-left: -4px; }
.brand svg { width: 38px; height: 38px; transition: transform .5s var(--ease-out); }
.brand:hover svg { transform: rotate(30deg); }
.brand span { font: 400 1.5rem/1 var(--f-display); letter-spacing: .005em; padding-top: 2px; }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; font: 500 var(--fs-ui)/1 var(--f-ui); text-decoration: none; padding: 12px 14px; border-radius: 12px; color: var(--ink-2); transition: color .15s var(--ease-out), background-color .15s var(--ease-out); }
.nav a:hover { color: var(--ink); background: var(--mist); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--ink); }
.menu { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .menu { display: block; }
  .menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line-strong); transition: background-color .15s var(--ease-out), scale .1s var(--ease-out); }
  .menu summary:active { scale: .96; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform .25s var(--ease-out), background-color .25s var(--ease-out), top .25s var(--ease-out); }
  .menu summary span::before, .menu summary span::after { content: ""; position: absolute; left: 0; }
  .menu summary span::before { top: -6px; } .menu summary span::after { top: 6px; }
  .menu[open] summary span { background: transparent; }
  .menu[open] summary span::before { top: 0; transform: rotate(45deg); }
  .menu[open] summary span::after { top: 0; transform: rotate(-45deg); }
  .menu-panel { position: fixed; inset: var(--header) 0 auto 0; background: var(--white); border-bottom: 1px solid var(--line-strong); box-shadow: var(--soft); padding: var(--s2) var(--gutter) var(--s5); display: grid; animation: drop .22s var(--ease-out); }
  .menu-panel a { font: 400 var(--fs-sub)/1.2 var(--f-display); text-decoration: none; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .menu-panel a:last-child { border-bottom: 0; }
  .menu-panel a[aria-current="page"] { color: var(--orange-deep); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px 1px; border-radius: 999px;
  font: 600 var(--fs-ui)/1 var(--f-ui); text-decoration: none; cursor: pointer;
  background: var(--sun); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), scale .1s var(--ease-out);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { scale: .96; }
.btn .ic { transition: transform .2s var(--ease-out); margin-right: -2px; }
.btn:hover .ic { transform: translateX(3px); }
.btn--ghost { background: var(--white); }
.btn--light { background: var(--white); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font: 600 var(--fs-ui)/1 var(--f-ui); text-decoration: none; padding: 12px 0; }
.text-link span, .text-link { background-image: linear-gradient(var(--ink), var(--ink)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s var(--ease-out); }
.text-link:hover { background-size: calc(100% - 22px) 2px; }
.text-link .ic { transition: transform .2s var(--ease-out); }
.text-link:hover .ic { transform: translateX(3px); }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; cursor: pointer; font-weight: 600; }

/* ---------- hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s6); padding-block: clamp(28px, 5vw, 56px) clamp(20px, 3vw, 32px); }
.masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 var(--s5); font: 500 var(--fs-label)/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.masthead > span + span::before { content: "✦"; color: var(--orange); margin-right: 14px; font-size: .9em; }
.hero-title { font: 400 var(--fs-display)/1 var(--f-display); letter-spacing: -.012em; margin: 0; text-wrap: balance; max-width: 13ch; }
.hero-title mark { color: inherit; background: var(--mark) no-repeat 0 92% / 100% .42em; padding: 0 .04em; }
.hero-lede { font: 400 var(--fs-read)/1.5 var(--f-read); color: var(--ink-2); margin: var(--s4) 0 0; max-width: 44ch; text-wrap: pretty; }
.hero-stats { list-style: none; display: flex; gap: var(--s6); margin: var(--s5) 0 0; padding: var(--s4) 0 0; border-top: 1px solid var(--line); }
.hero-stats li { display: grid; gap: 2px; }
.hero-stats b { font: 400 var(--fs-sub)/1 var(--f-display); }
.hero-stats span { font-size: var(--fs-small); color: var(--ink-2); }
.hero-art { position: relative; margin: 0; width: clamp(220px, 26vw, 340px); }
.hero-art .sticker { width: 100%; height: auto; transform: rotate(3deg); filter: drop-shadow(5px 5px 0 var(--ink)); transition: transform .5s var(--ease-out); }
.hero-art:hover .sticker { transform: rotate(0deg) scale(1.02); }
.hand-note { position: absolute; left: -104px; bottom: 2px; display: flex; align-items: flex-end; gap: 2px; color: var(--orange-deep); font: 500 var(--fs-small)/1 var(--f-ui); transform: rotate(-4deg); pointer-events: none; }
.hand-note svg { width: 64px; height: 38px; transform: scaleX(-1) rotate(-10deg); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-stats { gap: var(--s5); }
}
/* staged entrance, once, ~100ms apart */
.hero-copy > *, .hero-art { animation: enter .6s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; } .hero-art { animation-delay: .2s; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- filter bar ---------- */
.filterbar { position: sticky; top: var(--header); z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); transition: box-shadow .2s var(--ease-out); }
.filterbar.is-stuck { box-shadow: 0 10px 24px -18px rgba(16, 24, 40, .35); }
.filter-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-block: var(--s3); }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 14px; border-radius: 999px; cursor: pointer;
  background: var(--white); border: 1.5px solid var(--line-strong); font: 500 var(--fs-small)/1 var(--f-ui);
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), color .15s var(--ease-out), scale .1s var(--ease-out);
}
.chip[data-topic="all"] { padding-left: 16px; }
.chip:hover { border-color: var(--ink); background: var(--tbg, var(--mist)); }
.chip:active { scale: .96; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px var(--tdot); }
.chip .count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: var(--fs-label); background: rgba(29, 29, 31, .07); }
.chip[aria-pressed="true"] .count { background: rgba(255, 255, 255, .18); }
.search { position: relative; display: flex; align-items: center; flex: 0 1 280px; height: 44px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--white); transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out); }
.search:hover { border-color: var(--ink-2); }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px var(--sky-soft); }
.search > .ic { position: absolute; left: 14px; color: var(--ink-2); pointer-events: none; }
.search input { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 40px 0 42px; font-size: 1rem; outline: none; border-radius: inherit; }
.search input::placeholder { color: var(--ink-2); opacity: .85; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); opacity: 0; scale: .25; filter: blur(4px); pointer-events: none; transition: opacity .2s var(--ease-out), scale .2s var(--ease-out), filter .2s var(--ease-out), background-color .15s; }
.search.has-value .clear { opacity: 1; scale: 1; filter: blur(0); pointer-events: auto; }
.search .clear:hover { background: var(--mist); color: var(--ink); }
.search .clear:active { scale: .96; }
.search .clear::after { content: ""; position: absolute; inset: -4px; }
@media (max-width: 760px) {
  .filter-inner { flex-direction: column-reverse; align-items: stretch; gap: var(--s3); }
  .search { flex: none; width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { height: 44px; flex: none; }
}

/* ---------- grid & cards ---------- */
.browse { padding-bottom: var(--s9); }
.browse .grid { margin-top: var(--s6); }
.result-count { margin: var(--s5) 0 var(--s4); font-size: var(--fs-small); color: var(--ink-2); }
.result-count b { color: var(--ink); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }
.card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; padding: var(--pad-card);
  background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-card);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.card:focus-visible { outline-offset: 4px; border-radius: var(--r-card); }
.card[hidden] { display: none; }
.card-media { position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-media); overflow: hidden; background: var(--tbg, var(--mist)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; outline: 1px solid oklch(0 0 0 / .1); outline-offset: -1px; pointer-events: none; }
.card:hover .card-media img { transform: scale(1.04); }
.card-time { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); font: 500 var(--fs-label)/1 var(--f-ui); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.badge { position: absolute; right: 10px; top: 10px; height: 28px; padding: 0 12px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--sun); border: 1.5px solid var(--ink); font: 600 var(--fs-label)/1 var(--f-ui); transform: rotate(3deg); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 10px 8px; }
.card-kicker { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 500 var(--fs-label)/1 var(--f-ui); color: var(--ink-2); }
.card-kicker .dot { margin-right: 2px; }
.card-kicker .sep { opacity: .5; }
.card-title { font: 400 1.25rem/1.15 var(--f-display); margin: 0 0 8px; text-wrap: balance; }
.card-excerpt { margin: 0 0 14px; font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 var(--fs-small)/1 var(--f-ui); }
.card-cta .ic { transition: transform .2s var(--ease-out); }
.card:hover .card-cta .ic { transform: translateX(3px); }
@media (min-width: 1001px) {
  .card--wide { grid-column: span 2; flex-direction: row; gap: var(--s2); }
  .card--wide .card-media { flex: 0 0 58%; aspect-ratio: auto; min-height: 300px; }
  .card--wide .card-body { padding: 18px 18px 14px 20px; justify-content: center; }
  .card--wide .card-title { font-size: var(--fs-sub); }
  .card--wide .card-excerpt { -webkit-line-clamp: 4; font-size: var(--fs-ui); }
}
.grid.is-filtered .card--wide { grid-column: auto; flex-direction: column; }
.grid.is-filtered .card--wide .card-media { flex: none; aspect-ratio: 3 / 2; min-height: 0; }
.grid.is-filtered .card--wide .card-body { padding: 14px 10px 8px; }
.grid.is-filtered .card--wide .card-title { font-size: 1.25rem; }
.grid.is-filtered .card--wide .badge { display: none; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid--3 { grid-template-columns: 1fr; } }
.card.is-in { animation: fade .15s var(--ease-out) both; }
@keyframes fade { from { opacity: 0; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: var(--s8) var(--s4); border: 1.5px dashed var(--line-strong); border-radius: var(--r-card); }
.empty .doodle { margin-bottom: var(--s3); }
.empty p { margin: 0; color: var(--ink-2); }
.empty .empty-title { font: 400 var(--fs-sub)/1.1 var(--f-display); color: var(--ink); }

/* ---------- about ---------- */
.about { background: var(--mist); border-top: 1px solid var(--line); padding-block: var(--s8); }
.about-grid { display: grid; grid-template-columns: 200px minmax(0, 560px); gap: var(--s6); align-items: center; }
.about-photo { width: 200px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1.5px solid var(--ink); box-shadow: var(--pop); }
.about h2 { font: 400 var(--fs-sub)/1.1 var(--f-display); margin: 0 0 var(--s3); }
.about p:not(.label) { margin: 0 0 var(--s2); color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 620px) { .about-grid { grid-template-columns: 1fr; } .about-photo { width: 120px; } }

/* ---------- article ---------- */
.article { padding-block: var(--s6) var(--s8); }
.article-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: var(--s7); align-items: center; margin-bottom: var(--s7); padding-bottom: var(--s7); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; font: 500 var(--fs-small)/1 var(--f-ui); color: var(--ink-2); margin-bottom: var(--s4); }
.crumbs a { text-decoration: none; padding: 12px 0; margin-block: -4px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span { opacity: .5; }
.topic-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--tbg); font: 500 var(--fs-label)/1 var(--f-ui); margin: 0 0 var(--s4); }
.article-title { font: 400 var(--fs-title)/1.05 var(--f-display); letter-spacing: -.008em; margin: 0; text-wrap: balance; }
.dek { font: 400 var(--fs-read)/1.5 var(--f-read); color: var(--ink-2); margin: var(--s4) 0 0; max-width: 40em; text-wrap: pretty; }
.facts { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); margin: var(--s5) 0 0; padding: 0; font-size: var(--fs-read-2); color: var(--ink-2); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; outline: 1px solid oklch(0 0 0 / .1); outline-offset: -1px; }
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.rail { position: sticky; top: calc(var(--header) + var(--s5)); display: grid; gap: var(--s5); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); counter-reset: t; }
.toc a { position: relative; display: block; padding: 10px 0 10px 14px; margin-left: -1.5px; text-decoration: none; font-size: var(--fs-small); line-height: 1.35; color: var(--ink-2); border-left: 1.5px solid transparent; transition: color .15s var(--ease-out), border-color .15s var(--ease-out); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--orange); font-weight: 500; }
.toc-mobile { display: none; }
.copy-link { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--white); cursor: pointer; font-size: var(--fs-small); transition: border-color .15s var(--ease-out), scale .1s var(--ease-out); }
.copy-link:hover { border-color: var(--ink); }
.copy-link:active { scale: .96; }
.copy-link .swap { position: relative; width: 16px; height: 16px; }
.copy-link .swap .ic { position: absolute; inset: 0; transition: opacity .2s cubic-bezier(.2, 0, 0, 1), scale .2s cubic-bezier(.2, 0, 0, 1), filter .2s cubic-bezier(.2, 0, 0, 1); }
.copy-link .swap .ic + .ic { opacity: 0; scale: .25; filter: blur(4px); color: #2f7d32; }
.copy-link.is-copied .swap .ic:first-child { opacity: 0; scale: .25; filter: blur(4px); }
.copy-link.is-copied .swap .ic + .ic { opacity: 1; scale: 1; filter: blur(0); }
.cover { margin: 0; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 3; background: var(--tbg); position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; outline: 1px solid oklch(0 0 0 / .1); outline-offset: -1px; }
.progress { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--orange); }
@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; gap: 0; }
  .rail { position: static; order: 2; margin: var(--s6) 0 0; }
  .article-main { order: 1; }
  .toc { display: none; }
  .toc-mobile { display: block; border: 1.5px solid var(--line-strong); border-radius: 16px; margin-bottom: var(--s5); }
  .toc-mobile summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-weight: 500; font-size: var(--fs-read-2); }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary .num { font-size: var(--fs-label); min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--mist); }
  .toc-mobile ol { margin: 0; padding: 0 16px 12px 36px; }
  .toc-mobile li { font-size: var(--fs-read-2); }
  .toc-mobile a { display: block; padding: 10px 0; }
  .toc-mobile a { color: var(--ink-2); }
  .article-head { grid-template-columns: 1fr; gap: var(--s5); margin-bottom: var(--s5); padding-bottom: 0; border-bottom: 0; }
  .cover { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; aspect-ratio: 16 / 10; }
  .cover::after { display: none; }
}
@media (max-width: 900px) { .article-main > .cover + .prose { margin-top: 0; } }

/* ---------- prose (text-heavy: 18 → 20px, ~66 chars) ---------- */
.prose { font: 400 var(--fs-read)/1.7 var(--f-read); max-width: 28em; text-wrap: pretty; }
.prose > * { margin-block: 0 1.15em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 1.5px; text-underline-offset: .18em; transition: text-decoration-thickness .15s var(--ease-out), background-color .15s var(--ease-out); }
.prose a:hover { text-decoration-thickness: 2.5px; background: var(--sky-soft); border-radius: 3px; }
.prose strong { font-weight: 600; }
.prose h2 { font: 400 var(--fs-sub)/1.15 var(--f-display); margin: 2em 0 .6em; text-wrap: balance; display: flex; gap: 10px; align-items: flex-start; }
.prose h2::before { content: ""; flex: none; width: .95em; height: .95em; margin-top: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-60 -60 120 120'%3E%3Cpolygon points='0,-52 10,-40 26,-45 28,-29 44,-26 39,-10 52,0 39,10 44,26 28,29 26,45 10,40 0,52 -10,40 -26,45 -28,29 -44,26 -39,10 -52,0 -39,-10 -44,-26 -28,-29 -26,-45 -10,-40' fill='%23f2c230' stroke='%231d1d1f' stroke-width='7' stroke-linejoin='round'/%3E%3Ccircle cx='-12' cy='0' r='5' fill='%231d1d1f'/%3E%3Ccircle cx='12' cy='0' r='5' fill='%231d1d1f'/%3E%3Cpath d='M-7 9q7 9 14 0' stroke='%231d1d1f' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.prose h3 { font: 600 1em/1.35 var(--f-ui); margin: 1.8em 0 .45em; }
.prose h4 { font: 600 1em/1.35 var(--f-ui); margin: 1.5em 0 .4em; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin: .3em 0; padding-left: .25em; }
.prose ul > li::marker { content: "●  "; color: var(--orange); font-size: .7em; }
.prose ol > li::marker { font: 600 .9em var(--f-ui); color: var(--orange-deep); }
.prose figure { margin: 1.8em 0; }
.prose figure img, .prose > p > img { border-radius: 16px; width: 100%; outline: 1px solid oklch(0 0 0 / .1); outline-offset: -1px; }
.prose figcaption { font: 400 var(--fs-read-2)/1.45 var(--f-ui); color: var(--ink-2); margin-top: .7em; }
.prose .photo { margin: .4em 0 1.4em; }
.prose .photo img { aspect-ratio: 3 / 2; object-fit: cover; background: var(--mist); }
.prose .photo figcaption { font-size: var(--fs-label); margin-top: .55em; text-align: right; }
.prose .photo figcaption a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; }
.prose .photo figcaption a:hover { color: var(--ink); background: none; }
.prose blockquote { margin: 1.8em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--sky); font-style: italic; color: var(--ink-2); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; display: block; overflow-x: auto; font: 400 var(--fs-read-2)/1.45 var(--f-ui); border: 1.5px solid var(--line-strong); border-radius: 14px; }
.prose th { font-weight: 600; text-align: left; background: var(--mist); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td { font-variant-numeric: tabular-nums; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 16px; }
.prose ul:has(> li > figure) { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.prose ul:has(> li > figure) > li { padding: 0; margin: 0; }
.prose ul:has(> li > figure) > li::marker { content: none; }
.prose ul:has(> li > figure) figure { margin: 0; font: 500 var(--fs-small)/1.2 var(--f-ui); text-align: center; }
.disclosure { font: 400 var(--fs-read-2)/1.5 var(--f-ui) !important; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; background: var(--mist); }
.disclosure a { color: inherit !important; }
.key { margin: 2em 0; padding: 20px 22px 8px; border-radius: var(--r-card); background: var(--tbg, var(--sky-soft)); }
.key > :is(h2, h3, p):first-child { font: 500 var(--fs-label)/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px; display: block; }
.key > h2:first-child::before { display: none; }
.tour-cta { margin: 2em 0; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 16px 16px 18px; border-radius: var(--r-card); background: var(--orange-deep); color: var(--white); }
.tour-cta .ico { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .16); display: grid; place-items: center; }
.tour-cta strong { display: block; font: 400 1.25rem/1.1 var(--f-display); margin-bottom: 2px; }
.tour-cta span { font: 400 var(--fs-small)/1.4 var(--f-ui); }
.prose .tour-cta a.btn { color: var(--ink); text-decoration: none; background-color: var(--white); border-color: var(--ink); }
@media (max-width: 560px) { .tour-cta { grid-template-columns: 1fr; } .tour-cta .ico { display: none; } .tour-cta .btn { justify-self: start; } }
.author-card { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; margin-top: 3em; padding: 18px; border-radius: var(--r-card); background: var(--mist); font: 400 var(--fs-read-2)/1.5 var(--f-ui); }
.author-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; outline: 1px solid oklch(0 0 0 / .1); outline-offset: -1px; }
.author-card p { margin: 0; color: var(--ink-2); }
.author-card .label { margin-bottom: 4px; }
.author-card .name { font: 400 1.25rem/1.1 var(--f-display); color: var(--ink); margin-bottom: 4px; }

.more { background: var(--mist); border-top: 1px solid var(--line); padding-block: var(--s8) var(--s9); }
.more-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.more-head h2 { font: 400 var(--fs-sub)/1.1 var(--f-display); margin: 0; }

/* ---------- simple pages ---------- */
.page { padding-block: var(--s6) var(--s9); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); max-width: 35rem; margin-bottom: var(--s6); }
.page .prose { max-width: 28em; }
.lost { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--s7); align-items: center; padding-block: var(--s8) var(--s9); }
.lost-art .sticker { width: 100%; height: auto; transform: rotate(-3deg); filter: drop-shadow(5px 5px 0 var(--ink)); }
.lost-links { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; } .lost-art { max-width: 240px; } }

/* ---------- footer ---------- */
.site-footer { background: var(--sea); color: var(--white); position: relative; padding-top: var(--s8); font-size: var(--fs-small); }
.site-footer .waves { position: absolute; top: -1px; left: 0; width: 100%; height: 40px; fill: var(--white); }
.more + .site-footer .waves, .about + .site-footer .waves { fill: var(--mist); }
main:has(> .about:last-child) + .site-footer .waves { fill: var(--mist); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr; gap: var(--s6); padding-block: var(--s5) var(--s7); border-bottom: 1px solid rgba(255, 255, 255, .22); }
.foot-brand { font: 400 2.25rem/1 var(--f-display); color: var(--sun); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; margin: 0 0 var(--s4) !important; }
.site-footer p { margin: 0 0 var(--s3); color: #e6f1f8; max-width: 34ch; line-height: 1.5; }
.site-footer h2 { font: 500 var(--fs-label)/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: #ddedf5; margin: 6px 0 var(--s4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.site-footer ul a, .foot-contact a, .to-top { display: inline-block; padding: 5px 0; text-decoration: none; color: var(--white); line-height: 1.35; }
.site-footer ul a:hover, .foot-contact a:hover { text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 4px; }
.site-footer :focus-visible { outline-color: var(--white); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); padding-block: var(--s4) var(--s5); color: #ddedf5; }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-intro { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .site-footer ul a, .foot-contact a, .to-top { padding-block: 12px; } .copy-link { height: 44px; } }

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