/* test.salnorth.no — page-specific LAYOUT only.
   Every brand value (colour, type, radius, motion) comes from
   /design-system/styles.css; every control is a .sal-* component from
   /design-system/components.css. Nothing here re-invents a component. */

* { box-sizing: border-box; }

/* Footer pinned to the bottom on short pages. */
.sal-atmosphere { min-height: 100vh; display: flex; flex-direction: column; }
.sal-atmosphere > main { flex: 1; width: 100%; }

/* ------- shared page rhythm (internal tool → denser than public pages) ------- */

.hero { padding-block: var(--space-7) var(--space-6); }
.hero h1 {
  font-size: clamp(var(--fs-heading-1), 5vw, var(--fs-display-md));
  line-height: var(--lh-tight);
  margin-block: var(--space-4) var(--space-3);
}
.lede {
  color: var(--text-secondary);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  max-width: 52ch;
}

.status-note { color: var(--text-muted); margin-block: var(--space-7); text-align: center; }

/* Inline Lucide arrows in back links sit on the text baseline. */
.icon-inline { vertical-align: -0.125em; }

/* ------- start page: identity fields ------- */

.identity-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  max-width: 34rem;
  margin-top: var(--space-6);
}
@media (max-width: 480px) {
  .identity-row { grid-template-columns: 1fr; }
}
.identity-hint { margin-top: var(--space-2); max-width: 52ch; }


/* ------- the hero, and the team board in its top right ------- */

/* Prose left, board right. The board is a fixed 24rem so the counts land in one
   scannable column whatever the team names do; below 60rem it drops under the
   prose at full width rather than squeezing, because four teams at 11rem is a
   column of ellipses. */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: var(--space-6);
  align-items: start;
}
@media (max-width: 60rem) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
}
.hero__board:empty { display: none; }

.team-board { display: flex; flex-direction: column; gap: var(--space-2); }
.team-board__label { color: var(--text-muted); }
.team-board__list { display: flex; flex-direction: column; gap: var(--space-2); }

/* The same plate as a card: hairline, faint ground, small radius. A row is a
   sibling of the cards below it, not a different kind of object. */
.team-board__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--space-3);
  align-items: baseline;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-hairline);
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: inherit;
  font: inherit;
  text-align: left;
}
button.team-board__row { cursor: pointer; }
/* Only where a pointer can actually hover — a tap on a phone would otherwise
   stick the hover state on until the next tap. */
@media (hover: hover) and (pointer: fine) {
  button.team-board__row:hover { border-color: var(--border-strong); }
}
button.team-board__row:active { transform: scale(0.99); }
/* The literal curve, not --ease-out: that token is cubic-bezier(0.16, 1, 0.3, 1)
   and this is a different one. Left as the literal rather than swapped for a
   token that is not the same curve. */
button.team-board__row {
  transition: border-color 160ms ease, transform 160ms cubic-bezier(0.23, 1, 0.32, 1);
}
.team-board__row:focus-visible {
  outline: 2px solid var(--focus-ring, var(--ember));
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  /* The border keeps easing — it is a colour, and the colour is what says which
     plate the page below belongs to. The press scale goes, and with it the only
     movement in the list. Both rules it overrides are declared above it, which
     is the only reason it wins — a media query buys no specificity, and between
     two rules of equal weight the last one written is the one that applies. */
  button.team-board__row { transition: border-color 160ms ease; }
  button.team-board__row:active { transform: none; }
}

/* Current is a gold left edge — an independent channel from the moss outline,
   so «the team you are looking at» and «this team is finished» can both be true
   without a third combined style. */
.team-board__row[aria-checked="true"] {
  border-left-color: var(--rule-gold);
  /* The row the page below belongs to. A 2px gold edge alone read as a rounding
     artefact next to an identical plate, so the ground lifts with it — the same
     pairing the nav uses for the page you are on. */
  background: var(--surface-hover, var(--surface-raised));
}

/* Complete takes the answered card's outline exactly, so the signal is learned
   once and read everywhere. */
.team-board__row[data-complete] {
  border-color: color-mix(in srgb, var(--done) 50%, transparent);
}
.team-board__row[data-complete][aria-checked="true"] { border-left-color: var(--rule-gold); }
.team-board__row[data-complete] .team-board__count { color: var(--done); }
.team-board__count .check { flex: none; width: 0.9em; height: 0.9em; }

.team-board__name {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: var(--lh-tight);
}
.team-board__count {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.team-board__meta {
  grid-column: 1 / -1;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  margin-top: var(--space-1);
}
.team-board__meta .sep { margin-inline: 0.4em; color: var(--text-faint); }

/* One team: the same plate, none of the affordances. */
.team-board--single .team-board__row { cursor: default; }

/* «Administrer medarbeidere» — a leader's way to their list. On one team it
   sits on the meta line under the count, at its right: a row of its own across
   the card, so it never widens the count column. On several it stands under
   the board for the selected team, since a link cannot live inside a row that
   is itself a press. */
.team-board__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-2);
}
.team-board__foot .team-board__meta { margin-top: 0; }
.team-board__foot--list { justify-content: flex-end; margin-top: 0; }
.team-board__foot[hidden] { display: none; }
.team-board__manage { flex: none; margin-left: auto; white-space: nowrap; }
/* What an unfinished setup is missing, under «Fullfør oppsett»: a line of its
   own across the foot, under the button it explains. */
.team-board__note {
  flex-basis: 100%;
  order: 1;
  margin: 0;
  font-size: var(--fs-caption);
  line-height: var(--lh-snug);
  color: var(--text-secondary);
  text-align: right;
}
/* Under a board of several it names the team, which may be long: it wraps. */
.team-board__foot--list .team-board__manage { flex: 0 1 auto; white-space: normal; text-align: center; line-height: var(--lh-snug); }

/* ------- a card answered about several people ------- */

/* The «3/5» chip. TYPE, not a .sal-badge: a grid of five cards whose whole
   discipline is that state is a hairline, a word and moss does not need five
   tinted capsules in it. Tabular figures so the counts line up down a column. */
.card-answered__line,
.card-note__line {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  justify-content: space-between;
}
.card-answered__line > .mark { min-width: 0; }
/* The text gives way, never the chip: an unbreakable piece wider than the room
   beside it pushed the chip past the card's clipped edge. Not flex-wrap — a
   several-target eyebrow is always wider than one line, so wrap dropped the
   chip under it on every such card. */
.card-note__line > .eyebrow { min-width: 0; overflow-wrap: break-word; }
.card-count {
  flex: none;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.card-count__done { color: var(--text-secondary); }
.card-answered .card-count__done { color: var(--done); }

/* ------- administrer: a transient mode, not a setting ------- */

.assigned__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-3);
}
/* Only the TITLE shares its row with «Administrer svar»; everything under it
   (the lede, the count, the done line) spans both columns. It used to be held
   in the first column too, so on a phone the button's width squeezed the lede
   into half the screen. */
.assigned__head > :not(.assigned__manage) { grid-column: 1 / -1; }
.assigned__head > .assigned__title { grid-column: 1; }
.assigned__manage { grid-column: 2; grid-row: 1; justify-self: end; }
.assigned__manage[aria-pressed="true"] {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .assigned__manage[aria-pressed="true"]:hover {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
  }
}
.assigned__manage-note {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
  font-size: var(--fs-caption);
  color: var(--text-muted);
}

/* A card in manage mode is a <div>, not an <a> — see testCard(). It is not
   locked (that means «not granted»), so it keeps its full contrast and only
   loses the pointer affordance. */
.card--managed { cursor: default; }
.card-del { flex: none; color: var(--danger); }
@media (hover: hover) and (pointer: fine) {
  .card-del:hover {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 14%, transparent);
  }
}

/* The delete dialog — two centred questions in one design-system dialog, at
   body level (see deleteDialog in index.html). Its sentence IS the question,
   so it is the dialog's name and its largest type; there is no title over it
   saying «Slett svaret?» a second time. Calm motion, ≤200ms, opacity and a
   4px rise only; the exit is quicker than the entrance. */
.del-confirm.sal-scrim { animation: del-fade 180ms var(--ease-out); }
.del-confirm .sal-dialog { max-width: 30rem; animation: del-in 200ms var(--ease-out); }
.del-confirm[data-closing] { animation: del-fade-out 120ms var(--ease-out) forwards; }
.del-confirm__text {
  margin: 0;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
/* «Ja, men bare i …» opens this: the teams, unticked, on the gold rule, and the
   press that deletes in the ticked ones under them. */
.del-confirm__more[hidden] { display: none; }
.del-confirm__more {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule-gold);
}
.del-confirm__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.del-confirm .sal-dialog__footer { flex-wrap: wrap; }
/* What deletes: the design system's secondary hairline in the crimson TEXT
   tier — the same treatment «Administrer svar» takes while it is on — so the
   one destructive press is told apart by colour and words, never by being
   the loudest thing in the box. */
.del-confirm__danger {
  color: var(--danger-text);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .del-confirm__danger:not(:disabled):hover {
    color: var(--danger-text);
    border-color: var(--danger);
    background: color-mix(in srgb, var(--danger) 14%, transparent);
  }
}
.del-confirm__danger:disabled { opacity: 0.45; cursor: default; }
/* Three presses do not share a phone's width; they stack, one to a row. A
   stacked ghost («Avbryt», «Nei») takes a hairline: beside another press a
   bare word reads as a button, but alone on a full-width row it read as a
   caption over the buttons, not as one of them. Still the quietest edge in
   the stack, so the way out stays the least insistent. */
