/* hero.css — Hero Gears' design system. ONE file for every program.
 *
 * Chosen by Anton 2026-10-19: light, Apple-style - white and light-grey surfaces,
 * ONE blue, Inter. It replaces the dark / Merriweather system of 2026-10-14 (that
 * version is in git history, commit b91e111). The rules are in DESIGN.md and
 * DESIGN-layout.md beside this file; styleguide.html shows every part and
 * examples/ shows two real screens laid out by the rules.
 *
 * Master copy: Hero-Gears/hero-coding-rules, design/. Programs carry an exact copy
 * (with fonts/) under their own static folder and never edit it - change it here,
 * then copy it out. No colour, font size, radius or spacing outside this file.
 *
 * Drawn from Apple's public Human Interface Guidelines (principles and proportions)
 * and apple.com's own web blues. No Apple font, icons or logos are used.
 *
 * Fonts are shipped with the file (fonts/, Inter, SIL OFL 1.1). Nothing is loaded
 * from the internet: the factory screens must work without it.
 *
 * ── LAYOUT (what keeps a screen from looking messy) ─────────────────────────────
 * The rules are written out in DESIGN-layout.md. In short:
 *   - ONE spacing scale (4 8 12 16 24 32 48 64). Nothing else is ever used.
 *   - Space INSIDE a group is always smaller than the space BETWEEN groups
 *     (the law of proximity): 8 related · 16 items · 24 groups/cards · 48 sections.
 *   - FIVE type sizes (12 14 17 22 34). Hierarchy = size, weight and grey - never
 *     capitals, never a box per heading.
 *   - Top-left is what matters, top-right is the one main action. Answer first
 *     (is everything OK?), then numbers, then the list, then rare tools, then logs.
 *   - Everything is left-aligned in ONE column; text never wider than ~65 characters.
 *   - A part owns its inside; the container owns the space between parts. A part
 *     never sets its own outer margin (except banners, which fold away smoothly).
 *
 * ── MOTION (what moves, and why) ────────────────────────────────────────────────
 * Move only what the person touches or what just changed. Text, numbers and table
 * rows do not animate on their own.
 *   press   buttons, tiles, rows, switch thumb  - answer a finger instantly
 *   hover   buttons, tiles, rows, table rows, links - colour or lift, quickly
 *   focus   inputs, buttons - the ring fades in
 *   slide   segmented control thumb, switch thumb, disclosure arrow
 *   change  status pill, row dot, tile status word, banner colour - crossfade, never snap
 *   enter   banners - slide down and fade in; leave - fade up and fold away
 * Everyone who has "reduce motion" switched on gets none of it (bottom of file).
 */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Brand: one blue, everything else is grey */
  --hero-text:       #1d1d1f;   /* all ordinary text */
  --hero-bg:         #f5f5f7;   /* the page */
  --hero-primary:    #0071e3;   /* the ONE main action on a page = the blue */
  --hero-secondary:  #e8e8ed;   /* other actions: light grey fill */
  --hero-accent:     #0071e3;   /* links, focus, what is selected: the same blue */
  --hero-accent-hover: #0058b0;
  --hero-primary-hover: #0077ed;
  --hero-primary-press: #0068d0;

  /* Surfaces and quiet text */
  --hero-surface:    #ffffff;   /* cards, tiles, panels, inputs */
  --hero-surface-2:  #f5f5f7;   /* hover, raised */
  --hero-surface-press: #ebebf0;/* a row or list item being pressed */
  --hero-line:       #e5e5ea;   /* hairlines */
  --hero-line-strong:#c7c7cc;   /* input borders */
  --hero-muted:      #6e6e73;   /* secondary text, labels (4.9:1 on white) */

  --hero-on-primary:   #ffffff; /* 4.7:1 on #0071e3 */
  --hero-on-secondary: #1d1d1f;
  --hero-on-accent:    #ffffff;

  /* Status. Text colours are Apple's darker "accessible" variants so words stay
     readable on white; the bright system colours are for dots only. */
  --hero-ok:        #248a3d;
  --hero-warn:      #b25000;
  --hero-bad:       #d70015;
  --hero-unknown:   #8944ab;
  --hero-queue:     #27406b;    /* deep navy; the map's own status colour (hf_render.js) is the same */
  --hero-ok-bg:      rgba(52, 199, 89, .12);
  --hero-warn-bg:    rgba(255, 149, 0, .14);
  --hero-bad-bg:     rgba(255, 59, 48, .09);
  --hero-unknown-bg: rgba(175, 82, 222, .10);
  --hero-queue-bg:   rgba(39, 64, 107, .10);
  --hero-ok-dot:     #34c759;
  --hero-warn-dot:   #ff9500;
  --hero-bad-dot:    #ff3b30;
  --hero-unknown-dot:#af52de;
  --hero-yellow-dot: #ffcc00;   /* only for the yellow light of the HeroBot mascot's chest */
  --hero-queue-dot:  #27406b;

  /* Type: Inter, with the system font as fallback. FIVE sizes, nothing in between:
       34 page title · 22 section title · 17 body and card title (semibold)
       14 secondary text · 12 caption */
  --hero-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --hero-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --hero-size-xs: 12px;
  --hero-size-s:  14px;
  --hero-size-m:  17px;   /* body */
  --hero-size-l:  22px;
  --hero-size-2xl: 34px;
  --hero-leading: 1.47;

  /* Shape: rounder than Hero today */
  --hero-radius-s: 8px;     /* inputs */
  --hero-radius-m: 12px;    /* rows, banners */
  --hero-radius-l: 18px;    /* cards, tiles */
  --hero-radius-pill: 999px;/* buttons, pills */

  /* Space: ONE scale on a 4/8 grid. Nothing in between. */
  --hero-space-1: 4px;  --hero-space-2: 8px;  --hero-space-3: 12px;
  --hero-space-4: 16px; --hero-space-5: 24px; --hero-space-6: 32px;
  --hero-space-7: 48px; --hero-space-8: 64px;
  /* ...and what each step is FOR (proximity: inside a group < between groups) */
  --hero-gap-related: var(--hero-space-2);   /* a label and its field, a title and its subtitle */
  --hero-gap-item:    var(--hero-space-4);   /* items in a group, fields in a form, cards in a row */
  --hero-gap-group:   var(--hero-space-5);   /* groups in a section; the padding of a card */
  --hero-gap-section: var(--hero-space-7);   /* between sections of a page */
  --hero-page-width:  1040px;
  --hero-page-narrow: 720px;
  --hero-measure:     65ch;                  /* the widest a line of reading text may be */

  --hero-focus: 0 0 0 4px rgba(0, 113, 227, .30);
  --hero-card-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --hero-lift-shadow: 0 8px 28px rgba(0, 0, 0, .10);

  /* Motion. Apple moves things with a fast start that settles softly (the
     "ease" curve below), and answers a press instantly. Colour changes are
     quick; things that MOVE (a thumb, a card, a banner) take a little longer.
     Pick from these, nothing in between. */
  --hero-ease:   cubic-bezier(.32, .72, 0, 1);   /* movement: quick start, soft landing */
  --hero-ease-s: cubic-bezier(.4, 0, .2, 1);     /* colour and fades */
  --hero-t-press: .08s;   /* finger down */
  --hero-t-fast:  .18s;   /* hover, colour, focus */
  --hero-t-move:  .35s;   /* thumbs, cards, banners */

  /* Carried over from the dark system, so programs written for it keep working
     until their pages are laid out again (2026-10-19). --hero-shadow is the shadow
     of a window that floats over something (the app window on the map, a speech
     bubble). --hero-size-xl (28 px) is NOT one of the five sizes: do not use it in
     new pages; it goes when the last page stops using it. */
  --hero-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  --hero-size-xl: 28px;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
