/* Server pages of the core (sign-in, invitation, device, legal, operator area): the same component
   layer as packages/ui/src/base.css, so a page from the server and a page from the bundle look the
   same (docs/design/2026-09-15_Entwurf/KOMPONENTEN.md). Every colour is a token from tokens.css, no
   hex value (tools/checks/tokens.sh), no inline style anywhere (CSP). Public Sans from /static/fonts. */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/public-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-ui); font-size: 16px; line-height: 24px; color: var(--color-text);
  background: var(--color-bg); -webkit-font-smoothing: antialiased; text-wrap: pretty; }
.num, .an-table-num, .an-codes, .an-code { font-variant-numeric: tabular-nums; }
a { color: var(--brand-ink); font-weight: var(--weight-semibold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: var(--weight-bold); overflow-wrap: anywhere; }
h1 { font-size: 32px; line-height: 38px; letter-spacing: -0.02em; }
h2 { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: var(--weight-semibold); }
h3 { font-size: var(--text-md); line-height: var(--lh-md); font-weight: var(--weight-semibold); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--color-text-faint); opacity: 1; }
.an-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.an-skip { position: absolute; left: -999px; top: var(--space-2); z-index: 60; padding: var(--space-2) var(--space-3);
  background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-control); }
.an-skip:focus { left: var(--space-2); }

/* symbol and word */
.an-suite-mark { display: block; flex: none; fill: var(--brand); width: 26px; height: 26px; }
.an-suite-mark-lg { width: 34px; height: 34px; }
.an-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none; min-width: 0; }
.an-brand:hover { text-decoration: none; }
.an-wordmark { font-size: 19px; line-height: 24px; font-weight: var(--weight-bold); letter-spacing: -0.025em; }

/* buttons */
.an-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--hit-web);
  padding: 0 18px; border-radius: var(--radius-control); border: 1px solid var(--color-border); background: var(--color-surface);
  color: var(--color-text); font-size: 16px; font-weight: var(--weight-semibold); line-height: 20px; cursor: pointer; text-decoration: none;
  transition: background var(--motion-base) var(--motion-ease), border-color var(--motion-base) var(--motion-ease); text-align: center; }
.an-btn:hover { background: var(--color-surface-sunken); text-decoration: none; }
.an-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.an-btn-primary { background: var(--color-action); border-color: var(--color-action); color: var(--color-action-on); }
.an-btn-primary:hover { background: var(--color-action-ink); border-color: var(--color-action-ink); }
.an-btn-ghost { border-color: transparent; background: transparent; }
.an-btn-danger { color: var(--color-negative); border-color: var(--color-negative); }
.an-btn-danger:hover { background: var(--color-negative-tint); }
.an-btn-sm { font-size: var(--text-sm); padding: 0 14px; }
.an-btn-block { width: 100%; }
.an-link { background: none; border: 0; padding: 0; min-height: var(--hit-web); color: var(--brand-ink); font-weight: var(--weight-semibold); cursor: pointer; }
.an-link:hover { text-decoration: underline; }

/* fields */
.an-form { display: flex; flex-direction: column; gap: 22px; }
.an-form > div > label, .an-field > label, .an-grid-2 label, fieldset legend { display: block; font-size: var(--text-sm); line-height: var(--lh-sm); font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }
.an-field { display: flex; flex-direction: column; gap: var(--space-2); max-width: 520px; min-width: 0; }
.an-field > label { margin-bottom: 0; }
.an-input, select.an-input, textarea.an-input { width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--color-control-border);
  border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); font-size: 16px; }
.an-input-lg { font-size: 18px; }
.an-input-code { font-size: 18px; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.an-input[aria-invalid="true"] { border-color: var(--color-negative); }
.an-input-narrow { width: auto; min-width: 200px; }
.an-hint { font-size: 14px; line-height: 20px; color: var(--color-text-muted); }
.an-form .an-hint { margin-top: var(--space-2); }
.an-field .an-hint { margin-top: 0; }
.an-error { font-size: 14px; line-height: 20px; color: var(--color-negative); font-weight: var(--weight-semibold); }
.an-error::before { content: "× "; font-weight: var(--weight-bold); }
.an-check { display: flex; gap: var(--space-3); align-items: center; font-weight: var(--weight-regular); cursor: pointer; min-height: var(--hit-web); }
.an-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--color-action); flex: none; }
.an-field > label.an-check { font-size: 16px; font-weight: var(--weight-regular); }
.an-fieldset { border: 1px solid var(--color-border-soft); border-radius: var(--radius-control); padding: var(--space-3) var(--space-4); margin: 0; }

/* cards and layout helpers */
.an-panel { background: var(--color-surface); border: 1px solid var(--color-border-soft); border-radius: var(--radius-panel);
  padding: 28px 32px; display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; margin-bottom: var(--space-5); }