@media (max-width: 420px) {
  .del-confirm .sal-dialog__footer > .sal-btn { flex: 1 1 100%; }
  .del-confirm .sal-dialog__footer > .sal-btn--ghost { border-color: var(--border-hairline); }
}
@keyframes del-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes del-fade { from { opacity: 0; } }
@keyframes del-fade-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .del-confirm .sal-dialog { animation: del-fade 200ms var(--ease-out); }
}

/* ── the one place emphasis is carried by colour ─────────────────────────
   The word a sentence makes its claim about — «leder», «medlem» in join.html's
   role line — is ITALIC EMBER. Never bold: italic plus colour is the emphasis
   this brand has. Never a badge or a pill, which would read as a status where
   this is a role somebody is being given. Never uppercase; the eyebrows own
   that. (It used to carry names too, and that is not a loss of scope: no
   surface on this site prints a name any more.)

   The weight is DECLARED and not inherited, and --fw-light (400) is a ceiling
   rather than a choice: tokens/fonts.css bundles Cormorant italic at 300 and
   400 only, and Jost italic at 400 only, so italic text above 400 is a weight
   the browser has to synthesise — a faux-bold, on the one word in the sentence
   this brand refuses to set bold. */
.join__role em {
  font-style: italic;
  font-weight: var(--fw-light);
  color: var(--accent);
}

/* For what is said to a screen reader and shown to nobody — the test page's
   live region and its heading (the nav bar says the same thing to the eye).
   The design system has no such class yet, so it is local rather than
   invented under the sal- prefix. Not display:none, which is not announced at
   all, and not opacity:0, which still takes layout. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------- start page: catalog ------- */

.catalog { padding-bottom: var(--space-8); }

/* Completion moss — the one green on this page, used for the check, the
   answered card's outline and its footer rule. The shared --success is a
   FILL colour: on cream it only reaches ~2.5:1, under even the 3:1 bar for a
   graphic. There is no darker moss token yet, so light mode deepens it
   toward the ink rather than hard-coding a second hex (≈5:1 on a card).

   ON <main>, not on .catalog, because the team board is in the hero — outside
   the catalog entirely — and shows the same completion state. Declared once so
   the two cannot drift into two different greens for one fact. */
main { --done: var(--success); }
:is([data-theme="light"], [data-glass-tone="white"]) main {
  --done: color-mix(in srgb, var(--success) 70%, var(--ink-900));
}
/* And its one neighbour: AMBER, for an answer that is there but old (more than
   salteams.FRESH_DAYS). The design system's --warning, deepened toward the ink
   in light mode by the same move and for the same reason as the moss above —
   on cream the fill tier measures ~3:1, and this one sets a sentence
   (≈4.8:1 deepened). Dark keeps the fill, which already reads ~7:1 on a card. */
main { --stale: var(--warning); }
:is([data-theme="light"], [data-glass-tone="white"]) main {
  --stale: color-mix(in srgb, var(--warning) 70%, var(--ink-900));
}

/* Each category opens with the gold hairline — a ruled section. */
.catalog-group {
  border-top: 1px solid var(--rule-gold);
  padding-block: var(--space-6) var(--space-7);
}
.catalog-group:last-child { padding-bottom: 0; }
.category { margin: 0 0 var(--space-5); }

.grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}

/* Card internals: title, acronym, meta stacked; meta pinned to the bottom
   so every card in a row bottoms out at the same line. */
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
/* The title carries the gold, bold so it owns the card. Display-tier
   gold: bold heading-2 is large text, so light mode can afford the
   brighter, truer gold. */
.card h3 {
  font-size: var(--fs-heading-2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  margin: 0 0 var(--space-2);
  color: var(--accent-quiet-display);
}
.card .code {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-wide);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.card .meta {
  margin-top: auto;
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
}

/* Answered state — set from /api/me. Still a ruled footer rather than a tinted
   surface, but the rule turns from gold to moss and the card takes a moss
   outline, so "done" is countable across the whole grid at a glance. The check
   sits on the «Besvart» line, not off in a corner: the mark and the word carry
   the state together, and neither has to be decoded alone. */
.card.card--answered { border-color: color-mix(in srgb, var(--done) 50%, transparent); }
/* Beats .sal-card--interactive:hover, which would otherwise pull the outline
   back to the neutral hairline exactly when you point at it. */
.card.card--answered:hover { border-color: color-mix(in srgb, var(--done) 75%, transparent); }

/* Stale state — everybody on the card answered about, at least one of them
   too long ago. Not lit and not plain: the outline and the footer rule take
   the amber the way a done card takes the moss, at the same strengths, so the
   two states read as one family across the grid. The footer under the rule is
   the ordinary role line (the card is work again) and one sentence saying why;
   that sentence is the only amber TEXT, and no icon rides with it — the
   colour and the words carry it, as «Besvart» does on a done card.
   The LINES take the --warning fill itself, not the deepened text tier: on
   cream the deepened one goes brown, and a border is a graphic, which the fill
   already clears 3:1 for (see tokens/colors.css). Only the words need more. */
.card.card--stale { border-color: color-mix(in srgb, var(--warning) 70%, transparent); }
.card.card--stale:hover { border-color: var(--warning); }
.card-note.card-note--stale { border-top-color: color-mix(in srgb, var(--warning) 55%, transparent); }
.card-stale {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-snug);
  color: var(--stale);
}
/* The sentence alone (the reference catalogue's card has no role line above
   it), so it sits straight under the rule. */
.card-note--stale > .card-stale:first-child { margin-top: 0; }

.card-answered,
.card-note {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule-gold);
}
.card-answered { border-top-color: color-mix(in srgb, var(--done) 40%, transparent); }
.card-answered .mark {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--done);
}
/* The eyebrow is gold everywhere else; inside the mark it joins the moss. */
.card-answered .mark .eyebrow { color: inherit; }
.card-answered .check { flex: none; }
.card-answered .eyebrow,
.card-note .eyebrow { display: block; }
/* The second line of a footer: who a test is about on a role footer, and WHICH
   TEAM it was answered for on an answered one (only when the account is in more
   than one — see answeredNote). Same treatment either way: it is the same kind
   of fact, and the check line above it already carries the state. */
.card-answered .who,
.card-note .who {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
  /* One line: a long name truncates rather than growing the card. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Which team a team test is about is a phrase, not a name («Teamet Silje
   Nordby leder, der du er med som kollega»): cut off, it would say the one
   thing it exists to say by halves. It wraps instead. */
.card-note .who--team {
  white-space: normal;
  text-wrap: pretty;
}

/* Availability / role footer — the same ruled rhythm, but on the neutral
   hairline with a muted eyebrow. The moss rule, check and caps mean ANSWERED;
   a test still waiting to be taken has nothing to celebrate yet. */
.card-note { border-top-color: var(--border-hairline); }
.card-note .eyebrow { color: var(--text-muted); }

/* Two footer lines on one card — the answered note under «Ikke tildelt deg» (a
   test you answered before it was locked again). The second rule sits closer,
   so the pair reads as one footer rather than two sections. An answered card
   never carries a role note any more, so that pairing is gone. */
.card-unavailable + .card-answered { margin-top: var(--space-3); }

/* Locked state — the test exists but this account hasn't unlocked it. The card
   keeps its slot (the catalog keeps its shape) but stops being a card: it sinks
   to the inset tone and drops its outline, so it reads as a well in the grid
   rather than something raised out of it. saturate() then pulls the warm cream
   and the gold title to flat neutral grey — that is what actually reads as
   greyed-out beside the warm live cards, and it costs nothing, because
   desaturating leaves luminance (and so contrast) alone. The title also gives
   up the gold for a text tier; that swap is the loud part.

   Fading is rationed by theme. Dark has the headroom — cream-400 sits at ~8:1
   on ink, so 0.7 opacity still lands ~4.8:1 — and dark is where the inset well
   is the subtler of the two, so it gets the dimming. Light mode's text tiers
   are compressed toward the page and have none to spare (a blanket opacity took
   this card to ~2.4:1 the last time it was tried), so there the recessed
   surface and the grey carry it alone, which on cream they do plainly. */
.card--locked {
  cursor: default;
  background: var(--surface-inset);
  border-color: transparent;
}
html:not([data-theme="light"]):not([data-theme="glass"]) .card--locked { opacity: 0.7; }
/* The grey is applied per child rather than to the whole card so the answered
   footer can sit out: a test you finished must not stop looking finished the
   day its access closes, and a greyed check reads as a rendering fault. The
   card's own moss outline is set on the card, so it escapes this too — only
   the dimming above still reaches them, and moss survives being dimmed. */
.card--locked > :not(.card-answered) { filter: saturate(0.15); }
.card--locked h3 { color: var(--text-muted); }
.card--locked .code,
.card--locked .meta { color: var(--text-faint); }

/* Glass reads "locked" from the same two moves, with the container opacity
   taken out of the stack. `:not([data-theme="light"])` above used to mean
   "dark"; glass is attribute-NAMED, so it started matching, and 0.7 on a
   translucent plate fades the wash showing THROUGH the card as hard as the
   type sitting on it — the blanket-opacity failure light mode already measured
   at ~2.4:1, arriving by a second route. So the well and the grey carry it
   alone here, exactly as they do on cream:

   · The plate. --surface-inset is 0.86 ink under glass — a near-solid well
     against the neighbouring Clear cards' 0.62 — but the theme enrols every
     .sal-card by name at one specificity step above this file's `.card--locked`,
     so the line above is overruled and a locked card gets the full Clear plate.
     Restating it here scoped to the theme puts the well back. The specular rim
     goes with it: a lit ring is what "raised out of the grid" looks like in
     this material, and this card's whole job is to be a hole in the grid.
   · The grey. The dim moves inside the per-child filter, where it lands on the
     TYPE and leaves the material's density alone. brightness(), never
     contrast() — the theme rejects contrast() outright on a warm near-black
     brand — and a per-child filter is already this rule's own idiom. 0.78 puts
     the faintest line (.meta, cream-400) at ~5:1 on the well, with the answered
     footer sitting out of both moves just as it does under dark. */
[data-theme="glass"] .card--locked {
  background-image: none;
  background-color: var(--surface-inset);
}
[data-theme="glass"] .card--locked::after { display: none; }
[data-theme="glass"] .card--locked > :not(.card-answered) {
  filter: saturate(0.15) brightness(0.78);
}
/* The same ruled footer slot as .card-answered, but on the neutral hairline
   instead of gold — nothing celebratory about a closed door. */
.card-unavailable {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-hairline);
  font-size: var(--fs-overline);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  font-weight: var(--fw-light);
  color: var(--text-muted);
}