.hero, .hero * { box-sizing: border-box; }
body.hero {
  margin: 0;
  background: var(--hero-bg);
  color: var(--hero-text);
  font: 400 var(--hero-size-m)/var(--hero-leading) var(--hero-font);
  letter-spacing: -.011em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
/* Headings and paragraphs own NO outer space: the container that holds them
   decides the gap (see "Layout" below). Balanced/pretty wrapping avoids a lone
   word on the last line. */
.hero h1, .hero .hero-h1 { font-size: var(--hero-size-2xl); font-weight: 600; line-height: 1.12; letter-spacing: -.022em; margin: 0; text-wrap: balance; }
.hero h2, .hero .hero-h2 { font-size: var(--hero-size-l);   font-weight: 600; line-height: 1.25; letter-spacing: -.017em; margin: 0; text-wrap: balance; }
.hero h3, .hero .hero-h3 { font-size: var(--hero-size-m);   font-weight: 600; line-height: 1.3;  letter-spacing: -.011em; margin: 0; text-wrap: balance; }
.hero p  { margin: 0; text-wrap: pretty; }
.hero a:not([class]) { color: var(--hero-accent); text-decoration: none; transition: color var(--hero-t-fast) var(--hero-ease-s); }
.hero a:not([class]):hover { color: var(--hero-accent-hover); text-decoration: underline; text-underline-offset: 2px; }
.hero code, .hero .hero-kode { font-family: var(--hero-mono); letter-spacing: 0; }   /* same size as the text around it: only five sizes exist */
.hero .hero-muted { color: var(--hero-muted); }
.hero .hero-small { font-size: var(--hero-size-s); }
.hero .hero-caption { font-size: var(--hero-size-xs); color: var(--hero-muted); letter-spacing: 0; }
.hero .hero-label {               /* small grey group label inside a list; NOT for section titles. Sentence case: no headline is ever written in capitals */
  font-size: var(--hero-size-s); font-weight: 600; letter-spacing: 0;
  color: var(--hero-muted); margin: 0 0 var(--hero-space-2);
}
.hero :focus-visible { outline: none; box-shadow: var(--hero-focus); }
.hero [hidden] { display: none !important; }   /* "hidden" always wins over a part's own display */

/* ── Layout: the page, the header, the sections ─────────────────────────────────
 *   <div class="hero-page">
 *     <nav class="hero-hjem">…</nav>
 *     <header class="hero-header">  title + lede on the left, the ONE main action on the right
 *     <section class="hero-section"> <div class="hero-section__head"><h2>…</h2></div> …content… </section>
 */
.hero-page { max-width: var(--hero-page-width); margin: 0 auto;
             padding: var(--hero-space-6) var(--hero-space-5) var(--hero-space-8); }
.hero-page--narrow { max-width: var(--hero-page-narrow); }
@media (max-width: 600px) {
  .hero-page { padding: var(--hero-space-4) var(--hero-space-4) var(--hero-space-7); }
}

/* The way back. Quiet, at the very top, its TEXT aligned with the page edge. */
.hero-hjem { display: flex; gap: var(--hero-space-1); margin: 0 0 var(--hero-space-5) calc(var(--hero-space-4) * -1); }

.hero-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
               gap: var(--hero-space-4) var(--hero-space-5); margin: 0 0 var(--hero-space-6); }
