/* Content pages (home, docs, pricing, coverage, FAQ, changelog, legal, learn), on top of style.css.
   One column of reading width (--measure) inside the site width (--wrap); docs add a contents rail on wide screens. */
:root { --measure: 70ch; }

main { display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter-l); }

/* ---------- page head: the title, then one plain sentence ---------- */
.page-head { padding: 56px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 36px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 12px; max-width: 24ch; text-wrap: balance; }
.page-head .subtitle { font-size: 19px; line-height: 1.5; color: var(--text-dim); margin: 0; max-width: 60ch; }
.page-head .crumb { font-size: 14px; margin: 0 0 14px; color: var(--text-dim); }
.page-head .crumb a { color: var(--text-dim); }

/* ---------- running text ---------- */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; margin: 48px 0 12px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.prose h3 { font-size: 19px; line-height: 1.35; font-weight: 600; margin: 30px 0 8px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--text-faint); }
.prose a, .link { color: var(--link); text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); }
.prose a:hover { color: var(--link); text-decoration-color: currentColor; }
.prose strong { font-weight: 600; }
.prose .lede { font-size: 19px; color: var(--text-dim); }
.prose .small, .small { font-size: 14px; color: var(--text-dim); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
:not(pre) > code { font-size: 0.88em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow-wrap: break-word; }
/* break-word, not anywhere: a long chip still breaks rather than overflow a line, but it no longer lets a table squeeze
   its column to a letter's width (anywhere lowers the min-content width). In a table a chip is a name: never broken. */
td code, th code, code.name { white-space: nowrap; }
.wide { max-width: none; }

/* sideways scrolling (a table or a code sample wider than its box): a soft shade on the side that has more, gone once
   scrolled to that end (the covers scroll with the content, the shades stay at the edges) */
.table-wrap, pre {
  --scroll-bg: var(--bg); --scroll-shade: color-mix(in srgb, var(--text) 22%, transparent);
  background:
    linear-gradient(to right, var(--scroll-bg) 40%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(to left, var(--scroll-bg) 40%, transparent) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shade), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shade), transparent) right / 14px 100% no-repeat scroll,
    var(--scroll-bg);
}

/* tables: data and facts, never layout */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
.table-note { margin: -8px 0 20px; font-size: 13px; color: var(--text-dim); }
/* a table too wide for its column (page.js decides, measuring): one card per row, each value under its column's name */
.table-wrap.stacked { overflow: visible; border: 0; border-radius: 0; background: none; }
.table-wrap.stacked :is(table, tbody, tr, td, th) { display: block; }
.table-wrap.stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.table-wrap.stacked tr { padding: 12px 16px; margin: 0 0 10px; border: 1px solid var(--border); border-radius: 10px; }
.table-wrap.stacked :is(td, th) { padding: 4px 0; border: 0; text-align: left; white-space: normal; }
.table-wrap.stacked tr > :first-child { padding-top: 0; font-weight: 600; color: var(--text); }
.table-wrap.stacked [data-label]::before { content: attr(data-label); display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.table-wrap.stacked code { white-space: normal; }
.table-wrap.stacked code.name { white-space: nowrap; }  /* a name (no space: Retry-After, minutely[].time) never breaks at its hyphen */
thead th { font-weight: 600; color: var(--text); background: var(--surface-2); white-space: nowrap; }
/* a table keyed by names (fields, parameters: page.js .keyed): the names' column as wide as its longest name, the
   meaning gets the rest (the auto layout gave a 200 px name a 400 px column) */
.table-wrap:not(.stacked) > table.keyed > * > tr > :first-child { width: 1%; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: 13px; color: var(--text-dim); }

/* boxes: a note (teal rule) and a rule that matters (warn rule) */
.box { margin: 0 0 20px; padding: 14px 18px; border-radius: 0 10px 10px 0; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); max-width: var(--measure); }
.box.warn { border-left-color: var(--warn); }
.box > :last-child { margin-bottom: 0; }
.box p { margin: 0 0 8px; }
.box strong { font-weight: 600; }

/* ---------- code ---------- */
pre { margin: 0 0 20px; padding: 16px 18px; overflow-x: auto; border-radius: 10px; --scroll-bg: var(--code-bg); --scroll-shade: rgba(223, 231, 247, 0.28); color: #dfe7f7;
      font-size: 13.5px; line-height: 1.6; border: 1px solid var(--border); tab-size: 2; }
