/* Notes from the Terminal: editorial page, terminal accents. */
:root {
  --paper: #ffffff;
  --ink: #0b0b0c;
  --text: #1d1d1f;
  --muted: #5e5e66;          /* 6.4:1 on white */
  --rule: #e4e4e7;
  --note-bg: #fbf5ec;
  --accent: #ff8c1a;         /* terminal amber, decorative only */
  --accent-ink: #b34700;     /* amber for text, 5.5:1 on white */
  --up: #0a7f3f;
  --down: #c8102e;
  --tape-bg: #0b0b0c;
  --tape-fg: #f4f4f5;
  --tape-sym: #ff9f1c;
  --tape-up: #3ddc84;
  --tape-down: #ff6b6b;
  --tape-muted: #a1a1aa;
  --head: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1240px;
  --gutter: clamp(16px, 3vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 2px; }
img, svg { display: block; }
p { margin: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 20; background: var(--ink); color: #fff; padding: 8px 12px; font-family: var(--head); }
.skip:focus { left: 12px; }
.dot { margin: 0 8px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--head); font-weight: 600; font-size: 13px; line-height: 1;
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--ink); white-space: nowrap;
}
.btn-x { background: var(--ink); color: #fff; }
.btn-x:hover { background: #26262a; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.x-icon { width: 13px; height: 13px; fill: currentColor; flex: none; }

/* ---------- utility bar ---------- */
.utility { border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.utility-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; }
.u-left { display: flex; align-items: center; flex-wrap: wrap; }
.u-right { display: flex; align-items: center; gap: 8px; }
.u-live { display: inline-flex; align-items: center; gap: 6px; }
.pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 140, 26, .55); animation: pulse 2.4s ease-out infinite; flex: none;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 140, 26, .55); } 70% { box-shadow: 0 0 0 7px rgba(255, 140, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 140, 26, 0); } }