/* ------- catalog: «Tester du skal gjøre» ------- */

/* The one section on this page that is work rather than reference, so it is the
   only one that does not open with the gold eyebrow. That treatment — 11px
   tracked caps, identical to every category below it — was the quietest thing
   on the page attached to the most important content, which is what made the
   catalog look like a menu to browse rather than a list to obey. */
.assigned__head { margin-bottom: var(--space-5); }
.assigned__title {
  font-size: clamp(var(--fs-heading-2), 4vw, var(--fs-heading-1));
  line-height: var(--lh-tight);
  margin: 0;
}
/* This heading sits above 28px bold gold card titles, so it wins on size and on
   being the plain cream against their gold — never on weight. Emphasis in this
   system is italic and colour, and a heading does not need either. */
.assigned__lede {
  margin: var(--space-3) 0 0;
  max-width: 46ch;
  color: var(--text-secondary);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
}
.assigned__count {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
}
/* Everything done — the same moss, check and brevity as an answered card's
   footer, since it is the same fact at section scale. */
.assigned__done {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  color: var(--done);
}
.assigned__done .check { flex: none; }

/* ------- catalog: «Du står på listen som …» ------- */

/* What is left of the person rail, and it is one sentence naming the address
   this page thinks the reader is. It ended in «Bytt profil» while a seat was a
   NAME and an arriving person had to find their own among several; a person is
   their address now, the account is matched to its own seat by it, and so there
   is no wrong seat to be in — and no list of other people's seats a member may
   be shown. The press, its menu and the one-paint line that reported the swap
   all went with it, and their rules with them.

   A SIBLING of div.assigned rather than a child of it, for the reason the team
   board sits outside the section it repaints. No rule of its own — the
   section's gold hairline is already above it — and no entrance either. */
.roster-mine { margin-bottom: var(--space-5); }
.roster-mine__line {
  margin: 0;
  max-width: 60ch;
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
}


/* ------- catalog: no team yet ------- */

/* The whole of the page's content when the account is in no team — which is
   what a brand-new visitor to a public test.salnorth.no sees, so it is a state
   the page is IN rather than an error it reports. A card, so it reads as a
   deliberate object instead of prose that ran out, and narrow, so the empty
   space around it looks composed rather than broken. */
.teamless {
  max-width: 44rem;
  padding: var(--space-6);
}
@media (max-width: 480px) { .teamless { padding: var(--space-5); } }
.teamless__title {
  font-size: clamp(var(--fs-heading-2), 4vw, var(--fs-heading-1));
  line-height: var(--lh-tight);
  margin: var(--space-3) 0 0;
  max-width: 26ch;
}
.teamless__lede { margin: var(--space-4) 0 0; }
/* The account, on its own hairline. Full cream between the secondary lede above
   and the muted hint below, because «which account am I signed in as» is the
   one fact on this screen somebody may need to act on — somebody who followed
   an invitation with their private Google account and came here with their work
   one has nothing else to go on. */
.teamless__who {
  margin: var(--space-6) 0 var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-hairline);
  color: var(--text-primary);
}
.teamless .sal-hint { margin: 0; max-width: 52ch; }

/* ------- the team context ------- */

/* Which team the reader is answering for. A CONTEXT, not a question: it sits
   once at the top of the page and everything under it belongs to the team it
   names, so a person in three teams reads one team at a time instead of three
   stacked runs of cards. The same block is on the test page's start screen, so
   the two never disagree about whose sitting this is.

   Laid out as a label over the control rather than beside it: the label is an
   eyebrow, and an eyebrow on the same line as a 15px select fights it for the
   baseline at every viewport worth supporting. */
.team-ctx {
  margin-bottom: var(--space-6);
  max-width: 26rem;
}
.team-ctx__label {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-muted);
}
/* One team is a fact, not a choice, so it renders as a line. Cormorant at the
   body size, because it is naming a thing (a team) rather than saying something
   about it — the same job the card titles do, one tier down and in cream. */
.team-ctx__one {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}
/* The select keeps every design-system value; only its width is this page's
   business. */
.team-ctx__select { width: 100%; }
.team-ctx__note {
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-normal);
}

/* Switching team replaces a whole grid under the reader's eyes. With no
   transition that reads as a glitch rather than as an answer to what they just
   did — but these cards have never had an entrance and should not grow one, so
   this is the smallest thing that covers the swap: opacity and 4px, ease-out.
   Transitions, not keyframes, so flicking through teams retargets from where the
   last one got to instead of restarting.

   LITERAL MILLISECONDS, not --dur-fast. That token is 350ms, and switching team
   is a control somebody in three teams uses over and over — the design system
   makes exactly this call on .sal-menu, in those words, for the same reason. Out
   is faster than in (100/150) because the fade-out is the half the reader waits
   through, while the fade-in is the answer arriving; 250ms end to end puts the
   whole swap inside the range a select is supposed to live in.

   The 100ms out is also in team.js, which has to hold the class for exactly as
   long as the fade takes before it rebuilds. Change one, change the other.

   div.assigned takes the identical pair, because it is the second swap target:
   changing the PERSON whose answers are being entered replaces the same grid
   under the same eyes, and a person is a room inside the team room. Same motion
   for both axes on purpose — one gesture, learned once. Without this rule
   SalTeam.swap(assignedEl, …) holds a class for 100ms and fades nothing. */
.catalog-group,
.assigned {
  transition: opacity 150ms var(--ease-out),
              transform 150ms var(--ease-out);
}
.team-swap--out {
  opacity: 0;
  transform: translateY(-4px);
  transition-duration: 100ms;
}
.team-swap--in { opacity: 0; transform: translateY(4px); }

@media (prefers-reduced-motion: reduce) {
  /* The fade stays — it is what makes the swap legible. The movement goes: that
     is the half that causes trouble, and it carries no meaning here. */
  .catalog-group,
  .assigned { transition: opacity 150ms var(--ease-out); }
  .team-swap--out,
  .team-swap--in { transform: none; }
}

/* ------- test page ------- */

/* Question pages read best narrow — cap the container tighter than the
   catalog's full width. */
.test-main { max-width: 52rem; padding-block: var(--space-6) var(--space-8); }

/* ── the sitting, in the nav bar: «SÁL | BLI – Deg selv» ──
   Everything that used to introduce a sitting in the page lives on the start
   page now; this is the part of it that has to stay in view at question
   sixty. On a desktop it is one row: the line gives way — it shrinks and ends
   in an ellipsis — and the flags and the account control keep their places at
   the right end whatever the name is. On a phone the nav wraps like every
   other page and the line has the whole of row 1 beside the mark (below).

   Jost at the hairline weight, the brand's feather-light UI voice, beside the
   Cormorant mark: the mark is the site, this is the work. The code takes the
   eyebrow gold, the person the secondary text, so «BLI» reads as the label
   and the name as the content. The divider is the signature gold hairline,
   stood on end. */
.page-answer .sal-nav__inner { flex-wrap: nowrap; }
.page-answer .sal-nav__links { flex: none; }
.sitting-bar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--fw-hairline);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-tight);
  color: var(--text-secondary);
  transition: opacity var(--dur-quick) var(--ease-out);
}
/* Filled once /api/me lands, a beat after the bar paints: it arrives, it does
   not pop. Opacity only, so reduced motion keeps it as it is. */
@starting-style {
  .sitting-bar { opacity: 0; }
}
.sitting-bar[hidden] { display: none; }
.sitting-bar::before {
  content: "";
  flex: none;
  width: 1px;
  height: 1.6em;
  background: var(--rule-gold);
}
.sitting-bar__lines {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sitting-bar__text,
.sitting-bar__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* overflow:hidden clips at the line box, and at the bar's --lh-tight that
     box ends above Jost's descenders — «Deg selv» lost the tail of its g. */
  line-height: var(--lh-normal);
}
.sitting-bar__code {
  color: var(--accent-quiet);
  letter-spacing: var(--ls-wide);
}
/* The test's full name, as a small second line — on a phone only, where the
   line has a row to itself. On a desktop the bar is one line beside the
   flags, and the name is the bar's `title`. */
.sitting-bar__name {
  display: none;
  font-size: var(--fs-caption);
  color: var(--text-muted);
}
/* A PHONE WRAPS THE NAV, as every other page does when its row runs out:
   row 1 is the mark and the sitting, row 2 the flags and the account, right
   where they sit on a desktop. The links take a whole row of their own
   (flex-basis 100%) and the line a zero basis, so the line always stays
   beside the mark however long the person's address is — it fills the row,
   and the ellipsis is only for an address longer than a phone is wide. */