pre code { font-size: inherit; }
:root:not([data-theme='light']) pre, :root:not([data-theme='light']) .key-slab { border-color: rgba(170, 195, 255, 0.24); }
:root:not([data-theme='light']) .code .tabs button[aria-selected='true'] { border-color: rgba(170, 195, 255, 0.24); }
pre .k { color: #7fe0d4; } /* keys and keywords */
pre .s { color: #f2cf7a; } /* strings */
pre .c { color: #7f8db0; } /* comments */
.code { position: relative; margin: 0 0 20px; max-width: 86ch; }
.code pre { margin: 0; }
/* the bar above a sample: language tabs (if any) on the left, Copy on the right, never over the code */
.code .tabs, .code .code-bar { display: flex; align-items: flex-end; gap: 2px; padding: 0 6px; margin-bottom: -1px; min-height: 34px; }
.code .tabs button { padding: 7px 12px; font-size: 13.5px; color: var(--text-dim); border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; }
.code .tabs button[aria-selected='true'] { color: #dfe7f7; background: var(--code-bg); border-color: var(--border); }
.code .tabs + pre, .code .tabs ~ pre { border-top-left-radius: 0; }
.copy { margin: 0 -6px 6px auto; align-self: center; padding: 4px 12px; min-height: 32px; font-size: 13px; border-radius: 7px; color: var(--text-dim);
        background: var(--surface-2); border: 1px solid var(--border); }
.copy:hover { color: var(--text); border-color: var(--text-faint); }

/* ---------- docs: contents rail + article ---------- */
.docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); font-size: 14px; }
.toc h2 { font-size: 13px; font-weight: 600; color: var(--text-dim); margin: 0 0 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-dim); text-decoration: none; }
.toc a:hover { color: var(--text); border-left-color: var(--text-faint); }
.docs .prose { max-width: 80ch; }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; margin-bottom: 28px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
  .toc ol { border: 0; columns: 2; column-gap: 16px; }
  .toc a { padding-left: 0; border: 0; }
}

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; padding: 64px 0 56px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 20px; text-wrap: balance; }
/* the hero's colour: two hues (blue to magenta) for the highlighted words, the figures, the badge's dot, the main
   button and a soft glow behind. Text ends measured >= 4.5:1 on --bg in each theme (dark #5b9cf0 6.3, #e0679a 5.5;
   light #1f68c4 5.1, #b8336a 5.2); the button's white text on #1f68c4 / #9a46b0 5.5 and 5.4. */
