/* Antenor quality dashboard: the visual layer.
   One shared base (structure, components, the names of the tokens) and one
   block per look. Two looks are in while Peder chooses between them on the
   real pages (LOOKS in layout.js): A «Tegningen», the drawing sheet, and
   C «HMS-tavla», the safety board. data-look on <html> picks the look,
   data-theme the theme (light, dark or paper; none follows the system).
   A look owns its typefaces, its colours, the shell and the form state takes;
   the base owns everything both share, and names no colour of its own.
   A look's block is wrapped in :where(), so a rule in it weighs what it
   would anywhere: it wins a tie with the base because it comes later, and a
   base rule that is more specific (.explain h3 against a look's h3) holds.
   Status colours are reserved for state. Charts are grey by default; colour
   marks the point the chart makes. Rules and rationale: docs/design.md. */

/* ---------- constants (the same in every look and theme) ---------- */
:root {
  color-scheme: light dark;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --z-sticky: 10; --z-tip: 30; --z-drawer: 40;
  --gutter: clamp(1rem, 2.2vw, 1.5rem);
  /* What floats over the page (tooltip, side sheet) is the only thing with a shadow. */
  --float: 0 12px 28px -14px rgba(0, 0, 0, .5);
  /* Heat ramps. Both looks' accents are blue, so they share them. */
  --seq-0: light-dark(#eef0f2, #1f2630);
  --seq-1: light-dark(#cde2fb, #184f95);
  --seq-2: light-dark(#9ec5f4, #1c5cab);
  --seq-3: light-dark(#6da7ec, #256abf);
  --seq-4: light-dark(#3987e5, #3987e5);
  --seq-5: light-dark(#256abf, #6da7ec);
  --seq-6: light-dark(#104281, #9ec5f4);
  --div-n3: light-dark(#c23a39, #e66767);
  --div-n2: light-dark(#e38180, #a8504f);
  --div-n1: light-dark(#f3c4c3, #6b3f3d);
  --div-0: light-dark(#e6e9ec, #333a44);
  --div-p1: light-dark(#cde2fb, #1f4677);
  --div-p2: light-dark(#6da7ec, #256abf);
  --div-p3: light-dark(#256abf, #6da7ec);
}
:root[data-theme="antenor-light"] { color-scheme: light; }
:root[data-theme="antenor-dark"] { color-scheme: dark; }
:root[data-theme="paper"] { color-scheme: light; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; accent-color: var(--accent); caret-color: var(--accent); scrollbar-color: var(--line-2) transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.defs { position: absolute; }
/* What a script or the server has hidden stays hidden, whatever display its class sets. */
[hidden] { display: none !important; }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; overflow-y: auto; scrollbar-color: var(--side-line) transparent;
  display: flex; flex-direction: column; gap: 1.4rem;
  padding: 1.4rem 0 1.1rem; background: var(--side-bg); color: var(--side-ink);
}
.side > *, .menu > * { margin-inline: 1.1rem; }
.side > .nav, .menu > .nav, .side > .view-switch, .menu > .view-switch { margin-inline: 0; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; text-decoration: none; color: var(--side-ink); }
.brand-name { font: 600 21px/1.12 var(--heading); overflow-wrap: anywhere; }
.brand-sub { font: 500 12.5px/1.3 var(--label); color: var(--side-ink-3); }
.brand .logo { display: block; width: 132px; height: auto; }
.by { display: flex; align-items: center; gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--side-line); font: 400 12px/1.3 var(--label); color: var(--side-ink-3); }
.by .logo { display: block; width: 74px; height: auto; }
.nav { display: flex; flex-direction: column; gap: 1.1rem; }
.nav-group > span, .view-switch > span, .look-pick > span { display: block; padding: 0 1.1rem .35rem; font: 500 12px/1.3 var(--label); color: var(--side-ink-3); }
.nav a, .view-switch a {
  display: flex; align-items: center; gap: .55rem; padding: .4rem 1.1rem;
  color: var(--side-ink-2); text-decoration: none; font: 500 14.5px/1.3 var(--label);
  transition: background .15s, color .15s;
}
.nav a:hover, .view-switch a:hover { background: var(--side-hover); color: var(--side-ink); }
.nav a[aria-current="page"], .view-switch a[aria-current="true"] { color: var(--side-ink); font-weight: 600; }
.nav a .lock { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--side-ink-3); }
/* A group's switch between the group view and each company view. */
.view-switch { display: flex; flex-direction: column; padding-bottom: 1.1rem; border-bottom: 1px solid var(--side-line); }
.menu .view-switch { margin-bottom: 1.1rem; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .7rem; font-size: 12.5px; color: var(--side-ink-3); }
.menu > .pickers, .menu > .account { margin-top: 1.1rem; }
.menu > .by { margin-top: .9rem; }
.account { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.account a { color: var(--side-ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap;
  padding: .42rem .8rem; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: 500 13.5px/1.35 var(--label); cursor: pointer; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { background: var(--surface-3); }
.btn-ghost { background: transparent; }
.btn-small { padding: .28rem .6rem; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: default; }
.side .btn, .topbar .btn { background: transparent; color: var(--side-ink); border-color: var(--side-line); }
.side .btn:hover, .topbar .btn:hover { border-color: var(--side-ink-2); background: var(--side-hover); }
/* The pickers in the navigation frame: which of the two looks, and the theme.
   The theme picker is a plain select wearing the button style, so it needs no
   popup code; it sits on the dark frame in every theme, so its own drop-down
   is told to render dark, and its colours are said outright because Chromium
   on Windows can draw the list in the page's scheme (Peder, 6 Oct 2026). */
.pickers { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.look-pick { display: flex; flex-wrap: wrap; }
.look-pick > span { flex-basis: 100%; padding-inline: 0; }
.look-pick .btn { border-radius: 0; }
.look-pick .btn + .btn { margin-left: -1px; }
/* The pressed look is read from <html>, which is set before first paint, so
   the switch never fades in after the script has run. */
:root:not([data-look="c"]) .look-pick [data-look-pick="a"], :root[data-look="c"] .look-pick [data-look-pick="c"] { background: var(--side-ink); color: var(--side-bg); border-color: var(--side-ink); font-weight: 600; position: relative; }
.theme-pick { padding: .38rem .4rem .38rem .7rem; font-family: var(--label); color-scheme: dark; }
.theme-pick option { background: var(--side-bg); color: var(--side-ink); }

.main { min-width: 0; padding: 1.5rem clamp(1rem, 2.6vw, 2rem) 4rem; }
.wrap { max-width: 1320px; margin: 0 auto; }

/* narrow: the navigation collapses to a top bar with a disclosure menu */
.topbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    position: sticky; top: 0; z-index: var(--z-sticky); padding: .6rem 1rem;
    background: var(--side-bg); color: var(--side-ink);
  }
  .topbar .brand { flex-direction: row; align-items: baseline; gap: .6rem; }
  .topbar .brand-name { font-size: 17px; }
  .topbar .brand-sub { display: none; }
  .topbar summary { list-style: none; cursor: pointer; }
  .topbar summary::-webkit-details-marker { display: none; }
  .topbar .menu {
    position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100dvh - 52px); overflow-y: auto;
    padding: 1rem 0 1.2rem; background: var(--side-bg); border-top: 1px solid var(--side-line);
  }
  .main { padding: 1rem .75rem 3rem; }
}

/* ---------- page head ---------- */
/* The title with its lead, and the facts about the page (layout.js). */
h1, h2, h3 { font-family: var(--heading); margin: 0; text-wrap: balance; }
h1 { font-size: 1.875rem; line-height: 1.12; font-weight: 600; }
h2 { font-size: 1.125rem; line-height: 1.25; font-weight: 600; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 600; }
.page-title p { margin: .5rem 0 0; color: var(--ink-2); max-width: 70ch; text-wrap: pretty; }
.page-title .crumb { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; font: 500 13px/1.3 var(--label); color: var(--ink-3); }
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--accent); }
.facts { margin: 0; }
.fact dt { font: 500 12px/1.25 var(--label); color: var(--ink-3); }
.fact dd { margin: 0; color: var(--ink); }
.fact-view dd span { color: var(--ink-2); }
.fact-fresh a { margin-left: .3rem; color: var(--accent); }
.facts .fact-access dd { font-weight: 600; }   /* who the page is for: said firmly, but no state */
/* «Privat» alone is a warning: names of people, not for a shared screen
   (Peder, 27 Nov 2026). «Intern» stays quiet. */
.facts .fact-access.is-private dd { color: var(--warn-ink); }
.facts .fact-note.tone-warn dd { color: var(--warn-ink); font-weight: 600; }
.fact-owner dd, .fact-date dd { white-space: nowrap; }
.tag {
  display: inline-flex; align-items: center; padding: .05rem .45rem; border-radius: var(--r-sm);
  font: 500 12px/1.4 var(--label); border: 1px solid var(--line-2); color: var(--ink-2);
}
.tag-private { border-color: var(--warn-ink); color: var(--warn-ink); font-weight: 600; }

/* ---------- state ---------- */
/* A tone sets --tone and its companions on whatever carries it. The word
   that says the state (stateMark in components.js) takes the look's form. */
.tone-good { --tone: var(--good); --tone-soft: var(--good-soft); --tone-ink: var(--good-ink); }
.tone-warn { --tone: var(--warn); --tone-soft: var(--warn-soft); --tone-ink: var(--warn-ink); }
.tone-bad { --tone: var(--bad); --tone-soft: var(--bad-soft); --tone-ink: var(--bad-ink); }
.tone-neutral { --tone: var(--accent); --tone-soft: var(--accent-soft); --tone-ink: var(--ink-2); }
.state { display: inline-block; white-space: nowrap; margin-right: .5em; font: 600 12px/1.25 var(--label); }
.state-bad { color: var(--bad-ink); }
.state-warn { color: var(--warn-ink); }
.state-good { color: var(--good-ink); }

/* ---------- answer (the one-sentence conclusion) ---------- */
.answer { margin: 1.1rem 0 1.4rem; font: 500 1.25rem/1.4 var(--sans); max-width: 64ch; text-wrap: pretty; }

/* ---------- KPI tiles ---------- */
.kpis { display: flex; flex-wrap: wrap; margin-bottom: 1.4rem; }
.kpi { position: relative; flex: 1 1 172px; display: flex; flex-direction: column; min-width: 0; padding: .85rem 1.1rem 1rem; background: var(--surface); color: var(--ink); }
.kpi-label { font: 500 13.5px/1.3 var(--label); color: var(--ink-2); }
.kpi-value { margin-top: auto; padding-top: .4rem; font: 600 2.75rem/1.02 var(--figure); color: var(--ink); }
.kpi-value small { font-size: .45em; font-weight: 500; color: var(--ink-3); margin-left: .2rem; }
.kpi-sub { margin-top: .25rem; font: 400 13px/1.3 var(--label); color: var(--ink-3); }
.kpi-sub b { font-weight: 600; color: var(--tone-ink, var(--ink-2)); }
.kpi .spark { margin-top: .5rem; width: 100%; height: 34px; display: block; }
.spark path[fill-opacity] { display: none; }   /* a sparkline is its line: no soft area under it */
/* A row where only some tiles have a trend line, or a line under the number,
   keeps its numbers on one line: the others leave the same room. */
.kpis:has(.spark) .kpi:not(:has(.spark))::after { content: ""; flex: none; height: calc(34px + .5rem); }
.kpis:has(.kpi-sub) .kpi:not(:has(.kpi-sub)) .kpi-value { margin-bottom: calc(.25rem + 17px); }
a.kpi, button.kpi { text-decoration: none; transition: background .15s; }
button.kpi { border: 0; font: inherit; text-align: left; cursor: pointer; }
a.kpi:hover, button.kpi:hover { background: var(--surface-2); }
button.kpi .kpi-value .ico { font-size: .42em; color: var(--ink-3); margin-left: .4rem; vertical-align: .32em; }
/* A term with an explanation on hover: dotted underline, like <abbr>. */
.term, .kpi-label.has-help { text-decoration: underline dotted currentColor; text-underline-offset: 3px; cursor: help; }

/* ---------- panels and cards ---------- */
.panel { background: var(--surface); padding: 1.1rem var(--gutter) 1.25rem; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .8rem; }
.panel-head h2, .panel-head h3 { max-width: 60ch; }
.panel-note { font: 400 13px/1.4 var(--label); color: var(--ink-3); }
/* Fixed spacing that used to sit in style attributes on every element
   (docs/security-audit.md finding 14). */
.panel-note.lead { margin: 0 0 .7rem; }      /* introduces the figure below it */
.spaced { margin-top: 1rem; }                /* one step away from what is above */

.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
@media (max-width: 1100px) { .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; } }

.card { display: flex; flex-direction: column; gap: .4rem; }
.card .panel-head { margin-bottom: .1rem; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card .card-answer { margin: .1rem 0 .5rem; max-width: 72ch; font: 400 15px/1.5 var(--sans); text-wrap: pretty; }
.analysis-link { font: 500 13px/1.2 var(--label); white-space: nowrap; text-decoration: none; color: var(--accent); }
.analysis-link:hover { text-decoration: underline; }
/* The one icon: an arrow, drawn once (ICONS in layout.js) and turned. */
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.ico-ne { transform: rotate(-45deg); }
.ico-w { transform: rotate(180deg); }
/* Dashboard cards are drawn at their slot width: scale with the panel, scroll only on phones. */
.card .chart-scroll { padding: 4px 0; }
.card .chart-scroll > .chart { min-width: 0; }
@media (max-width: 700px) { .card .chart-scroll > .chart { min-width: 520px; } }
/* Scroll containers must never widen their parent (flex/grid items default to min-width:auto). */
.chart-scroll, .table-scroll, .card > * { min-width: 0; max-width: 100%; }

/* Quoted answers in a list (insight in components.js): two columns read
   across, so the order, worst first, survives the layout. */
.insights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 0 2rem; overflow-y: clip; }
.insights li { display: flex; margin-bottom: -1px; }   /* the last row's rule falls outside the list and is clipped */
.insights li a:focus-visible { outline-offset: -2px; }
.insights li a { flex: 1; display: block; padding: .7rem 0 .75rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.insights .ins-text { font-size: 14.5px; line-height: 1.45; transition: color .15s; }
.insights li a:hover .ins-text { color: var(--accent); }
.insights .ins-topic { display: block; margin-top: .2rem; font: 400 12.5px/1.35 var(--label); color: var(--ink-3); }

/* catalogue */
.catalog-group { margin-top: 1.6rem; }
.catalog-group > h2 { margin-bottom: .7rem; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.catalog a { text-decoration: none; display: flex; flex-direction: column; gap: .5rem; transition: background .15s; }
.catalog a:hover { background: var(--surface-2); }
.catalog a:hover h3 { color: var(--accent); }
.catalog .q { font: 400 13.5px/1.4 var(--label); color: var(--ink-2); }
.catalog .a { font-size: 14.5px; line-height: 1.45; }

/* A list cut to its largest rows (topN in src/charts/kit.js): the note says
   so, and the button swaps to every row and back. */
.top-n-note { margin: 0 0 .5rem; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.top-n-all > summary { list-style: none; margin: 0 0 .6rem; }
.top-n-all > summary::-webkit-details-marker { display: none; }
.top-n:has(> .top-n-all[open]) > .top-n-top { display: none; }
.top-n .when-open { display: none; }
.top-n:has(> .top-n-all[open]) .when-open { display: inline; }
.top-n:has(> .top-n-all[open]) .when-closed { display: none; }

/* ---------- explainer blocks under a chart ---------- */
.explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem 2.5rem; margin-top: 1.6rem; }
.explain h2, .explain h3 { font-size: 14px; line-height: 1.3; font-weight: 600; margin-bottom: .5rem; }
.explain ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); font-size: 14px; max-width: 70ch; }
.explain li { margin: .3rem 0; }
.explain li::marker { color: var(--ink-3); }
.source { margin-top: 1.4rem; font: 400 13px/1.45 var(--label); color: var(--ink-3); }
.chart-sub { margin: 2rem 0 .3rem; }         /* heading for a second figure in one analysis */
.chart-question { font-size: 15px; }
.matrix-scroll { overflow-x: auto; }
.kpi-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }

/* ---------- controls ---------- */
/* A switch between views of the same thing: ruled cells, the chosen one inked in. */
.segs { display: inline-flex; flex-wrap: wrap; gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); margin-bottom: 1rem; overflow: hidden; }
.seg { flex: 1 1 auto; border: 0; background: var(--surface); color: var(--ink-2); font: 500 13px/1.35 var(--label); padding: .34rem .8rem; cursor: pointer; text-align: center; }
.seg:hover { color: var(--ink); background: var(--surface-2); }
.seg.on { background: var(--ink); color: var(--surface); }
a.seg { text-decoration: none; }
.segs.period { margin: 1rem 0 0; }

/* ---------- legend ---------- */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; padding: 0; margin: .8rem 0 0; font: 400 13px/1.3 var(--label); color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: .45rem; }
.key { display: inline-block; flex: none; background: var(--k); }
.key-rect { width: 12px; height: 12px; }
.key-line { width: 16px; height: 3px; }
.key-dot { width: 10px; height: 10px; border-radius: 50%; }
.key-ring { width: 10px; height: 10px; border-radius: 50%; background: none; box-shadow: inset 0 0 0 2px var(--k); }
.key-dash { width: 16px; height: 0; border-top: 2px dashed var(--k); background: none; }
.key-band { width: 16px; height: 12px; opacity: .55; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-scroll { overflow-x: auto; padding: 8px 2px; }
.chart-scroll > .chart { min-width: min(var(--chart-width, 1040px), 880px); }
.chart-scroll:focus-visible { outline-offset: -2px; }
.chart text { font-family: var(--label); }
.chart rect { rx: 0; }
/* The quietest category («ikke vurdert», «avlyst») is filled like the track
   it lies on, so it is an outlined field: empty, but there. The track itself
   is the one drawn with an opacity. */
.chart :is(rect, path)[fill="var(--surface-3)"]:not([opacity]) { stroke: var(--ink-3); stroke-width: 1; stroke-opacity: .65; }
.key[style*="--surface-3)"] { box-shadow: inset 0 0 0 1px var(--ink-3); }
/* A label on an ordinary grey mark is inked, whatever ink the chart asked
   for (some ask for the ink of a solid colour). */
.chart [fill="var(--mark)"] + text, .chart [fill="var(--mark-2)"] + text { --accent-ink: var(--ink); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--ink-3); stroke-width: 1; }
.chart .map-sea { fill: var(--sea, var(--surface-2)); }
.chart .map-land { fill: var(--surface); stroke: var(--ink-3); stroke-width: .7; stroke-linejoin: round; }
.chart .map-border { fill: none; stroke: var(--line); stroke-width: .8; stroke-linejoin: round; }
.chart .map-frame { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.chart .map-dot { fill-opacity: .6; stroke: var(--accent); stroke-width: 1.2; }
.chart .tick { fill: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.chart .lbl { fill: var(--ink-2); font-size: 13.5px; }
.chart .lbl-sm { fill: var(--ink-3); font-size: 12.5px; }
.chart .lbl-strong { fill: var(--ink); font-size: 13.5px; font-weight: 600; }
.chart .val { fill: var(--ink); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .val-lg { fill: var(--ink); font-size: 22px; font-weight: 600; font-family: var(--figure); font-variant-numeric: tabular-nums; }
.chart .note { fill: var(--ink-2); font-size: 12.5px; }
.chart .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.chart .axis-title { fill: var(--ink-3); font-size: 12.5px; }
.chart .ref { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; fill: none; }
.chart .leader { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.chart .mark { cursor: pointer; outline: none; }
.chart .hit { fill: transparent; }
.chart .hit:hover, .chart .hit:focus-visible { fill: var(--ink); fill-opacity: .06; }
.chart .mark:focus-visible { stroke: var(--accent); stroke-width: 2; }
.chart g.mark:hover > .shape, .chart .mark:hover + .shape { filter: brightness(1.15); }
.competency-profile text { fill: var(--accent); text-decoration: underline; }
.competency-profile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .chart .grow-y { transform-box: fill-box; transform-origin: bottom; animation: grow-y .7s var(--ease) both; }
  .chart .grow-x { transform-box: fill-box; transform-origin: left; animation: grow-x .7s var(--ease) both; }
  .chart .draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); animation: draw 1.1s var(--ease) .1s forwards; }
  .chart .fade { animation: fade .6s ease .35s both; }
}
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- tables ---------- */
details.table { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .9rem; }
/* A disclosure's marker is drawn, in the text's colour and stroke, not the browser's triangle. */
:is(details.table, .calendar-overdue, .wrap details:not([class])) > summary { list-style: none; }
:is(details.table, .calendar-overdue, .wrap details:not([class])) > summary::-webkit-details-marker { display: none; }
:is(details.table, .calendar-overdue, .wrap details:not([class])) > summary::before { content: ""; display: inline-block; width: .38em; height: .38em; margin: 0 .6em .12em .1em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .15s; }
:is(details.table, .calendar-overdue, .wrap details:not([class]))[open] > summary::before { transform: rotate(45deg); margin-bottom: .25em; }
details.table summary { cursor: pointer; font: 500 13px/1.4 var(--label); color: var(--ink-2); width: max-content; }
details.table summary:hover { color: var(--accent); }
.table-scroll { overflow-x: auto; margin-top: .7rem; }
table.data { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.data th, table.data td { text-align: left; padding: .5rem .9rem .5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--ink-2); font: 500 12.5px/1.3 var(--label); white-space: nowrap; position: sticky; top: 0; background: var(--surface); border-bottom-color: var(--ink-3); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data a { color: var(--ink); text-decoration-color: var(--line-2); }
table.data a:hover { color: var(--accent); text-decoration-color: var(--accent); }
/* raw source tables (wide) */
.raw-scroll { overflow: auto; max-height: 75dvh; border: 1px solid var(--line-2); background: var(--surface); }
.raw-scroll table.data th, .raw-scroll table.data td { padding: .45rem .8rem; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
/* the state of a source, in the source overview */
.chip { display: inline-flex; align-items: center; padding: .08rem .5rem; border-radius: var(--r-sm); font: 600 12.5px/1.4 var(--label); background: var(--tone-soft); color: var(--tone-ink); }
.bars-inline { display: flex; height: 8px; overflow: hidden; background: var(--surface-3); min-width: 140px; }
.bars-inline span { display: block; height: 100%; }
/* scorecard tables (HTML charts) */
table.score td, table.score th[scope="row"] { vertical-align: middle; padding-top: .7rem; padding-bottom: .7rem; }
table.score th[scope="row"] { color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom-color: var(--line); }
table.score td.muted, table.score .muted-row td { color: var(--ink-3); font-size: 13px; }
table.score .muted-row th { color: var(--ink-3); }
table.score tr.focus { background: var(--bad-soft); }
table.score tr.focus th[scope="row"] { background: none; }   /* the row's tint, once */
table.score [data-tip] { cursor: pointer; }
table.score span[data-tip] { text-decoration: underline dotted var(--ink-3); text-underline-offset: 3px; }
.cellbar { display: grid; grid-template-columns: 3.4em minmax(60px, 1fr); align-items: center; gap: .6rem; min-width: 150px; }
.cellbar .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.cellbar .track { display: block; height: 8px; background: var(--surface-3); overflow: hidden; }
.cellbar .track i { display: block; height: 100%; }
td[data-tip]:hover .v, td[data-tip]:focus-visible .v { color: var(--accent); }

/* ---------- notices ---------- */
/* What the reader must know before the numbers: a full border and a tint in
   the tone's colour, never a bar down one side (Peder, 24 Sep 2026). */
.notice { margin-block: 0 1rem; border: 1px solid var(--tone, var(--line-2)); border-radius: var(--r-sm); padding: .65rem .9rem; color: var(--ink); background: var(--tone-soft, var(--surface-2)); font-size: 14px; max-width: none; }
.notice a { color: inherit; font-weight: 600; }
.board-notice { margin-bottom: 1.2rem; }
.panel .notice { margin: 1rem 0 0; }
/* What the data does not cover, on the report drafts: said in plain words, not boxed. */
.review-gap { margin: .7rem 0 0; color: var(--ink-2); font-size: 14px; max-width: 86ch; }
.review-section .panel-head { margin-bottom: .3rem; }
.section-title { margin: 1.8rem 0 .7rem; }   /* a standard's name above its points on /barekraft */

/* ---------- wall picker (/skjerm/velg) ---------- */
/* Six slots in the order the wall shows them, then the link. Without
   JavaScript the slots are read only and the list under them is a plain form;
   with it the list opens in a sheet (client.js). */
.picker-intro { margin: 0 0 .4rem; color: var(--ink-2); }
.picker-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .9rem 0 .5rem; }
@media (max-width: 900px) { .picker-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .picker-slots { grid-template-columns: minmax(0, 1fr); } }
.picker-slot { display: flex; flex-direction: column; gap: .55rem; min-width: 0; padding: .7rem .85rem .8rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); }
.picker-slot.is-free { border-style: dashed; background: transparent; align-items: flex-start; }
.picker-slot-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.9rem; }
.picker-position { font: 600 12.5px/1.3 var(--label); color: var(--ink-3); }
.picker-moves { display: flex; gap: .25rem; }
.picker-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.picker-free-note { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.picker-feedback { min-height: 1.5em; margin: .3rem 0 0; font-size: 13.5px; color: var(--ink-2); }
.picker-finish { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.picker-finish .panel-note { margin: .7rem 0 0; }
.picker-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.btn.picker-open { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.picker-open[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.picker-url { display: block; width: 100%; margin-top: .6rem; padding: .45rem .6rem; font: 13px/1.4 var(--mono); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.picker-copy-status { min-height: 1.4em; margin: .35rem 0 0; font-size: 13px; color: var(--ink-2); }
.picker-reset { display: inline-block; margin-top: .9rem; font-size: 13px; color: var(--ink-2); }
[data-picker-fallback] { margin-top: 1.4rem; }
[data-picker-fallback] .picker-actions { margin-top: 1.2rem; }
.pick-group + .pick-group { margin-top: 1.8rem; }
.pick-group > h3 { font: 600 13.5px/1.3 var(--label); color: var(--ink-2); margin-bottom: .6rem; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .5rem; }
.pick {
  display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .85rem; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); transition: border-color .15s;
}
.pick:hover { border-color: var(--ink-3); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pick input { margin-top: .2rem; flex: none; }
.pick-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pick-label { font: 400 13px/1.3 var(--label); color: var(--ink-2); }
.pick-value { font: 600 1.35rem/1.15 var(--figure); font-variant-numeric: tabular-nums; color: var(--ink); }
.pick-value .state { margin: 0 0 0 .55rem; }
.pick-sub { font: 400 12.5px/1.3 var(--label); color: var(--ink-3); }
.pick-origin { font: 400 12px/1.3 var(--label); color: var(--ink-3); margin-top: .2rem; }
/* The same card as a button in the picker sheet. */
button.pick { width: 100%; font: inherit; color: inherit; text-align: left; }
button.pick:hover:not(:disabled) { border-color: var(--accent); }
button.pick:disabled { cursor: default; opacity: .6; }
.pick-where { margin-left: auto; flex: none; font: 400 12px/1.3 var(--label); color: var(--ink-3); white-space: nowrap; }
.picker-sheet .picks { grid-template-columns: minmax(0, 1fr); margin-bottom: 1.2rem; }

/* ---------- sign-in pages and the sign-in list ---------- */
/* src/pages/signin.js and src/pages/admin.js */
.auth { max-width: 34rem; margin: 10vh auto; padding: 0 1rem; display: flex; flex-direction: column; gap: 1.4rem; }
.auth-brand { color: var(--ink); }
.auth-brand .brand-sub { color: var(--ink-3); }
.auth .panel { border: 1px solid var(--line-2); padding: 1.4rem 1.5rem 1.5rem; }
.auth .btn { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }   /* the page's one action */
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; }
.form-row label { flex-basis: 100%; color: var(--ink-2); font-size: 14px; }
.field { padding: .5rem .7rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); min-width: min(22rem, 100%); }
.field::placeholder { color: var(--ink-3); opacity: 1; }
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
form.inline { display: inline; }
.field-small { min-width: 0; padding: .28rem .5rem; font-size: 12.5px; }
/* The roles on /admin: one line per role, the name in front. */
.roles { margin: 0; display: grid; gap: .4rem; }
.roles div { display: grid; grid-template-columns: 8rem 1fr; gap: .6rem; }
.roles dt { font-weight: 600; }
.roles dd { margin: 0; color: var(--ink-2); }

/* ---------- AI export ---------- */
.steps { margin: .8rem 0 1.4rem; padding-left: 1.3rem; color: var(--ink-2); max-width: 74ch; }
.steps li { margin: .5rem 0; }
.steps li::marker { color: var(--ink-3); }
.prompt {
  margin: .6rem 0 0; padding: 1rem 1.2rem; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: 13.5px/1.6 var(--mono); color: var(--ink-2);
}
code { font: .92em/1.5 var(--mono); background: var(--surface-3); padding: .1em .35em; border-radius: var(--r-sm); }

/* ---------- tooltip and side sheet ---------- */
#tip {
  position: fixed; z-index: var(--z-tip); pointer-events: none; max-width: 320px;
  background: var(--surface); border: 1px solid var(--ink-3); border-radius: var(--r-sm);
  padding: .6rem .75rem; font-size: 13px; box-shadow: var(--float);
}
#tip .tt { font-weight: 600; margin-bottom: .3rem; }
#tip .tx { max-width: 34ch; color: var(--ink-2); line-height: 1.45; margin-bottom: .2rem; }
#tip .tr { display: flex; justify-content: space-between; gap: 1.4rem; line-height: 1.55; }
#tip .tr span:first-child { color: var(--ink-3); }
#tip .tr span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
#tip .th { color: var(--accent); font: 500 12.5px/1.3 var(--label); margin-top: .45rem; }
/* A side sheet: the drill-down drawer and the wall picker's list. */
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer); width: min(460px, 100vw);
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; max-width: 100vw;
  background: var(--surface); color: var(--ink); border: 0; border-left: 1px solid var(--ink-3);
  padding: 1.4rem 1.4rem 2rem; overflow-y: auto; box-shadow: var(--float);
}
.sheet::backdrop { background: rgba(0, 0, 0, .4); }
@media (prefers-reduced-motion: no-preference) { .sheet:not([hidden]) { animation: slide-in .25s var(--ease); } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.sheet h3 { margin: 0 0 .3rem; font-size: 1.125rem; }
.sheet .dsub { color: var(--ink-3); font-size: 13px; margin-bottom: 1.1rem; }
.sheet h4 { margin: .4rem 0 .2rem; font: 600 13px/1.3 var(--label); color: var(--ink-2); }
#drill ol { list-style: none; padding: 0; margin: 0 0 1.2rem; }
#drill li { padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: 14px; }
#drill li a { color: var(--ink); text-decoration-color: var(--line-2); }
#drill li a:hover { color: var(--accent); text-decoration-color: var(--accent); }
#drill li .dm { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: .15rem; }
/* Sticky, so "Lukk" stays in view while the list scrolls. */
.sheet .close { position: sticky; top: 0; float: right; z-index: 1; margin: -.3rem -.3rem .4rem 1rem; background: var(--surface); }

.skip-link { position: fixed; top: -60px; left: 1rem; z-index: 60; background: var(--surface); color: var(--ink); padding: .75rem; border: 1px solid var(--ink); }
.skip-link:focus { top: 1rem; }
.mobile-chart-hint { display: none; color: var(--ink-3); font-size: 12.5px; margin: 0 0 .7rem; }
@media (max-width: 650px) { .mobile-chart-hint { display: block; } }
@media (max-width: 560px) {
  .kpi { flex-basis: 40%; }
  .kpi-value { font-size: 2.1rem; }
  .explain { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- deadline calendar (private) ---------- */
/* Narrow screens get the same content as a day agenda. */
.calendar-toolbar, .calendar-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1.2rem 0; }
.calendar-toolbar h2 { margin: 0 auto; text-transform: capitalize; }
.calendar-filters [aria-current] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line-2); border-bottom: 0; border-right: 0; background: var(--surface); }
.calendar-weekdays { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface-2); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.calendar-weekdays span { padding: .5rem .65rem; font: 500 12.5px/1.3 var(--label); color: var(--ink-2); }
.calendar-day, .calendar-blank { min-height: 124px; padding: .55rem .6rem; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); min-width: 0; }
.calendar-blank { background: var(--surface-2); }
.calendar-day h3 { display: flex; gap: .4rem; align-items: baseline; margin: 0 0 .5rem; font: 600 15px/1.2 var(--figure); }
.calendar-day h3 > span { display: none; }
.calendar-day h3 small { font: 600 12px/1.2 var(--label); color: var(--accent); }
.calendar-today { box-shadow: inset 0 0 0 2px var(--accent); }
.calendar-day ul { list-style: none; padding: 0; margin: 0; }
.calendar-event { --kind: var(--accent); padding: .35rem 0 .4rem; border-top: 1px solid var(--line); overflow-wrap: break-word; hyphens: auto; font-size: 12.5px; line-height: 1.35; }
.calendar-document { --kind: var(--c2); }
.calendar-competency { --kind: var(--c3); }
.calendar-kind::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .4em; background: var(--kind); }
.calendar-event > span, .calendar-event > a, .calendar-event > small { display: block; }
.calendar-kind, .calendar-event > small { color: var(--ink-2); font: 500 12px/1.3 var(--label); }
.calendar-kind { margin-bottom: .15rem; }
.calendar-overdue, .calendar-coverage { margin-top: 2rem; }
.calendar-overdue summary { cursor: pointer; font-weight: 600; }
.calendar-overdue ul { padding: 0; list-style: none; }
.calendar-overdue li { display: flex; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.calendar-overdue time { flex: 0 0 8rem; color: var(--ink-2); }
.calendar-coverage { color: var(--ink-2); font-size: 14px; }
@media (max-width: 800px) {
  .calendar-grid { display: block; }
  .calendar-weekdays, .calendar-blank, .calendar-empty { display: none; }
  .calendar-day { min-height: 0; padding: .9rem; }
  .calendar-day h3 > span { display: inline; }
  .calendar-toolbar h2 { order: -1; width: 100%; }
  .calendar-overdue li { display: block; }
  .calendar-overdue time { display: block; }
}

/* ---------- wall view (/skjerm) ----------
   A fixed 1920x1080 stage, scaled to the screen by src/ui/wall.js. Sizes are
   in px on purpose: the stage never reflows, it only scales. */
body.wall-body { overflow: hidden; }
.wall {
  position: fixed; top: 0; left: 0; width: 1920px; height: 1080px; transform-origin: 0 0;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 20px; padding: 0 36px 32px;
}
.w-head {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  margin: 0 -36px; padding: 18px 36px; background: var(--side-bg); color: var(--side-ink);
}
.w-brand { display: flex; align-items: baseline; gap: 20px; }
.w-brand span { font: 600 32px/1 var(--heading); }
.w-brand .w-what { font-weight: 400; color: var(--side-ink-2); }
.w-status { display: flex; align-items: center; gap: 28px; font: 400 20px/1.2 var(--label); color: var(--side-ink-2); font-variant-numeric: tabular-nums; }
.w-alert { color: #ffb4a8; font-weight: 600; }
.w-by { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.w-by .logo { width: 96px; height: auto; display: block; }
/* The way back from the wall: small and quiet, since the screen is for reading. */
.w-back { font-size: 14px; color: var(--side-ink-3); text-decoration: none; padding: .3rem .7rem; border: 1px solid var(--side-line); border-radius: var(--r-sm); }
.w-back:hover, .w-back:focus-visible { color: var(--side-ink); border-color: var(--side-ink-2); }
.w-kpis { display: grid; grid-template-columns: repeat(var(--w-kpi-count, 6), minmax(0, 1fr)); }
.w-kpi { position: relative; background: var(--surface); padding: 16px 24px 18px; display: flex; flex-direction: column; min-width: 0; }
.w-kpi .state { font-size: 17px; }
.w-kpi-label { font: 500 20px/1.25 var(--label); color: var(--ink-2); }
.w-kpi-value { margin-top: auto; padding-top: 6px; font: 600 76px/1 var(--figure); font-variant-numeric: tabular-nums; color: var(--ink); }
.w-kpi-value small { font-size: 26px; font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.w-kpi-sub { margin-top: 4px; font: 400 18px/1.3 var(--label); color: var(--ink-2); }
.w-kpi-sub b { color: var(--tone-ink); font-weight: 600; }
.w-board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: 0; }
.w-panel { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; min-height: 0; overflow: hidden; background: var(--surface); padding: 18px 26px 18px; }
.w-span-4 { grid-column: span 4; } .w-span-6 { grid-column: span 6; } .w-span-8 { grid-column: span 8; } .w-span-12 { grid-column: span 12; }
.w-panel.rows-2 { grid-row: span 2; }
.w-panel h2 { font: 600 20px/1.2 var(--label); color: var(--ink-2); }
.w-answer { margin: 0; font: 500 22px/1.32 var(--sans); color: var(--ink); text-wrap: pretty; }
.w-answer .state { font-size: 17px; vertical-align: .12em; }
.w-figure { display: flex; flex-direction: column; min-height: 0; padding-top: 4px; }
.w-figure .chart-scroll { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 0; }
.w-figure .chart { width: 100%; height: 100%; min-width: 0; }
.w-figure .legend { flex: none; font-size: 16px; margin-top: 8px; }
.w-figure .hit, .w-figure .mark { cursor: default; }

@media print {
  .side, .topbar, #tip, .sheet, .fact-fresh a, .skip-link { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .main { padding: 0; }
  .review-section { break-inside: avoid; }
}

/* =====================================================================
   LOOK A · «Tegningen», the drawing sheet
   Type, palette and density from the technical drawing. The page is one
   framed sheet on a desk; sections are ruled, not boxed; the page's facts
   are the title block (tegningshode) at the head of the sheet; state is a
   stamp; a chart's ordinary marks are hatched and its point is solid.
   Barlow, Barlow Semi Condensed and Barlow Condensed (SIL OFL, fonts/).
   ===================================================================== */
@font-face { font-family: "Barlow"; src: url("fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semi-condensed-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semi-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:where(:root:not([data-look="c"])) {
  --sans: "Barlow", "Segoe UI", system-ui, sans-serif;
  --heading: var(--sans);
  --label: "Barlow Semi Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  --figure: "Barlow Condensed", "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --r-sm: 2px;
  --side-w: 236px;

  --bg: light-dark(#e4e9ef, #070f1c);            /* the desk */
  --surface: light-dark(#fafcfd, #0e1a2c);       /* the sheet */
  --surface-2: light-dark(#eef2f6, #14233a);
  --surface-3: light-dark(#e2e8ef, #1b2e4a);
  --ink: light-dark(#0e1b2c, #e8eef6);
  --ink-2: light-dark(#40506a, #b6c2d3);
  --ink-3: light-dark(#56647a, #8a9ab0);
  --line: light-dark(rgba(14, 27, 44, .13), rgba(232, 238, 246, .12));
  --line-2: light-dark(rgba(14, 27, 44, .28), rgba(232, 238, 246, .26));
  --frame: light-dark(#40506a, #7186a3);         /* the sheet's frame and the title block's rules */
  --rule: color-mix(in srgb, var(--ink) 27%, var(--surface));   /* --line-2 on the sheet, opaque: rules that meet are drawn at one weight */
  --accent: light-dark(#1257c9, #6aa5ff);
  --accent-soft: light-dark(rgba(18, 87, 201, .09), rgba(106, 165, 255, .14));
  --accent-ink: light-dark(#ffffff, #070f1c);
  --mark: light-dark(#a3aebd, #5a6a82);
  --mark-2: light-dark(#d2d9e2, #2e3f59);
  --bad: light-dark(#c22f1d, #ff7a66);   --bad-soft: light-dark(rgba(194, 47, 29, .07), rgba(255, 122, 102, .13));   --bad-ink: var(--bad);
  --warn: light-dark(#9a6200, #e6a53a);  --warn-soft: light-dark(rgba(154, 98, 0, .08), rgba(230, 165, 58, .12));    --warn-ink: var(--warn);
  --good: light-dark(#0f7a4d, #44c48a);  --good-soft: light-dark(rgba(15, 122, 77, .08), rgba(68, 196, 138, .12));   --good-ink: var(--good);
  /* Categorical: drawing blue, plum and teal first. */
  --c1: light-dark(#1c5bc0, #6ea3f2);
  --c2: light-dark(#a8437f, #d67fb4);
  --c3: light-dark(#0f8590, #3fb5bf);
  --c4: light-dark(#6b4fb8, #a593ea);
  --c5: light-dark(#7a8a1c, #b3c24f);
  --c6: light-dark(#c7742a, #e39a55);
  --c7: light-dark(#4f6480, #93a4bd);
  --c8: light-dark(#d16a8f, #ea94b1);
  --c-other: var(--mark);
  /* The shell: Prussian blue. */
  --side-bg: light-dark(#0f2f5c, #0b2447);
  --side-ink: #ffffff;
  --side-ink-2: rgba(255, 255, 255, .86);
  --side-ink-3: rgba(255, 255, 255, .68);
  --side-hover: rgba(255, 255, 255, .10);
  --side-line: rgba(255, 255, 255, .22);

  ::selection { background: light-dark(rgba(18, 87, 201, .22), rgba(106, 165, 255, .32)); }

  /* shell: the chosen page and the chosen view are the same ruled cell */
  .nav a, .view-switch a { margin-inline: .55rem; padding-inline: .55rem; border: 1px solid transparent; }
  .nav a[aria-current="page"], .view-switch a[aria-current="true"] { border-color: var(--side-ink-2); background: var(--side-hover); }
  .nav-group > span, .view-switch > span, .look-pick > span, .brand-sub { letter-spacing: .08em; text-transform: uppercase; }
  .brand-name { font-family: var(--label); }

  /* the sheet: one frame, everything inside ruled to it */
  .wrap { background: var(--surface); border: 1px solid var(--frame); padding: 0 var(--gutter) 1.5rem; }
  .wrap > .page-head, .wrap > .kpis, .wrap > .board, .wrap > .panel, .wrap > :is(div, form):not(.board) > .kpis, .wrap > :is(div, form):not(.board) > .panel { margin-inline: calc(-1 * var(--gutter)); }
  .wrap > .notice:first-of-type, .page-head + :not(.kpis, .board, .panel, .notice) { margin-top: 1.1rem; }
  /* What opens a page under the title block meets its rule, with no second rule of its own. */
  .page-head + :is(div, form):has(> .panel:first-child, > .kpis:first-child, > input[type="hidden"]:first-child + .panel) { margin-top: 0; }
  .page-head + :is(div, form) > :is(.panel:first-child, input[type="hidden"]:first-child + .panel) { border-top: 0; }

  /* the title block */
  .page-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); border-bottom: 1px solid var(--frame); margin-bottom: 0; }
  .page-title { padding: 1.1rem var(--gutter) 1rem; align-self: end; }
  .page-title p:not([class]) { font-size: 14.5px; }
  .facts { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line-2); border-left: 1px solid var(--frame); }
  .fact { flex: 1 1 30%; min-width: 0; padding: .4rem .65rem .45rem; background: var(--surface); }
  .fact-view, .fact-note { flex: 2 1 42%; }
  .fact-access { flex: 1 1 16%; }
  .fact dt { letter-spacing: .07em; text-transform: uppercase; }
  .fact dd { margin-top: 1px; font: 500 14.5px/1.3 var(--sans); }
  .fact-view dd span { display: block; font: 400 12.5px/1.35 var(--label); }
  .fact-fresh a { font: 500 13px/1 var(--label); }
  .fact-note dd { font: 400 12.5px/1.35 var(--label); color: var(--ink-2); }
  .fact-note { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
  .fact-note.tone-warn { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
  @media (max-width: 1180px) {
    .page-head { grid-template-columns: minmax(0, 1fr); }
    .facts { border-left: 0; border-top: 1px solid var(--frame); }
  }
  @media (max-width: 560px) {
    .fact, .fact-access { flex-basis: 45%; }
    .fact-view, .fact-note { flex-basis: 100%; }
    .fact-owner dd, .fact-date dd { white-space: normal; }
  }

  /* state is a stamp: an outlined word, the way a drawing is marked */
  .state { padding: 1px 6px 0; border: 1.5px solid currentColor; border-radius: 1px; letter-spacing: .07em; text-transform: uppercase; vertical-align: .1em; }
  .state-good { padding: 0; border: 0; }
  /* The same in a table cell. Who a page is for is no state, so that tag is
     a grey field and never an outline. */
  .chip { padding: 0; background: none; letter-spacing: .07em; text-transform: uppercase; font-size: 12px; }
  .chip:is(.tone-warn, .tone-bad) { padding: 1px 6px 0; border: 1.5px solid currentColor; border-radius: 1px; }
  .tag { border: 0; background: var(--surface-3); color: var(--ink-2); }
  .tag-private { border: 1.5px solid var(--warn-ink); background: none; color: var(--warn-ink); }
  .fact-access.is-private { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
  .pick-value.tone-bad { color: var(--bad-ink); }

  /* KPI row: ruled cells; what needs someone has a top rule, a tint and its stamp */
  .kpis { gap: 1px; background: var(--line-2); border-bottom: 1px solid var(--frame); margin-bottom: 0; }
  /* Under an answer the row is closed above too, so its cell rules end on a rule. */
  .answer + :is(div, form) > .kpis:first-child { border-top: 1px solid var(--frame); }
  .kpi { border-top: 4px solid transparent; padding-top: .6rem; }
  .kpi.tone-bad, .kpi.tone-warn { border-top-color: var(--tone); }
  /* The tint marks the exception: with three or more cells that need someone
     the row keeps its rules and stamps and drops the tint (as C's plates). */
  .kpis:not(:has(> :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn))) > .kpi:is(.tone-bad, .tone-warn) { background: color-mix(in srgb, var(--tone) 7%, var(--surface)); }
  .kpi .state { position: absolute; top: .55rem; right: .7rem; margin: 0; background: var(--surface); }
  .kpi:has(.state) .kpi-label { padding-right: 5.2rem; }
  /* Six tiles or more are too narrow for a label beside its stamp. */
  .kpis:has(> .kpi:nth-child(6)) .kpi .state { position: static; align-self: flex-start; margin: 0 0 .3rem; }
  .kpis:has(> .kpi:nth-child(6)) .kpi:has(.state) .kpi-label { padding-right: 0; }
  @media (max-width: 560px) {
    .kpi .state { position: static; align-self: flex-start; margin: 0 0 .3rem; }
    .kpi:has(.state) .kpi-label { padding-right: 0; }
  }
  .kpi.tone-bad .kpi-value { color: var(--bad-ink); }
  a.kpi:hover, button.kpi:hover { background: color-mix(in srgb, var(--tone, var(--ink)) 9%, var(--surface)); }

  /* sections of the sheet: ruled, never boxed */
  .panel { background: none; }
  .wrap > .panel, .wrap > :is(div, form):not(.board) > .panel { border-top: 1px solid var(--line-2); }
  .wrap > .kpis + .panel, .wrap > .page-head + .panel, .wrap > .board + .panel, .wrap > :is(div, form):not(.board) > .kpis + .panel { border-top: 0; }
  .wrap > .panel:last-child { padding-bottom: 0; }
  .board { gap: 1px; overflow: hidden; border-bottom: 1px solid var(--rule); }
  .board > .panel { box-shadow: 0 0 0 1px var(--rule); }
  /* The catalogue: each topic is a band of the sheet, its analyses ruled cells to the frame. */
  .catalog-group { margin: 0 calc(-1 * var(--gutter)); border-top: 1px solid var(--frame); }
  .page-head + .catalog-group { margin-top: 0; border-top: 0; }
  .catalog-group > h2 { margin: 0; padding: .8rem var(--gutter) .7rem; }
  .catalog { gap: 1px; overflow: hidden; border-top: 1px solid var(--rule); }
  .catalog > .panel { box-shadow: 0 0 0 1px var(--rule); padding: .9rem var(--gutter) 1rem; }
  .catalog a:focus-visible { outline-offset: -2px; }
  .wrap:has(> .catalog-group:last-child) { padding-bottom: 0; }
  /* The wall picker's six places: one ruled grid, a free place left blank. */
  .picker-slots { gap: 1px; overflow: hidden; border: 1px solid var(--rule); }
  .picker-slot, .picker-slot.is-free { border: 0; border-radius: 0; background: none; box-shadow: 0 0 0 1px var(--rule); }
  .picker-slot.is-free { background: var(--surface-2); }
  /* A raw table is part of the sheet: it runs to the frame and starts on the title's margin. */
  .wrap > .raw-scroll { margin-inline: calc(-1 * var(--gutter)); border: 0; border-block: 1px solid var(--rule); background: none; }
  .page-head + .raw-scroll { margin-top: 0; border-top: 0; }
  .wrap > .raw-scroll table.data :is(th, td):first-child { padding-left: var(--gutter); }
  .wrap:has(> .raw-scroll:last-child) { padding-bottom: 0; }
  .wrap > .raw-scroll:last-child { border-bottom: 0; }
  .insights li a { border-bottom-color: var(--line); }
  .section-title { padding-top: 1rem; border-top: 1px solid var(--frame); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .page-head + .section-title { margin-top: 0; border-top: 0; }

  /* charts: the point is solid, the rest is hatched like a section cut */
  .chart .base { stroke: var(--ink); }
  .hatch-ground { fill: var(--surface); }
  .hatch-line { stroke: var(--ink-3); stroke-width: 1; stroke-opacity: .7; }
  .hatch-line-2 { stroke-opacity: .5; }
  .chart [fill="var(--mark)"] { fill: url(#hatch); stroke: var(--ink-3); stroke-width: .8; }
  .chart path[fill="var(--mark)"][fill-opacity] { stroke: none; }   /* the faint area under a line is no mark: no outline down to the baseline */
  .chart [fill="var(--mark-2)"] { fill: url(#hatch-2); stroke: var(--ink-3); stroke-width: .6; stroke-opacity: .7; }
  /* A label on a hatched mark has the sheet behind it. */
  .chart [fill="var(--mark)"] + text, .chart [fill="var(--mark-2)"] + text { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
  .key:is(.key-rect, .key-band)[style*="--mark)"] { background: repeating-linear-gradient(-45deg, var(--ink-3) 0 1px, var(--surface) 1px 3.5px); box-shadow: inset 0 0 0 1px var(--ink-3); }
  .key:is(.key-rect, .key-band)[style*="--mark-2)"] { background: repeating-linear-gradient(-45deg, var(--ink-3) 0 1px, var(--surface) 1px 5.6px); box-shadow: inset 0 0 0 1px var(--line-2); }

  table.data th { letter-spacing: .05em; text-transform: uppercase; font-size: 12px; }
  .auth .panel { border-color: var(--frame); background: var(--surface); }

  /* on paper every page is a whole framed sheet */
  @media print { .wrap { -webkit-box-decoration-break: clone; box-decoration-break: clone; } }

  /* the wall: the same sheet, at five metres */
  .wall { gap: 0; padding: 0 0 0; grid-template-rows: auto auto minmax(0, 1fr); }
  .w-head { margin: 0; }
  .w-kpis { gap: 1px; background: var(--line-2); border-bottom: 2px solid var(--frame); }
  .w-kpi { border-top: 8px solid transparent; }
  .w-kpi.tone-bad, .w-kpi.tone-warn { border-top-color: var(--tone); }
  .w-kpis:not(:has(> :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn))) > .w-kpi:is(.tone-bad, .tone-warn) { background: color-mix(in srgb, var(--tone) 8%, var(--surface)); }
  .w-kpi.tone-bad .w-kpi-value { color: var(--bad-ink); }
  .w-kpi .state { position: absolute; top: 14px; right: 18px; margin: 0; border-width: 2px; padding: 2px 9px 1px; background: var(--surface); }
  .w-kpi:has(.state) .w-kpi-label { padding-right: 120px; }
  .w-board { gap: 1px; overflow: hidden; background: var(--surface); }
  .w-panel { box-shadow: 0 0 0 1px var(--rule); }
  .w-answer .state { border-width: 2px; padding: 1px 8px 0; }
}

/* =====================================================================
   LOOK C · «HMS-tavla», the safety board
   Type, palette and density from the HSE board and its safety signs
   (ISO 7010 / ISO 3864). White work surfaces on a grey ground, an asphalt
   shell with the yellow marker, heavy narrow figures, and one signature:
   what needs someone stands on a sign plate, a filled field with a keyline
   set in from its edge. Only «Må tas» and «Følg med» get a plate.
   Archivo, one variable file with weight and width (SIL OFL, fonts/).
   ===================================================================== */
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:where(:root[data-look="c"]) {
  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --heading: var(--sans);
  --label: var(--sans);
  --figure: var(--sans);
  --r-sm: 2px;
  --r-plate: 4px;
  --side-w: 248px;

  --bg: light-dark(#e8e9e6, #121416);
  --surface: light-dark(#ffffff, #1b1e21);
  --surface-2: light-dark(#f4f5f3, #22262a);
  --surface-3: light-dark(#e3e5e2, #2b3035);
  --ink: light-dark(#15181a, #eef0f1);
  --ink-2: light-dark(#454b50, #b4bbc0);
  --ink-3: light-dark(#5d6368, #8f979d);
  --line: light-dark(#d9dbd8, #2f3438);
  --line-2: light-dark(#c3c6c3, #40464b);
  /* The sign colours are real fields, the same in light and dark. */
  --sign-green: #1b7f46;
  --sign-yellow: #f5c400;
  --sign-red: #c9281d;
  --sign-ink: #15181a;
  /* State: the fills are the sign colours; the -ink variants are text on a surface. */
  --good: light-dark(var(--sign-green), #3fb06f);  --good-soft: light-dark(#e3f1e8, rgba(63, 176, 111, .16));  --good-ink: light-dark(#17703d, #5cc489);
  --warn: light-dark(var(--sign-yellow), #f5c400); --warn-soft: light-dark(#fdf3cc, rgba(245, 196, 0, .14));   --warn-ink: light-dark(#7a5400, #f5c400);
  --bad: light-dark(var(--sign-red), #ef5a4c);     --bad-soft: light-dark(#f8e1df, rgba(239, 90, 76, .16));    --bad-ink: light-dark(#b3241a, #ff7d70);
  --accent: light-dark(#0b5cab, #5ea2ea);
  --accent-soft: light-dark(#e2ecf7, rgba(94, 162, 234, .16));
  --accent-ink: light-dark(#ffffff, #121416);
  --mark: light-dark(#b2b6b8, #555b60);
  --mark-2: light-dark(#dcdedc, #3a3f43);
  --c1: light-dark(#1d4e89, #6a9ad6);
  --c2: light-dark(#d9772b, #e48b45);
  --c3: light-dark(#7a4fa3, #a98ad0);
  --c4: light-dark(#2a8f8f, #4fb3b3);
  --c5: light-dark(#b0487a, #d47ba6);
  --c6: light-dark(#5f7d2a, #9db85a);
  --c7: light-dark(#6b7480, #9aa3ae);
  --c8: light-dark(#a05a2c, #c98a5c);
  --c-other: var(--mark);
  /* The shell: asphalt, with the yellow marker. */
  --side-bg: light-dark(#1f2326, #0b0d0e);
  --side-ink: #ffffff;
  --side-ink-2: #d3d7da;
  --side-ink-3: #a3aaaf;
  --side-hover: rgba(255, 255, 255, .08);
  --side-line: rgba(255, 255, 255, .14);
  --on-warn: var(--sign-ink);                      /* ink on the warning fill: sign yellow takes black */
  --sea: light-dark(#e6ebee, #171b1e);

  ::selection { background: var(--sign-yellow); color: var(--sign-ink); }
  body { font-size: 15px; }

  /* shell: the yellow marker says where you are, page and view alike */
  .brand-name { font: 750 23px/1.05 var(--heading); font-stretch: 82%; }
  .nav-group > span, .view-switch > span, .look-pick > span { font-weight: 600; }
  .nav a, .view-switch a { font-weight: 400; font-size: 14px; }
  .nav a[aria-current="page"] { font-weight: 650; background: rgba(255, 255, 255, .09); box-shadow: inset 5px 0 0 var(--sign-yellow); }
  /* One yellow marker in the shell, the page; the chosen view is a white field. */
  .view-switch a { margin-inline: .7rem; padding-inline: .5rem; border-radius: var(--r-sm); }
  .view-switch a[aria-current="true"] { font-weight: 650; background: var(--side-ink); color: var(--side-bg); }

  @media screen and (min-width: 901px) { .main { padding-top: 1.75rem; } }
  .wrap { max-width: 1220px; }

  /* page head: a sign's heading, then the facts as one ruled strip */
  .page-head { margin-bottom: 1.25rem; }
  h1 { font: 800 2.75rem/1 var(--heading); font-stretch: 78%; }
  h2 { font: 750 1.375rem/1.12 var(--heading); font-stretch: 82%; }
  h3 { font: 700 1.0625rem/1.2 var(--heading); font-stretch: 88%; }
  .page-title p:not([class]) { font-size: 15.5px; }
  .facts { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; margin-top: 1rem; padding: .6rem 0 .55rem; border-block: 1px solid var(--line-2); font-size: 13px; line-height: 1.45; }
  .fact { display: flex; gap: .45rem; align-items: baseline; min-width: 0; }
  .fact dt { font: 650 13px/1.45 var(--sans); color: var(--ink); white-space: nowrap; }
  .fact dd { color: var(--ink-2); }
  .fact-view, .fact-note { flex-basis: 100%; }
  .fact-view dd span::before { content: "· "; }
  .fact-fresh a { font-weight: 600; }

  /* the state plate */
  .state { --plate: var(--sign-red); --plate-ink: #ffffff;
    padding: 5px 10px; border-radius: var(--r-plate); background: var(--plate); color: var(--plate-ink);
    outline: 1.5px solid var(--plate-ink); outline-offset: -3.5px;
    font: 700 13px/1.1 var(--sans); font-stretch: 86%; letter-spacing: .015em; vertical-align: .08em; }
  .state-warn { --plate: var(--sign-yellow); --plate-ink: var(--sign-ink); }
  .state-good { padding: 0; background: none; outline: 0; color: var(--good-ink); font-size: 13.5px; }
  /* The same in a table cell, without the keyline: too small to carry one. */
  .chip { border-radius: var(--r-plate); font-weight: 700; font-stretch: 86%; }
  .chip.tone-good { padding: 0; background: none; }
  .chip.tone-warn { background: var(--sign-yellow); color: var(--sign-ink); }
  .chip.tone-bad { background: var(--sign-red); color: #ffffff; }

  /* KPI row: separate tiles. On the dashboard, where each tile is a link to
     its analysis, a number that needs someone is a whole plate, while no
     more than two of the row do: a sign works by being the exception. With
     three or more, and on an analysis' own page, every tile stays white and
     carries the small plate, so the row never becomes a wall of signs. */
  .kpis { gap: 10px; margin-bottom: 1.5rem; }
  .kpi { border-radius: var(--r-sm); padding: .95rem 1.15rem 1.05rem; }
  .kpi-value { font: 800 3.25rem/.95 var(--figure); font-stretch: 76%; padding-top: .55rem; }
  .kpi-sub { color: var(--ink-2); }
  @media (max-width: 560px) { .kpi-value { font-size: 2.5rem; } }
  .kpi .state { align-self: flex-start; margin: 0 0 .5rem; }
  .kpis:not(:has(> :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn))) > a.kpi:is(.tone-bad, .tone-warn) {
    --plate: var(--sign-red); --plate-ink: #ffffff;
    background: var(--plate); color: var(--plate-ink); border-radius: var(--r-plate); outline: 2px solid var(--plate-ink); outline-offset: -6px; padding: 1.05rem 1.3rem 1.1rem;
    &.tone-warn { --plate: var(--sign-yellow); --plate-ink: var(--sign-ink); }
    :is(.kpi-label, .kpi-value, .kpi-value small, .kpi-sub, .kpi-sub b) { color: var(--plate-ink); }
    .state { padding: 0; margin: 0 0 .3rem; background: none; outline: 0; color: var(--plate-ink); font: 750 13px/1 var(--sans); font-stretch: 84%; }
    .spark :is(path, circle)[fill^="var"] { fill: var(--plate-ink); }
    .spark path[stroke] { stroke: var(--plate-ink); }
    &:hover { background: color-mix(in srgb, var(--plate) 90%, #000); }
    &:focus-visible { outline-color: var(--plate-ink); box-shadow: 0 0 0 3px var(--accent); }
  }

  /* white work surfaces on the ground */
  .panel { border-radius: var(--r-sm); padding: 1.2rem 1.5rem 1.3rem; }
  .panel + .panel, .wrap > :is(div, form):not(.board) > .panel, .kpis + .panel, .section-title + .panel { margin-top: 14px; }
  .board, .catalog { gap: 14px; }
  .board > .panel, .catalog > .panel { margin-top: 0; }
  .board + .panel { margin-top: 14px; }
  .panel-head { padding-bottom: .65rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line); }
  .card .panel-head { margin-bottom: .45rem; }
  .card .card-answer { font-size: 15.5px; max-width: 66ch; }
  .card-answer .state, .answer .state { margin-right: .6em; }
  .analysis-link { color: var(--ink-2); }
  .analysis-link:hover { color: var(--accent); }
  .insights li a { padding: .8rem 0 .85rem; }
  .catalog > .panel { padding: 1rem 1.15rem 1.1rem; }

  /* charts: plain marks; yellow takes the sign's black ink */
  .ico { stroke-width: 2; }
  .chart .val { font-weight: 650; }
  .chart .val-lg { font-weight: 800; font-stretch: 80%; }
  .chart [fill="var(--warn)"] + text { --accent-ink: var(--on-warn); }
  .explain h2 { font-size: 1.0625rem; font-stretch: 88%; }

  .seg.on, .calendar-filters [aria-current] { font-weight: 650; }
  table.data th { font-weight: 650; }
  /* «Privat» is a hazard label, yellow on black: never the «Følg med» plate's black on yellow. */
  .tag-private, .facts .fact-access.is-private dd { border: 1px solid var(--sign-yellow); border-radius: var(--r-sm); background: var(--sign-ink); color: var(--sign-yellow); font-weight: 700; }
  .facts .fact-access.is-private dd { padding: 0 .4rem; }

  /* A tint is no sign: the scorecard row the sentence names is ruled above and below in ink, its name set heavier. */
  table.score tr.focus { background: none; }
  table.score tr.focus > :is(th, td) { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
  table.score tr.focus th[scope="row"] { font-weight: 750; font-stretch: 88%; }

  /* The wall picker's six places: ruled cells of their panel, never boxes in a box. */
  .picker-slots { gap: 1px; overflow: hidden; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); }
  .picker-slot, .picker-slot.is-free { border: 0; border-radius: 0; background: var(--surface); }
  .picker-slot.is-free { background: var(--surface-2); }
  .pick-value { font: 800 1.75rem/1 var(--figure); font-stretch: 76%; }

  /* the wall: the board itself */
  .w-brand span { font: 800 36px/1 var(--heading); font-stretch: 80%; }
  .w-brand .w-what { font-weight: 500; }
  .w-kpis, .w-board { gap: 14px; }
  .w-kpi, .w-panel { border-radius: var(--r-sm); }
  .w-kpi-value { font: 800 84px/.95 var(--figure); font-stretch: 76%; }
  .w-kpi .state { align-self: flex-start; margin: 0 0 8px; padding: 6px 13px; outline-width: 2px; outline-offset: -4.5px; border-radius: 5px; font-size: 18px; }
  .w-kpis:not(:has(> :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn) ~ :is(.tone-bad, .tone-warn))) > .w-kpi:is(.tone-bad, .tone-warn) {
    --plate: var(--sign-red); --plate-ink: #ffffff;
    background: var(--plate); border-radius: 6px; outline: 3px solid var(--plate-ink); outline-offset: -9px;
    &.tone-warn { --plate: var(--sign-yellow); --plate-ink: var(--sign-ink); }
    :is(.w-kpi-label, .w-kpi-value, .w-kpi-value small, .w-kpi-sub, .w-kpi-sub b) { color: var(--plate-ink); }
    .state { padding: 0; margin: 0 0 4px; background: none; outline: 0; color: var(--plate-ink); font: 750 18px/1 var(--sans); font-stretch: 84%; }
  }
  .w-panel h2 { font: 750 24px/1.1 var(--heading); font-stretch: 82%; color: var(--ink); }
  .w-answer .state { font-size: 18px; }
  .w-answer .state:not(.state-good) { padding: 6px 13px; outline-width: 2px; outline-offset: -4.5px; border-radius: 5px; }
}

/* =====================================================================
   PAPER · a theme of either look: the look on warm paper
   From the Pinterest «Lines» board Peder chose (docs/design.md "Papir").
   It keeps its grounds, strokes and printed-poster palette; type, shell
   and the form state takes are the look's. Light only, so the values are
   plain. It comes after the looks so that it wins over their colours.
   ===================================================================== */
:root[data-theme="paper"] {
  --bg: #e6dfd0;
  --surface: #faf6ec;
  --surface-2: #f3ecdd;
  --surface-3: #e4dccb;
  --ink: #231f19;
  --ink-2: #544d42;
  --ink-3: #6f6657;
  --line: rgba(35, 31, 25, .13);
  --line-2: rgba(35, 31, 25, .26);
  --frame: #544d42;
  --accent: #0b53c0;
  --accent-soft: rgba(11, 83, 192, .10);
  --accent-ink: #faf6ec;
  --on-warn: #faf6ec;
  --sea: #ece5d6;
  --mark: #b9ae99;
  --mark-2: #d8cfbd;
  --good: #2c7350;  --good-soft: rgba(44, 115, 80, .11);  --good-ink: #25664a;
  --warn: #8f6207;  --warn-soft: rgba(143, 98, 7, .12);   --warn-ink: #7a5306;
  --bad: #b8402f;   --bad-soft: rgba(184, 64, 47, .10);   --bad-ink: #a83726;
  /* Categorical: the printed-infographic palette, teal through mustard,
     lavender, indigo, olive and plum. No coral: it reads as «Må tas». */
  --c1: #14746b;
  --c2: #c98a12;
  --c3: #8a6bb0;
  --c4: #2e4a78;
  --c5: #6f8038;
  --c6: #7c3d5c;
  --c7: #a3562a;
  --c8: #40616b;
  --c-other: #b3a893;
  --seq-0: #ece5d6;
  --seq-1: #cfdcd3;
  --seq-2: #a8c6bd;
  --seq-3: #7aaca1;
  --seq-4: #4a9084;
  --seq-5: #26756a;
  --seq-6: #0f4f47;
  --div-n3: #b34a30;
  --div-n2: #d08a70;
  --div-n1: #eccdbd;
  --div-0: #e4dccb;
  --div-p1: #c3d8d1;
  --div-p2: #6aa89b;
  --div-p3: #14746b;
}