.hero-header__text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--hero-gap-related); }
.hero-lede { font-size: var(--hero-size-m); color: var(--hero-muted); max-width: var(--hero-measure); }
.hero-header__actions { display: flex; flex-wrap: wrap; gap: var(--hero-space-3); align-items: center; }

.hero-section { margin-top: var(--hero-gap-section); }
.hero-header + .hero-section, .hero-section:first-child { margin-top: 0; }
.hero-section__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hero-space-3);
                      margin: 0 0 var(--hero-space-4); }
.hero-section__aside { margin-left: auto; font-size: var(--hero-size-s); color: var(--hero-muted); }
.hero-section__aside b { color: var(--hero-text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Containers. These own the space between the parts they hold. */
.hero-stack { display: flex; flex-direction: column; gap: var(--gap, var(--hero-gap-item)); }
.hero-stack--tight { --gap: var(--hero-space-2); }
.hero-stack--loose { --gap: var(--hero-gap-group); }
.hero-stack > * { margin-top: 0; margin-bottom: 0; }
.hero-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--hero-space-3)); }
.hero-cluster--between { justify-content: space-between; }
.hero-cluster--end { justify-content: flex-end; }
.hero-grid { display: grid; gap: var(--hero-gap-item); grid-template-columns: repeat(auto-fit, minmax(var(--min, 220px), 1fr)); }
.hero-split { display: grid; gap: var(--hero-gap-group); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .hero-split { grid-template-columns: minmax(0, 1fr); } }
.hero-prose { max-width: var(--hero-measure); }
.hero-prose > * + * { margin-top: var(--hero-space-3); }
.hero-scroll { overflow-x: auto; }

/* The bar above a list: a filter on the left, the action for the list on the right */
.hero-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
                gap: var(--hero-space-3); margin: 0 0 var(--hero-space-4); }

/* ── Buttons: four kinds, nothing else ──────────────────────────────────────
 *   primary   - the ONE main action on a page (blue, filled)
 *   secondary - other actions (light grey, filled)
 *   ghost     - quiet: navigation, cancel, "back" (plain blue text)
 *   danger    - removes something or cannot be undone (red text on pale red)
 * Hover fades the fill; a press shrinks the button a touch and darkens it, at
 * once; letting go springs back. The focus ring fades in instead of popping.
 * The label says what happens ("Opret indkøbsordre"), never just "OK".
 */
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--hero-space-2);
  min-height: 40px; padding: var(--hero-space-2) var(--hero-space-5);
  border: 0; border-radius: var(--hero-radius-pill);
  font: 500 var(--hero-size-s)/1.2 var(--hero-font); letter-spacing: -.006em; text-decoration: none;
  cursor: pointer;
  transition: background-color var(--hero-t-fast) var(--hero-ease-s),
              color var(--hero-t-fast) var(--hero-ease-s),
              box-shadow var(--hero-t-fast) var(--hero-ease-s),
              transform var(--hero-t-move) var(--hero-ease);
}
.hero-btn:active:not(:disabled):not([aria-disabled="true"]) {
  transform: scale(.97);
  transition-duration: var(--hero-t-press);
}
.hero-btn--primary   { background: var(--hero-primary);   color: var(--hero-on-primary); }
.hero-btn--primary:hover:not(:disabled)   { background: var(--hero-primary-hover); }
.hero-btn--primary:active:not(:disabled)  { background: var(--hero-primary-press); }
.hero-btn--secondary { background: var(--hero-secondary); color: var(--hero-on-secondary); }
.hero-btn--secondary:hover:not(:disabled) { background: #dcdce1; }
.hero-btn--secondary:active:not(:disabled){ background: #d1d1d6; }
.hero-btn--ghost     { background: transparent; color: var(--hero-accent); padding-left: var(--hero-space-4); padding-right: var(--hero-space-4); }
.hero-btn--ghost:hover:not(:disabled)     { background: rgba(0, 113, 227, .08); }
.hero-btn--ghost:active:not(:disabled)    { background: rgba(0, 113, 227, .16); }
.hero-btn--danger    { background: var(--hero-bad-bg); color: var(--hero-bad); }
.hero-btn--danger:hover:not(:disabled)    { background: rgba(255, 59, 48, .16); }
.hero-btn--danger:active:not(:disabled)   { background: rgba(255, 59, 48, .24); }
.hero-btn:disabled, .hero-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.hero-btn--small { min-height: 30px; padding: var(--hero-space-1) var(--hero-space-4); font-size: var(--hero-size-xs); }

/* Actions at the bottom of a form, dialog or card: right-aligned, the main one LAST
   (rightmost). Put a destructive one apart on the left, never beside the main one. */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
                gap: var(--hero-space-3); margin-top: var(--hero-gap-group); }
.hero-actions--start { justify-content: flex-start; }
.hero-actions__apart { margin-right: auto; }

/* ── Surfaces ────────────────────────────────────────────────────────────── */
/* A card holds a group of things that belong together. Never nest cards. */
.hero-card {
  background: var(--hero-surface); border: 1px solid var(--hero-line);
  border-radius: var(--hero-radius-l); padding: var(--hero-gap-group);
  box-shadow: var(--hero-card-shadow);
}
@media (max-width: 600px) { .hero-card { padding: var(--hero-space-4); } }
.hero-card--flush { padding: 0; overflow-x: auto; overflow-y: hidden; }   /* tables and lists run edge to edge; a wide table scrolls, it is never cut off */
.hero-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--hero-space-3);
                   padding: var(--hero-space-4) var(--hero-gap-group); border-bottom: 1px solid var(--hero-line); }