:root { --hl1: #5b9cf0; --hl2: #e0679a; --btn1: #1f68c4; --btn2: #9a46b0; }
:root[data-theme='light'] { --hl1: #1f68c4; --hl2: #b8336a; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --hl1: #1f68c4; --hl2: #b8336a; } }
.hero { position: relative; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: -6% 0; z-index: -1; pointer-events: none;
                background: radial-gradient(40% 50% at 18% 42%, color-mix(in srgb, var(--btn1) 16%, transparent), transparent 70%),
                            radial-gradient(38% 46% at 74% 58%, color-mix(in srgb, var(--btn2) 13%, transparent), transparent 70%); filter: blur(10px); }
.hero h1 .hl { background: linear-gradient(90deg, var(--hl1), var(--hl2)); -webkit-background-clip: text; background-clip: text; color: transparent;
               white-space: nowrap; } /* "for all of Europe" stays one line, one gradient */
.hero .badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px 6px 11px; border-radius: 999px; font-size: 14.5px;
               font-weight: 600; color: var(--text); background: var(--surface-solid); border: 1px solid var(--border);
               box-shadow: 0 1px 8px color-mix(in srgb, var(--btn1) 14%, transparent); }
.hero .badge .dot { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(120deg, var(--btn1), var(--btn2));
                    box-shadow: 0 0 0 4px color-mix(in srgb, var(--btn1) 18%, transparent); }
.hero .badge b { font-weight: 700; }
.hero .btn.primary { color: #fff; background: linear-gradient(120deg, var(--btn1), var(--btn2)); }
.hero .btn.primary:hover { color: #fff; background: linear-gradient(120deg, color-mix(in srgb, var(--btn1) 88%, #000), color-mix(in srgb, var(--btn2) 88%, #000)); }
.hero .lede { font-size: 19px; line-height: 1.5; color: var(--text-dim); margin: 0 0 28px; max-width: 42ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
/* four facts in two even columns (one row of four where the hero is a single wide column) */
.hero .facts { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 26px; font-size: 14.5px; color: var(--text-dim); }
.hero .facts b { font-weight: 600; background: linear-gradient(90deg, var(--hl1), var(--hl2)); -webkit-background-clip: text; background-clip: text;
                 color: transparent; }

/* the live map, framed like a window onto it: the site's one picture */
.preview { position: relative; display: block; aspect-ratio: 4 / 3.4; border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
           background: #1b2230 url('/static/og.jpg') 72% 50% / cover no-repeat padding-box; box-shadow: var(--shadow); text-decoration: none; }
/* padding-box: the picture behind the live map must not show through the translucent 1 px border (coloured slivers at the
   frame's edges where og.jpg has rain) */
.preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.preview .open { position: absolute; right: 12px; bottom: 12px; padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 600;
                 color: var(--text); background: var(--surface); border: 1px solid var(--border); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.preview:hover .open { border-color: var(--accent); }
/* the map's credits, once, under the frame (the preview itself shows no "i") */
.preview-fig { margin: 0; min-width: 0; }
.preview-fig figcaption { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--text-dim); text-align: right; }
.preview-fig figcaption a { display: inline-block; padding: 8px 0; color: inherit; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 40px 0 36px; }
  .preview { aspect-ratio: 4 / 3; }
}
@media (min-width: 640px) and (max-width: 900px) { .hero .facts { grid-template-columns: repeat(4, max-content); } }

/* ---- home: scores block (one linked card: a raindrop per rainy day, filled where Nimbo beat the standard forecast) ---- */
.scorecard { display: block; position: relative; padding: 28px 28px 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2);
             color: var(--text); text-decoration: none; overflow: hidden; isolation: isolate; transition: border-color .2s, transform .2s, box-shadow .2s; }
.scorecard::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(60% 90% at 0% 0%, color-mix(in srgb, var(--hl1) 14%, transparent), transparent 70%), radial-gradient(50% 80% at 100% 100%, color-mix(in srgb, var(--hl2) 14%, transparent), transparent 70%); }
.scorecard:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.scorecard:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sc-defs { position: absolute; }
.sc-defs stop:first-child { stop-color: var(--logo-a); }
.sc-defs stop:last-child { stop-color: var(--logo-b); }
.sc-head h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 650; margin: 0 0 8px; max-width: none; }
.sc-head p { margin: 0; color: var(--text-dim); font-size: 17px; max-width: 60ch; }
.sc-rows { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px; margin: 26px 0 14px; }
#scores[data-state='ready'] .sc-rows { display: grid; }
#scores[data-state='ready'] .sc-key { display: flex; }
.sc-row { display: grid; gap: 12px; min-width: 0; }
.sc-n { display: flex; align-items: baseline; gap: 12px; }
.sc-n b { font-size: clamp(34px, 4.4vw, 46px); line-height: 1; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
          background: linear-gradient(90deg, var(--hl1), var(--hl2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sc-n b small { font-size: .42em; font-weight: 600; letter-spacing: 0; color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); }
.sc-n span { font-size: 15px; font-weight: 600; color: var(--text); }
.sc-drops { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 7px 6px; }
.drop { display: block; width: 100%; height: auto; aspect-ratio: 12 / 14; overflow: visible; }
.drop.w { fill: url(#sc-g); }
.drop.l { fill: color-mix(in srgb, var(--text) 24%, var(--surface-2)); }
.scorecard:hover .sc-drops .w { animation: sc-hop .5s ease-out both; animation-delay: calc(var(--i) * 18ms); }
@keyframes sc-hop { 40% { transform: translateY(-3px); } }
.sc-key { display: none; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 18px; font-size: 14px; color: var(--text-dim); }
.sc-key span { display: inline-flex; align-items: center; gap: 8px; }
.sc-key .drop { width: 11px; flex: none; }
.sc-go { display: inline-flex; align-items: center; gap: 10px; margin: 0; min-height: 36px; font-weight: 650; color: var(--link); }
#scores:not([data-state='ready']) .sc-head { margin-bottom: 18px; }
.sc-go svg { width: 16px; height: 10px; transition: transform .2s; }
.scorecard:hover .sc-go svg { transform: translateX(4px); }
.scorecard:hover .sc-go span { text-decoration: underline; text-underline-offset: 3px; }
/* drops fall in once, when the block scrolls into view (only when JS armed it; otherwise they are simply there) */
#scores.armed .sc-drops .drop { opacity: 0; transform: translateY(-14px); }
#scores.armed.play .sc-drops .drop { animation: sc-fall .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes sc-fall { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .scorecard { padding: 22px 18px 16px; }
  .sc-rows { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .scorecard, .sc-go svg { transition: none; }
  .scorecard:hover { transform: none; }
  .scorecard:hover .sc-drops .w, #scores.armed.play .sc-drops .drop { animation: none; }
  #scores.armed .sc-drops .drop { opacity: 1; transform: none; }
}

.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section > h2, .section-head h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; margin: 0 0 10px; max-width: 30ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 24px; }
.section-head p { margin: 0; color: var(--text-dim); max-width: 60ch; }
.section .intro { color: var(--text-dim); max-width: 62ch; margin: 0 0 24px; }

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.split .prose { max-width: 52ch; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* plans: two columns of facts */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 860px; }
.plan { border: 1px solid var(--border); border-radius: 14px; padding: 24px 24px 22px; display: flex; flex-direction: column; }
.plan.featured { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: inset 0 3px 0 var(--accent); }
.plan h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.plan .price { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 16px; font-weight: 400; color: var(--text-dim); letter-spacing: 0; }
.plan .calls { color: var(--text-dim); margin: 0 0 16px; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.plan li { padding-left: 20px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 8px; background: var(--accent); }
.plan .btn { margin-top: auto; align-self: flex-start; }
/* home: the two plans in brief, the details on /pricing */
.plans.compact { margin-top: 22px; }
.plans.compact .plan { padding: 20px 22px; }
.plans.compact .price { font-size: 32px; margin-bottom: 8px; }
.plan .plan-line { color: var(--text-dim); margin: 0 0 18px; }
.plans-more { margin: 16px 0 0; }

/* ---- home offer (2026-11-13): the API as one ask and one answer, the free plan led, privacy as one quiet line ---- */
.say { min-width: 0; }
.say .code { margin-bottom: 10px; }
.say .answer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; max-width: 86ch; padding: 14px 18px; border: 1px solid var(--border);
               border-radius: 10px; background: var(--surface-2); }
.say .answer-label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.say .answer-text { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
/* the free plan is the larger card: its figure in the hero's two hues (>= 4.5:1, see the hero tokens), the main button */
.plans.compact { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); max-width: 900px; align-items: stretch; }
.plans.compact .plan.lead { padding: 22px 22px 20px; border-color: color-mix(in srgb, var(--btn1) 55%, var(--border)); box-shadow: inset 0 3px 0 var(--btn1); }
.plans.compact .plan.lead .price { font-size: 20px; font-weight: 400; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin-bottom: 10px; }
.plans.compact .plan.lead .price small { font-size: 20px; color: var(--text); }
.plans.compact .plan.lead .big { font-size: clamp(48px, 7vw, 64px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
                  background: linear-gradient(90deg, var(--hl1), var(--hl2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plans.compact .plan.lead .btn.primary { color: #fff; background: linear-gradient(120deg, var(--btn1), var(--btn2)); }
.plans.compact .plan.lead .btn.primary:hover { color: #fff; background: linear-gradient(120deg, color-mix(in srgb, var(--btn1) 88%, #000), color-mix(in srgb, var(--btn2) 88%, #000)); }
.privacy-line { margin: 0; padding: 28px 0 40px; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--text-dim); }
.privacy-line a { display: inline-block; padding: 6px 2px; margin: -6px 0; }
@media (max-width: 700px) { .plans.compact { grid-template-columns: minmax(0, 1fr); } .plans.compact .plan.lead { padding: 22px 22px 20px; } }
/* ---- end home offer ---- */
@media (max-width: 700px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* the coverage map: two alpha masks (radar footprint, coasts) coloured by the theme, drawn as 10 km pixels */
.pixmap { position: relative; width: 100%; max-width: 560px; aspect-ratio: 364 / 440; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--border); }
.pixmap i { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; image-rendering: pixelated; }
.pixmap .radar { background: color-mix(in srgb, var(--accent) 34%, transparent); -webkit-mask-image: url('/static/img/coverage-radar.png'); mask-image: url('/static/img/coverage-radar.png'); }
.pixmap .coast { background: var(--text-dim); -webkit-mask-image: url('/static/img/coverage-coast.png'); mask-image: url('/static/img/coverage-coast.png'); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-dim); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -1px; }
.legend .radar { background: color-mix(in srgb, var(--accent) 34%, transparent); outline: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.legend .none { background: var(--bg-2); outline: 1px solid var(--text-faint); }

/* FAQ */
/* the page head's rule is the only rule above the first group (no second one under it) */
.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--nav-h) + 12px); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; font-weight: 600; font-size: 17px; line-height: 1.6; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
/* plus / minus drawn as two 2 px bars, centred on the first line of the question (16 px padding + half of 27.2 px) */
.faq summary::after { content: ''; position: absolute; right: 6px; top: calc(16px + 13.6px - 6px); width: 12px; height: 12px; color: var(--text-dim);
                      background: linear-gradient(currentColor 0 0) center / 12px 2px no-repeat, linear-gradient(currentColor 0 0) center / 2px 12px no-repeat; }
.faq details[open] summary::after { background: linear-gradient(currentColor 0 0) center / 12px 2px no-repeat; }
.faq details > div { padding: 0 0 14px; }
.faq h2 { font-size: 15px; font-weight: 600; color: var(--text-dim); margin: 40px 0 6px; }
.faq > h2:first-child { margin-top: 0; }

/* changelog */
.log { max-width: var(--measure); }
/* the date on the baseline of its entry's title */
.log article { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: first baseline; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.log time { font-size: 14px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.log .prose h2 { font-size: 17px; line-height: 1.6; letter-spacing: 0; margin: 0 0 6px; font-weight: 600; }
.log p, .log ul { margin: 0 0 8px; }
@media (max-width: 600px) { .log article { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* learn index */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 900px; }
.cards a { display: block; height: 100%; padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; }
.cards a:hover { border-color: var(--accent); }
.cards b { display: block; font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.cards span { color: var(--text-dim); font-size: 15px; }
@media (max-width: 700px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.next { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); max-width: calc(var(--measure) * 16 / 15); font-size: 15px; color: var(--text-dim); }

/* the seller's identity (partials/trader.html) */
.trader { margin: 0 0 20px; padding: 14px 18px; border: 1px dashed var(--warn); border-radius: 10px; max-width: var(--measure); }
.trader-flag { font-size: 13px; color: color-mix(in srgb, var(--warn) 80%, var(--text)); margin: 0 0 8px !important; }
.trader dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.trader dl > div { display: contents; }
.trader dt { color: var(--text-dim); }
.trader dd { margin: 0; }

/* ---------- shared by the dashboard, status and newsletter ---------- */
:root { --bad: #f08a80; }
:root[data-theme='light'] { --bad: #b8372c; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --bad: #b8372c; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.link-btn { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: 3px; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: 0.6; cursor: progress; }
input[type=email], textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
input[type=email]:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
::placeholder { color: var(--text-faint); }

/* ---------- dashboard ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.dash-head b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.dash-empty { max-width: 62ch; padding: 8px 0 24px; }
.dash-empty h2, .ask h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; margin: 0 0 12px; }
.dash-empty p { margin: 0 0 12px; }
.dash-empty .actions { margin: 20px 0 14px; }
.ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.ticks li { padding-left: 20px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 8px; background: var(--accent); }
.dash-wait { padding: 24px 0 48px; color: var(--text-dim); }
.pixel-spin { display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--accent); animation: pixel-blink 1s steps(2, jump-none) infinite; }
@keyframes pixel-blink { from { opacity: 1; } to { opacity: 0.2; } }

/* the sign-up question: a note from us, not a form gate */
.ask { max-width: 640px; padding: 28px 28px 24px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); }
.ask h2 label { cursor: text; }
.ask > p { color: var(--text-dim); margin: 0 0 18px; max-width: 54ch; }
.ask .actions { margin-top: 16px; }
.ask-error, .dash-error { color: var(--bad); font-size: 14.5px; margin: 10px 0 0; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 24px; min-width: 0; }
.panel { border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; min-width: 0; }
.panel.quiet { background: var(--surface-2); }
.panel h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.panel p { margin: 0 0 12px; }
.panel > :last-child { margin-bottom: 0; }
.panel .code { margin-bottom: 12px; }
.panel .actions { margin-top: 4px; }
#paid-note, #intent-note { max-width: none; margin-bottom: 24px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* the key: on a dark slab like the code samples, large enough to check by eye */
.key-slab { position: relative; display: flex; align-items: flex-start; gap: 12px; margin: 0 0 12px; padding: 16px 12px 16px 18px; border-radius: 10px;
            background: var(--code-bg); border: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--accent); }
/* Copy at the slab's top right, beside the key (which wraps beside it), whatever its label ("Copied", "Select and copy") */
.key-slab .copy { flex: none; margin: -4px 0 0; align-self: flex-start; }
.key-slab code { display: block; flex: 1 1 auto; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; font-size: 15.5px; line-height: 1.5; color: #e8f4f2; overflow-wrap: anywhere; letter-spacing: 0.01em; }
.key-slab.dim { padding-right: 18px; box-shadow: none; }
.key-slab.dim code { color: #9fb0d0; }
.key-warn { font-size: 14.5px; color: var(--text-dim); }
.key-warn b { color: var(--warn); font-weight: 600; }
.regen { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.regen-confirm { margin-top: 14px; padding: 14px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--border)); }
.regen-confirm p { font-size: 14.5px; }
.regen-confirm .actions { margin: 0; }
.regen-confirm b { font-weight: 600; }

/* usage: a meter of 50 pixels */
.usage-num { margin: 0 0 10px; color: var(--text-dim); }
.usage-num b { font-size: 30px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; margin-right: 4px; }
.meter { position: relative; height: 12px; margin: 0 0 12px; background: var(--surface-2); outline: 1px solid var(--border); outline-offset: -1px; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .4s ease; }
.meter::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(2% - 2px), var(--bg) calc(2% - 2px) 2%); }
.meter[data-level='high'] i, .meter[data-level='grace'] i { background: var(--warn); }
.meter[data-level='stopped'] i { background: var(--bad); }
.panel details summary { cursor: pointer; color: var(--text-dim); }
.panel details p { margin: 8px 0 0; }
.panel q { color: var(--text); }

/* ---------- status ---------- */
.now { display: flex; align-items: center; gap: 14px; margin: 0 0 6px; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
/* 4 px in from the edge: its 4 px halo stays inside the column */
.lamp { flex: none; width: 16px; height: 16px; margin-left: 4px; background: var(--text-faint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text-faint) 22%, transparent); }
#status[data-state='operational'] .lamp { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
#status[data-state='degraded'] .lamp { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); }
#status[data-state='down'] .lamp { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 22%, transparent); }
#status[data-state='loading'] .lamp { animation: pixel-blink 1s steps(2, jump-none) infinite; }
.now-meta { margin: 0 0 8px 34px; }
.status-missing { margin-top: 20px; }
.uptime, .incidents { margin-top: 44px; }
.uptime h2, .incidents h2 { font-size: 22px; font-weight: 600; margin: 0 0 16px; }
.measure { margin: 0 0 18px; }
.measure-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; margin: 0 0 8px; }
.measure-head h3 { font-size: 16px; font-weight: 600; margin: 0; white-space: nowrap; }
.measure-head span { font-size: 14px; color: var(--text-dim); }
/* one bar per day, each a column of the map's pixels */
.bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 38px; }
.bars li { background: var(--surface-2); outline: 1px solid var(--border); outline-offset: -1px; }
.bars li.ok { background: var(--accent); outline: 0; }
.bars li.part { background: var(--warn); outline: 0; }
.bars li.bad { background: var(--bad); outline: 0; }
.bars li:hover { opacity: 0.7; }
.bars-axis { display: flex; justify-content: space-between; margin: 4px 0 0; color: var(--text-faint); }
.bars-legend i { width: 10px; height: 10px; }
.bars-legend .ok { background: var(--accent); }
.bars-legend .part { background: var(--warn); }
.bars-legend .bad { background: var(--bad); }
.bars-legend .none { background: var(--surface-2); outline: 1px solid var(--border); }
@media (max-width: 600px) {
  .bars { gap: 1px; height: 30px; }
  .bars-legend { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 20px; }
}
.inc-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); border-top: 1px solid var(--border); }
.inc-list li { padding: 14px 0 14px 20px; border-bottom: 1px solid var(--border); position: relative; }
.inc-list li::before { content: ''; position: absolute; left: 0; top: 22px; width: 8px; height: 8px; background: var(--text-faint); }
.inc-list li.open::before { background: var(--bad); }
.inc-list h3 { font-size: 16px; font-weight: 600; margin: 0 0 2px; }
.inc-list p { margin: 4px 0 0; }
.status-about { margin-top: 56px; }
.status-about h2 { margin-top: 0; }

/* ---------- newsletter sign-up (partials/newsletter.html) ---------- */
.nl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; align-items: center; max-width: 980px;
      padding: 26px 28px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.nl-title { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 0 0 6px; }
.nl-copy { grid-row: span 2; }
.nl-copy p { margin: 0; color: var(--text-dim); }
.nl-field { display: flex; gap: 8px; align-self: end; }
.nl-field label { flex: 1; min-width: 0; }
.nl-field input { height: 42px; }
.nl-msg { margin: 4px 0 0; align-self: start; }
.nl[data-state='error'] .nl-msg { color: var(--bad); }
.nl[data-state='sent'] .nl-msg { color: var(--text); }
@media (max-width: 760px) {
  .nl { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .nl-copy { grid-row: auto; margin-bottom: 8px; }
}
@media (max-width: 420px) { .nl-field { flex-direction: column; } .nl-field .btn { width: 100%; } }
.nl-about { margin-top: 40px; }
/* the latest digest on /newsletter (js/newsletter.js), as the mail shows it */
.nl-edition { padding: 18px 22px; }
.nl-edition h3 { margin: 0 0 8px; }
.nl-edition h4 { font-size: 16px; font-weight: 600; margin: 18px 0 4px; }
.nl-edition p { margin: 0 0 8px; }
.nl-edition .nl-rows { width: auto; margin: 0 0 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.nl-edition .nl-rows td { padding: 2px 12px 2px 0; border: 0; }
.nl-edition .nl-rows td + td { text-align: right; white-space: nowrap; }
#nl-outcome { margin-bottom: 24px; max-width: 980px; }

/* ---------- Learn: notebook figures (pages/learn/*.html, scripts/learn_figures.py) ----------
   A figure reads like a rendered notebook: the code cell ("In [n]:"), its output (the plot) and a caption. Each plot
   ships as four SVGs: wide / narrow (phones: text stays 11 px or more) x dark / light; the page shows the theme's own
   picture (lazy images: the hidden theme's file is never fetched). */
.nb { margin: 28px 0 32px; max-width: var(--measure); }
.nb-prompt { display: block; margin: 0 0 4px; font: 500 12.5px/1.4 var(--mono); color: var(--text-faint); }
.nb-in { margin: 0 0 14px; }
.nb pre { --scroll-bg: var(--surface-solid); margin: 0; padding: 12px 14px; color: var(--text); font-size: 13px; line-height: 1.55;
          border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; }
:root:not([data-theme='light']) .nb pre { border-color: var(--border); border-left-color: var(--accent); }
.nb pre .k { color: var(--accent); }
.nb pre .s { color: var(--prob); }
.nb pre .c { color: var(--text-faint); }
.nb-plot img { display: block; width: 100%; height: auto; margin: 0 auto; }
.nb figcaption { margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }
.nb figcaption b { color: var(--text); font-weight: 600; }
.nb-light { display: none; }
:root[data-theme='light'] .nb-light { display: block; }
:root[data-theme='light'] .nb-dark { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .nb-light { display: block; }
  :root:not([data-theme]) .nb-dark { display: none; }
}
/* the narrow drawing (picture source under 600 px) is never stretched far past its own size */
@media (max-width: 600px) { .nb-plot img { max-width: 460px; } }
/* ---------- end Learn notebook figures ---------- */