@media (max-width: 480px) {
  .page-answer .sal-nav__inner { flex-wrap: wrap; column-gap: var(--space-3); }
  /* Row 2 starts under the mark, where every other page puts it when its nav
     wraps — so stepping from the start page into the questions does not move
     the flags and the account to the other side of the screen. */
  .page-answer .sal-nav__links { flex: 1 1 100%; justify-content: flex-start; }
  .sitting-bar { flex: 1 1 0; gap: var(--space-3); font-size: var(--fs-body); }
  .sitting-bar__name { display: block; }
  /* ONE BASELINE: the test's name sits on the line SÁL stands on, and «BLI –
     Kari» rides above it, so the two lines read as a lockup with the mark
     rather than a block floated beside it (centred, the pair hung 5px below
     the mark's baseline). `last baseline` on both, so the pair aligns by its
     second line — at rest and in the compact bar alike. */
  .page-answer .sal-nav__inner > .sal-wordmark,
  .page-answer .sitting-bar { align-self: last baseline; }
  /* Two lines now, so the hairline stands as tall as both — stretched to the
     lines rather than sized in em, so it can never outgrow or undershoot
     them. */
  .sitting-bar::before { align-self: stretch; height: auto; }
}
/* The questions are the whole page now — no heading block above them — so a
   part opens straight under the page's own top air. Its gold rule went with
   the introduction it separated the part from: with nothing above it, it sat
   one gap under the nav's own gold hairline and read as a doubled border. */
.page-answer .step.active { margin-top: 0; border-top: 0; padding-top: 0; }

.backlink { margin: 0 0 var(--space-5); font-size: var(--fs-body-sm); }
.test-eyebrow { margin-bottom: var(--space-2); }
h1.page {
  font-size: clamp(var(--fs-heading-1), 5vw, var(--fs-display-md));
  line-height: var(--lh-tight);
  margin-block: 0 var(--space-3);
}

/* Thin progress bar riding the submit row's gold hairline — fills with
   answered/total so the respondent feels movement without ever seeing a
   demotivating question count. Anchored to .submit-row (sticky, so it is
   already a containing block) and straddling its 1px top border. */
.progressbar {
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: transparent;
}
.progressbar .fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width var(--dur-fast) var(--ease-standard);
}
/* Under glass the row's rim is a ::after — a positioned sibling that paints
   after every child — and it lands on the exact 1px this bar straddles, which
   would veil the ember with 46% cream for half the bar's height. Lift the bar
   over the rim; a progress reading is not something the material gets to tint.

   The row is a rounded plate there (see .submit-row, below), so the bar can no
   longer straddle a straight border: at top:-1px it hangs a 2px ledge off both
   top corners, outside a rim that has curved away from under it. It rides just
   inside the rim instead, held clear of the two corner arcs by their own
   radius. Clipping it to the plate's radius is the obvious alternative and it
   does not work: CSS scales a corner radius down when the two on one side
   exceed that side's length, so 10px on a 2px-tall box is 2px of rounding, and
   the bar pokes out of the curve exactly as before. */
[data-theme="glass"] .progressbar {
  z-index: 1;
  top: 0;
  left: var(--radius-lg);
  right: var(--radius-lg);
}

/* Identity / confirm panel — a .sal-card; only spacing lives here. */
.panel { margin-top: var(--space-6); }
.panel .label { display: block; margin: var(--space-5) 0 var(--space-2); }
.panel .label:first-child { margin-top: 0; }
.panel .sal-input { max-width: 26rem; }
.panel .field { margin-bottom: var(--space-4); max-width: 26rem; }
.panel .btn-confirm { margin-top: var(--space-2); }

/* One section ("batch") visible at a time; the rest stay in the DOM so
   answer state survives Tilbake/Fortsett. Each step opens with the gold
   hairline — the ruled-section rhythm. */
.step { display: none; }
.step.active {
  display: block;
  border-top: 1px solid var(--rule-gold);
  margin-top: var(--space-7);
  padding-top: var(--space-6);
}
.step-overline { margin: 0 0 var(--space-3); }
/* «Om Kari Nordmann» over every part of a test answered about several people —
   the brand's emphasis (display italic in ember), because it is the one fact
   on the part the statements below never repeat. */
.step-about {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-snug);
  color: var(--accent);
  overflow-wrap: anywhere;
}
.section-h1 { font-size: var(--fs-heading-2); margin: 0 0 var(--space-3); }
.section-desc {
  color: var(--text-secondary);
  font-style: italic;
  max-width: 62ch;
  margin-top: 0;
}

/* Question card internals. The faint numeral is decorative set-dressing.
   Each card is its own container, so the scale inside re-organises on the width
   it actually has rather than the viewport's. */
.q {
  margin-top: var(--space-5);
  padding: var(--space-6);
  container-type: inline-size;
}
/* A phone spends a fifth of the card's width on its own padding, and the track
   is what needs those pixels. Keep the generous block padding, tighten the
   sides. */
@media (max-width: 480px) {
  .q { padding: var(--space-5) var(--space-4); }
}
.q.missing { border-color: var(--danger); }
.q::before {
  content: attr(data-num);
  position: absolute;
  top: var(--space-2); right: var(--space-4);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-light);
  font-size: var(--fs-display-md);
  line-height: 1;
  color: var(--text-primary);
  opacity: 0.07;
  pointer-events: none;
}
.q .text {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: var(--fw-regular);
  font-size: var(--fs-heading-2);
  line-height: var(--lh-snug);
  color: var(--text-primary);
  max-width: 58ch;
  margin: 0;
  /* Room for the corner numeral (.q::before), which sits in the card's padding
     at the top right and ran into the end of the first line — «rolle¹» on a
     phone. The numeral reaches about 2.6rem in from the card's edge: the card's
     own padding covers most of that on a wide screen, this covers the rest. */
  padding-right: 1.25rem;
}
@media (max-width: 480px) {
  .q .text { padding-right: 2.25rem; }   /* the card's side padding is 1rem here */
}

/* The -2 … +2 answer scale: a hairline slider with gold ticks on the line
   and an ember fill that runs out from the neutral centre. The whole wrap is
   a tall clickable band, so it is easy to hit. */
.scale {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.scale .end {
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
/* Bipolar items (semantic-differential scales, e.g. SOI's orientation
   items) carry full sentences as pole text instead of a short "Helt
   uenig/enig" label — let them wrap onto a sensible width instead of
   forcing the nowrap/uppercase treatment made for short labels. */
.scale.bipolar .end {
  flex: 1 1 14rem;
  max-width: 18rem;
  font-size: var(--fs-body-sm);
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
}

/* Narrow card: the two anchors and the track can't share a line without
   squeezing the track down to nothing, and letting the row wrap scattered them
   — one anchor stranded above the line, the other sharing the bottom line with
   the value. So below the fold-point the scale becomes three deliberate rows:
   both anchors above the track, each hugging its own end and pulled down into
   the band's head-room so they read as labels OF the line — stopping a hair
   short of the thumb, which at −2/+2 sits directly beneath them — then the
   track at full card width, then the chosen value centred underneath.

   The threshold is the card's own content box: the side-by-side row needs
   ~22rem of it, and this leaves a little margin for a longer anchor. */
@container (max-width: 25rem) {
  .scale {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "low  high"
      "track track"
      "value value";
    /* Bottom-aligned, so a pole text that wraps to two lines still sits on the
       same line as its short opposite. */
    align-items: end;
    column-gap: var(--space-3);
    row-gap: 0;
  }
  .scale .end:first-child { grid-area: low; }
  .scale .end:last-child { grid-area: high; text-align: right; }
  /* -0.4rem into the 3.25rem band: the thumb's top edge is 0.925rem down, so
     the anchors clear it by about 8px at either extreme. */
  .scale .slider-wrap { grid-area: track; margin-top: -0.4rem; }
  .scale .value-badge { grid-area: value; justify-self: center; margin-top: -0.25rem; }
  /* The flex basis and cap that gave the bipolar poles their own column widths
     have nothing to size in a grid — the two columns are the layout now. */
  .scale.bipolar .end { flex: none; max-width: none; }
  /* A bipolar pole is a whole sentence, not the two words "Helt uenig" — in two
     ~120px columns on a 320px phone the pair became two narrow towers of text
     beside each other. They get the card's full width instead, stacked in the
     order the scale itself reads: low pole, track, high pole, value. Same pull
     into the band's head-room at both ends, so each label reads as belonging to
     the line rather than floating between cards. */
  .scale.bipolar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "low"
      "track"
      "high"
      "value";
  }
  .scale.bipolar .end:last-child {
    grid-area: high; text-align: left; margin-top: -0.4rem;
  }
  /* The value's -0.25rem assumed it sat directly under the track; the high pole
     is between them now. */
  .scale.bipolar .value-badge { margin-top: 0; }
}

.slider-wrap {
  position: relative; flex: 1 1 12rem; min-width: 8rem;
  height: 3.25rem;   /* clickable hitbox — the input fills this height */
}
/* Ticks sit ON the track line, inset by half the thumb width so each
   tick lines up exactly with where the thumb centre lands. */
.slider-wrap .ticks {
  position: absolute; top: 50%; left: 0.7rem; right: 0.7rem;
  display: flex; justify-content: space-between; pointer-events: none;
}
.slider-wrap .ticks span {
  width: 2px; height: 12px; margin-top: -6px; border-radius: 1px;
  background: var(--accent-quiet); opacity: 0.55;
}

input[type="range"].slider {
  position: relative; z-index: 1; /* thumb draws above the ticks */
  display: block; width: 100%; height: 100%; margin: 0;
  -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer;
  /* The band is a wide target in the middle of a long form, so a finger on its
     way past has to be able to scroll the page. pan-y hands a vertical drag to
     the browser (and cancels our pointer with it); a horizontal one stays here
     and answers the question. See the gesture handling in test.html. */
  touch-action: pan-y;
  --p: 50%; /* fill percentage, set from JS on input */
}
input[type="range"].slider:focus,
input[type="range"].slider:focus-visible { outline: none; box-shadow: none; }
input[type="range"].slider::-moz-focus-outer { border: 0; }
/* The rule above suppresses the browser's own ring, and the element selector
   outranks the design system's :focus-visible, so a keyboard respondent had no
   focus indicator at all on the only control the page has. The ring goes on the
   thumb rather than on the input: the input IS the whole 3.25rem band, so a ring
   there is a tall rectangle around the card row rather than a mark on the value.
   Two separate rules on purpose — a vendor pseudo-element the browser does not
   know invalidates the entire selector list, so combining them drops both. */
input[type="range"].slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}
input[type="range"].slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}