.hero-card__body { padding: var(--hero-gap-group); }
.hero-card__foot { display: flex; justify-content: flex-end; gap: var(--hero-space-3); flex-wrap: wrap;
                   padding: var(--hero-space-3) var(--hero-gap-group); border-top: 1px solid var(--hero-line);
                   background: var(--hero-surface-2); }

/* Banners: a tinted band, a coloured dot, dark text.
 * They slide down and fade in when they appear, and fold away when they go
 * (add .is-leaving, wait .35 s, remove). A banner is the one part that carries its
 * own bottom margin, so it can fold away without the layout jumping. */
.hero-banner {
  position: relative; padding: var(--hero-space-3) var(--hero-space-4) var(--hero-space-3) var(--hero-space-6);
  border-radius: var(--hero-radius-m); background: var(--hero-surface);
  border: 1px solid var(--hero-line); margin: 0 0 var(--hero-space-4);
  font-size: var(--hero-size-s); line-height: 1.45;
  transition: background-color var(--hero-t-move) var(--hero-ease-s), border-color var(--hero-t-move) var(--hero-ease-s);
  animation: hero-banner-in var(--hero-t-move) var(--hero-ease);   /* no fill: when it ends it lets go, so leaving can fade */
}
.hero-stack > .hero-banner { margin: 0; }
@keyframes hero-banner-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hero-banner::before { content: ""; position: absolute; left: var(--hero-space-4); top: 1.05em;
                       width: 8px; height: 8px; border-radius: 50%; background: var(--hero-line-strong);
                       transition: background-color var(--hero-t-move) var(--hero-ease-s); }
.hero-banner.is-ok      { background: var(--hero-ok-bg);      border-color: transparent; }
.hero-banner.is-warn    { background: var(--hero-warn-bg);    border-color: transparent; }
.hero-banner.is-bad     { background: var(--hero-bad-bg);     border-color: transparent; }
.hero-banner.is-unknown { background: var(--hero-unknown-bg); border-color: transparent; }
.hero-banner.is-ok::before      { background: var(--hero-ok-dot); }
.hero-banner.is-warn::before    { background: var(--hero-warn-dot); }
.hero-banner.is-bad::before     { background: var(--hero-bad-dot); }
.hero-banner.is-unknown::before { background: var(--hero-unknown-dot); }
.hero-banner .hero-actions { margin-top: var(--hero-space-3); }
/* The one number a person reads off a screen and types into Monitor: big, equal-width, one click selects it all. */
.hero-bignumber { font-family: var(--hero-mono); font-size: var(--hero-size-2xl); font-weight: 600; letter-spacing: .02em;
                  line-height: 1.2; margin: var(--hero-space-2) 0; user-select: all; }
.hero-banner.is-leaving {
  animation: none; overflow: hidden; opacity: 0; transform: translateY(-8px);
  height: 0 !important; padding-top: 0; padding-bottom: 0; margin-bottom: 0; border-width: 0;
  transition: opacity var(--hero-t-fast) var(--hero-ease-s), transform var(--hero-t-move) var(--hero-ease),
              height var(--hero-t-move) var(--hero-ease), padding var(--hero-t-move) var(--hero-ease),
              margin var(--hero-t-move) var(--hero-ease);
}

/* Pills: a status in words. Colour is never the only signal. When the status
   changes, the colour and the word crossfade instead of snapping. */
.hero-pill {
  display: inline-block; padding: 2px var(--hero-space-3); border-radius: var(--hero-radius-pill);
  font-size: var(--hero-size-xs); font-weight: 500; white-space: nowrap; letter-spacing: 0;
  background: var(--hero-secondary); color: var(--hero-muted);
  transition: background-color var(--hero-t-move) var(--hero-ease-s), color var(--hero-t-move) var(--hero-ease-s);
}
.hero-pill.is-ok      { color: var(--hero-ok);      background: var(--hero-ok-bg); }
.hero-pill.is-warn    { color: var(--hero-warn);    background: var(--hero-warn-bg); }
.hero-pill.is-bad     { color: var(--hero-bad);     background: var(--hero-bad-bg); }
.hero-pill.is-unknown { color: var(--hero-unknown); background: var(--hero-unknown-bg); }
.hero-pill.is-queue   { color: var(--hero-queue);   background: var(--hero-queue-bg); }

/* App tiles: things you OPEN. The status is the coloured word under the name, nothing
 * else (Anton, 2026-10-29: "the word coloured fx kører is enough") - no ring, no coloured
 * edge. Hover lifts the tile; a press pushes it back down and in. */