/* ---------- masthead ---------- */
.masthead-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px var(--gutter) 16px; }
.wordmark { display: inline-block; color: var(--ink); font-size: clamp(30px, 4.4vw, 52px); line-height: 1; white-space: nowrap; }
.wordmark:hover { color: var(--ink); }
.wm-notes { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.01em; }
.wm-terminal { font-family: var(--head); font-weight: 900; letter-spacing: -.035em; }
.cursor { display: inline-block; width: .4em; height: .7em; margin-left: .08em; vertical-align: baseline; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* ---------- search ---------- */
.search-form { position: relative; display: flex; align-items: center; margin-bottom: 6px; }
.search-form input { width: 270px; font: 500 14px var(--head); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 9px 40px 9px 16px; outline: none; -webkit-appearance: none; appearance: none; }
.search-form input::placeholder { color: var(--muted); }
.search-form input:focus { border-color: var(--ink); }
.search-form button { position: absolute; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.search-icon { width: 17px; height: 17px; }
.search-big { position: relative; max-width: 760px; margin: 4px 0 14px; }
.search-big input { width: 100%; font: 600 22px var(--head); color: var(--ink); border: 0; border-bottom: 3px solid var(--ink); padding: 10px 8px 12px 40px; background: transparent; outline: none; border-radius: 0; -webkit-appearance: none; appearance: none; }
.search-big input::placeholder { color: var(--muted); font-weight: 500; }
.search-big-icon { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-big-icon .search-icon { width: 22px; height: 22px; }
.search-status { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; min-height: 1.4em; }
.search-ideas { margin: 18px 0 8px; }
.search-ideas .chips { margin-top: 8px; }
.chip-idea { font-weight: 500; }
.search-results { max-width: 860px; padding-bottom: 60px; }
.search-results .label { margin-top: 26px; }
.result { padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.result-head { margin: 2px 0 6px; font-family: var(--head); font-weight: 700; font-size: 21px; line-height: 1.22; color: var(--ink); }
.result-head a:hover { color: var(--accent-ink); }
.result-snip { font-size: 16.5px; line-height: 1.5; color: var(--text); }
mark { background: #ffe2c2; color: inherit; padding: 0 1px; border-radius: 2px; }
.tagline { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; text-align: right; }

/* ---------- section nav ---------- */
.sections { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--rule); }
.sections ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.sections ul::-webkit-scrollbar { display: none; }
.sections a { display: block; padding: 12px 0 11px; font-family: var(--head); font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; }
.sections a:hover { color: var(--ink); box-shadow: inset 0 -3px 0 var(--rule); }
.sections a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }

/* ---------- ticker tape ---------- */
.tape { background: var(--tape-bg); color: var(--tape-fg); font-family: var(--mono); font-size: 12.5px; }
.tape-row { display: flex; align-items: center; gap: 20px; min-height: 38px; }
.tape-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tape-list::-webkit-scrollbar { display: none; }
.tape-list li { display: flex; gap: 7px; white-space: nowrap; }
.t-sym { color: var(--tape-sym); font-weight: 600; }
.t-chg.up { color: var(--tape-up); }
.t-chg.down { color: var(--tape-down); }
.t-chg.flat { color: var(--tape-muted); }
.tape-meta { color: var(--tape-muted); white-space: nowrap; font-size: 11.5px; }

/* ---------- shared type ---------- */
.kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 11.5px; line-height: 1.3; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.kicker a:hover { text-decoration: underline; color: var(--accent-ink); }
.kicker-sep { color: var(--muted); font-weight: 400; }
.star { color: var(--accent); font-size: 13px; letter-spacing: 0; }
.label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 4px; padding-top: 9px; border-top: 3px solid var(--ink); font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); }
.label-note { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--muted); font-size: 11.5px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.meta .dot { margin: 0 7px; }
.srcs a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.srcs a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.share { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-family: var(--head); font-weight: 600; font-size: 12.5px; }
.share .x-icon { width: 11px; height: 11px; }
.note { margin-top: 12px; padding: 10px 13px; background: var(--note-bg); border-radius: 3px; font-size: 16.5px; line-height: 1.5; color: var(--text); }
.note-label { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-right: 9px; }
.figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 14px; }
.figure-value { font-family: var(--head); font-weight: 900; font-size: 44px; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.figure-label { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.figure-sm { margin: 10px 0 0; }
.figure-sm .figure-value { font-size: 22px; letter-spacing: -.02em; }
.figure-sm .figure-label { font-size: 11px; }
.byline { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; }
.more { display: inline-flex; gap: 6px; margin-top: 16px; font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--ink); }
.empty { padding: 18px 0; color: var(--muted); font-style: italic; }

/* ---------- front page ---------- */
.live-strip { display: none; }
.front { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px; padding: 30px 0 34px; border-bottom: 1px solid var(--rule); }
.front-solo { grid-template-columns: minmax(0, 1fr); }
.front-side { display: flex; flex-direction: column; gap: 30px; }
.lead-head { margin: 4px 0 16px; font-family: var(--head); font-weight: 800; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.028em; color: var(--ink); text-wrap: balance; }
.lead-head a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.lead-body { font-size: 21px; line-height: 1.5; max-width: 40em; }
.lead .note { font-size: 18px; max-width: 40em; }
.note-card-title { margin: 12px 0 8px; font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.note-card-title a:hover { color: var(--accent-ink); }
.note-card-dek { font-style: italic; color: var(--muted); font-size: 17px; }
.top-list { list-style: none; margin: 0; padding: 0; }
.top-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.top-list li:last-child { border-bottom: 0; }
.top-n { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--accent-ink); padding-top: 3px; }
.top-head { font-family: var(--head); font-weight: 700; font-size: 16.5px; line-height: 1.28; color: var(--ink); }
.top-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.columns { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 40px; padding: 30px 0 56px; }
.day { margin: 22px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.label + .day { margin-top: 10px; }
.brief { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 14px; padding: 20px 0 22px; border-bottom: 1px solid var(--rule); }
.brief-time { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 1px; }
.brief-head { margin: 2px 0 8px; font-family: var(--head); font-weight: 700; font-size: 23px; line-height: 1.2; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; }
.brief-head a:hover { color: var(--accent-ink); }
.brief-body { font-size: 17.5px; line-height: 1.55; max-width: 42em; }
.river-solo { max-width: 860px; padding-bottom: 56px; }

/* ---------- wire ---------- */
.wire-list { list-style: none; margin: 0; padding: 0; }
.wire-item { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.wire-item > time { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.wire-head { display: block; font-family: var(--head); font-weight: 500; font-size: 15px; line-height: 1.35; color: var(--ink); }
.wire-head:hover { color: var(--accent-ink); }
.wire-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.wire-src { font-weight: 600; color: var(--text); }
.wire-also { padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; }
.wire-sec { text-transform: uppercase; letter-spacing: .06em; }
.wire-list-wide .wire-item { grid-template-columns: 64px minmax(0, 1fr); padding: 13px 0; }
.wire-list-wide .wire-head { font-size: 17px; }
.wire-page { max-width: 900px; padding-bottom: 56px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.chip { font-family: var(--head); font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- inner pages ---------- */
.page-head { padding: 34px 0 22px; max-width: 820px; }
.page-head .kicker { gap: 8px; }
.page-title { margin: 6px 0 10px; font-family: var(--head); font-weight: 900; font-size: clamp(34px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -.03em; color: var(--ink); }
.page-dek { font-size: 20px; color: var(--muted); max-width: 38em; }
.story-wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; padding: 36px 0 60px; }
.story-head { margin: 6px 0 14px; font-family: var(--head); font-weight: 800; font-size: clamp(32px, 4vw, 50px); line-height: 1.04; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.dateline { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.dateline .updated { margin-left: 10px; color: var(--accent-ink); }
.story-card { margin: 4px 0 24px; max-width: 760px; }
.story-card img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 4px; }
.story-body { font-size: 22px; line-height: 1.55; max-width: 36em; }
.story .note { font-size: 19px; max-width: 36em; margin-top: 18px; }
.correction { margin-top: 16px; padding: 10px 13px; border: 1px solid var(--rule); font-size: 16px; }
.story-sources { margin-top: 34px; max-width: 36em; }
.story-sources ul { list-style: none; margin: 8px 0 0; padding: 0; }
.story-sources li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-family: var(--head); font-weight: 600; font-size: 16px; }
.share-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.story-aside { display: flex; flex-direction: column; gap: 32px; }
.morning-note { max-width: 720px; margin: 0 auto; padding: 40px 0 64px; }
.mn-title { margin: 8px 0 14px; font-family: var(--serif); font-weight: 600; font-size: clamp(36px, 4.8vw, 56px); line-height: 1.06; letter-spacing: -.018em; color: var(--ink); text-wrap: balance; }
.mn-dek { font-style: italic; font-size: 23px; line-height: 1.4; color: var(--muted); }
.morning-note .byline { margin: 18px 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.mn-body p { font-size: 21px; line-height: 1.62; margin-bottom: 1.05em; }
.mn-body a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.mn-stories { margin-top: 40px; }
.index-list { max-width: 820px; padding-bottom: 60px; }
.index-item { padding: 22px 0; border-top: 1px solid var(--rule); }
.index-title { margin: 4px 0 6px; font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--ink); }
.index-dek { color: var(--muted); font-style: italic; }
.archive-days { list-style: none; margin: 0 0 60px; padding: 0; max-width: 640px; }
.archive-days li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); font-family: var(--head); font-weight: 600; }
.archive-days .count { font-family: var(--mono); font-weight: 400; font-size: 12.5px; color: var(--muted); }
.prose { max-width: 720px; padding: 40px 0 64px; }
.prose h2 { margin: 34px 0 10px; font-family: var(--head); font-weight: 800; font-size: 24px; letter-spacing: -.01em; color: var(--ink); }
.prose p, .prose li { font-size: 19px; line-height: 1.6; }
.prose p + p { margin-top: .9em; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.prose .lede { font-size: 22px; line-height: 1.5; margin-bottom: 1em; }
.how { padding-left: 1.2em; }
.how li { margin-bottom: .7em; }
.source-list { font-family: var(--mono); font-size: 13px !important; line-height: 1.8 !important; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #d4d4d8; padding: 44px 0 36px; font-family: var(--head); }
.wordmark-inverse, .wordmark-inverse:hover { color: #fff; font-size: 30px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid #2e2e33; }
.footer-tagline { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #a1a1aa; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 20px 0; font-weight: 600; font-size: 14.5px; }
.footer-links a:hover { color: var(--tape-sym); }
.copyright { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: #8a8a93; }

/* ---------- live refresh pill ---------- */
.fresh { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; }
.fresh button { display: inline-flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .live-strip { display: block; padding-top: 18px; }
  .live-strip .wire-item:last-child { border-bottom: 0; }
  .front, .columns, .story-wrap { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .tagline { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .u-date, .u-date-dot, .u-handle, .tape-time { display: none; }
  .search-form input { width: 38px; padding: 0; border-color: transparent; color: transparent; background: transparent; position: absolute; right: 0; opacity: 0; pointer-events: none; }
  .search-form button { position: static; width: 38px; height: 38px; border: 1px solid var(--rule); }
  .search-form { margin-bottom: 2px; }
  .search-big input { font-size: 19px; }
  .utility-row { min-height: 44px; gap: 10px; }
  .masthead-row { padding-top: 16px; padding-bottom: 12px; }
  .wordmark { font-size: clamp(25px, 7.4vw, 34px); }
  .sections ul { gap: 20px; }
  .front { padding-top: 22px; }
  .lead-body { font-size: 19px; }
  .figure-value { font-size: 36px; }
  .brief { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 18px 0 20px; }
  .brief-time { font-size: 12px; }
  .brief-head { font-size: 21px; }
  .brief-body { font-size: 17px; }
  .story-body { font-size: 19px; }
  .mn-body p { font-size: 19px; }
  .prose p, .prose li { font-size: 18px; }
}
@media (max-width: 400px) {
  .u-wire-dot, .u-live { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .pulse { animation: none; }
}