/* track — the ember fill runs from the CENTRE (the neutral 0) out to the
   thumb, in either direction, not from the left edge. min()/max() pick the
   two ends of that span whichever side of centre the thumb is on. --rail is
   the unfilled line: --border-soft everywhere except a pair (.pair), which
   needs it to clear 3:1 against the card. */
input[type="range"].slider::-webkit-slider-runnable-track {
  height: 2px; border-radius: 999px; background: var(--rail, var(--border-soft));
}
input[type="range"].slider.touched::-webkit-slider-runnable-track {
  background: linear-gradient(90deg,
    var(--rail, var(--border-soft)) min(var(--p), 50%),
    var(--accent)      min(var(--p), 50%),
    var(--accent)      max(var(--p), 50%),
    var(--rail, var(--border-soft)) max(var(--p), 50%));
}
input[type="range"].slider::-moz-range-track {
  height: 2px; border-radius: 999px; border: none; background: var(--rail, var(--border-soft));
}
input[type="range"].slider.touched::-moz-range-track {
  background: linear-gradient(90deg,
    var(--rail, var(--border-soft)) min(var(--p), 50%),
    var(--accent)      min(var(--p), 50%),
    var(--accent)      max(var(--p), 50%),
    var(--rail, var(--border-soft)) max(var(--p), 50%));
}
input[type="range"].slider::-moz-range-progress { background: transparent; }

/* thumb */
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  margin-top: calc(1px - 0.7rem);
  background: var(--surface-card); border: 2px solid var(--accent-quiet);
  box-shadow: var(--shadow-md);
  transition: background 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease, transform 0.12s ease;
}
input[type="range"].slider::-moz-range-thumb {
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  background: var(--surface-card); border: 2px solid var(--accent-quiet);
  box-shadow: var(--shadow-md);
  transition: background 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease, transform 0.12s ease;
}
input[type="range"].slider.touched::-webkit-slider-thumb {
  background: var(--accent); border-color: var(--cream-100);
  box-shadow: var(--glow-ember), var(--shadow-md);
}
input[type="range"].slider.touched::-moz-range-thumb {
  background: var(--accent); border-color: var(--cream-100);
  box-shadow: var(--glow-ember), var(--shadow-md);
}
/* Held. `.grabbing` is set by the touch handler, which suppresses the native
   drag (and with it :active) until the gesture reads as an answer rather than
   the start of a scroll — this is the moment the thumb becomes yours. */
input[type="range"].slider:active::-webkit-slider-thumb,
input[type="range"].slider.grabbing::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"].slider:active::-moz-range-thumb,
input[type="range"].slider.grabbing::-moz-range-thumb { transform: scale(1.12); }

/* The badge is the un-answer control (a <button>), so the UA chrome comes off
   and the display type below stands exactly as it did when this was a span.
   Disabled — i.e. nothing to remove — it keeps the em dash and the arrow. */
.value-badge {
  appearance: none; background: none; border: 0; padding: 0;
  cursor: pointer;
  min-width: 2.6rem; text-align: center;
  font-family: var(--font-display); font-style: italic; font-size: 2rem;
  line-height: 1; color: var(--text-muted);
}
.value-badge:disabled { cursor: default; }
.value-badge:focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.value-badge.touched { color: var(--accent); font-weight: var(--fw-medium); }

/* «Kan ikke vurdere» — only on a colleague's sitting about the leader (see
   scale() in test.html). A filter chip in its own row at the card's end, under
   the line, because it is about the whole statement and not either pole; the
   brand's selected chip says it is chosen. Set aside, the line steps back but
   stays live — a press on it answers after all — so it fades, it is not
   disabled. */
.q-aside { display: flex; justify-content: flex-end; margin-top: var(--space-4); }
.q-aside .sal-tag {
  min-height: 2.5rem;   /* a thumb's target, not a 30px pill */
  transition:
    background var(--dur-quick) var(--ease-standard),
    border-color var(--dur-quick) var(--ease-standard),
    color var(--dur-quick) var(--ease-standard),
    transform var(--dur-press) var(--ease-out);
}
.q-aside .sal-tag:active { transform: scale(0.97); }
.q .scale { transition: opacity var(--dur-quick) var(--ease-standard); }
.q .scale.is-aside { opacity: 0.4; }
@media (prefers-reduced-motion: reduce) {
  .q-aside .sal-tag { transition: none; }
  .q-aside .sal-tag:active { transform: none; }
}

/* ── An unnamed pair (CFI) ────────────────────────────────────────────────
   Two statements that ARE the question, and a seven-point line between them —
   and nothing else: no numbers, no scale words, no readout. Where the thumb
   sits is the answer, the section's description is the only key, and the
   range's aria-valuetext says the value to a screen reader.

   Wide, a step's pairs join into ONE table — left statement · line · right
   statement — with a quiet gold line down the middle column at the midpoint.
   Too narrow for three columns, the statements stack (left above the line,
   right below it and right-aligned, so q.left is 1 at every width) and the
   rows come apart into one card per pair: with no column to line them up by,
   it has to be plain where one pair ends.

   Unanswered shows NO thumb: a thumb resting on the centre is exactly what
   the midpoint answer looks like, and the midpoint is a real answer. Built by
   scale() and buildStep() in test.html; nothing here touches the other tests. */
.q--pair::before { content: none; }   /* no corner numeral */
.pairs {
  container: pairs / inline-size;
  margin-top: var(--space-5);
}
/* Joined: the pairs' cards meet edge to edge and read as one table. */
.pairs > .q--pair {
  margin: 0;
  padding: var(--space-4) var(--space-5);
  border-radius: 0;
}
.pairs > .q--pair + .q--pair { border-top-width: 0; }
.pairs > .q--pair:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.pairs > .q--pair:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.pairs > .q--pair:only-child { border-radius: var(--radius-lg); }
/* .q.missing recolours a card's border; a joined row shares its top edge with
   the row above, so the mark is drawn inside it instead. */
.pairs > .q--pair.missing { box-shadow: inset 0 0 0 1px var(--danger); }

.pair {
  /* The unfilled line and the ticks clear 3:1 against the card (WCAG 1.4.11);
     --border-soft measured 1.54:1 and the 55 % gold ticks 2.08:1. Half the text
     colour into the card, not --field-border, which lands at 2.98:1 on the
     light card. */
  --rail: color-mix(in srgb, var(--text-primary) 50%, var(--surface-card));
  --cell: 2.5rem;                         /* a notch's share of the line, in the table */
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--cell) * 7) minmax(0, 1fr);
  grid-template-areas:
    "low .     high"
    "low track high"
    "low .     high";
  grid-template-rows: 1fr auto 1fr;      /* the line centred against the statements */
  column-gap: var(--space-5);
}
.pair-end {
  margin: 0;
  align-self: center;
  /* A step up from the site's small body text: the two statements ARE the
     question, read 24 times over, and some respondents found 14px hard work. */
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--text-primary);
  text-wrap: balance;
}
.pair-end.low { grid-area: low; text-align: right; }
.pair-end.high { grid-area: high; }
.pair .slider-wrap { grid-area: track; }
.pair .slider-wrap .ticks span { opacity: 1; }
.pair .slider-wrap .ticks span.mid { height: 16px; margin-top: -8px; }   /* slightly taller, not a target */

/* No thumb until answered (or while a finger is on it — show() previews). */
.pair input[type="range"].slider:not(.touched)::-webkit-slider-thumb { opacity: 0; }
.pair input[type="range"].slider:not(.touched)::-moz-range-thumb { opacity: 0; }
/* …so the focus ring cannot go on the thumb either. It rings the line and its
   ticks instead — drawn by the wrap, because an outline on the input is the
   whole 3.25rem band, a tall box around the middle of the row. */
.pair .slider-wrap:has(.slider:not(.touched):focus-visible)::after {
  content: "";
  position: absolute; inset: 10px -6px;
  border: 2px solid var(--focus-ring);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
/* Answered, it goes back on the thumb. The base rule that puts it there is
   outranked by the .touched glow (same specificity, later in this file), so a
   keyboard user lost sight of an answered slider altogether — in EVERY test,
   not only here; said again with the glow kept, for all of them. */
input[type="range"].slider.touched:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 1px var(--accent), var(--glow-ember), var(--shadow-md);
}
input[type="range"].slider.touched:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 1px var(--accent), var(--glow-ember), var(--shadow-md);
}
/* Too narrow for three columns: stack the statements, and give every pair a
   card of its own. */