.an-panel-elevated { box-shadow: var(--shadow-md); }
.an-narrow-in { max-width: 560px; }
.an-row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.an-inline { display: inline; }
.an-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-5); align-items: start; }
.an-grid-2 > .an-panel { margin-bottom: 0; }
.an-muted { color: var(--color-text-muted); }
.an-kv { margin: 0; display: grid; gap: var(--space-1); }
.an-kv dt { font-size: var(--text-sm); font-weight: var(--weight-semibold); margin-top: var(--space-2); }
.an-kv dd { margin: 0; color: var(--color-text-muted); overflow-wrap: anywhere; }
.an-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-sm); word-break: break-all;
  background: var(--color-surface-sunken); padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); }
.an-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); font-family: ui-monospace, monospace; }
.an-qr { display: block; width: 200px; max-width: 100%; border-radius: var(--radius-control); align-self: center; } /* light quiet zone comes with the image, in both modes */
.an-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-2); }
.an-meter { height: 10px; background: var(--color-border-soft); border-radius: 5px; overflow: hidden; }
.an-meter > span { display: block; height: 100%; background: var(--color-action); }
.an-meter-warn > span { background: var(--color-negative); }
.an-w0 { width: 0; } .an-w10 { width: 10%; } .an-w20 { width: 20%; } .an-w30 { width: 30%; } .an-w40 { width: 40%; } .an-w50 { width: 50%; }
.an-w60 { width: 60%; } .an-w70 { width: 70%; } .an-w80 { width: 80%; } .an-w90 { width: 90%; } .an-w100 { width: 100%; }

/* status sign, tags, notices */
.an-status, .an-tag { display: inline-flex; align-items: baseline; gap: 6px; border-radius: 8px; font-weight: var(--weight-semibold); vertical-align: baseline; }
.an-status { padding: 6px 10px; font-size: 14px; line-height: 18px; }
.an-tag { padding: 2px 8px; font-size: 13px; line-height: 18px; white-space: nowrap; background: var(--color-surface-sunken); color: var(--color-text-muted); }
.an-status-pos, .an-tag-pos { background: var(--color-positive-tint); color: var(--color-positive); }
.an-status-pos::before, .an-tag-pos::before { content: "✓"; font-weight: var(--weight-bold); }
.an-status-neg, .an-tag-neg { background: var(--color-negative-tint); color: var(--color-negative); }
.an-status-neg::before, .an-tag-neg::before { content: "×"; font-weight: var(--weight-bold); }
.an-status-warn { background: var(--color-warning-tint); color: var(--color-warning); }
.an-tag-accent { background: var(--color-action-tint); color: var(--color-action-ink); }
.an-tag-neutral { background: var(--color-surface-sunken); color: var(--color-text-muted); }
.an-alert { display: flex; gap: var(--space-2); padding: 12px 14px; border-radius: var(--radius-control); background: var(--color-action-tint);
  color: var(--color-action-ink); font-weight: var(--weight-semibold); font-size: var(--text-sm); line-height: var(--lh-sm); margin-bottom: var(--space-4); }
.an-alert-neg { background: var(--color-negative-tint); color: var(--color-negative); }
.an-alert-neg::before { content: "×"; font-weight: var(--weight-bold); }
.an-alert-pos { background: var(--color-positive-tint); color: var(--color-positive); }
.an-alert-pos::before { content: "✓"; font-weight: var(--weight-bold); }

/* tables: head on the sunken surface, rows in a card */
.an-table-wrap { overflow-x: auto; padding: 0; gap: 0; }
.an-table-wrap > h2 { padding: 20px 20px 12px; }
.an-table { width: 100%; border-collapse: collapse; }
.an-table th { text-align: left; font-size: 13px; line-height: 18px; font-weight: var(--weight-semibold); color: var(--color-text-muted);
  padding: 12px 20px; background: var(--color-surface-sunken); }
.an-table td { padding: 12px 20px; border-top: 1px solid var(--color-border-soft); vertical-align: middle; height: var(--hit-web); }
.an-table td.an-empty { text-align: center; color: var(--color-text-muted); }
.an-table-num { text-align: right; font-variant-numeric: tabular-nums; }

/* empty areas: one sentence, at most one button */
.an-empty { color: var(--color-text-muted); }
.an-empty-hero { margin-bottom: var(--space-5); padding: 28px; border: 1px dashed var(--color-border); border-radius: var(--radius-tile);
  display: flex; flex-direction: column; gap: var(--space-2); }
.an-empty-lead { font-size: var(--text-lg); line-height: var(--lh-lg); font-weight: var(--weight-semibold); color: var(--color-text); }
.an-empty-hero .an-btn { margin-top: var(--space-3); }