.hero-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--hero-gap-item); }
.hero-tile {
  --lift: var(--hero-card-shadow);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--hero-space-2);
  padding: var(--hero-space-5) var(--hero-space-3) var(--hero-space-4); text-align: center;
  background: var(--hero-surface); border: 1px solid var(--hero-line); border-radius: var(--hero-radius-l);
  box-shadow: var(--lift);
  color: var(--hero-text); text-decoration: none;
  transition: box-shadow var(--hero-t-move) var(--hero-ease), transform var(--hero-t-move) var(--hero-ease),
              border-color var(--hero-t-move) var(--hero-ease-s);
}
a.hero-tile:hover { color: var(--hero-text); --lift: var(--hero-lift-shadow); transform: translateY(-2px); }
a.hero-tile:active { transform: scale(.98); --lift: var(--hero-card-shadow); transition-duration: var(--hero-t-press); }
.hero-tile .hero-ikon {
  width: 60px; height: 60px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 113, 227, .10); color: var(--hero-accent);
  font-weight: 600; font-size: var(--hero-size-l); letter-spacing: -.01em;
}
.hero-tile .hero-navn   { font-weight: 600; font-size: var(--hero-size-s); line-height: 1.3; }
.hero-tile .hero-status { font-size: var(--hero-size-xs); font-weight: 500; letter-spacing: 0;
                          transition: color var(--hero-t-move) var(--hero-ease-s); }
.hero-tile.is-ok .hero-status   { color: var(--hero-ok); }
.hero-tile.is-warn .hero-status { color: var(--hero-warn); }
.hero-tile.is-bad .hero-status  { color: var(--hero-bad); }

/* Icons (Phosphor Regular, icons/sprite.svg): <svg class="hero-icon"><use href=".../icons/sprite.svg#wrench"/></svg>.
 * Painted in the text colour (currentColor), so an icon is always the colour of what it sits
 * in. Default size is the size of the text beside it; the modifiers are the type scale:
 * s 14 · m 17 · l 22 · 2xl 34 (a tile). No other size. */
.hero-icon { width: 1em; height: 1em; flex: none; fill: currentColor; vertical-align: -.125em; }
.hero-icon--s   { width: var(--hero-size-s);   height: var(--hero-size-s); }
.hero-icon--m   { width: var(--hero-size-m);   height: var(--hero-size-m); }
.hero-icon--l   { width: var(--hero-size-l);   height: var(--hero-size-l); }
.hero-icon--2xl { width: var(--hero-size-2xl); height: var(--hero-size-2xl); }

/* Rows: things that only have to keep RUNNING, or the lines of a list. One grouped
 * list, a dot, a word. At least 52 px tall. Hover and press tint the row like a
 * list item in an Apple app. */
.hero-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hero-line);
             border-radius: var(--hero-radius-l); overflow: hidden; background: var(--hero-surface);
             box-shadow: var(--hero-card-shadow); }
.hero-card--flush > .hero-rows, .hero-disclosure__body > .hero-rows { border: 0; border-radius: 0; box-shadow: none; }
.hero-rows li + li { border-top: 1px solid var(--hero-line); }
.hero-row { display: flex; align-items: center; gap: var(--hero-space-3); flex-wrap: wrap; min-height: 52px;
            padding: var(--hero-space-3) var(--hero-gap-group); color: var(--hero-text); text-decoration: none;
            font-size: var(--hero-size-s);
            transition: background-color var(--hero-t-fast) var(--hero-ease-s); }
.hero-row::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--hero-line-strong);
                    transition: background-color var(--hero-t-move) var(--hero-ease-s); }
.hero-row--plain::before { display: none; }
a.hero-row:hover { background: var(--hero-surface-2); color: var(--hero-text); }
a.hero-row:active { background: var(--hero-surface-press); transition-duration: var(--hero-t-press); }
.hero-row.is-ok::before   { background: var(--hero-ok-dot); }
.hero-row.is-warn::before { background: var(--hero-warn-dot); }
.hero-row.is-bad::before  { background: var(--hero-bad-dot); }
.hero-row .hero-navn { flex: 1; min-width: 160px; font-weight: 500; }
.hero-row__time { flex: none; width: 4.5em; font-family: var(--hero-mono); font-size: var(--hero-size-xs); color: var(--hero-muted); }

/* Numbers that matter (counts on a dashboard). They do not animate: a number
   that moves by itself is a number nobody can read. Equal-width digits. */
.hero-tal { display: flex; gap: var(--hero-space-3); flex-wrap: wrap; }
.hero-tal--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--hero-gap-item); }
.hero-tal > div { background: var(--hero-surface); border: 1px solid var(--hero-line); box-shadow: var(--hero-card-shadow);
                  border-radius: var(--hero-radius-l); padding: var(--hero-space-4) var(--hero-gap-group); min-width: 140px;
                  display: flex; flex-direction: column; gap: var(--hero-space-1); }
.hero-tal b { display: block; font-size: var(--hero-size-2xl); font-weight: 600; line-height: 1.1; letter-spacing: -.022em;
              font-variant-numeric: tabular-nums; }
.hero-tal span { font-size: var(--hero-size-xs); color: var(--hero-muted); letter-spacing: 0; }

/* Key and value, for details ("Mappe: …", "Scope: …") */
.hero-kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--hero-space-2) var(--hero-gap-group);
           margin: 0; font-size: var(--hero-size-s); }
.hero-kv dt { color: var(--hero-muted); }
.hero-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Nothing here yet. The ONE place text is centred. */
.hero-empty { padding: var(--hero-space-7) var(--hero-gap-group); text-align: center; color: var(--hero-muted);
              font-size: var(--hero-size-s); display: flex; flex-direction: column; gap: var(--hero-space-1); }
.hero-empty b { color: var(--hero-text); font-size: var(--hero-size-m); font-weight: 600; }

