/* Ferrylist. Tokens first. One family (Schibsted Grotesk), one mono for ledger data. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --hull: #14262b;        /* ink, text */
  --quay: #eff1ec;        /* page ground, cool grey-green */
  --band-dark: #0a1417;   /* dark-mode band, one step below --quay dark */
  --deck: #fafbf8;        /* raised surface */
  --ferry: #f5b820;       /* signal yellow, primary action only */
  --ferry-ink: #14262b;   /* text on ferry */
  --buoy: #b8341f;        /* left on the dock */
  --tide: #226770;        /* links, secondary */
  --rule: #c5cdc4;        /* hairlines */
  --mute: #4f6469;        /* secondary text */
  --ok: #2c7a46;
  --focus: #1a5fd0;
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 6px;
  --gutter: 16px;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hull: #e6ece7; --quay: #0f1c20; --deck: #16272c; --buoy: #ff8f78; --tide: #78c9d1;
    --rule: #2c4045; --mute: #9db1b5; --ok: #6fd08c; --focus: #7fb0ff;
  }
}
:root[data-theme="dark"] {
  --hull: #e6ece7; --quay: #0f1c20; --deck: #16272c; --buoy: #ff8f78; --tide: #78c9d1;
  --rule: #2c4045; --mute: #9db1b5; --ok: #6fd08c; --focus: #7fb0ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--quay); color: var(--hull);
  font: 400 var(--step-0)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--tide); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ferry); color: var(--ferry-ink); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 40rem; }
h1, h2, h3 { font-family: var(--font); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 8.5vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: var(--step-1); line-height: 1.4; max-width: 34rem; }
.mute { color: var(--mute); }
.mono { font-family: var(--mono); }

/* Header and footer */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 20px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; color: var(--hull); text-decoration: none; min-height: 44px; }
.mark svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 4px; align-items: center; }
.top nav a { color: var(--hull); text-decoration: none; padding: 10px 10px; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { text-decoration: underline; }
.foot { border-top: 1px solid var(--rule); margin-top: 72px; padding: 32px 0 48px; font-size: .9rem; color: var(--mute); }
.foot .wrap { display: grid; gap: 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: var(--hull); display: inline-flex; min-height: 44px; align-items: center; }
.foot .legal { max-width: 46rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r); border: 2px solid var(--hull);
  font: 700 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  background: var(--ferry); color: var(--ferry-ink);
  box-shadow: 3px 3px 0 var(--hull);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--hull); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hull); }
.btn.quiet { background: transparent; color: var(--hull); box-shadow: none; }
.btn.quiet:hover { background: var(--deck); transform: none; box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { border-color: var(--hull); box-shadow: 3px 3px 0 #000; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* The manifest: the one signature element. A ruled cargo ledger with a "left on the dock" strip. */
.manifest {
  background: var(--deck); border: 2px solid var(--hull); border-radius: var(--r);
  font-family: var(--mono); font-size: .875rem; line-height: 1.45; position: relative;
}
.manifest header { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 2px solid var(--hull); font-weight: 700; flex-wrap: wrap; }
.manifest .cargo { list-style: none; margin: 0; padding: 0; }
.manifest .cargo li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 9px 14px; border-bottom: 1px dashed var(--rule); }
.manifest .cargo li:last-child { border-bottom: 0; }
.manifest .dock { border-top: 2px solid var(--hull); background: repeating-linear-gradient(-45deg, transparent 0 9px, color-mix(in srgb, var(--buoy) 8%, transparent) 9px 10px); }
.manifest .dock h3 { font: 700 .875rem/1.3 var(--mono); letter-spacing: .02em; margin: 0; padding: 10px 14px 4px; color: var(--buoy); }
.manifest .dock ul { list-style: none; margin: 0; padding: 0 14px 12px; }
.manifest .dock li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 4px 0; }
.manifest .n { font-weight: 700; min-width: 2.2ch; text-align: right; }
.manifest .why { display: block; color: var(--mute); font-family: var(--font); font-size: .85rem; }
.manifest .dock .n { color: var(--buoy); }
.manifest .ok { color: var(--ok); font-weight: 700; }
.manifest .foot-note { padding: 8px 14px 12px; border-top: 1px dashed var(--rule); color: var(--mute); font-family: var(--font); font-size: .8rem; }
.stamp { display: inline-block; border: 2px solid var(--buoy); color: var(--buoy); padding: 2px 8px; font: 800 .75rem/1.2 var(--mono); letter-spacing: .06em; border-radius: 3px; transform: rotate(-2deg); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top nav a { white-space: nowrap; padding: 10px 8px; }
@media (max-width: 22rem) { .top nav a:first-child { display: none; } }