/* the frame: header, colour bar, sidebar, content */
.an-header { display: flex; align-items: center; gap: var(--space-4); padding: 12px 24px; background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-soft); flex-wrap: wrap; }
.an-header form { margin: 0; }
.an-header-divider { width: 1px; height: 26px; background: var(--color-border); flex: none; }
.an-header-app { font-size: 18px; line-height: 24px; font-weight: var(--weight-semibold); }
.an-header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.an-appbar { height: 3px; background: var(--color-border); }
.an-layout { display: flex; min-height: calc(100vh - 72px); }
.an-nav { width: 232px; flex-shrink: 0; padding: 20px 12px; background: var(--color-surface); border-right: 1px solid var(--color-border-soft);
  display: flex; flex-direction: column; gap: var(--space-1); }
.an-nav-item { display: flex; align-items: center; min-height: var(--hit-web); padding: 0 14px; border-radius: var(--radius-control);
  color: var(--color-text); font-weight: var(--weight-regular); text-decoration: none; }
.an-nav-item:hover { background: var(--color-surface-sunken); text-decoration: none; }
.an-nav-item-active { background: var(--color-surface-sunken); font-weight: var(--weight-semibold); }
.an-main { flex: 1; min-width: 0; max-width: 1440px; padding: 32px 40px; }
.an-main > h1 { margin-bottom: var(--space-5); }
.an-main > .an-hint, .an-main > p { margin-bottom: var(--space-5); max-width: 60ch; }
.an-main > .an-row, .an-main > form.an-row { margin-bottom: var(--space-5); }
.an-main-inner { display: flex; flex-direction: column; gap: 28px; }
.an-lang { display: flex; gap: var(--space-2); font-size: 13px; }
.an-lang a { font-weight: var(--weight-regular); color: var(--color-text-muted); text-transform: uppercase; }
.an-lang a[aria-current="true"] { font-weight: var(--weight-bold); color: var(--color-text); }
.an-theme { display: flex; gap: 2px; }
.an-theme .an-btn[aria-pressed="true"] { background: var(--color-surface-sunken); border-color: var(--color-text); }
.an-who { font-size: var(--text-sm); }
.an-legal { max-width: 760px; display: flex; flex-direction: column; gap: var(--space-3); }
.an-legal h2 { margin-top: var(--space-5); }
.an-legal .an-table { margin: var(--space-2) 0; }
.an-legal .an-table th, .an-legal .an-table td { padding-left: 12px; padding-right: 12px; }

/* public pages: symbol and word above one card, one field per step, languages below */
.an-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); padding: 64px 16px 48px; }
.an-auth > .an-brand .an-wordmark { font-size: 27px; line-height: 33px; }
.an-auth-area { margin-top: -16px; font-size: var(--text-sm); color: var(--color-text-muted); font-weight: var(--weight-semibold); }
.an-auth-card, .an-auth > .an-panel { width: 100%; max-width: 440px; padding: 32px; border-radius: 18px; background: var(--color-surface);
  border: 1px solid var(--color-border-soft); display: flex; flex-direction: column; gap: 22px; margin: 0; box-shadow: none; }
.an-auth-card h1, .an-auth > .an-panel h1 { font-size: 27px; line-height: 33px; letter-spacing: -0.015em; }
.an-auth-head { display: flex; flex-direction: column; gap: var(--space-2); }
.an-auth-lead, .an-auth > .an-panel > p { font-size: 16px; line-height: 24px; color: var(--color-text-muted); }
.an-auth-card .an-alert { margin-bottom: 0; }
.an-auth-card .an-field { max-width: none; }
.an-auth-card .an-code { text-align: center; letter-spacing: 0.08em; }
.an-auth-langs { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; }
.an-auth-langs a { color: var(--color-text-muted); font-weight: var(--weight-regular); }
.an-auth-langs a[aria-current="true"] { color: var(--color-text); font-weight: var(--weight-semibold); }
.an-auth-foot { font-size: var(--text-sm); }
.an-auth-foot a { color: var(--color-text-muted); font-weight: var(--weight-regular); }
.an-auth-theme { margin-top: calc(-1 * var(--space-3)); }

@media (max-width: 1023px) {
  .an-layout { flex-direction: column; }
  .an-nav { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--color-border-soft); padding: 8px 12px; }
  .an-main { padding: 24px 20px; }
  .an-who, .an-header-divider, .an-header-app { display: none; }
  .an-header { padding: 14px 20px; }
}
@media (max-width: 479px) {
  .an-auth { padding-top: 32px; }
  .an-auth-card, .an-auth > .an-panel { padding: 24px 20px; }
}
@media print { .an-header, .an-appbar, .an-nav, .an-btn { display: none !important; } .an-main { padding: 0; } }
/* the operator's measurements (core/ops/monitoring.py): a number, a meter, the last 24 hours as a line */
.an-gauge { display: grid; gap: var(--space-2); min-width: 0; }
.an-gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.an-gauge-title { font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.an-gauge-value { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.an-gauge-warn { color: var(--color-negative); font-weight: var(--weight-semibold); }
.an-spark { display: block; width: 100%; height: 40px; color: var(--color-action); }
.an-freshness { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.an-freshness .an-btn { margin-left: auto; }