@container pairs (max-width: 46rem) {
  .pairs > .q--pair { padding: var(--space-5) var(--space-4); }
  .pairs > .q--pair:nth-child(n) { border-radius: var(--radius-lg); }
  .pairs > .q--pair + .q--pair { margin-top: var(--space-3); border-top-width: 1px; }
  .pairs > .q--pair.missing { box-shadow: none; }   /* a card has its whole border for that */
  .pair {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "low" "track" "high";
    grid-template-rows: none;
  }
  .pair-end { max-width: 92%; font-size: var(--fs-body-lg); }
  .pair-end.low { text-align: left; }
  .pair-end.high { justify-self: end; margin-top: var(--space-1); text-align: right; }
}

/* ── A forced-choice pair (CFI, «Skala: 2») ───────────────────────────────
   No line: the two statements are the two options, and picking one is the
   answer. Each is a label holding a real radio (visually hidden — the card is
   the control), side by side with a quiet «eller» between them while they fit,
   stacked under one another once they do not. Unanswered, both read the same;
   chosen, the picked one takes the ember edge and a faint ember wash and the
   other recedes to secondary text, so which side won is plain at a glance in a
   table of six. Press feedback is a small scale on :active; nothing moves on
   its own. Built by choice() in test.html. */
.pair.pair--choice {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "low or high";
  grid-template-rows: auto;
  align-items: stretch;
  column-gap: var(--space-3);
}
.pair-opt {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 160ms ease, background-color 160ms ease,
              transform 140ms var(--ease-out);
}
.pair-opt.low { grid-area: low; }
.pair-opt.high { grid-area: high; }
.pair-opt .pair-end {
  text-align: left;
  text-wrap: pretty;   /* balance narrows a card's lines to half its width */
  transition: color 160ms ease;
}
.pair-choice {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .pair-opt:hover { border-color: var(--border-strong); background: var(--surface-hover); }
}
.pair-opt:active { transform: scale(0.985); }
.pair-opt:has(.pair-choice:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.pair-opt:has(.pair-choice:checked),
.pair-opt:has(.pair-choice:checked):hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.pair--choice.is-chosen .pair-opt:not(:has(.pair-choice:checked)) .pair-end {
  color: var(--text-secondary);
}
.pair-or {
  grid-area: or;
  align-self: center;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
@container pairs (max-width: 46rem) {
  .pair.pair--choice {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "low" "or" "high";
    row-gap: var(--space-2);
  }
  .pair--choice .pair-end { max-width: none; }
  .pair--choice .pair-end.high { justify-self: start; margin-top: 0; text-align: left; }
  .pair-or { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .pair-opt { transition: border-color 160ms ease, background-color 160ms ease; }
  .pair-opt:active { transform: none; }
}

/* The sticky action bar. Its markup also carries `sal-glass sal-glass--guard`
   (test.html builds the row), which is inert under dark and light and leaves
   every value below exactly as it was; under glass the theme's own roster wins
   on specificity and takes over all three of the surface declarations — the
   88% tint, the 8px blur and the gold top rule, which becomes the transparent
   border the specular ring is drawn on. Nothing here needs a theme condition,
   and nothing here may be deleted: this IS the dark and light surface.
   Guard weight, because everything on the page scrolls under it, and the
   page's only other blurred surface is .sal-nav, so glass costs two backdrop
   roots here — inside the two-per-phone budget, because the question cards are
   .sal-card and Clear plates do not blur. */
/* The storage notice is fixed to the bottom of the viewport and this row is
   sticky at the same edge, so on this page the notice has to be lifted clear of
   it — a disclosure covering the button you are reaching for is worse than no
   disclosure at all. Generous on purpose: over-clearing is invisible, and the
   row's height moves with its progress and error lines.

   Scoped to the page, not to :root, because all three pages of this site load
   this file and only the questionnaire parks anything down there — on the
   catalogue the notice would float oddly high for no reason.

   And to the page rather than to `body:has(.submit-row)`, which was the first
   attempt and reads better than it behaves: the row is built in JS once the
   questions arrive, so :has() would be false while the notice was appearing and
   true a few hundred milliseconds later, jumping it 112px up the screen while
   somebody was reading it. A class on <body> is true from first paint. */
body.page-answer { --sal-consent-clear: 7rem; }

/* AND NEVER OVER THE QUESTIONS. Fixed in the corner at 24rem it reached past the
   gutter into the column and covered the first section heading at 1440. On this
   page it stays fixed only where the gutter left of the column can hold it — at
   that gutter's width, 1rem short of the column — and between a phone and that
   width it is the in-flow band the design system already makes it on a phone:
   at the top of the page, pushing the questions down rather than lying on them,
   and gone once scrolled past. 90rem is the 52rem column plus a gutter each side
   wide enough for a card of about 17rem and its margins. */
@media (min-width: 481px) and (min-height: 30.0625rem) and (max-width: 89.99rem) {
  body.page-answer .sal-consent {
    position: relative;
    z-index: var(--z-base);
    inset: auto;
    width: calc(100% - 2 * var(--space-6));
    max-width: calc(52rem - 2 * var(--space-6));   /* the column's own content width */
    margin: var(--space-4) auto 0;
    transition: opacity var(--dur-fast) var(--ease-out) var(--dur-slow);
  }
  body.page-answer .sal-consent[data-entering] { transform: none; }
  body.page-answer .sal-consent[data-closing] {
    transform: none;
    transition: opacity var(--dur-quick) var(--ease-standard) 0s;
  }
}
@media (min-width: 90rem) {
  body.page-answer .sal-consent {
    width: calc((100vw - 52rem) / 2 + var(--space-6) - 3 * var(--space-4));
  }
}
/* Glass lifts the row var(--space-4) off the window's bottom edge (see the
   .submit-row block below), which spends exactly the margin this figure was
   over-clearing by: at 7rem the notice's bottom edge and the plate's top rim
   ended up on the same line, touching. Give the lift back. */
[data-theme="glass"] body.page-answer {
  --sal-consent-clear: calc(7rem + var(--space-4));
}

.submit-row {
  position: sticky; bottom: 0; margin-top: 3rem;
  /* Above the sliders (z-index 1) — everything that scrolls under the row,
     text and sliders alike, blurs behind it. */
  z-index: 10;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule-gold); padding: 1rem 0.25rem;
}
/* Progress and error on their own line above the buttons. As four flex
   siblings the row wrapped to two or three lines on a phone, and the wrap point
   moved as the error text came and went; giving the two spans a full-width
   flex item caps the row at two rows at every width. `flex: 1 0 100%` and no
   `order` — the div is appended before the buttons, so the reading order is
   the visual order. */
.submit-meta {
  flex: 1 0 100%;
  display: flex; gap: var(--space-3); align-items: baseline; flex-wrap: wrap;
}
.submit-row .progress { color: var(--text-muted); font-size: var(--fs-body-sm); }
/* --danger-text, not --danger: crimson is a FILL colour and measures 2.6–3:1
   as text on ink; the text tier is the same hue at the lightness AA needs. */
.submit-row .error { color: var(--danger-text); font-size: var(--fs-body-sm); }

/* A SMALL SCREEN GETS A SMALL BAR. At 320 wide the progress line, Tilbake and
   Fortsett stood on three rows — about 170px of a 568px screen — and a part's
   first question landed under them. Here the two buttons share one row and the
   bar keeps only the air it needs: progress on a short line above, then the
   presses. Narrow OR short, because a phone on its side has the same problem
   with the width to spare. */
@media (max-width: 480px), (max-height: 42rem) {
  .submit-row {
    gap: var(--space-2) var(--space-3);
    margin-top: var(--space-6);
    padding-block: var(--space-2);
    padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
  }
  .submit-row .progress, .submit-row .error { font-size: var(--fs-caption); }
  .submit-row .sal-btn { padding-inline: var(--space-3); }
  /* Out-ranks the glass plate's own padding further down, which is (0,2,0). */
  :root[data-theme="glass"] .submit-row { padding-block: var(--space-2); }
}


/* Under glass the row stops being a rule and becomes a PLATE, and that has to
   be finished as a plate. Dark and light give it a gold hairline over the
   page's own colour at 88%: two edges of an implied box, and the eye supplies
   the rest from the column it already knows. Guard weight gives it a body
   instead — visibly denser than the wash — so the left and right edges of that
   body are drawn whether we draw a rim on them or not, and the bottom ran off
   the window. Square corners, a ring on the top edge alone, and the reader gets
   a box with three sides missing sitting under two fully-rimmed question cards.

   So: all four corners at the card's own --radius-lg, the roster's whole ring
   (test.html no longer trims it to the top), and the plate lifted var(--space-4)
   clear of the window's bottom edge — which is what makes the fourth side
   something there is room to see. `bottom` is the sticky offset; the matching
   margin is what keeps the gap once the row lands at the end of the column
   instead of riding the viewport. */
[data-theme="glass"] .submit-row {
  bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  /* 0.25rem of gutter is what a full-width rule needs; a plate needs the
     card's own, so the progress line and Fortsett stand under the question
     text rather than out past it. Vertical is untouched — the row's height is
     what body.page-answer's --sal-consent-clear is budgeted against. */
  padding: 1rem var(--space-6);
}
/* And it follows the card down at the same breakpoint, for the same reason:
   at 320px two buttons and a gap need every pixel of the 64 the wide gutters
   were spending, or Fortsett wraps to a line of its own and the plate grows
   past the clearance the notice above it was given. */
@media (max-width: 480px) {
  [data-theme="glass"] .submit-row { padding: 1rem var(--space-4); }
}

/* Confirmation panel — layout only; the card itself is .sal-card. */
.confirm-panel { border-color: var(--danger); }
/* --danger-text: crimson as text measured 2.58:1 on the dark card. */
.confirm-title { font-weight: var(--fw-medium); color: var(--danger-text); margin: 0 0 var(--space-3); }
/* The same panel once the last missing answer is in (it updates live): not a
   warning any more, so the moss and the outline an answered card wears. */
.confirm-panel[data-done] { border-color: color-mix(in srgb, var(--done) 50%, transparent); }
.confirm-panel[data-done] .confirm-title { color: var(--done); }
/* With nothing left to press (the bar's own button is the way on) the line is
   the whole panel, and sits in it evenly. */
.confirm-panel .confirm-title:last-child { margin-bottom: 0; }
.confirm-list {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  color: var(--text-secondary);
  max-height: 40vh;
  overflow-y: auto;
}
.confirm-list li { margin: var(--space-1) 0; }
.confirm-list a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.confirm-list a:hover { color: var(--accent); }
/* Only on the submit-time panel: what happens to the questions in the list
   above if you go on. Quieter than the question it precedes. */
.confirm-note {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary); font-size: var(--fs-body-sm);
}
.confirm-q { margin: 0 0 var(--space-4); color: var(--text-primary); }
.confirm-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Post-submit confirmation. */
.done { padding-block: var(--space-8); }
.done h2 { font-size: var(--fs-heading-1); margin-bottom: var(--space-3); }
.done p { color: var(--text-secondary); }
.done .done__left { color: var(--text-primary); font-variant-numeric: tabular-nums; }
/* The receipt's heading takes focus from the script (tabindex -1) so a screen
   reader hears that it went in — not from a key, so no ring for the eye. A
   keyboard reader still gets one wherever :focus-visible applies. */
.done > h2[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
/* The receipt's ways on: «Svar om neste person» and «Tilbake til testene»,
   side by side while they fit and stacked once they do not. Links styled as
   the design system's buttons — they go somewhere, so they are <a>. */
.done .done__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
}
/* .sal-btn is nowrap; on a phone a long label wraps inside itself rather than
   outgrowing the column. */
.done .done__actions .sal-btn { white-space: normal; max-width: 100%; }

/* ------- join page (/join/<role>/<token>) ------- */

/* One screen, one decision — the same narrow measure as a test page, since this
   is a form to fill in and not a page to browse. Every state (the form, an
   invitation that no longer opens anything, already a member, done) is drawn
   into this one container by join.html's `screen()`. */
.join { max-width: 44rem; padding-block: var(--space-7) var(--space-9); }
/* ── the head, and the eyebrow is the whole of it now ─────────────────────
   «Jeg er feil person» stood at the right of this line, small and quiet: the
   way out of having picked somebody else's name off a list. Nobody picks a seat
   any more — an account is matched to its own by its address — so there is no
   wrong one to get out of, and the wrapping row that held the two apart went
   with it.
   What is left is the one thing the head still does for the eyebrow, and it is
   STATED rather than left for margin collapsing to arrive at by accident: the
   eyebrow gives up its own bottom margin, so the air above .join__title is the
   heading's own and stays the heading's if that value ever changes. */
.join__head > .eyebrow { margin: 0; }

.join__title {
  font-size: clamp(var(--fs-heading-1), 5vw, var(--fs-display-md));
  line-height: var(--lh-tight);
  margin-block: var(--space-4) var(--space-3);
}
.join .lede { margin: 0 0 var(--space-3); }
/* What the link makes them: the premise of the one press under it, and on a
   member arrival the only sentence in the panel.
   NO BOTTOM MARGIN, still, although «Fullt navn» is back below it on a leader
   arrival. The air between the two belongs to the FIELD and is declared there,
   because the field is the thing that comes and goes: a member press has no
   field at all, and a bottom margin here would reopen the 48px of nothing
   between a sentence and the button it introduces that the deleted field left
   behind. The press's own air is .join__go's for the same reason — margins
   belong to the element that is always there to carry them, and neither
   collapses into the other anyway, since a .sal-btn is inline-flex and an
   inline-level box's top margin has nothing to collapse with.
   The role itself is the family's emphasis: italic ember, never bold. That `em`
   is declared up with the vocabulary rule near the top of this file, so this
   sentence cannot drift from the other places the brand makes such a claim. */
.join__role {
  margin: 0;
  max-width: 52ch;
  color: var(--text-secondary);
}
/* THE LEADER'S NAME — the one field left on this site, under the sentence that
   says why it is being asked for. It owns the air above itself (see
   .join__role) and nothing below it: the alert collapses when empty and the
   press declares its own. `hidden` on a member press is honoured by
   .sal-field[hidden] in components.css, whose display would otherwise beat the
   UA rule. No transition on the way out — a field that vanishes because the
   chair was taken is a rare race, and the alert beside it is what the reader
   is meant to be reading. */
.join__field { margin-top: var(--space-5); }
/* Collapsed and NEVER `display: none`, and join.html builds this <p>
   empty and standing on the strength of it: a role="alert" is announced when
   text ARRIVES in a region the accessibility tree already holds, and an element
   that was display: none until the moment it spoke enters that tree carrying
   its sentence — a node appearing, not an alert. The first refusal of a sitting
   is exactly the one that is lost. It is the one that can least afford to be:
   with the seat picker and its messages gone, this alert is the whole of what
   the panel can say — the leader seat taken between the paint and the press,
   the account already in the team, the server that did not answer.
   The zeroed margin is the whole of the collapse. This is block flow, so an
   empty <p> generates no line box and is already nothing tall; only its own
   top margin had to go. */
.join__error { margin: var(--space-4) 0 0; }
.join__error:empty { margin: 0; }
/* ONE declaration for the air above the press, and it holds in both states the
   panel has: 24px under the role line at rest, and 24px under the alert once a
   press has been refused. Put on the things that can precede it instead, it
   would have to be right twice and stay right — and the alert is a role="alert"
   that arrives after the paint. */
.join__go { margin-top: var(--space-5); }
/* Two children on the leader's confirmation — a primary and a ghost — so the
   line is declared rather than left to two inline-flex buttons and a space.
   («Avbryt» was the third thing this row could hold: the way back out of a
   correction to a seat picked wrong. There is no seat to pick and no
   correction to back out of, so the row holds one press or two.)
   `.join__actions.backlink` is still a single link and still reads as one: a
   flex row of one item is that item. */
.join__actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

/* ── start page (start.html) ──────────────────────────────────────────────
   What a catalogue card opens: the test, who it is about, which team, what to
   know first, and «Start testen». It sits in .test-main, the questionnaire's
   own narrow measure, so the step from one page to the next does not move the
   column under the reader's eyes.

   Two state colours, each with its one meaning. EMBER is «already answered»,
   the owner's own word for it — the outline a person who has been answered
   about wears, so a re-answer is never an accident. AMBER is «too old to count
   any more», and it is the catalogue's stale card exactly: the outline is
   --warning at the card's 70%, the words are main's --stale (the catalogue
   section declares it, light mode deepened), so one fact has one colour on
   both pages instead of two near-identical ambers mixed twice.

   The ember LINES take --accent itself; the ember WORDS («Fullført … Vil du
   svare på nytt?») take a text tier, the same move --done and --stale make:
   --accent at 14px is ~4.4:1 on a row and under 4:1 on the picked row's ember
   wash, so it steps 15% toward the cream on ink and toward the ink on cream
   (≈4.9:1 on the wash, ≈5.5:1 on a plain row, either theme). */
.start { --answered: color-mix(in srgb, var(--accent) 85%, var(--cream-100)); }
:is([data-theme="light"], [data-glass-tone="white"]) .start {
  --answered: color-mix(in srgb, var(--accent) 85%, var(--ink-900));
}

/* The content arrives after two fetches, replacing the loading line. A swap
   with no transition reads as a glitch; this is the smallest thing that covers
   it — opacity and 4px, ease-out, inside 200ms. Seen once per opened card, so
   it has earned an entrance; it is not repeated on anything the reader does. */
.start.start--in { animation: start-in 200ms var(--ease-out); }
@keyframes start-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes start-fade { from { opacity: 0; } }
@keyframes start-fade-out { to { opacity: 0; } }

/* «Team: Sál · Tech-team   Feil team?» — a line of context under the heading,
   not a control panel: one team is a fact, and the switch only exists when
   there is another team to switch to. */
.start-team {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  margin: 0 0 var(--space-6);
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
}
.start-team__name { color: var(--text-primary); }
/* A text press in the link colour, underlined so it reads as pressable at body
   size. The padding is the hit area a thumb needs and the negative margin
   gives the line its height back. */
.start-team__switch {
  margin: calc(-1 * var(--space-2)) 0 calc(-1 * var(--space-2)) var(--space-2);
  padding: var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 160ms ease, transform var(--dur-press) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .start-team__switch:hover { color: var(--accent-hover); }
}
/* It is a press like every other one here, so it answers on the way down. */
.start-team__switch:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .start-team__switch:active { transform: none; }
}
.start-lang { margin: 0 0 var(--space-5); }
.start-note { margin-block: var(--space-4) var(--space-6); }