/* ── Forms and tables ────────────────────────────────────────────────────── */
/* A form: ONE column, the label ABOVE its field, help text under it. */
.hero-form { display: flex; flex-direction: column; gap: var(--hero-gap-group); max-width: 520px; }
.hero-field { display: flex; flex-direction: column; gap: var(--hero-gap-related); }
.hero-field > label, .hero-field__label { font-size: var(--hero-size-s); font-weight: 500; }
.hero-help { font-size: var(--hero-size-xs); color: var(--hero-muted); letter-spacing: 0; }
.hero-field .hero-input, .hero-field select, .hero-field input[type=text], .hero-field input[type=number] { width: 100%; }
.hero-field--inline { flex-direction: row; align-items: center; }

.hero-input, .hero select, .hero input[type=text], .hero input[type=number] {
  font: 400 var(--hero-size-s)/1.4 var(--hero-font); color: var(--hero-text); letter-spacing: -.006em;
  background: var(--hero-surface); border: 1px solid var(--hero-line-strong);
  border-radius: var(--hero-radius-s); padding: var(--hero-space-2) var(--hero-space-3); min-height: 40px;
  transition: border-color var(--hero-t-fast) var(--hero-ease-s), box-shadow var(--hero-t-move) var(--hero-ease);
}
.hero-input:hover, .hero select:hover, .hero input[type=text]:hover, .hero input[type=number]:hover {
  border-color: #aeaeb2;
}
.hero-input:focus, .hero select:focus, .hero input[type=text]:focus, .hero input[type=number]:focus {
  border-color: var(--hero-accent);
}

/* Tables: at most six columns. Name first, its code under it in grey. Numbers are
 * right-aligned (class is-num) with equal-width digits. Actions last and quiet
 * (class is-actions). Rows at least 52 px. No vertical lines, no zebra stripes. */
.hero-table { width: 100%; border-collapse: collapse; font-size: var(--hero-size-s); }
.hero-table th { text-align: left; font-size: var(--hero-size-xs); font-weight: 500; color: var(--hero-muted);
                 padding: var(--hero-space-3); border-bottom: 1px solid var(--hero-line); letter-spacing: 0; white-space: nowrap; }
.hero-table td { padding: var(--hero-space-3); border-bottom: 1px solid var(--hero-line); vertical-align: middle; height: 52px;
                 transition: background-color var(--hero-t-fast) var(--hero-ease-s); }
