/* ------------------------------------------------------------------
   /fiskevejr — the long read. Same tokens, same fonts, same rules as the
   front page. Nothing here that main.css doesn't already believe in.
   ------------------------------------------------------------------ */

/* reading progress: a 2px line, driven by the scroll position in pure CSS */
.readbar { position: fixed; top: 0; left: 0; z-index: 60; width: 100%; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); animation: readgrow linear both; animation-timeline: scroll(root); }
@keyframes readgrow { to { transform: scaleX(1); } }
@supports not (animation-timeline: scroll()) { .readbar { display: none; } }

/* the ticker. Yes, a <marquee>. It still works, and it is still the right tool for a ticker. */
.ticker { border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ticker marquee { display: block; padding: 6px 0; }
.ticker b { color: var(--fg); font-weight: 600; }
.ticker .go { color: var(--accent); }
.ticker .no { color: var(--wrong); }

/* hero: the front page's .hero, with the spot map behind instead of the shape */
.art-hero { min-height: min(100svh, 820px); padding-top: clamp(3rem, 8vw, 6rem); }
.art-hero .display { font-size: clamp(2.3rem, 6.5vw, 6.2rem); max-width: 18ch; }
.art-hero .lede { max-width: 50ch; }
.art-hero .actions a { text-decoration: none; display: inline-block; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; opacity: var(--scene-opacity); touch-action: pan-y; }
.readout { position: absolute; z-index: 2; pointer-events: none; padding: 2px 6px; background: var(--bg); border: 1px solid var(--line); box-shadow: 4px 4px 0 var(--accent); white-space: nowrap; transform: translate(12px, -50%); }
.readout[hidden] { display: none; }

/* prose */
.prose { max-width: none; font-size: 18px; line-height: 1.5; }
.prose .measure { max-width: 64ch; }
.prose p { margin: 0 0 1.25em; text-wrap: pretty; }
.prose p.first::first-letter { initial-letter: 3; font-weight: 500; color: var(--accent); margin-right: 0.5rem; }
.prose .h2 { margin-top: 3.5rem; max-width: 64ch; }
.prose a:hover { color: var(--accent); }
.prose strong, .prose b { font-weight: 700; }
.prose pre {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.5;
  border: 1px solid var(--line); padding: 1rem; margin: 0 0 1.5rem;
  overflow-x: auto; tab-size: 2;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote { margin: 0 0 1.5rem; padding: 0 0 0 1rem; border-left: 1px solid var(--line); color: var(--muted); font-style: italic; }
.prose ul { padding-left: 1.1em; margin: 0 0 1.5rem; }
.prose li { margin: 0 0 0.5em; }
.prose li::marker { color: var(--accent); }

/* the seven steps, numbered like the projects list */
.steps { list-style: none; padding: 0; margin: 0 0 2rem; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; border-bottom: 1px solid var(--line); margin: 0; }
.steps a { display: grid; grid-template-columns: 3rem 1fr; gap: 0.75rem; align-items: baseline; padding: 0.6rem 0; text-decoration: none; }
.steps a::before { content: "[" counter(s, decimal-leading-zero) "]"; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.steps a:hover, .steps a:hover::before { color: var(--accent); }

/* fun facts: a dotted box, like the menu dividers */
.fact { margin: 0 0 1.5rem; padding: 0.75rem 0; border-top: 1px dotted var(--muted); border-bottom: 1px dotted var(--muted); display: grid; gap: 0.3rem; font-size: 0.95rem; }
.fact p { margin: 0; }

/* figures */
.fig { margin: 0 0 2rem; }
.fig img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.fig.gif img { background: #000; }
.cap { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--muted); margin: 0.5rem 0 0; }
.cap b { color: var(--fg); font-weight: 600; }
.breakout { max-width: 1000px; }

/* "Her gemte fiskene sig": bars in mono, nothing else */
.bars { border: 1px solid var(--line); padding: 1rem; display: grid; gap: 0.9rem; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.bars h3 { font: inherit; font-weight: 700; margin: 0; }
.bars .g { display: grid; gap: 0.4rem; }
.bars .g > span { color: var(--muted); }
.bars .b { display: grid; grid-template-columns: 3.5rem 1fr 4rem; align-items: center; gap: 0.75rem; }
.bars .b i { display: block; height: 14px; width: var(--w); background: var(--fg); }
.bars .b.before i { background: var(--muted); }
.bars .b em { font-style: normal; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- numbers: fg by default, blue when it's a go, red when not ---------- */
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1; font-weight: 500; }
.b-top { color: var(--accent); }
.b-good { color: var(--fg); }
.b-maybe { color: var(--muted); }
.b-bad { color: var(--wrong); }

/* ---------- demos sit in the front page's .demos grid, one column ---------- */
.demos.one { grid-template-columns: 1fr; max-width: 1000px; }
.demo .demo-note { max-width: none; }
.demo .demo-note a { color: inherit; }

/* species */
.tabs { display: flex; gap: 1.25rem; font-family: var(--font-mono); font-size: 13px; }
.tabs button { font: inherit; background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; }
.tabs button::before { content: "["; } .tabs button::after { content: "]"; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { color: var(--accent); }

/* the week: seven cells in a bordered grid, like the toolkit */
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.days button { font: inherit; background: var(--bg); border: 0; padding: 0.5rem 0.25rem 0.4rem; cursor: pointer; display: grid; gap: 0.35rem; color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.days .v { text-align: center; font-variant-numeric: tabular-nums; }
.days .bar { height: 36px; display: flex; align-items: flex-end; padding: 0 20%; }
.days .bar i { display: block; width: 100%; min-height: 2px; background: var(--muted); }
.days .d { text-align: center; text-transform: uppercase; }
.days button:hover { color: var(--fg); }
.days button[aria-pressed="true"] { color: var(--fg); }
.days button[aria-pressed="true"] .bar i { background: var(--accent); }
.days button[aria-pressed="true"] .d { color: var(--accent); }

/* the pick */
.pick { display: grid; grid-template-columns: auto 1fr; gap: 0 1.25rem; align-items: baseline; padding: 0.5rem 0 1rem; border-bottom: 1px solid var(--line); }
.pick .num { font-size: clamp(3rem, 8vw, 5.5rem); letter-spacing: -0.04em; }
.pick .pname { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.pick .pmeta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; margin-top: 0.35rem; }
.pick .pmeta b { color: var(--fg); font-weight: 600; }
.pick .chips { grid-column: 1 / -1; margin-top: 0.75rem; }

/* spot rows, like the projects list */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .row { width: 100%; display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 0.75rem; align-items: baseline; padding: 0.7rem 0; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rows .row .num { font-size: 1.5rem; }
.rows .row .nm { font-weight: 500; }
.rows .row .mt, .rows .row .km { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.rows .row .mt { display: block; margin-top: 0.15rem; }
.rows .row:hover .nm { color: var(--accent); }
.rows .row[aria-expanded="true"] .nm::after { content: " ↑"; }
.rows .row[aria-expanded="false"] .nm::after { content: " ↓"; color: var(--muted); }
.rows .why { display: none; padding: 0 0 1rem 3.5rem; }
.rows .row[aria-expanded="true"] + .why { display: block; }

/* reasons as bracketed mono tags */
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 12px; }
.chips li::before { content: "["; color: var(--muted); } .chips li::after { content: "]"; color: var(--muted); }
.chips li b { font-weight: 700; margin-left: 0.35em; }
.chips li.plus b { color: var(--accent); }
.chips li.minus b { color: var(--wrong); }
.wline { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0.6rem 0 0; }

/* ---------- the terminal, inline this time ---------- */
.term {
  border: 1px solid var(--line);
  box-shadow: 8px 8px 0 var(--accent);
  font-family: var(--font-mono); font-size: 14px; line-height: 1.5;
  margin: 2rem 8px 3rem 0;
  max-width: 1000px;
  background: var(--bg);
}
.term .q-chips { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.term .q-chips button { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--fg); cursor: pointer; text-align: left; }
.term .q-chips button::before { content: "["; color: var(--muted); } .term .q-chips button::after { content: "]"; color: var(--muted); }
.term .q-chips button:hover { color: var(--accent); }
.term .q-chips button[aria-pressed="true"] { color: var(--accent); text-decoration: underline; }
.term-out { padding: 12px; min-height: 180px; word-break: break-word; }
.term-out .line { margin: 0 0 0.5rem; }
.term-out .idle { color: var(--muted); }
.term-out .u { font-weight: 700; }
.term-out .u::before { content: "> "; color: var(--accent); }
.term-out .call, .term-out .res { color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.term-out .call::before { content: "→ "; color: var(--accent); }
.term-out .res::before { content: "← "; }
.term-out details { margin: 0 0 0.75rem; font-size: 13px; }
.term-out summary { color: var(--muted); cursor: pointer; }
.term-out summary:hover { color: var(--accent); }
.term-out pre { margin: 0.5rem 0 0; padding: 0.6rem 0.8rem; border: 1px dotted var(--muted); max-height: 14rem; overflow: auto; font-size: 12px; line-height: 1.45; white-space: pre; }
.term-out .a p { margin: 0 0 0.6rem; }
.term-out .a p:last-child { margin: 0; }
.term-out .a b { color: var(--accent); font-weight: 700; }
.term-out .cursor::after { content: "▍"; animation: tblink 1s steps(2) infinite; }
@keyframes tblink { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term-out .cursor::after { animation: none; } }

/* ---------- lift explorer ---------- */
.lift .ctl { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 1rem; }
.lift select { font: inherit; font-family: var(--font-mono); font-size: 13px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 0; padding: 0.3rem 0.5rem; }
.lift .axis, .lift .lrow { display: grid; grid-template-columns: 11rem 1fr 3.5rem; gap: 0.75rem; align-items: center; font-family: var(--font-mono); font-size: 12px; }
.lift .axis { color: var(--muted); text-transform: uppercase; }
.lift .axis .mid { position: relative; height: 1em; }
.lift .axis .mid::after { content: var(--mid, "1,0 = en almindelig dag"); position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.lift .lrow { padding: 0.3rem 0; border-top: 1px dotted var(--muted); }
.lift .lrow .lb { font-family: var(--font-sans); font-size: 15px; }
.lift .lrow .tr { position: relative; height: 14px; }
.lift .lrow .tr::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; border-left: 1px solid var(--line); }
.lift .lrow .tr i { position: absolute; top: 0; bottom: 0; }
.lift .lrow .tr i.up { left: 50%; background: var(--accent); }
.lift .lrow .tr i.dn { right: 50%; background: var(--wrong); }
.lift .lrow .vl { text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.lift .lrow:hover .lb { color: var(--accent); }
.lift .fine { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0.5rem 0 0; }
@media (max-width: 600px) {
  .lift .axis, .lift .lrow { grid-template-columns: 7rem 1fr 3rem; }
  .lift .lrow .lb { font-size: 13px; }
  .lift .axis .mid::after { content: "1,0"; }
}

/* ---------- end ---------- */
.sign { font-size: 1.5rem; font-style: italic; margin: 0 0 2.5rem; }
.outro { border-top: 1px solid var(--line); padding-top: 1.5rem; color: var(--muted); font-size: 0.95rem; max-width: 64ch; }
.outro a { color: var(--fg); }

@media (max-width: 720px) {
  .art-hero { min-height: 0; }
  .art-hero .hero-hint { display: none; }
}

/* ---------- two columns on wide screens: the text, and the terminal that follows it ---------- */
.side { display: none; }
@media (min-width: 1100px) {
  .prose { display: grid; grid-template-columns: minmax(0, 64ch) minmax(360px, 1fr); gap: 0 clamp(2rem, 5vw, 5rem); }
  .prose .col { min-width: 0; }
  .side { display: block; min-width: 0; align-self: stretch; }
  .side-sticky { position: sticky; top: 72px; }
  .side .term { margin: 0 8px 0 0; max-width: none; display: flex; flex-direction: column; max-height: calc(100vh - 72px - 2rem); }
  .side .term .q-chips { flex: none; }
  .side .term .term-out { flex: 1; min-height: 240px; overflow: auto; }
}
.term-out .boot { color: var(--muted); font-size: 13px; }
.term-out .boot b { color: var(--accent); font-weight: 600; }

/* "til højre" only makes sense when there is a right */
.only-wide { display: none; }
@media (min-width: 1100px) { .only-wide { display: inline; } .only-narrow { display: none; } }

/* the typed question */
.term .term-in input::placeholder { color: var(--muted); }
.side .term .term-in { flex: none; }

.term-out .a .cursor { white-space: pre-wrap; }
