/* ContextWire: the parts every page shares. Fonts, colour tokens, the header and the footer.
   Each page loads this first, then its own sheet (site.css; how-ask-works.html loads ask-page.css).
   The look: a wire desk. Cream paper, black ink, one telegram-yellow signal, cobalt for links and data.
   Big tight grotesk headings, IBM Plex Mono for labels and code, hairline rules that frame the page,
   squared corners, and the Morse letters C W (-.-. .--) as the mark.
   A page that must stay light sets data-theme="light" on <html>. */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/schibsted-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/schibsted-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/ibm-plex-mono-400-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/ibm-plex-mono-500-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(/ibm-plex-mono-600-latin.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --paper: #f5f2ea;      /* the page */
  --panel: #fffdf8;      /* cards, fields, quoted source text */
  --sunk: #ece7da;       /* wells: inline code, tracks, skeletons */
  --ink: #16130e;
  --ink-2: #4e493f;      /* secondary text */
  --ink-3: #6f695c;      /* captions and counters */
  --rule: #d9d2c1;       /* hairlines */
  --rule-2: #b9b19d;     /* field borders */
  --signal: #ffcc1a;     /* telegram yellow: the highlight, the main call to action */
  --signal-soft: #fff0b0;
  --signal-ink: #1c1600;
  --link: #1a3fd0;       /* cobalt: links, focus, the data hue */
  --link-ink: #ffffff;
  --ok: #1c7a45; --warn: #974600; --bad: #b3261e;
  --term: #16130e; --term-ink: #f2ecda; --term-dim: #a59d88; --term-rule: #3a352b;   /* terminal blocks: dark in both themes */
  --data: #1a3fd0; --data-soft: #d3dbf6; --data-mute: #8f8878;                      /* charts: one hue, its track, the grey for "the other" */
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 4px;
  --lift: 4px 4px 0 var(--ink);
  /* names the older views use (card.js, news.js, the news page, search-apis.html) */
  --slip: var(--panel); --mark: var(--signal); --mark-soft: var(--signal-soft); --mark-ink: var(--signal-ink);
  --bg: var(--paper); --muted: var(--ink-2); --line: var(--rule); --accent: var(--link); --accent-ink: var(--link-ink); --code: var(--sunk);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --paper: #11100d; --panel: #1a1814; --sunk: #26231c; --ink: #f1ebda; --ink-2: #bdb5a0; --ink-3: #958d7a; --rule: #343026; --rule-2: #514b3c;
    --signal: #ffc61a; --signal-soft: #4b3d0a; --signal-ink: #1c1600; --link: #9db0ff; --link-ink: #0c1024;
    --ok: #62cf8f; --warn: #f0b469; --bad: #ff8f85;
    --term: #0a0907; --term-rule: #2b271f;
    --data: #6d86f5; --data-soft: #262d55; --data-mute: #8a8372;
    --lift: 4px 4px 0 var(--signal); }
}

[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sr:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip-path: none; z-index: 60; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); }
.top *, .foot-site * { box-sizing: border-box; }
.top .wrap, .foot-site .wrap, .strip .wrap { max-width: 1180px; margin: 0 auto; padding-inline: max(18px, env(safe-area-inset-left, 0px)) max(18px, env(safe-area-inset-right, 0px)); }
.foot-site ul { padding: 0; margin: 0; list-style: none; } .foot-site h4, .foot-site p { margin: 0; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--paper); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 10px 22px; min-height: 60px; }
@media (min-width: 1240px) { .top .wrap, .foot-site .wrap, .strip .wrap { padding-inline: 34px; } }
/* a narrow phone: the mark, one button and the menu still fit on one row */
@media (max-width: 400px) { .top .wrap { padding-inline: 14px; } .top-in { column-gap: 8px; } .wordmark { font-size: 17px; gap: 7px; } .wordmark svg { width: 24px; height: 24px; } .top-cta .top-btn { padding: 7px 9px; font-size: 13.5px; } }
@media (max-width: 340px) { .top .wordmark span { display: none; } }
.framed .top .wrap { border-inline-color: transparent; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18.5px; letter-spacing: -0.035em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark i { font-style: normal; }
.wordmark:hover { color: var(--ink); }
.wordmark svg { width: 26px; height: 26px; flex: none; }
.cw-bg { fill: var(--ink); } .cw-fg { fill: var(--signal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cw-bg { fill: var(--signal); } :root:not([data-theme="light"]) .cw-fg { fill: var(--signal-ink); } }
.nav { display: none; gap: 2px; margin-inline: auto; font-size: 14.5px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 11px; border-radius: var(--r); }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--signal); border-radius: 0; }
.top-cta { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.top-cta .login { display: none; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 8px 10px; }
.top-cta .login:hover { color: var(--ink); text-decoration: underline; }
.top-cta .top-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 7px 14px; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink);
  border-radius: var(--r); font: 600 14.5px/1.2 var(--sans); text-decoration: none; white-space: nowrap; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.top-cta .top-btn:hover { color: var(--paper); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--signal); }
.top-cta .top-btn:active { transform: none; box-shadow: none; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--panel); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary i { display: block; width: 18px; height: 2px; background: var(--ink); box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink); }
.menu[open] > summary { background: var(--ink); border-color: var(--ink); }
.menu[open] > summary i { background: var(--paper); box-shadow: 0 -6px 0 var(--paper), 0 6px 0 var(--paper); }
.menu-sheet { position: absolute; right: 0; top: 52px; width: min(78vw, 300px); background: var(--panel); border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: var(--lift); padding: 6px; display: grid; }
.menu-sheet a { color: var(--ink); text-decoration: none; padding: 12px 12px; border-radius: 3px; font-weight: 500; }
.menu-sheet a + a { border-top: 1px solid var(--rule); }
.menu-sheet a:hover { background: var(--sunk); }
@media (min-width: 940px) { .nav { display: flex; } .menu { display: none; } .top-cta .login { display: inline-block; } .top-cta { margin-left: 0; } }

/* the notice strip under the header */
.strip { background: var(--term); color: var(--term-ink); font: 500 12.5px/1.45 var(--mono); letter-spacing: 0.02em; }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; padding-block: 9px; text-align: center; }
.strip b { background: var(--signal); color: var(--signal-ink); padding: 1px 7px; border-radius: 2px; font-weight: 600; letter-spacing: 0.06em; }
.strip a { color: var(--term-ink); text-underline-offset: 3px; white-space: nowrap; }
.framed .strip .wrap { border-inline-color: transparent; }


/* ---------- footer ---------- */
.foot-site { border-top: 1px solid var(--rule); margin-top: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
.foot-site .wrap { padding-block: 40px 30px; }
.foot-cols { display: grid; gap: 28px 30px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 820px) { .foot-cols { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } }
.foot-cols h4 { font: 500 11.5px/1.4 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.foot-cols li + li { margin-top: 7px; }
.foot-cols a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.foot-cols a:hover { color: var(--ink); text-decoration: underline; }
.foot-about { grid-column: 1 / -1; }
@media (min-width: 820px) { .foot-about { grid-column: auto; } }
.foot-about p { color: var(--ink-2); font-size: 14.5px; max-width: 36ch; margin-top: 12px; }
.foot-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--rule); font: 400 12px/1.5 var(--mono); color: var(--ink-3); }
.foot-base a { color: var(--ink-3); }
.foot-base a:hover { color: var(--ink); }
.morse { display: inline-flex; align-items: center; gap: 10px; }
.morse svg { height: 6px; width: auto; fill: var(--ink-3); }