.hero-table th.is-num, .hero-table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.hero-table th.is-actions, .hero-table td.is-actions { text-align: right; white-space: nowrap; width: 1%; }
.hero-table tr:last-child td { border-bottom: 0; }
.hero-table tbody tr:hover td { background: var(--hero-surface-2); }
.hero-table tbody tr.is-bad td { background: var(--hero-bad-bg); }
.hero-table .hero-cell-main { font-weight: 500; }
.hero-table .hero-cell-sub { display: block; margin-top: 2px; font-size: var(--hero-size-xs); color: var(--hero-muted); letter-spacing: 0; }
.hero-table .hero-cell-sub .hero-kode { color: var(--hero-text); opacity: .8; }
.hero-card--flush .hero-table th:first-child, .hero-card--flush .hero-table td:first-child { padding-left: var(--hero-gap-group); }
.hero-card--flush .hero-table th:last-child,  .hero-card--flush .hero-table td:last-child  { padding-right: var(--hero-gap-group); }
.hero-table--wide { min-width: 640px; }
/* + / − quantity, kept compact so a row does not fill up with buttons */
.hero-qty { display: inline-flex; align-items: center; gap: var(--hero-space-1); }
.hero-qty__n { min-width: 2ch; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-btn--icon { min-width: 30px; padding-left: 0; padding-right: 0; }

/* A row that opens and closes: for what is used seldom, and for logs. */
.hero-disclosure { background: var(--hero-surface); border: 1px solid var(--hero-line); border-radius: var(--hero-radius-l);
                   box-shadow: var(--hero-card-shadow); overflow: hidden; }
.hero-disclosure--plain { border: 0; border-radius: 0; box-shadow: none; }
.hero-disclosure--plain + .hero-disclosure--plain { border-top: 1px solid var(--hero-line); }
.hero-disclosure > summary { list-style: none; display: flex; align-items: center; gap: var(--hero-space-3); min-height: 56px;
                             padding: var(--hero-space-3) var(--hero-gap-group); cursor: pointer; font-weight: 500;
                             transition: background-color var(--hero-t-fast) var(--hero-ease-s); }
.hero-disclosure > summary::-webkit-details-marker { display: none; }
.hero-disclosure > summary:hover { background: var(--hero-surface-2); }
.hero-disclosure > summary:active { background: var(--hero-surface-press); transition-duration: var(--hero-t-press); }
.hero-disclosure > summary .hero-summary__hint { margin-left: auto; font-size: var(--hero-size-s); font-weight: 400; color: var(--hero-muted); }
.hero-disclosure > summary::after {              /* the arrow turns down when it opens */
  content: ""; flex: none; width: 8px; height: 8px; margin: 0 var(--hero-space-1) 0 var(--hero-space-2);
  border-right: 2px solid var(--hero-line-strong); border-bottom: 2px solid var(--hero-line-strong);
  transform: rotate(-45deg); transition: transform var(--hero-t-move) var(--hero-ease);
}
.hero-disclosure > summary .hero-summary__hint + * { margin-left: 0; }
.hero-disclosure[open] > summary::after { transform: rotate(45deg); }
/* The body: padded content (a form, some text) ... */
.hero-disclosure__body { padding: var(--hero-space-1) var(--hero-gap-group) var(--hero-gap-group);
                         display: flex; flex-direction: column; gap: var(--hero-gap-item); }
/* ... or --flush: a list that runs edge to edge, with an optional grey note under it */
.hero-disclosure__body--flush { padding: 0; gap: 0; border-top: 1px solid var(--hero-line); }
.hero-disclosure__body--flush > .hero-rows { border: 0; border-radius: 0; box-shadow: none; }
.hero-disclosure__note { padding: var(--hero-space-3) var(--hero-gap-group); border-top: 1px solid var(--hero-line);
                         background: var(--hero-surface-2); font-size: var(--hero-size-xs); color: var(--hero-muted); letter-spacing: 0; }
@media (max-width: 600px) { .hero-disclosure > summary, .hero-disclosure__body, .hero-disclosure__note { padding-left: var(--hero-space-4); padding-right: var(--hero-space-4); }
                            .hero-disclosure__body--flush { padding-left: 0; padding-right: 0; } }
/* Where the browser can, the body glides open instead of jumping. */
@supports (interpolate-size: allow-keywords) {
  .hero-disclosure { interpolate-size: allow-keywords; }
  .hero-disclosure::details-content { height: 0; overflow: clip;
    transition: height var(--hero-t-move) var(--hero-ease), content-visibility var(--hero-t-move) allow-discrete; }
  .hero-disclosure[open]::details-content { height: auto; }
}

/* Progress: a thin track, the blue fills it. The words say what and how far. */
.hero-progress { display: flex; flex-direction: column; gap: var(--hero-space-2); }
.hero-progress__track { height: 6px; border-radius: var(--hero-radius-pill); background: rgba(118, 118, 128, .16); overflow: hidden; }
.hero-progress__fill { height: 100%; width: 0; border-radius: inherit; background: var(--hero-accent);
                       transition: width .5s var(--hero-ease); }
.hero-progress__meta { display: flex; justify-content: space-between; gap: var(--hero-space-3);
                       font-size: var(--hero-size-xs); color: var(--hero-muted); letter-spacing: 0; }

/* The status card on a dashboard: the mascot and one sentence about how things stand */
.hero-status { display: flex; align-items: center; gap: var(--hero-gap-group); }
.hero-status__text { flex: 1; min-width: 0; }

/* HeroBot, the small mascot. Decoration only; sized by --u (1px = about 93 px tall).
   A dark grey body (--bot) so it stands out on the light page, white eyes and chest
   panel, and a traffic light in the chest: red, yellow, green. */
.hero-bot { --u: 1px; --bot: var(--hero-muted); display: inline-flex; flex-direction: column; align-items: center; flex: none; }
.hero-bot--lg { --u: 1.15px; }
.hero-bot__ball  { width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: 50%; background: var(--hero-accent); }
.hero-bot__stem  { width: calc(2 * var(--u)); height: calc(9 * var(--u)); background: var(--bot); }
.hero-bot__head  { width: calc(46 * var(--u)); height: calc(36 * var(--u)); background: var(--bot);
                   border-radius: calc(12 * var(--u)); display: flex; flex-direction: column; align-items: center;
                   justify-content: center; gap: calc(5 * var(--u)); }
.hero-bot__eyes  { display: flex; gap: calc(7 * var(--u)); }
.hero-bot__eye   { width: calc(12 * var(--u)); height: calc(7 * var(--u)); background: var(--hero-surface);
                   border-radius: calc(4 * var(--u)); position: relative; }
.hero-bot__eye::after { content: ""; position: absolute; left: calc(3 * var(--u)); top: calc(1.5 * var(--u));
                        width: calc(6 * var(--u)); height: calc(4 * var(--u)); border-radius: calc(2 * var(--u));
                        background: var(--hero-accent); }
.hero-bot__mouth { width: calc(16 * var(--u)); height: calc(3 * var(--u)); background: var(--hero-surface);
                   border-radius: 0 0 calc(4 * var(--u)) calc(4 * var(--u)); }
.hero-bot__neck  { width: calc(8 * var(--u)); height: calc(4 * var(--u)); background: var(--bot); }
.hero-bot__body  { width: calc(56 * var(--u)); height: calc(38 * var(--u)); background: var(--bot);
                   border-radius: calc(12 * var(--u)); display: flex; align-items: center; justify-content: center; }
.hero-bot__chest { width: calc(36 * var(--u)); height: calc(22 * var(--u)); background: var(--hero-surface);
                   border-radius: calc(6 * var(--u)); display: flex; align-items: center; justify-content: center;
                   gap: calc(4 * var(--u)); }
.hero-bot__light { width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: 50%; background: var(--hero-bad-dot); }
.hero-bot__light:nth-child(2) { background: var(--hero-yellow-dot); }
.hero-bot__light:nth-child(3) { background: var(--hero-ok-dot); }
.hero-bot--corner { position: fixed; right: var(--hero-space-5); bottom: var(--hero-space-5); pointer-events: none; }

/* The way to the guide (Anton, 2026-10-20): HeroBot in the bottom right corner under a
   speech bubble "Skal du have hjælp?". The whole thing is ONE link to the program's
   article in Hero Info. It replaces .hero-bot--corner. Under 1440 px the robot no longer
   fits beside the 1040 px page, so only the bubble stays; it fits in the page's bottom
   padding, so the last row of the page can always be scrolled clear of it.
     <a class="hero-hjaelp" href="{vejledning}" target="_blank" rel="noopener">
       <span class="hero-hjaelp__boble">Skal du have hjælp?</span>
       <span class="hero-bot" aria-hidden="true">…</span>
     </a> */
.hero-hjaelp { position: fixed; right: var(--hero-space-5); bottom: var(--hero-space-5); z-index: 10;
               display: flex; flex-direction: column; align-items: flex-end; gap: var(--hero-space-3);
               text-decoration: none; border-radius: var(--hero-radius-m); }
.hero-hjaelp__boble { position: relative; white-space: nowrap; padding: var(--hero-space-2) var(--hero-space-4);
                      background: var(--hero-surface); color: var(--hero-accent);
                      font-size: var(--hero-size-s); font-weight: 500;
                      border: 1px solid var(--hero-line); border-radius: var(--hero-radius-m);
                      box-shadow: var(--hero-shadow); }
.hero-hjaelp__boble::after {                    /* the tail, pointing down at the robot's head */
  content: ""; position: absolute; right: calc(28px - 5px); bottom: -6px; width: 10px; height: 10px;
  background: var(--hero-surface); border-right: 1px solid var(--hero-line); border-bottom: 1px solid var(--hero-line);
  transform: rotate(45deg); }
.hero-hjaelp:hover .hero-hjaelp__boble { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 1440px) {
  .hero-hjaelp { right: var(--hero-space-4); bottom: var(--hero-space-4); }
  .hero-hjaelp .hero-bot, .hero-hjaelp__boble::after { display: none; }
}
@media (max-width: 1240px) { .hero-bot--corner { display: none; } }

/* ── Only in the Apple style: parts Hero does not have today ───────────────── */

/* Segmented control. The white thumb SLIDES to the chosen segment (as in iOS and
 * macOS) instead of the white jumping from one label to the next. Segments are
 * equal width; tell the control how many there are: style="--n:3" (up to 6). */
.hero-segment { --n: 3; --i: 0; position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
                gap: 2px; padding: 2px; background: rgba(118, 118, 128, .12); border-radius: 10px; }
.hero-segment input { position: absolute; opacity: 0; pointer-events: none; margin: 0; }
.hero-segment::before {                         /* the thumb */
  content: ""; position: absolute; top: 2px; bottom: 2px; left: 2px; border-radius: 8px; background: #fff;
  width: calc((100% - 4px - (var(--n) - 1) * 2px) / var(--n));
  transform: translateX(calc(var(--i) * (100% + 2px)));
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04);
  transition: transform var(--hero-t-move) var(--hero-ease);
}
.hero-segment:has(input:nth-of-type(2):checked) { --i: 1; }
.hero-segment:has(input:nth-of-type(3):checked) { --i: 2; }
.hero-segment:has(input:nth-of-type(4):checked) { --i: 3; }
.hero-segment:has(input:nth-of-type(5):checked) { --i: 4; }
.hero-segment:has(input:nth-of-type(6):checked) { --i: 5; }
.hero-segment label { position: relative; z-index: 1; text-align: center; padding: var(--hero-space-1) var(--hero-space-4); border-radius: 8px;
                      font-size: var(--hero-size-s); font-weight: 500; cursor: pointer; color: var(--hero-text);
                      letter-spacing: -.006em; white-space: nowrap; transition: opacity var(--hero-t-fast) var(--hero-ease-s); }