/* ── who it is about ── */
.start-who { margin: 0 0 var(--space-7); }

/* ONE obligation is a statement, so it is a plate and not a row: no dot, no
   hover, nothing that asks to be pressed. The same hairline plate as the
   catalogue's cards and the team board's rows. */
.start-plate {
  padding: var(--space-5);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
}
.start-plate__label { margin: 0 0 var(--space-2); }
.start-plate__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-heading-2);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  overflow-wrap: anywhere;   /* a peer is an address, and an address has no spaces */
}
.start-plate__meta { margin: var(--space-1) 0 0; font-size: var(--fs-body-sm); color: var(--text-muted); }
.start-plate__note { margin: var(--space-3) 0 0; max-width: 60ch; color: var(--text-secondary); }
.start-plate__state { margin: var(--space-3) 0 0; font-size: var(--fs-body-sm); }

/* SEVERAL is a choice: a heading that asks, a count on the gold rule, and one
   row per person. */
.start-who__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
}
/* The gold rule under the heading IS the progress: a hairline track with the
   answered share filled in ember — «3 av 9 fullført» drawn, not decorated.
   Set once on load; nothing animates it. */
.start-who__meter {
  position: relative;
  height: 2px;
  background: var(--rule-gold);
  overflow: hidden;
}
.start-who__meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
}
.start-who__title,
.start-before__title {
  margin: 0;
  font-size: var(--fs-heading-3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
}
.start-who__count {
  margin: 0;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.start-who__lede { margin: var(--space-3) 0 var(--space-4); max-width: 60ch; color: var(--text-secondary); }
.start-who__lede + .start-who__lede { margin-top: calc(-1 * var(--space-2)); }
.start-who__list { display: flex; flex-direction: column; gap: var(--space-2); }

/* A ROW IS A LINK THAT PICKS on a plain press (aria-current) — not a radio, because a radio
   group selects on every arrow press and selecting an answered person opens a
   dialog; see whoList() in start.html — so the whole plate is the hit area and
   not an 18px circle. Two independent channels, so both can be true at once without
   a third combined style: the OUTLINE says what state the person is in, and
   the FILL says «this is the one picked».

   The pick is FILLED, not outlined, because an outline is already taken: an
   answered row wears an ember one, and ember is also the focus ring's colour,
   so a second outline-shaped «picked» read as one more answered row (and, in
   light mode, the lifted --surface-hover ground went DARKER than its
   neighbours and read as disabled). Filled is how this system marks a choice
   — a selected chip is filled, a selected menu row is ember-washed
   (.sal-menu__item--selected) — so the picked row takes that wash, a solid
   ember edge, and the radio's own ember dot: three cues, none of them an
   outline. The edge is an inset shadow rather than a border, so the state
   outline stays one even colour all the way round. */
.start-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease,
              transform var(--dur-press) var(--ease-out);
}
/* «Neste» on the first person still to do, at the row's end. */
.start-row__next { flex: none; margin-left: auto; align-self: flex-start; margin-top: 0.15em; }
.start-row__next[hidden] { display: none; }   /* .sal-badge sets display */
/* The dot is .sal-check's radio, drawn by hand because there is no radio
   under it any more: the same 18px ring, the same 8px ember dot fading up
   from scale(0.6) — so the row still reads as «pick one» at a glance. It sits
   on the first line of the name, not in the middle of three. */
.start-row__dot {
  flex: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin-top: 0.3em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface-inset);
  transition: border-color var(--dur-quick) var(--ease-out);
}
.start-row__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out);
}
.start-row[aria-current="true"] .start-row__dot { border-color: var(--accent); }
.start-row[aria-current="true"] .start-row__dot::before { opacity: 1; transform: scale(1); }
/* A done row's ring holds a thin check in the answered colour instead of the
   dot — done is said by the mark itself, picked or not. */