.hero-segment label:active { opacity: .55; transition-duration: var(--hero-t-press); }
.hero-segment input:focus-visible + label { box-shadow: var(--hero-focus); }
/* Old browsers without :has() cannot slide: they get the plain white label instead. */
@supports not selector(:has(*)) {
  .hero-segment::before { display: none; }
  .hero-segment input:checked + label { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
}

/* Switch. The thumb slides and the track fades to blue. While a finger is
 * down the thumb stretches a little, as on iOS, and settles when released. */
.hero-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0;
               width: 51px; height: 31px; border: 0; border-radius: var(--hero-radius-pill);
               background: #e9e9ea; cursor: pointer;
               transition: background-color var(--hero-t-move) var(--hero-ease-s), box-shadow var(--hero-t-fast) var(--hero-ease-s); }
.hero-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px;
                      border-radius: 14px; background: #fff;
                      transition: transform var(--hero-t-move) var(--hero-ease), width var(--hero-t-fast) var(--hero-ease);
                      box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16), 0 3px 1px rgba(0, 0, 0, .10); }
.hero-switch:checked { background: var(--hero-accent); }
.hero-switch:checked::after { transform: translateX(20px); }
.hero-switch:active:not(:disabled)::after { width: 33px; }
.hero-switch:checked:active:not(:disabled)::after { transform: translateX(14px); }
.hero-switch:disabled { opacity: .4; cursor: not-allowed; }
.hero-setting { display: flex; align-items: center; justify-content: space-between; gap: var(--hero-space-4);
                padding: var(--hero-space-3) var(--hero-gap-group); min-height: 56px; }
.hero-setting + .hero-setting { border-top: 1px solid var(--hero-line); }
.hero-setting > span { display: flex; flex-direction: column; gap: 2px; }

/* Reduce motion: everything above stops moving. State changes still happen,
   they just happen at once. */
@media (prefers-reduced-motion: reduce) {
  .hero *, .hero *::before, .hero *::after { transition: none !important; animation: none !important; }
}