.start-row[data-state="done"] .start-row__dot {
  border-color: var(--answered);
  color: var(--answered);
}
.start-row[data-state="done"] .start-row__dot::before { display: none; }
.start-row__dot > svg { display: block; }
.start-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.start-row__name {
  font-family: var(--font-display);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-snug);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.start-row__meta,
.start-row__state { font-size: var(--fs-body-sm); line-height: var(--lh-normal); color: var(--text-muted); }
/* Pointing strengthens the outline in whatever colour it already is — the
   catalogue card's hover, at its strengths — so no row loses its state under
   the pointer. */
@media (hover: hover) and (pointer: fine) {
  .start-row[data-state="todo"]:hover { border-color: var(--border-strong); }
  .start-row[data-state="done"]:hover { border-color: color-mix(in srgb, var(--accent) 75%, transparent); }
  .start-row[data-state="stale"]:hover { border-color: var(--warning); }
}
.start-row:active { transform: scale(0.99); }
.start-row[aria-current="true"] {
  box-shadow: inset 3px 0 0 var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-raised));
}
.start-row:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* The two states, on the plate and on the row alike, at the catalogue card's
   strengths (done 50%, stale 70%) so the two pages draw one fact one way. */
.start-plate[data-state="done"],
.start-row[data-state="done"] { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.start-plate[data-state="stale"],
.start-row[data-state="stale"] { border-color: color-mix(in srgb, var(--warning) 70%, transparent); }
[data-state="done"] > .start-plate__state,
.start-row[data-state="done"] .start-row__state { color: var(--answered); }
[data-state="stale"] > .start-plate__state,
.start-row[data-state="stale"] .start-row__state { color: var(--stale); }

/* ── before you start ── */
.start-before {
  margin: 0 0 var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule-gold);
}
.start-before__title { margin-bottom: var(--space-4); }
/* A colleague rating the leader: what the questions were written for, and the
   way out of one they cannot see. Ahead of the list, in the body's own colour
   rather than the list's quieter one, because it governs every answer. */
.start-before__note {
  max-width: 60ch;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
  line-height: var(--lh-relaxed);
}
.start-before__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 60ch;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}
/* A short gold dash, not a bullet glyph: the hairline is this brand's mark,
   and a dash level with the x-height reads as a list without shouting it. */
.start-before__list li { position: relative; padding-left: var(--space-5); }
.start-before__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: var(--space-3);
  height: 1px;
  background: var(--rule-gold);
}

/* ── the two presses ──
   «Tilbake» at the start of the line, «Start testen» at the end — the order a
   page is read in, and the one the sketch drew. margin-left:auto keeps the
   start press at the end even when a narrow screen wraps the row. */
.start-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-hairline);
}
.start-actions__go { margin-left: auto; overflow-wrap: anywhere; }
/* A LIST keeps its two presses in sight: the row rides the bottom of the
   window, as the sitting's submit row does, so «Start: <navn>» never sits a
   screen away from the person it starts. */
.start-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  backdrop-filter: blur(8px);
  border-top-color: var(--rule-gold);
}
/* One line from 381px up, however long the name: «Start: <navn>» takes the
   room «Tilbake» leaves and wraps inside itself, rather than dropping under
   it into a staircase (below 381px the pair stacks, as every start page does). */
@media (min-width: 381px) {
  .start-actions--sticky { flex-wrap: nowrap; }
  .start-actions--sticky > .start-actions__back { flex: none; }
  .start-actions--sticky > .start-actions__go { flex: 0 1 auto; min-width: 0; white-space: normal; text-align: center; }
}
/* …and a row reached by Tab is scrolled clear of it, not under it. */
html:has(.start-actions--sticky) { scroll-padding-bottom: 8rem; }
.start-actions .icon-inline { flex: none; }
/* Below ~380px the two no longer fit one row (the gutter is a fixed 32px), and
   a wrapped row left «Start testen» hanging alone at the right under
   «Tilbake» — a staircase. So they stack, each the full width, in reading
   order: the way back, then the way on, which lands under the thumb. */
@media (max-width: 380px) {
  .start-actions > .sal-btn { flex: 1 1 100%; }
  .start-actions__go { margin-left: 0; }
}

/* ── «Du har allerede svart» ──
   The design system's scrim and dialog, kept at body level by start.html. Only
   the timing is this page's: the system's 600ms/1100ms entrance is written for
   a dialog that announces something, and this one answers a press — so 180ms
   for the scrim, 200ms for the panel, and a quicker 120ms on the way out,
   because the exit is the half the reader waits through. Opacity and a few
   pixels only; reduced motion keeps the fade and drops the movement. */
.start-confirm.sal-scrim { animation: start-fade 180ms var(--ease-out); }
.start-confirm .sal-dialog { max-width: 28rem; animation: start-in 200ms var(--ease-out); }
.start-confirm[data-closing] { animation: start-fade-out 120ms var(--ease-out) forwards; }
.start-confirm__title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-heading-3);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  overflow-wrap: anywhere;
}
.start-confirm__body { margin: 0; color: var(--text-secondary); }
.start-confirm .sal-dialog__footer { flex-wrap: wrap; }
/* The page's own two presses stack under 380px (see .start-actions); the
   dialog's do the same, or «Svar på nytt» wraps alone under «Avbryt». */
@media (max-width: 380px) {
  .start-confirm .sal-dialog__footer > .sal-btn { flex: 1 1 100%; }
  /* The stacked «Avbryt» takes a hairline, as the delete dialog's does. */
  .start-confirm .sal-dialog__footer > .sal-btn--ghost { border-color: var(--border-hairline); }
}

@media (prefers-reduced-motion: reduce) {
  .start.start--in,
  .start-confirm .sal-dialog { animation: start-fade 200ms var(--ease-out); }
  .start-row { transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
  .start-row:active { transform: none; }
  .start-row__dot::before { transform: none; transition: opacity var(--dur-quick) var(--ease-out); }
}
