/* Schichtbericht-Analyse (#116). A light grey canvas with white cards, a white sidebar with the Sweet Tec logo, one
   typeface (Inter). Blue is data: solid for Stillstand, light for ohne Stillstand. Amber marks what is selected in a
   chart. Red says worse, always with an arrow beside it. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #16191f;          /* text, 17.6:1 on white */
  --ink-strong: #3d4452;   /* secondary text, 9.8:1 */
  --ink-muted: #5b6270;    /* labels, heads, hints: 6.1:1 on white, 5.6:1 on the canvas */
  --rule: #eceef2;         /* row rules inside cards */
  --rule-strong: #dfe2e8;  /* card borders, table head rules */
  --field: #7f8591;        /* control outlines: 3.7:1 on white, 3.2:1 on Panel Grey (WCAG 1.4.11; #154) */
  --panel: #ebedf1;        /* hover rows, quiet panels; one step below the canvas, so a panel shows on it too (#154,
                              P8); Muted Ink 5.2:1 on it */
  --canvas: #f4f5f7;
  --paper: #ffffff;
  --nav-current: #e9ecf2;
  --row-hover: #f8f9fa;    /* hover rows and weekend columns inside white cards */
  --select-soft: #fdf0d2;  /* the lit day's column behind the bars */
  --ink-hover: #2b303a;    /* the primary button on hover */
  --data: #164194;         /* Stillstand (AKTIV) */
  --data-2: #6f8bd0;       /* ohne Stillstand (PASSIV), 3.3:1 on white */
  --select: #f7a800;       /* selection in a chart, never text on white */
  --alert: #d41217;        /* worse than the reference, a failed state; 5.4:1 on white */
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: var(--body);
  --side-w: 240px;
  --radius: 12px;
  --radius-control: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); scroll-padding-top: 96px; touch-action: manipulation; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 20; padding: 8px 16px; background: var(--ink); color: var(--paper); border-radius: var(--radius-control); }
.skip:focus { top: 8px; }
body { margin: 0; font: 400 14px/1.5 var(--body); color: var(--ink); background: var(--canvas); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; scrollbar-color: var(--rule-strong) transparent; }
::selection { background: var(--select); color: var(--ink); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: var(--rule-strong); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--radius-control); }
h1, h2, h3 { font-family: var(--head); margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.015em; }
h2 { font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 13px; line-height: 20px; font-weight: 600; }
small { font-size: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }
.icon { flex: none; display: inline-block; vertical-align: -3px; }

/* Shell: a white sidebar beside the canvas. */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px 0; background: var(--paper); border-right: 1px solid var(--rule-strong); position: sticky; top: 0; align-self: start; height: 100vh; z-index: 3; }
/* #116: the nav scrolls on short screens, not the sidebar, so the ask suggestions can open wider than it. */
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.side-head { padding: 0 8px 12px; }
.logo { display: block; width: 104px; }
.logo img { display: block; width: 104px; height: auto; }
.app-name { margin: 8px 0 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.demo-mark { display: inline-block; margin: 6px 0 0; padding: 1px 8px; background: var(--panel); border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 11px; line-height: 16px; font-weight: 500; color: var(--ink-strong); }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: var(--radius-control); text-decoration: none; color: var(--ink-strong); font-weight: 500; }
.side li a .icon { color: var(--ink-muted); }
.side li a:hover { background: var(--panel); color: var(--ink); }
.side li a[aria-current="page"] { background: var(--nav-current); color: var(--ink); font-weight: 600; }
.side li a[aria-current="page"] .icon { color: var(--ink); }
.nav-text { flex: 1; min-width: 0; }
/* Sections (#75): a quiet label per group of what you do; the footer stays in view while a long list scrolls. */
.nav-section { margin: 16px 0 4px 10px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.nav .nav-section:first-child { margin-top: 8px; }
.side-foot { position: sticky; bottom: 0; margin-top: auto; padding: 8px 0 16px; background: var(--paper); border-top: 1px solid var(--rule); }
.stand { display: grid; gap: 1px; margin: 10px 10px 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.stand strong { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); }
.stand .term { justify-self: start; }
.stand-week { color: var(--ink-strong); text-decoration: none; }
/* Login (#137, ADR 0037). Who is signed in, last in the sidebar's foot under a hairline: the name (cut with an ellipsis
   when long) over the role, „Abmelden“ as a 32px icon button at the right (Frederick's pick, 16 Nov 2026). */
.account { display: flex; align-items: center; gap: 4px; margin: 12px 0 0; padding: 12px 0 0 10px; border-top: 1px solid var(--rule); }
.account-who { display: grid; flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 18px; }
.account-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--ink); }
.account-role { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.account-out { flex: none; margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; color: var(--ink-muted); background: none; border: 0; border-radius: var(--radius-control); cursor: pointer; }
.icon-btn:hover, .icon-btn:focus-visible { color: var(--ink); background: var(--panel); }
/* A change this role may not make (#137 follow-up, Frederick 17 Nov 2026): his sentence once, first in the body of the
   page the change came from, where a card would start and as wide (shared edges): white with the card's hairline, the
   sign-in refusal's Ink 600 and circle-alert icon. Panel Grey would vanish on the canvas (same grey). The answer to what
   was just tried, not an error page. It takes focus on load; not on paper. */
.refused { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0; padding: 10px 16px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.refused .icon { flex: none; margin-top: 2px; }
.refused:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
@media print { .refused { display: none; } }
@media (max-height: 860px) and (min-width: 761px) {  /* short laptop screens: the nav keeps its room (1366 × 768) */
  .account { margin-top: 6px; padding-top: 6px; }
}
/* The sign-in pages: the logo and the app's name over one white card in the middle of the canvas (Frederick's pick).
   Fields are 36px, as for a form one fills in; a refusal is Ink at 600 with its icon, an invalid field a 2px Ink
   border (DESIGN.md Inputs: never red). */
.auth-page { display: flex; flex-direction: column; align-items: center; min-height: 100vh; min-height: 100dvh; padding: 64px 16px 48px; font-feature-settings: "cv11" 1; }  /* words: no tabular hyphen (#125) */
.auth-brand { margin-bottom: 24px; }
.auth-brand img { display: block; width: 104px; height: auto; }
.auth-card { width: 100%; max-width: 400px; padding: 28px 32px 32px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.auth-card-wide { max-width: 480px; }
.auth-lead { margin: 8px 0 0; color: var(--ink-strong); }
.auth-who { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); overflow-wrap: anywhere; }
.auth-lead + .auth-who { margin-top: 4px; }
.auth-name { font-weight: 600; color: var(--ink); }
.auth-notice { margin: 16px 0 0; padding: 8px 12px; background: var(--panel); border-radius: var(--radius-control); font-size: 13px; line-height: 18px; color: var(--ink-strong); }
.auth-error { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; font-weight: 600; color: var(--ink); }
.auth-error .icon { margin-top: 3px; }
.auth-form { display: grid; gap: 16px; margin-top: 24px; }
.auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="text"] { width: 100%; height: 36px; padding: 0 10px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius-control); }
.auth-form input:hover { border-color: var(--ink-muted); }
.auth-form input[aria-invalid="true"] { padding: 0 9px; border: 2px solid var(--ink); }
.auth-form input.code-input { width: 152px; font-size: 18px; font-weight: 600; letter-spacing: 0.16em; font-feature-settings: "tnum" 1, "cv11" 1; }
.auth-form .auth-submit { height: 36px; }  /* as tall as the fields; .btn comes later in this file */
.auth-help { max-width: 400px; margin: 16px 0 0; text-align: center; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.auth-help a { color: var(--ink-strong); text-decoration-color: var(--field); }
.auth-help a:hover { color: var(--ink); text-decoration-color: currentColor; }
.auth-actions { margin: 24px 0 0; }
.field-hint { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.auth-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.auth-steps > li { display: grid; gap: 12px; counter-increment: step; }
.auth-steps > li + li { padding-top: 20px; border-top: 1px solid var(--rule); }
.auth-steps h2::before { content: counter(step) ". "; }
.auth-app { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 16px; }
.auth-qr { margin: -6px 0 0 -6px; line-height: 0; }  /* the code's own white edge (2 modules) stands outside the text's left */
.auth-qr .qr { display: block; }
.auth-app-hint { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-strong); }
.auth-key { margin-top: 12px; }
.auth-key summary { font-size: 13px; font-weight: 500; color: var(--ink-strong); cursor: pointer; }
.auth-key summary:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-key dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; font-size: 13px; line-height: 18px; }
.auth-key dt { color: var(--ink-muted); }
.auth-key dd { margin: 0; overflow-wrap: anywhere; }
.auth-key code { font: 600 14px/18px var(--body); letter-spacing: 0.04em; }
@media (max-width: 520px) {  /* phones: the QR code over its hint, the key under its label (WCAG 1.4.10) */
  .auth-card { padding: 24px 20px; }
  .auth-app { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .auth-qr { order: 2; margin: 0 0 0 -6px; }  /* a phone cannot scan its own screen: the key comes first */
  .auth-key dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .auth-key dd + dt { margin-top: 6px; }
}
@media (max-width: 760px) {  /* 16px fields: iOS Safari zooms into anything smaller */
  .auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="text"] { font-size: 16px; }
}
.badge { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11px; line-height: 20px; text-align: center; font-weight: 600; }

/* Asking, at the top of the sidebar (#116): a search-like field; the panel of examples opens wider than the sidebar. */
.topbar-ask { position: relative; display: flex; align-items: center; margin: 0 0 4px; }
.ask-icon { position: absolute; left: 10px; top: 9px; color: var(--ink-muted); pointer-events: none; }
.topbar-ask input[type="text"] { flex: 1; min-width: 0; height: 36px; padding-left: 34px; background: var(--paper); border-color: var(--field); border-radius: var(--radius-control); }
.topbar-ask input[type="text"]:hover { border-color: var(--ink-muted); }
.topbar-ask input[type="text"]:focus { background: var(--paper); border-color: var(--field); }
.ask-suggest { position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; width: 400px; padding: 8px 12px 12px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: 0 8px 24px -8px rgb(22 25 31 / 0.18); }
.ask-suggest ul { list-style: none; margin: 4px 0 8px; padding: 0; }
.ask-suggest .example { display: flex; justify-content: space-between; gap: 16px; }
.ask-all { margin: 4px 0 0; font-size: 12px; }
::placeholder { color: var(--ink-muted); opacity: 1; }

/* The page: head (title, the period it shows, the export), the filter row, then cards on the canvas. */
.body { min-width: 0; padding: 0 32px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; max-width: 1376px; padding: 24px 0 12px; }
.page-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.page-title .back { flex-basis: 100%; margin: 0 0 4px; }
.page-title .h1-note { margin-left: 0; }
.page-context { margin: 0; font-size: 13px; color: var(--ink-muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-body { max-width: 1376px; }
.entries-export { margin: 16px 0 8px; }
.topbar-export { gap: 8px; }

/* FilterBar (#116, Front): one row of dropdowns on the canvas; the labels are for screen readers, the period's dates
   stand in the page head. It sticks while the page scrolls. */
.filter { position: sticky; top: 0; z-index: 2; max-width: 1376px; margin: 0; padding: 8px 0 12px; background: var(--canvas); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.label-note { margin-left: 4px; }
/* Zeitraum with ‹ ›: one control in three parts (#80). Off when the period does not step or the data ends. */
.period { display: flex; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); }
.period > :first-child { border-radius: var(--radius-control) 0 0 var(--radius-control); }
.period > :last-child { border-radius: 0 var(--radius-control) var(--radius-control) 0; }
.period select { border-radius: 0 !important; margin: 0 -1px; position: relative; }
/* #155 (S5): with „Von–bis“ picked the row keeps one line at 1280px (it was 155px too wide, so „Alle Produkte“ and
   „Zurücksetzen“ dropped and every card moved 40px down): ‹ › go, since a Von–bis period does not step; the select
   needs only its own words; Von and Bis sit 4px closer to it, as its parts, and hold „01.10.2026“ with the picker
   in 124px. Measured at 1280px: 8px to spare. */
.period:has(option[value="von-bis"]:checked) .step { display: none; }
.period select:has(> option[value="von-bis"]:checked) { width: 110px; margin: 0; border-radius: var(--radius-control) !important; }
.filter-row:has(option[value="von-bis"]:checked) .field-date { margin-left: -4px; }
.filter-row:has(option[value="von-bis"]:checked) .field-date input { width: 124px; padding-left: 8px !important; padding-right: 6px !important; }
.filter-row:has(option[value="von-bis"]:checked) .field-date input::-webkit-calendar-picker-indicator { margin-inline-start: 2px; }
.filter-row:has(option[value="von-bis"]:checked) .filter-reset { padding: 0 0 0 4px; }
.step:hover { background: var(--panel); }
.step.is-off { color: var(--rule-strong); }
.step .flip { transform: scaleX(-1); }
/* Multi-select (#80): a dropdown button; a checkbox list in a white panel with a soft shadow, as menus float. */
.multi { position: relative; }
.multi summary { display: flex; align-items: center; height: 32px; min-width: 120px; max-width: 220px; padding: 0 28px 0 12px; list-style: none; color: var(--ink); background: var(--paper) url("icons/chevron.svg") no-repeat right 10px center; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); cursor: pointer; font-weight: 500; }
.multi summary::-webkit-details-marker { display: none; }
.multi summary::before { content: none; }
.multi summary:hover, .multi[open] summary { border-color: var(--field); }
.multi.is-picked summary { background-color: var(--nav-current); border-color: var(--field); font-weight: 600; }
.multi-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 3; display: flex; flex-direction: column; min-width: 100%; width: max-content; max-width: min(320px, calc(100vw - 32px)); max-height: min(60vh, 420px); overflow-y: auto; margin: 0; padding: 6px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); box-shadow: 0 8px 24px -8px rgb(22 25 31 / 0.18); }
.multi-option { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; border-radius: 6px; cursor: pointer; }
.multi-option:hover { background: var(--panel); }
.multi-option input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.multi-rule { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--rule); }
.multi-hint { max-width: 288px; margin: 8px 8px 0; font-size: 12px; color: var(--ink-muted); }
.multi-done { align-self: flex-start; margin: 8px 0 0 8px; }
/* Chips: each pick with its own ×, under the fields. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px 0 10px; font-size: 12px; color: var(--ink); text-decoration: none; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 999px; }
.chip:hover { border-color: var(--field); }
.chip-filter { color: var(--ink-muted); }
.chip-name { font-weight: 600; }
.chip svg { margin-left: 4px; color: var(--ink-muted); }
.chip:hover svg { color: var(--ink); }
.filter-reset { display: inline-flex; align-items: center; height: 32px; padding: 0 8px; font-size: 13px; font-weight: 500; color: var(--ink-strong); text-decoration: none; }
.filter-reset:hover { color: var(--ink); text-decoration: underline; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--ink-muted); }
.filter .field-date label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
input[type="date"] { width: 136px; }
select { appearance: none; padding-right: 28px !important; background-image: url("icons/chevron.svg"); background-position: right 10px center; background-repeat: no-repeat; }
select, input[type="date"], input[type="text"], input[type="search"] { font: inherit; color: var(--ink); height: 32px; padding: 0 10px; background-color: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); }
.filter select { font-weight: 500; }
select:hover, input[type="date"]:hover, input[type="text"]:hover, input[type="search"]:hover { border-color: var(--field); }
input[type="date"], input[type="text"], input[type="search"], textarea { border-color: var(--field); }
input[type="date"]:hover, input[type="text"]:hover, input[type="search"]:hover, textarea:hover { border-color: var(--ink-muted); }
.btn, .btn-quiet { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--radius-control); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn:hover { background: var(--ink-hover); }
.btn-quiet { background: var(--paper); color: var(--ink); border: 1px solid var(--rule-strong); }
.btn-quiet:hover { border-color: var(--field); background: var(--panel); }
.notice { max-width: 1376px; margin: 0 0 12px; padding: 8px 12px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); font-size: 13px; }
.hint { margin: 0 0 8px; font-size: 13px; color: var(--ink-muted); }

/* Cards (#116): white on the canvas, a thin border, no shadow. A card head carries the title with its (i), the finding
   under it, and the card's own controls at the right. */
.card { margin-top: 16px; padding: 20px 24px 24px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.card-head h2 { display: flex; align-items: center; gap: 6px; }
.finding { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--ink-strong); }
.finding .figure { color: var(--ink); font-weight: 600; text-decoration-color: var(--rule-strong); }
.card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-muted); }
.card-foot p { margin: 0; }
.card-foot a { color: var(--ink-strong); }
/* (i): a small button beside a title or label; a click opens its popover (#125). */
.info { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; color: var(--ink-muted); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.info:hover, .info:focus-visible, .info[aria-expanded="true"] { color: var(--ink); background: var(--panel); }
.info .icon { vertical-align: 0; }
/* A legend line over a chart (dataviz: a legend for two or more series; text in text colours, the mark beside it). */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--ink-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .mark { margin: 0; }
.legend .mark-ref { width: 16px; height: 0; border-top: 1.5px dashed var(--field); }
/* Better or worse: an arrow and the figure; worse in red, better or equal in grey, no direction (Planzeiten) grey. */
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; }
.delta.worse { color: var(--alert); }
.delta .icon { vertical-align: 0; }
/* A segmented switch (Vergleich, period shortcuts): buttons or links in one rounded group. */
.switch { display: inline-flex; padding: 2px; background: var(--panel); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); }
.switch a, .switch button { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-strong); text-decoration: none; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.switch a:hover, .switch button:hover { color: var(--ink); }
.switch [aria-current], .switch [aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--rule-strong); }
.switch-label { margin-right: 8px; font-size: 12px; color: var(--ink-muted); }

/* Terms and figures. A term is a button that reads as its word: a dotted line under it says a click explains it. */
.term { display: inline; padding: 4px 0; margin: -4px 0; font: inherit; color: inherit; text-align: inherit; background: none; border: 0; cursor: pointer; text-decoration: underline dotted var(--field); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.term:hover, .term[aria-expanded="true"] { text-decoration-color: var(--ink); }
/* #154 (P3): the 4px above and below make the word a 24px target (WCAG 2.5.8) without moving the line. */
.figure { white-space: nowrap; }
.figure strong { font-weight: 600; }

/* Popover (#125, design round 3; DESIGN.md Popover): one look for help and for data. White on a soft shadow, as menus
   float; 13px Ink. Help: an optional title, one or two lines, an optional „Mehr“, opened by a click. Data (#tip, on
   hover and focus): the period as heading, label and figure in two aligned columns with tabular figures, the series'
   marks, a hairline before „ohne Stillstand“, notes muted last; no click hint (#129). An icon button's hover name is
   the same popover, one line. The data tip can be hovered: the pointer may rest on it (WCAG 1.4.13, #10). */
.pop, .tip { position: fixed; z-index: 10; box-sizing: border-box; width: max-content; max-width: min(360px, calc(100vw - 16px)); padding: 10px 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--radius-control); box-shadow: 0 8px 24px -8px rgb(22 25 31 / 0.18); font-size: 13px; line-height: 18px; font-weight: 400; text-align: left; white-space: normal; text-wrap: pretty; }
.pop[hidden], .tip[hidden] { display: none; }
.tip.is-name { padding: 4px 8px; font-size: 12px; line-height: 16px; }
.tip.is-passing { pointer-events: none; }  /* a chart tip that had to open in the pointer's way (#154) */
.pop-title, .pop-head { display: block; margin-bottom: 2px; font-weight: 600; color: var(--ink); }
.pop-head { margin-bottom: 8px; }
.pop-text { display: block; color: var(--ink-strong); }
.pop-more { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--field); }
.pop-more:hover { text-decoration-color: var(--ink); }
.pop-rows { display: grid; grid-template-columns: minmax(0, auto) auto; align-items: start; gap: 4px 24px; }
.pop-label { display: flex; align-items: baseline; gap: 8px; color: var(--ink-strong); }
.pop-label .mark { flex: none; margin: 0; width: 8px; height: 8px; border-radius: 2px; }
.pop-label.is-indent { padding-left: 28px; }  /* the parts 12px in from the total's words, past its mark (#154) */
.pop-value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.pop-label.is-strong, .pop-value.is-strong { font-weight: 600; color: var(--ink); }
.pop-value.is-muted { color: var(--ink-muted); }
.pop-label small, .pop-value small { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-muted); }
.ruled th:has([aria-expanded="true"]) { z-index: 3; }  /* a sticky head cell is its own layer: its open popover over the next cells */
.term.delta { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); padding: 4px 2px; margin: -4px 0; }  /* „kein Vergleich“ keeps the delta's look */
.pop-divider { grid-column: 1 / -1; height: 0; margin: 2px 0; border-top: 1px solid var(--rule); }
.pop-note { display: block; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
/* Tabular figures are for figures (#125, Taste): in words Inter's tabular hyphen reads as „Median - Tag“. */
.pop, .tip, .term, .switch, .side, h1, h2, .gloss-row summary { font-feature-settings: "cv11" 1; }

/* Übersicht lists (#116 round 2): the top five across all Moguln, name first, a bar on the first one's scale; Neu
   wiederkehrend as a compact table sorted by Stillstand or Störungen. */
.top-list { margin: 0; padding: 0; list-style: none; }
.top-list li + li { border-top: 1px solid var(--rule); }
.top-list a { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(80px, 3fr) 9.5rem; align-items: center; gap: 16px; padding: 10px 0; color: inherit; text-decoration: none; }
.top-list a:hover { background: var(--row-hover); }
.top-list a:hover strong { text-decoration: underline; }
.top-name { display: flex; flex-direction: column; min-width: 0; }
.top-name strong { font-weight: 600; }
.top-where { font-size: 12px; line-height: 16px; color: var(--ink-muted); font-weight: 400; }
.top-bar { display: block; height: 8px; }
.top-bar i { display: block; height: 100%; min-width: 2px; background: var(--data); border-radius: 0 4px 4px 0; }
.top-figures { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-muted); }
.top-figures strong { color: var(--ink); font-weight: 600; }
.recurring-table th[scope=row] { font-weight: 600; }
.recurring-table th[scope=row] .top-where { display: block; }
.recurring-table thead a { color: inherit; }
.recurring-table thead a[aria-current] { font-weight: 600; text-decoration: none; color: var(--ink); }

/* Stillstand je Tag, Woche oder Monat (#116 round 2, Frederick's pick 1a): one blue on one axis in minutes from 0.
   A column is one link over its whole height; hover, focus and the picked days light the whole column, once. */
.cchart { --plot-h: 200px; --axis-w: 44px; margin-top: 4px; }
.verlauf .cchart { --plot-h: 168px; }
/* #127: the unit has its own row over the axis labels, 16px under the card head (with or without a finding) and
   12px over the plot, so the top tick label, centred on the top gridline, stays 5px clear (12px less half its 14px
   line; print: 10px less half of 11px). Nothing hangs over the text above. */
.cchart-unit { width: var(--axis-w); margin: 0 0 12px; padding-right: 8px; font-size: 12px; line-height: 14px; color: var(--ink-muted); text-align: right; }
.cchart-plot { display: grid; grid-template-columns: var(--axis-w) minmax(0, 1fr); }
.cchart-axis { position: relative; height: var(--plot-h); }
.cchart-axis span { position: absolute; right: 8px; transform: translateY(50%); font-size: 12px; line-height: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.cchart-area { position: relative; height: var(--plot-h); border-bottom: 1px solid var(--rule-strong); }
.cchart-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--rule); }
.cchart-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.cchart-cols li { position: relative; }
.ccol { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; border-radius: 4px 4px 0 0; }
.ccol:hover, .ccol:focus-visible { background: var(--select-soft); }
.ccol:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.ccol.is-picked { background: var(--select-soft); box-shadow: inset 0 -2px 0 var(--select); }
.ccol.is-empty { cursor: default; }
.ccol-bar { position: absolute; bottom: 0; left: 50%; width: clamp(4px, 62%, 24px); height: max(2px, var(--h)); transform: translateX(-50%); background: var(--data); border-radius: 4px 4px 0 0; }
.cchart[data-few] .ccol-bar { width: clamp(4px, 62%, 48px); }  /* S9 a (Frederick, 17 Nov 2026): up to 7 columns */
.ccol-value { position: absolute; left: 50%; bottom: calc(var(--h) + 4px); transform: translateX(-50%); font-size: 11px; line-height: 14px; font-weight: 500; color: var(--ink-strong); white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.cchart-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-left: var(--axis-w); padding-top: 6px; font-size: 12px; line-height: 16px; color: var(--ink-muted); text-align: center; white-space: nowrap; }
.cchart-x .is-empty { color: var(--ink-muted); }
.cchart-note { margin: 6px 0 0 var(--axis-w); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.cchart .strip-table { margin-top: 12px; }
/* „Zahlen als Tabelle“ (#155, U5): as wide as its columns, so a figure sits near its day; Stillstand with its part per
   Mogul and its Störungen, then ohne Stillstand, each group opened by a hairline (RuledTable column groups). */
.ruled.cchart-table { width: auto; }
.cchart-table th[scope="row"] { font-weight: 400; color: var(--ink); padding-right: 24px; }
.cchart-table td.num { min-width: 88px; }
.cchart-table th.group { text-align: center; }
.cchart-table th.group .mark { margin-right: 6px; }
.cchart-table .group, .cchart-table .group-start { border-left: 1px solid var(--rule); }
@media (min-width: 1280px) {  /* the second head row sticks under the first (34px), not on top of it */
  .cchart-table thead tr + tr th { top: calc(var(--filter-h, 65px) + 34px); }
}


/* Übersicht (#82, #116): the measures as one table, a row per Mogul so it grows with the plant; each figure with its
   change against the comparison picked in the card head. */
.overview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 4px; }
.card-title { display: flex; align-items: center; gap: 6px; }
.card-link { font-size: 13px; font-weight: 500; color: var(--ink-strong); white-space: nowrap; }
.compare-switch { display: flex; align-items: center; }
.overview-table th[scope="col"] { white-space: nowrap; }
.overview-table th.col-oee { white-space: normal; min-width: 128px; }
/* #129 (Frederick): the heads align on their first line, so „OEE“ reads in line with „Stillstand“ and the others;
   „vorläufig laut Schichtbericht“ hangs under it. Bottom-aligned, the note took the common line and lifted „OEE“. */
.overview-table thead th { vertical-align: top; }
.overview-table .oee-label { display: block; font-size: 11px; }
.overview-table thead th .mark { margin-right: 6px; }
.overview-table tbody th { padding-right: 24px; font-size: 14px; font-weight: 600; }
.overview-table tbody th a { text-decoration: none; }
.overview-table tbody th a:hover { text-decoration: underline; }
.overview-table td.num { min-width: 112px; padding-top: 12px; padding-bottom: 12px; vertical-align: middle; }
.overview-table .figure strong { font-size: 15px; font-weight: 600; }
.overview-table .figure { text-decoration: none; }
.overview-table .figure:hover { text-decoration: underline; }
.overview-table .oee-label { font-weight: 400; color: var(--ink-muted); }
.deltas { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; min-height: 18px; }
/* U6 a: „kein Vergleich“ once per row, under the Mogul's name; a line in the head where nothing compares. */
.overview-table .row-note { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.compare-none { margin: 4px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.deltas a.delta { min-height: 24px; margin: -4px 0; padding: 4px 2px; text-decoration: none; }  /* a 24px target (WCAG 2.5.8), the row keeps its height */
.deltas a.delta:hover { text-decoration: underline; }
/* One comparison at a time once JavaScript runs (data-compare on the table); without it both show. */
[data-compare="previous"] .cmp-typical, [data-compare="typical"] .cmp-previous { display: none; }
.compare-key { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.compare-key > span { display: inline-flex; align-items: center; gap: 4px; }
.key-worse { color: var(--alert); }
.print-legend { display: none; }
.dot { color: var(--ink-muted); margin: 0 2px; }
.print-head { display: none; }  /* on paper only (#154): see Print */
.print-head img { display: block; width: 48px; height: auto; }
.print-head p { margin: 0; }

/* Sections */
.block { margin-top: 16px; }
h2 .figure { text-decoration-color: var(--ink-muted); }
.sub-block { margin-top: 24px; }

/* TimelineStrip (#116): a row per Mogul, a track per quantity, bars with rounded tops (dataviz), the Median-Tag as a
   dashed line; the value stands at each track's peak, every other day in its tip. */
.strip { --label-w: 196px; --track-h: 56px; }
.strip-weeks { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); font-size: 12px; color: var(--ink-muted); }
.strip-axis { display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); }
.week { padding: 0 0 4px 6px; border-left: 1px solid var(--rule); white-space: nowrap; overflow: hidden; }
.weeks-unit { padding-right: 8px; text-align: right; }  /* „KW“ once, beside the numbers of a long strip (#10) */
.week em { font-style: normal; }
.strip-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); border-top: 1px solid var(--rule); }
.strip-row:first-of-type { border-top-color: var(--rule-strong); }
.strip-row h3 { padding-top: 12px; font-size: 13px; }
.strip-row h3 a { text-decoration: none; }
.strip-row h3 a:hover { text-decoration: underline; }
.track { display: grid; grid-template-columns: calc(var(--label-w) - 76px) minmax(0, 1fr); align-items: stretch; }
.track + .track { border-top: 1px solid var(--rule); }  /* dashes belong to the Median-Tag line only */
.strip-one .track:last-child .track-cells { border-bottom: 1px solid var(--rule-strong); }
.track-label { display: flex; flex-direction: column; align-self: end; padding-bottom: 4px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.track-scale { font-size: 11px; color: var(--ink-muted); }
.track-cells { position: relative; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); height: var(--track-h); }
.cell { position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 0; padding: 0 14%; }
.cell i { display: block; width: 100%; max-width: 24px; min-width: 2px; border-radius: 4px 4px 0 0; }
.track-stillstand .cell i { background: var(--data); }
.track-ohne-stillstand .cell i { background: var(--data-2); }
.cell-weekend { background: var(--row-hover); }
.cell-monday { border-left: 1px solid var(--rule); }
.cell.is-day { background: var(--select-soft); box-shadow: inset 0 0 0 1px var(--select); }
a.cell:focus-visible { outline-offset: -2px; }
.cell-noreport::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--field); }
.strip-values .track-cells { height: calc(var(--track-h) + 24px); }  /* room for the peak label on its own bar */
.strip-values .cell { padding-top: 24px; }
.cell-value { position: absolute; z-index: 1; left: 50%; bottom: calc(var(--track-h) + 2px); transform: translateX(-50%); padding: 0 3px; font-size: 11px; line-height: 13px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; background: var(--paper); border-radius: 3px; pointer-events: none; }
.cell-weekend .cell-value { background: var(--row-hover); }
.cell.is-day .cell-value, .cell.is-picked .cell-value { color: var(--ink); background: var(--select-soft); }
.cell-value.is-peak { bottom: calc(var(--h, 100) * var(--track-h) / 100 + 3px); color: var(--ink); font-weight: 600; }  /* on its own bar, never in the gap to the next track */
.cell-note { bottom: 2px; }  /* „lief nicht“ on the baseline of the Mogul's first track */
.ref { position: absolute; left: 0; right: 0; bottom: calc(var(--ref) * var(--track-h) / 100); height: 0; border-top: 1px dashed var(--field); pointer-events: none; }  /* 3.3:1, WCAG 1.4.11 */
.strip-values .cell i { position: relative; z-index: 1; }  /* the bars stand in front of the Median-Tag line */
.cell-idle::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 6px; height: 0; margin-left: -3px; border-top: 1px solid var(--ink-muted); }  /* lief nicht, once days get narrow */
.strip-note { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--ink-muted); }

/* RankedBars and side list */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 16px; align-items: stretch; }
.split > .card { margin-top: 16px; }
.split.block { margin-top: 0; }
/* #116 round 2: the top five and the Neu-wiederkehrend table stack at every width on screen; the table needs it. */
/* U4 a (Frederick, 17 Nov 2026): the top five and „Neu wiederkehrend“ side by side again from 1280px, the names on one
   column so the bars share a baseline; below 1280px they stack, each at most 760px wide, names near their figures. */
.split.overview-where { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); column-gap: 16px; }
@media screen { .overview-where .top-list a { grid-template-columns: minmax(0, 300px) minmax(112px, 1fr) 7.5rem; } }
@media print { .sort-arrow { display: none !important; } }  /* DESIGN.md Print: sort arrows stay off paper */
@media screen {
  .overview-where .recurring-table th, .overview-where .recurring-table td { padding-left: 6px; padding-right: 6px; }
  .overview-where .recurring-table thead th.num { padding-right: 12px; }  /* room for the sort arrow */
}
th .sort + .info { margin: -4px 0 -4px 12px; vertical-align: middle; }  /* clear of the arrow; the head keeps its line */
.overview-where .recurring-table td.num, .overview-where .recurring-table thead th { white-space: nowrap; }
.overview-where .recurring-table tbody th { white-space: normal; }  /* a long name wraps inside the side card */
@media screen and (min-width: 1366px) {  /* with a Trend column the names keep more room where the window has it */
  .split.overview-where { grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); }
}
@media screen and (max-width: 1279px) {
  .split.overview-where { grid-template-columns: minmax(0, 1fr); }
  .overview-where > .card { max-width: 760px; }
}
.cause-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.cause-columns h3 { margin-bottom: 4px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bar-row { display: grid; gap: 4px; padding: 10px 6px; text-decoration: none; border-top: 1px solid var(--rule); border-radius: 6px; }
.bars li:first-child .bar-row { border-top: 0; }
.bar-row:hover { background: var(--row-hover); }  /* #154: the light blue keeps its contrast (Panel Grey is a step darker now) */
.bar-label { font-size: 13px; }
.sep { color: var(--ink-muted); }
.bar-track { display: block; height: 8px; }
.bar { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; }  /* square at the baseline: a bar, not a meter */
.bar-stillstand { background: var(--data); }
.bar-ohne-stillstand { background: var(--data-2); }
.bar-value { font-size: 12px; color: var(--ink-muted); }
.bar-value strong { color: var(--ink); font-weight: 600; }
.recurring { list-style: none; margin: 0; padding: 0; }
.recurring li { padding: 10px 0; border-top: 1px solid var(--rule); }
.recurring li:first-child { border-top: 0; padding-top: 0; }
.recurring a { display: block; text-decoration: none; }
.recurring a:hover .rec-name { text-decoration: underline; }
.rec-name { display: block; font-size: 13px; }
.rec-figures { display: block; font-size: 12px; color: var(--ink-muted); }
.rec-figures strong { color: var(--ink); font-weight: 600; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.trend svg { flex: none; }
.trend-steigend { color: var(--alert); font-weight: 600; }
.more { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; font-weight: 500; }

/* RuledTable and SourceRef */
.back { margin: 0 0 8px; font-size: 13px; }
.context { margin: 8px 0 16px; }
/* The scope above a list (#113): what it holds, in words, each filter with its dimension; the period last. */
.scope { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 4px 0 0; font-size: 13px; color: var(--ink-strong); }
.scope-label { margin-right: 4px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.scope-part strong { font-weight: 600; }
.scope-part.is-open, .scope-sep { color: var(--ink-muted); }
.scope-all { margin-left: 4px; font-size: 12px; font-weight: 600; text-decoration-color: var(--ink-muted); }
.scope + .context { margin-top: 4px; }
.crumbs + .scope { margin-top: 0; }
/* A list's own filters and its order (#113): one quiet row right above the table, no toolbar. */
.list-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
/* #116: a list's sum and its export on one line, then the list with its own filters in a card. */
.list-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 12px; }
.list-summary .context { margin: 0; font-size: 15px; }
.list-summary .entries-export { margin: 0; }
.list-summary + .shift-sums { margin-top: 8px; }
.list-card .hint { margin-bottom: 8px; }
.list-controls select { max-width: 224px; }
.field-search input { width: 192px; }
.list-state { margin: 0 0 0 auto; padding-bottom: 6px; font-size: 12px; color: var(--ink-muted); }
/* The cap under a long list (#154, P1): a card foot like the Rangfolge's. */
.list-cap { display: block; }  /* „Alle zeigen“ right after its sentence, not at the card's far edge */
.over-cap, .over-cap-note { display: none; }  /* past the first 25 rows: on paper only (#154) */
.list-all { font-weight: 600; color: var(--ink); white-space: nowrap; }
.list-reset { margin-left: 8px; font-weight: 600; color: var(--ink); text-decoration-color: var(--ink-muted); }
/* SortHead (#113): the head sorts its column; the arrow shows on the sorted one only (down: largest or newest first). */
/* The arrow sits in the cell's padding, so a sortable head is no wider than before (#113: the OEE sources' twelve
   heads scrolled the page sideways at 1280 px). */
th .sort { position: relative; display: inline-block; padding: 0; font: inherit; color: inherit; text-align: inherit; text-decoration: none; background: none; border: 0; cursor: pointer; }
th .sort:hover { color: var(--ink); text-decoration: underline; }
.sort-arrow { display: none; position: absolute; left: calc(100% + 1px); bottom: 3px; width: 7px; height: 9px; }
th[aria-sort] .sort { color: var(--ink); }
th[aria-sort] .sort-arrow { display: block; }
th[aria-sort="ascending"] .sort-arrow { transform: rotate(180deg); }
.table-wrap { overflow-x: auto; }
.ruled { width: 100%; border-collapse: collapse; font-size: 13px; }
.ruled th { padding: 8px 12px; text-align: left; font-weight: 500; color: var(--ink-muted); border-bottom: 1px solid var(--rule-strong); font-size: 12px; vertical-align: bottom; }
.ruled thead th { vertical-align: top; }  /* #154 (P7): heads of one and two lines align on their first line */
.ruled thead th { background: var(--paper); }  /* a sticky head stays opaque over the rows passing under it */
.ruled td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ruled tbody tr:last-child > * { border-bottom: 0; }
.ruled tbody tr:hover { background: var(--row-hover); }
.ruled .num { text-align: right; white-space: nowrap; }
.ruled td a { text-decoration: none; }  /* figures in tables: underlined on hover; links inside running text keep their line (WCAG 1.4.1) */
.ruled td a:hover { text-decoration: underline; }
.ruled thead th.num { white-space: normal; }  /* „Kästen Plan“, „OEE laut Bericht“: heads wrap before the page scrolls (#10) */
.nowrap { white-space: nowrap; }
/* Laptops (#10): the remark hyphenates (lang="de") and the SourceRef may break between Datei and „Blatt · Zelle“, so
   the Einträge table fits 1280 px without scrolling the page; on wider screens both stay on one line. */
.remark { min-width: 144px; max-width: 360px; hyphens: auto; }
/* A masked name (#154, P4): „Name entfernt“ as a muted pill inside the text, never the raw „[PERSON]“. */
.masked { display: inline-block; padding: 0 6px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--ink-muted); background: var(--panel); border-radius: 999px; white-space: nowrap; }
.source-ref { display: block; font-size: 12px; color: var(--ink-muted); }
.source-ref > span { white-space: nowrap; }
/* #155: file names and cell references are words: Inter's tabular hyphen read „2026 - 10 - 02“ (as #125 for terms). */
.source-ref, .original-file { font-feature-settings: "cv11" 1; }
.source summary { font-size: 12px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.source dl { margin: 8px 0 0; padding: 8px; background: var(--panel); border-radius: var(--radius-control); font-size: 12px; }
.source dl div { display: grid; gap: 0; margin-bottom: 4px; }
.source dt { color: var(--ink-muted); }
.source dd { margin: 0; overflow-wrap: anywhere; }
/* „Original anzeigen“ as a sub-row (#154, Q4 a): under its entry across the whole table, on Panel Grey; the file with its
   sheet and checksum once, then report column and cell beside the original text in two columns. */
.original-toggle { display: inline-block; font-size: 12px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; white-space: nowrap; }
/* #155 (E1): „Blatt · Zelle“ is the toggle, one line; quiet as a SourceRef, Ink on hover and while open. */
.original-toggle .source-ref { display: inline; color: var(--ink-muted); }
.original-toggle:hover .source-ref, .original-toggle[aria-expanded="true"] .source-ref { color: var(--ink); }
@media print {  /* on paper the reference prints as text, without its chevron */
  .ruled td .original-toggle { display: inline !important; text-decoration: none; }
  .ruled td .original-toggle::before { display: none; }
}
.original-toggle::before { content: ""; display: inline-block; width: 10px; height: 6px; margin-right: 6px; vertical-align: 2px; background: url("icons/chevron.svg") no-repeat center; transform: rotate(-90deg); }
.original-toggle[aria-expanded="true"]::before { transform: none; }
.original-toggle:hover { text-decoration-color: currentColor; }
.ruled .original-toggle { text-decoration: underline; text-decoration-color: var(--rule-strong); }
.ruled tbody tr:nth-last-child(1 of :not(.original-row, .over-cap)) > * { border-bottom: 0; }  /* the last row shown */
.original-row { display: none; }
.original-row.is-open, .original-row:target:not(.is-closed) { display: table-row; }
.original-row.over-cap { display: none; }  /* an open original under a row past the cap goes with it */
.ruled tbody tr.original-row:hover { background: none; }
.ruled tbody tr:has(+ .original-row.is-open) > *, .ruled tbody tr:has(+ .original-row:target) > * { border-bottom-color: transparent; }
.ruled .original-row > td { padding-top: 0; }
.original { padding: 8px 12px; background: var(--panel); border-radius: var(--radius-control); font-size: 12px; line-height: 18px; }
.original-file { margin: 0 0 4px; color: var(--ink-muted); overflow-wrap: anywhere; }
.original-file .hash { font-variant-numeric: tabular-nums; }
.original-cells { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 16px; margin: 0; }
.original-cells > div { display: contents; }
.original-cells dt { color: var(--ink-muted); white-space: nowrap; }
.original-cell { color: var(--ink-strong); }
.original-cells dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* Inline bars, charts and small parts of the detail pages */
/* The Rangfolge (#155, S1): name first, one line per row; the bar (RankedBars: 8px, square at its start) grows from the
   left of the minutes' cell toward the figure, on the first row's scale; Anzahl and kumuliert follow. */
.ranked-table tbody th[scope="row"] { font-weight: 500; }
.ranked-table td.col-bar { width: 36%; min-width: 200px; }
.bar-cell { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem; align-items: center; gap: 12px; }
.bar-cell .bar-track { height: 8px; }
@media print { .bar-cell { gap: 6px; } .bar-cell .bar-track { grid-area: auto; height: 6px; } }
/* Q9 b: „davon ohne Störgrund im Bericht“ apart, as RuledTable's buckets: last, on Panel Grey, below a Strong Hairline. */
.ranked-table tbody.bucket th, .ranked-table tbody.bucket td { background: var(--panel); border-top: 1px solid var(--rule-strong); }
.ranked-table tbody.bucket th[scope="row"] { font-weight: 400; color: var(--ink-strong); }
.panel { background: var(--paper); padding: 16px 20px; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.page-note.panel { margin-top: 16px; max-width: none; }
.empty-compact { margin: 8px 0 0; padding: 8px 12px; background: var(--panel); border-radius: var(--radius-control); font-size: 13px; color: var(--ink-muted); }
.day-letter { font-size: 11px; line-height: 16px; text-align: center; overflow: hidden; white-space: nowrap; }
.day-num { color: var(--ink); }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; display: inline-block; width: 10px; height: 6px; margin-right: 6px; vertical-align: 2px; background: url("icons/chevron.svg") no-repeat center; transform: rotate(-90deg); }
details[open] > summary::before { transform: none; }
.weeks-table summary { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.page-note { margin: 8px 0 0; color: var(--ink-muted); max-width: 80ch; }
.page-note .figure { color: var(--ink); }
.chart { height: 200px; margin-top: 8px; }
.weeks-table summary { font-size: 13px; cursor: pointer; }
.strip-table { margin-top: 8px; }
th a { text-decoration: none; }
th a:hover { text-decoration: underline; }
th a[aria-current] { color: var(--ink); text-decoration: underline; }
.tag { display: inline-block; padding: 0 8px; border-radius: 12px; background: var(--panel); font-size: 12px; white-space: nowrap; }
.btn-row { display: flex; gap: 8px; margin-top: 16px; }

/* Fragen (B1, #140; Frederick's pick Q1 a, 17 Nov 2026): the question field, one white answer card, Quellen as a card
   of its own, the examples and „Zuletzt gefragt“, all at the page's one width (audit F1). No filter bar: the question
   carries its own scope. */
.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 16px; }
.ask input { width: 100%; }
.ask-status { margin: 0; font-size: 13px; color: var(--ink); }
.ask-status:not(:empty) { margin-top: 8px; }
.ask-hint { margin: 8px 0 0; max-width: 80ch; }
.btn[aria-disabled="true"] { background: var(--ink-muted); border-color: var(--ink-muted); cursor: progress; }
.example[aria-disabled="true"] { color: var(--ink-muted); cursor: progress; }
.example[aria-disabled="true"]:hover { background: none; }
body.is-asking .answer, body.is-asking .examples, body.is-asking .ask-history { opacity: .55; transition: opacity 120ms ease-out 120ms; }
/* The wait at a glance (#69): a thin ink line runs under the field, and the loading chip shows the same words. */
.ask-wait { display: none; position: relative; overflow: hidden; height: 2px; margin-top: 8px; background: var(--rule); }
body.is-asking .ask-wait { display: block; }
.ask-wait span { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: var(--ink); animation: ask-wait 1.2s ease-in-out infinite; }
@keyframes ask-wait { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
body.is-asking .loading { visibility: visible; }

/* The answer card: the sentence with the measure page's link at the right, the fixed line under it (kind, shift,
   period, the switch), then its blocks on hairlines, each with a title and its one-line rows. */
/* After asking, focus lands on the sentence (or a no-answer title), a heading with tabindex -1: no ring there
   (Frederick, 17 Nov 2026); the next Tab reaches the first link inside the answer with the normal Ink ring. */
.answer-text:focus, .answer-state:focus { outline: none; }
.answer-question { display: none; }  /* on paper only: the field does not print */
.answer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 32px; }
.answer-text { margin: 0; max-width: 80ch; font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: 0; color: var(--ink); text-wrap: pretty; }  /* a heading that reads as the sentence it is */
.answer-text strong { font-weight: 600; }
.answer-head .card-link { flex: none; }
.answer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.answer-scope { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.answer-period { color: var(--ink-strong); font-weight: 500; }
.answer-switch form { display: contents; }
.answer-switch > span[aria-current] { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
/* Notes on how the answer came about, under the fixed line: recomputed from the history, a name hidden (#110). */
.answer-recomputed, .answer-hidden { margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.answer-state-body + .answer-hidden { margin-top: 8px; }
.answer-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule); }
.answer-block > h2 + .finding { margin-bottom: 16px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-bottom: 8px; }
.block-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
/* The days (Q1 a): the Stillstand column chart, as wide as its columns need (64px each), so a few days never stand as
   lone bars in a wide plot (audit F3); a month fills the card. Light blue for ohne Stillstand (The Two Blues Rule). */
.answer .cchart { max-width: calc(var(--axis-w) + var(--n) * 64px); }
.cchart-ohne-stillstand .ccol-bar { background: var(--data-2); }
/* A day without a report: the 3px Field Outline dot at the baseline; a day with a report and no entry stays blank
   (The Honest Zero Rule). */
.ccol-value.is-print { display: none; }  /* on paper only, for a sparse answer (audit F13) */
.ccol.is-noreport::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 3px; height: 3px; transform: translate(-50%, 50%); border-radius: 50%; background: var(--field); }
.answer .strip-table .ruled { width: auto; min-width: 280px; }
/* One line per row (Q1 a; the Übersicht's top list): the name, a bar on the first row's scale, then minutes and count
   in cells of their own, right-aligned, so digits line up across the rows and the remarks below (dataviz review). A
   trend column for the whole card once any row in it rises; a recurring fault's days before it. „Ursache offen“
   stands apart at the end (audit F18). */
.rank-list a, .remark-list li, .rank-head { grid-template-columns: minmax(200px, 3fr) minmax(80px, 2fr) 7rem 4.5rem; }
.answer.has-trend .rank-list a, .answer.has-trend .remark-list li, .answer.has-trend .rank-head { grid-template-columns: minmax(200px, 3fr) minmax(80px, 2fr) 7rem 4.5rem 6.5rem; }
.answer .rank-list.has-days a, .answer .rank-head:has(+ .has-days) { grid-template-columns: minmax(200px, 3fr) minmax(80px, 2fr) 7rem 4.5rem 5rem 6.5rem; }
.rank-head { display: grid; gap: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.rank-head span { justify-self: end; white-space: nowrap; }
.rank-head span:last-child:not(:nth-child(-n+4)) { justify-self: start; }  /* the trend head over its arrows */
.rank-list a { padding: 8px 0; }
.rank-list .top-name { display: block; }  /* one line: the Mogul follows the name, not under it */
.rank-min, .rank-count, .rank-days, .remark-figure, .remark-count { justify-self: end; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-min strong, .remark-figure strong { color: var(--ink); font-weight: 600; }
.rank-list a:hover .rank-min strong { text-decoration: underline; }
.rank-label .sep { color: var(--ink-muted); }
.rank-where { margin-left: 8px; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.top-bar i.bar-ohne-stillstand { background: var(--data-2); }
.rank-trend .trend { justify-content: flex-start; }
/* The remarks (Q1 a, audit F6, F22): each text once, its count beside it, when and where in muted text, the minutes
   right-aligned with the rows above. */
.remark-list { list-style: none; margin: 0; padding: 0; }
.remark-list li { display: grid; gap: 4px 16px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--rule); }
.remark-list li:first-child { border-top: 0; }
.remark-what { grid-column: span 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; min-width: 0; }  /* the text and when and where share the name and bar columns */
.remark-text { font-size: 14px; }
.remark-count { font-size: 14px; }
.remark-meta { font-size: 13px; color: var(--ink-muted); }
.remark-figure { text-decoration: none; }
.remark-figure:hover strong { text-decoration: underline; }
.answer-how { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
/* No answer (audit F16): the title, one sentence, the way on; the examples follow in their own card. */
.answer-state { font-size: 15px; }
.answer-state-body { margin: 4px 0 0; max-width: 80ch; font-size: 14px; color: var(--ink-strong); }
.answer-retry { margin: 16px 0 0; }
/* Quellen (Q1 a): its own card, folded; the title at card-title size (audit F7), the count beside it. */
.answer-sources > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; }
.answer-sources > summary::before { align-self: center; }
.answer-sources > summary h2 { display: inline; }
.answer-sources-note { font-size: 13px; color: var(--ink-muted); }
.answer-sources-open { display: flex; justify-content: flex-end; margin: 8px 0 0; }
.answer-sources .table-wrap { margin-top: 8px; }
.answer .ruled th, .answer-sources .ruled th { top: 0; }  /* no filter bar on this page to stick below */

/* Zum Beispiel and Zuletzt gefragt (#69): hairline rows in white cards at the page's width; one click asks again. */
.examples ul, .ask-history ul { list-style: none; margin: 4px 0 0; padding: 0; }
.examples-label { margin: 0; font-size: 12px; color: var(--ink-muted); }  /* also the top bar's ask menu */
.examples h2, .ask-history h2 { margin-bottom: 8px; }  /* card titles at one size (finish review) */
/* Fragen's history was `.history` until #140; Einstellungen › Regeln' Verlauf table (`table.history`) still takes its
   card look from this rule. Kept as it was, so that page does not change here; its own group (C5) moves it. */
.history { max-width: 80ch; margin-top: 16px; padding: 16px 24px 20px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.example { display: block; width: 100%; min-height: 32px; padding: 4px; font: inherit; font-size: 13px; color: var(--ink); text-align: left; background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 2px; cursor: pointer; }
.example:hover { background: var(--panel); }
.ask-history .card-title { gap: 4px; margin-bottom: 0; }
.ask-history .card-title h2 { margin-bottom: 0; }
.history-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ask-history .example { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.history-when { flex: none; font-size: 12px; color: var(--ink-muted); }
.link-button { padding: 0; font: inherit; font-size: 12px; color: var(--ink); background: none; border: 0; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { text-decoration-color: currentColor; }
.history-clear { min-height: 24px; padding: 4px 0; }  /* a 24px target (WCAG 2.5.8; audit F24) */
@media (prefers-reduced-motion: reduce) { body.is-asking .ask-history { transition: none; } }

/* On paper (audit F26): the question as text instead of its field, the answer card, no controls. Quellen, the
   examples and the history stay on screen. */
@media print {
  .ask, .ask-wait, .ask-status, .ask-hint, .answer-switch, .answer-sources, .examples, .ask-history, .answer-retry { display: none !important; }
  .answer-hidden { display: none; }  /* the printed question shows the „Name entfernt“ pill: said once (#110) */
  .answer-question { display: block; margin: 0 0 8px; font-size: 13px; color: var(--ink-muted); }
  .answer { margin-top: 8px; }
  /* The rows and the remarks at one size on paper, on the same columns (the shared print rules set the lists). */
  .answer .rank-list a, .answer .remark-list li, .answer .rank-head { grid-template-columns: minmax(0, 3fr) minmax(40px, 2fr) 72px 64px; gap: 2px 12px; padding: 3px 0; font-size: 11px; line-height: 14px; }
  .answer.has-trend .rank-list a, .answer.has-trend .remark-list li, .answer.has-trend .rank-head { grid-template-columns: minmax(0, 3fr) minmax(40px, 2fr) 72px 64px 72px; }
  .answer .rank-list.has-days a, .answer .rank-head:has(+ .has-days) { grid-template-columns: minmax(0, 3fr) minmax(40px, 2fr) 72px 64px 52px 72px; }
  .answer .rank-head { font-size: 10px; }
  .answer .ccol-value.is-print { display: block; font-size: 9px; }
  .answer .remark-text, .answer .remark-count, .answer .remark-meta, .answer .trend { font-size: 11px; }
}

/* EmptyState */
.empty { margin-top: 16px; padding: 32px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius); max-width: 640px; }
.empty p { margin: 8px 0 0; color: var(--ink-muted); }
.empty .empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }  /* the way on from here (#10) */
.empty > p:first-child { margin-top: 0; }  /* an error page: its title is the page's h1 above the panel */

/* Loading: boosted navigation keeps the page in place and dims it. */
body.htmx-request main { opacity: .55; transition: opacity 120ms ease-out 120ms; }
.loading { position: fixed; right: 16px; bottom: 16px; margin: 0; visibility: hidden; }
.loading span { padding: 4px 8px; background: var(--ink); color: var(--paper); border-radius: var(--radius-control); font-size: 12px; }
body.htmx-request .loading { visibility: visible; }

/* Production screens (WP6c): RuledTable variants, no new visual language. */
.muted { color: var(--ink-muted); }
.ruled tbody th { padding: 10px 12px; font-size: 13px; color: var(--ink); text-align: left; white-space: nowrap; vertical-align: top; border-bottom: 1px solid var(--rule); }
/* #129: a row head has no ground of its own, so it takes the row's hover with the rest of the row. A group's head that
   spans several rows stays white: it belongs to no single row (Planzeiten, Frederick). */
.ruled tbody th[rowspan] { background: var(--paper); }
.ruled thead th[colspan] { text-align: center; border-bottom: 1px solid var(--rule); }
.ruled .col-group { border-left: 1px solid var(--rule); }
.row-bucket th, .row-bucket td { background: var(--panel); }
tr:not(.row-bucket) + .row-bucket > * { border-top: 1px solid var(--rule-strong); }
.h1-note { margin-left: 8px; font: 400 13px/1.5 var(--body); color: var(--ink-muted); letter-spacing: 0; vertical-align: middle; }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 16px; }
.seg-label { margin-right: 8px; font-size: 12px; color: var(--ink-muted); }
.seg a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--ink-strong); border: 1px solid transparent; border-radius: var(--radius-control); text-decoration: none; }
.seg a:hover { color: var(--ink); background: var(--paper); border-color: var(--rule-strong); }
.seg a[aria-current] { color: var(--ink); background: var(--paper); border-color: var(--rule-strong); font-weight: 600; }
.seg-tabs { margin: 0; padding: 2px; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 10px; }
.seg-tabs a { height: 30px; }
.seg-tabs a[aria-current] { background: var(--nav-current); border-color: transparent; box-shadow: none; }
.upload-title { margin-top: 0; }
.upload-card .upload-form { margin-top: 0; }  /* the card head with its (i) keeps the gap */
/* #116: one plain line under the head of a data page; facts as label over value. */
.page-lead { margin: 4px 0 0; font-size: 14px; color: var(--ink-strong); }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; }
.facts dt { font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.facts dd { margin: 2px 0 0; }
.export-card .btn-row { margin-top: 20px; }
.export-card .card-foot { justify-content: flex-start; }
.info-line { display: inline-flex; align-items: center; gap: 2px; }
.shift-sums { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 13px; }

/* Measure pages (#81): Verlauf as a one-row strip, tabs and „Aufschlüsseln nach“ as Stufe-style links, the drill path. */
/* Stillstand (#116): a summary card with a label over each figure, the Verlauf card, then the views. */
.totals { padding: 16px 24px; }
.totals dl { display: flex; flex-wrap: wrap; gap: 12px 0; margin: 0; }
.totals dl > div { flex: 1 1 200px; padding: 0 24px; border-left: 1px solid var(--rule); }
.totals dl > div:first-child { padding-left: 0; border-left: 0; }
.totals dt { display: flex; align-items: center; font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.totals dd { margin: 4px 0 0; }
.totals dd .figure { text-decoration: none; }
.totals dd .figure strong { font-size: 18px; letter-spacing: -0.01em; }
.totals dd .figure:hover { text-decoration: underline; }
.totals .count { display: block; font-size: 12px; color: var(--ink-muted); }
.totals dd .plain { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.totals dl > div { flex-basis: 140px; }
.totals dl > div:has(.count) { flex-basis: 200px; }
.page-title > .info { align-self: center; }
.card > .card-head:only-child { margin-bottom: 0; }
.strip-one { --label-w: 144px; --track-h: 40px; }
.strip-one .strip-row { border-top-color: var(--rule-strong); }
.strip-one .strip-row { grid-template-columns: minmax(0, 1fr); }
.strip-one .track { grid-template-columns: var(--label-w) minmax(0, 1fr); }
.strip-one a.week { color: inherit; text-decoration: none; }
.strip-one a.week:hover { color: var(--ink); text-decoration: underline; }
.strip-one .cell { text-decoration: none; }
.cell.is-picked { background: var(--select-soft); box-shadow: inset 0 -3px 0 var(--select); }  /* the light blue bar keeps its contrast */
.measure-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 24px; }
.measure-bar .seg { margin: 0; }
.seg-nach { margin: 0 0 16px; }
.measure-bar + .seg-nach { margin-top: 16px; }
.view-export { flex: none; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; font-size: 13px; }
.crumbs .sep { margin-right: 4px; }
.crumbs [aria-current] { font-weight: 600; }
.ranked:first-of-type, .measure-bar + .block, .crumbs + .block, .seg-nach + .block, .scope + .block { margin-top: 16px; }
.card > .card-foot.hint { display: block; margin-bottom: 0; }
.card > .table-wrap { margin: 0 -12px; }
.rule-line { margin: 12px 0 0; }
a.drill { display: inline-flex; align-items: center; gap: 6px; }
a.drill svg { flex: none; color: var(--ink-muted); }
a.drill:hover svg { color: var(--ink); }
/* Planzeiten (B4, #116 round 2): a muted mark after Reinigung Ist where the typed value differs from the Reinigen rows,
   its sentence in the tip; muted, never red, since it checks a typed value and says nothing about the plan. The Ist
   column keeps the mark's room in every row, so its figures stay aligned. */
.has-checks td.ist { position: relative; padding-right: 40px; }  /* the figure's link keeps 24px of room from the check mark (WCAG 2.5.8) */
.check-mark { position: absolute; top: 50%; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: -12px; padding: 0; color: var(--ink-muted); background: none; border: 0; border-radius: 50%; cursor: pointer; }
.check-mark:hover, .check-mark:focus-visible, .check-mark[aria-expanded="true"] { color: var(--ink); background: var(--panel); }
.check-mark .icon { vertical-align: 0; }
/* #156 (PZ1): a note under a head („je Schicht gezählt“) hangs under its first line, which stays in line with the
   neighbouring heads (thead th align top, #154 P7). */
.ruled thead .head-note { display: block; font-size: 11px; font-weight: 400; color: var(--ink-muted); }
/* #156 (O3): OEE by period, each period once as the head of its Moguln' rows (as Planzeiten groups by Mogul); a
   hairline closes each period's group. */
.by-period tbody th[scope="rowgroup"] { font-weight: 600; }
.kaesten-long { width: auto; min-width: 640px; }  /* five columns as one block: a row reads across without a ruler */
.by-period tbody + tbody > tr:first-child > * { border-top: 1px solid var(--rule-strong); }
/* The deviation mark (#156, Frederick's O1 a; DESIGN.md): ink, an icon and underlined words, no hue of its own. */
.deviation { margin-left: 6px; color: var(--ink); white-space: nowrap; text-decoration: none; }
.deviation > span { text-decoration: underline; text-underline-offset: 2px; }
.deviation:hover > span { text-decoration-thickness: 2px; }
.deviation .icon { margin-right: 4px; vertical-align: -2px; }  /* on the text's baseline, beside the figure */
/* #156 (C2's note): Kästen' day table has a two-row head (Mogul over A, B, Plan); the second row sticks under the first
   (34.5px, measured at 1280 and 1366), not on top of it. */
@media (min-width: 1280px) {
  .kaesten-days thead tr + tr th { top: calc(var(--filter-h, 65px) + 34.5px); }
}

/* Laptops (#116): below 1440px the sidebar, the gutters, the cards and the table cells give back their room, so the
   widest tables (Einträge, the OEE sources) fit 1280px without scrolling the page sideways (#10). */
@media screen and (max-width: 1439px) {
  :root { --side-w: 208px; }
  .body { padding: 0 24px 56px; }
  .card { padding: 16px 16px 20px; }
  .card > .table-wrap { margin: 0 -8px; }
  .ruled th, .ruled td, .ruled tbody th { padding-left: 8px; padding-right: 8px; }
  .side { padding-left: 8px; padding-right: 8px; }
  .ask-suggest { width: 360px; }
}
@media (max-height: 860px) and (min-width: 761px) {
  .side li a { min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
  .nav-section { margin-top: 10px; }
  .logo, .logo img { width: 88px; }
  .side-head { padding-bottom: 8px; }
}
@media (max-width: 1100px) {
  :root { --side-w: 200px; }
  .body { padding: 0 16px 48px; }
  .ask-suggest { width: 320px; }
  .filter { position: static; }
  .day-letter { display: none; }
  .split, .answer-split { grid-template-columns: minmax(0, 1fr); }
  .strip { --label-w: 180px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding-bottom: 16px; border-right: 0; border-bottom: 1px solid var(--rule-strong); }
  .ask-suggest { width: 100%; }
  .side ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .side-foot { position: static; margin-top: 16px; padding-bottom: 0; }
  .logo, .logo img { width: 96px; }
  .stand { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
  .filter { position: static; }
  .strip { --label-w: 120px; }
  .track { grid-template-columns: minmax(0, 48px) minmax(0, 1fr); }
  .strip-row { grid-template-columns: minmax(0, 1fr); }
  .ask { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .ask .field { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  body.htmx-request main, body.is-asking .answer, body.is-asking .examples, body.is-asking .history { transition: none; }
  .ask-wait span { animation: none; width: 100%; }
}

/* Column headers stay visible on long tables, below the filter bar. The bar is static under 1100px. */
@media (min-width: 1280px) {
  .table-wrap { overflow-x: visible; }
  .ruled thead th { position: sticky; top: var(--filter-h, 65px); z-index: 1; }  /* #129: heads only; row heads scroll */
}

/* Upload (WP7): the same fields and buttons as the filter bar; a correction is a ruled comparison plus a reason. */
.upload-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-top: 24px; }
input[type="file"] { font: inherit; font-size: 13px; color: var(--ink-muted); max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; height: 32px; padding: 0 16px; margin-right: 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius-control); cursor: pointer; }
input[type="file"]:hover::file-selector-button { border-color: var(--ink-muted); }
/* The German picker (#10): the input out of sight but focusable; its focus ring shows on the button that stands in. */
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 32px; }
.file-enhanced input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.file-enhanced input[type="file"]:focus-visible + .btn-quiet { outline: 2px solid var(--ink); outline-offset: 2px; }
.field .file-row .btn-quiet { font-size: 14px; color: var(--ink); }  /* a button, not the field's 12px muted label */
.file-enhanced .btn-quiet:hover { border-color: var(--ink-muted); }
.file-pick { min-width: 0; max-width: 100%; }
.file-name { min-width: 0; font-size: 13px; color: var(--ink-muted); overflow-wrap: anywhere; }
.file-pick .field-error { margin-top: 4px; }
.file-name.file-chosen { color: var(--ink); font-weight: 600; }
textarea { display: block; width: 100%; max-width: 640px; min-height: 72px; padding: 8px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius-control); resize: vertical; }
textarea:hover { border-color: var(--ink-muted); }
textarea[aria-invalid="true"] { border-color: var(--ink); }
.result { margin-top: 24px; max-width: 640px; }
.result p { margin: 8px 0 0; }
.correction { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; max-width: 640px; }
.correction label { font-size: 12px; color: var(--ink-muted); }
.correction .hint { margin: 4px 0 0; }
.correction .btn-row { margin-top: 12px; }
.field-error { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.nowrap { white-space: nowrap; }
.intake-log tr.is-current > * { background: var(--row-hover); }
.intake-log a[aria-current] { font-weight: 600; }

/* The import report (#138, Frederick 16 Nov 2026): the outcome in one line, the hints by cause as rows that unfold
   (the glossary's pattern), then the files with something to look at. Cells are references, in tabular figures. */
.card-context { margin: 0; font-size: 13px; color: var(--ink-muted); }
.import-summary { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.import-detail { margin: 8px 0 0; max-width: 80ch; color: var(--ink-strong); }
.import-file { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.import-links { margin: 8px 0 0; font-size: 13px; }
.import-sub, .import-sub h3 { margin: 24px 0 8px; font-size: 14px; }
.page-lead ~ .import-crumbs { margin-top: 12px; }  /* the print head stands between them, hidden on screen */
.hint-body > .table-wrap { margin-right: -12px; }  /* the right edge the card's own tables share */
@media screen and (max-width: 1439px) { .hint-body > .table-wrap { margin-right: -8px; } }
.import-crumbs .fname { max-width: 60ch; }
.import-crumbs ol { margin-bottom: 0; }
.import-sub h3 { margin: 0; }
.import-card .empty-compact { max-width: 640px; }
.hint-groups { border-top: 1px solid var(--rule); }
.hint-group { border-bottom: 1px solid var(--rule); }
.hint-group > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-height: 44px; margin: 0 -8px; padding: 12px 8px 10px; border-radius: 6px; cursor: pointer; }
.hint-group > summary:hover { background: var(--panel); }
.hint-group > summary::before { align-self: center; margin-right: 0; }
.hint-title { font-weight: 600; color: var(--ink); }
.hint-count { font-size: 13px; color: var(--ink-muted); }
.hint-body { padding: 0 0 16px 16px; }
.hint-why { margin: 0 0 4px; max-width: 80ch; font-size: 13px; color: var(--ink-strong); }
.hint-link { white-space: nowrap; }
.hint-table td, .import-files td { vertical-align: top; }
.hint-table { table-layout: fixed; width: 100%; min-width: 640px; }  /* the same columns in every cause; narrow windows scroll it */
.hint-table .col-date { width: 112px; }
.hint-table .col-file { width: 26%; }
.hint-table .col-mogul { width: 88px; }
.hint-table .col-shift { width: 72px; }
.hint-table .col-cell { width: 64px; }
.hint-file .fname { max-width: 100%; }
.fname { display: inline-block; max-width: 44ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; text-decoration: inherit; }
@media (min-width: 1280px) {  /* no filter bar on this page: a long list's head sticks at the top */
  .import-card .ruled thead th, .import-files thead th, .intake-log thead th { top: 0; }
}
.hint-finding { min-width: 200px; }
.cell-ref { font-weight: 500; white-space: nowrap; }
.import-files th[scope="row"] { font-weight: 400; overflow-wrap: anywhere; }
.tag-hints { font-weight: 600; color: var(--ink); }  /* a Panel Grey tag: amber is the selected day's only */
.tag-refused { color: var(--alert); font-weight: 600; }
.tag-conflict { font-weight: 600; }
.tag-known, .tag-gone, .tag-taken, .tag-expired { color: var(--ink-muted); }
/* „Bericht ersetzen?“ and the versions of a report (#118, Frederick 17 Nov 2026): a clear warning, the figures per
   Mogul before → after (the new one in bold, unchanged ones quiet), the cells that differ, a red confirm. */
.btn-danger { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn-danger:hover { background: #b00f13; border-color: #b00f13; }
.btn-danger:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.replace-warning { display: flex; align-items: flex-start; gap: 8px; max-width: 80ch; margin: 0; padding: 10px 12px; border-left: 3px solid var(--alert); background: var(--panel); border-radius: 0 var(--radius-control) var(--radius-control) 0; color: var(--ink); font-weight: 500; }
.replace-warning svg { flex: none; margin-top: 3px; color: var(--alert); }
.replace-files { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 16px 0 0; font-size: 13px; }
.replace-files dt, .version-facts dt { color: var(--ink-muted); }
.replace-files dd, .version-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.replace-files .fname { max-width: 60ch; }
.change-figures, .change-cell-table { width: auto; min-width: 560px; }
.change-figures th[scope="row"] { font-size: inherit; font-weight: 600; color: var(--ink); vertical-align: middle; border-bottom-color: var(--rule); }
.correction-action { display: block; margin-top: 4px; }
.change-figures .same, .change-figures .was { color: var(--ink-muted); }
.change-figures .is-changed strong { font-weight: 600; color: var(--ink); }
.change-figures tfoot > tr > * { border-top: 1px solid var(--rule-strong); }
.change-cells { margin-top: 12px; }
.change-cells > summary, .version-changes > summary { font-size: 13px; font-weight: 500; color: var(--ink-strong); cursor: pointer; }
.change-cell-table { margin-top: 8px; }
.replace-card .correction { margin-top: 24px; }
.version-list { margin: 0; padding: 0; list-style: none; }
.version { padding: 16px 0; border-top: 1px solid var(--rule); }
.version:first-child { padding-top: 0; border-top: 0; }
.version-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 8px; font-size: 14px; }
.version-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; max-width: 880px; margin: 0; font-size: 13px; }
.version-facts .sha { font-variant-numeric: tabular-nums; }
.version-changes { margin-top: 12px; }
.version-changes .table-wrap { margin-top: 8px; }
.version-note { margin: 8px 0 0; font-size: 13px; }
.replaced-note { max-width: 48ch; overflow-wrap: anywhere; }
/* One file: each Mogul a row group, the report's total against the sum of its rows. */
.file-title { overflow-wrap: anywhere; }
.file-checks th[scope="rowgroup"] { vertical-align: top; font-weight: 600; }
.file-checks tbody + tbody > tr:first-child > * { border-top: 1px solid var(--rule-strong); }
.file-checks .check-mismatch td:last-child { font-weight: 600; color: var(--alert); }
.file-checks .check-text td:last-child, .file-checks .check-not_reported td:last-child { color: var(--ink-muted); }
.technical { margin-top: 24px; }
.technical > summary { display: inline-block; font-size: 13px; font-weight: 500; color: var(--ink-strong); cursor: pointer; }
.technical .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; max-width: 880px; margin: 8px 0 0; padding: 12px; background: var(--panel); border-radius: var(--radius-control); font-size: 12px; }
.technical dt { color: var(--ink-muted); }
.technical dd { grid-column: 2; margin: 0; overflow-wrap: anywhere; }
/* While the files go up (#138): the button rests, a status line says so, a thin ink line runs (as on Fragen). */
.upload-status { margin: 0; font-size: 13px; color: var(--ink); }
.upload-status:not(:empty) { margin-top: 12px; }
.upload-wait { display: none; position: relative; overflow: hidden; max-width: 640px; height: 2px; margin-top: 8px; background: var(--rule); }
.is-uploading .upload-wait { display: block; }
.upload-wait span { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: var(--ink); animation: ask-wait 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .upload-wait span { animation: none; width: 100%; } }
/* On paper the report stands alone: no upload form, the causes unfolded by app.js before printing. */
@media print {
  .upload-card, .upload-status, .upload-wait, .import-card ~ .log-card, .upload-lead, .import-crumbs,
  .hint-link, .import-card .card-link, .technical, .replace-card form, .import-card ~ .replaced-card,
  .versions-card ~ .log-card, .versions-card ~ .upload-card, .replace-card ~ .log-card { display: none !important; }
  .import-card > .table-wrap, .hint-body > .table-wrap, .card > .table-wrap.file-checks-wrap { margin: 0; }
  /* On paper (#118): each version's comparison opens; a cell list stays as on screen (open up to 12 cells). */
  .version-changes::details-content { content-visibility: visible; display: block; }
  .change-cells > summary::before, .version-changes > summary::before { display: none; }
  .hint-group > summary { margin: 0; padding: 8px 0 4px; min-height: 0; }
  .hint-group > summary::before { display: none; }
  .fname { max-width: none; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .hint-body { padding-left: 0; }
}

/* Prüfliste rows (#52; B5, #116 round 2; #157): one dense RuledTable. Each text is a row group: text, Anlagenteil,
   Einträge, Stillstand, ohne Stillstand (each in its own column, never added: PL1) and the decision in one row; under
   it a full-width row that „Einträge und Quellen“ opens (PL3). Fixed columns, so a long Störgrund list or an opened
   entries table never widens the page (1280 and 1366 px, #10). */
.review-rows { table-layout: fixed; min-width: 920px; }  /* narrower windows scroll the table, not the page */
.review-rows .col-unit { width: 120px; }  /* the date range on one line: 11.08.–01.10.2026 */
.review-rows .col-entries { width: 64px; }
.review-unit { hyphens: auto; overflow-wrap: break-word; }
.review-unit .review-sub { white-space: nowrap; }  /* the date range in one piece (#157, PL2) */
.review-rows .col-minutes { width: 84px; }
.review-rows .col-passive { width: 84px; }  /* as wide as Stillstand; „ohne Stillstand“ takes two lines */
.review-rows .col-decide { width: 40%; }  /* #157 (PL2 a): the evidence went under the text, so the decision takes two lines;
   at 1280px the text keeps room for its hint on one line and most suggestions keep their alternatives on one */
.review-row { scroll-margin-top: calc(var(--filter-h, 65px) + 48px); }  /* a jump lands below the sticky filter bar and table head (#83) */
@media (max-width: 1099px) { .review-row { scroll-margin-top: 16px; } }  /* the bar stops sticking there */
/* Every group ends on one hairline across the table: under its row, or under its entries while they are open; the
   last group shown (the cap hides the rest, #154) ends on none. */
.review-row > tr:has(+ .review-entries.is-open) > td, .review-row > tr:has(+ .review-entries:target:not(.is-closed)) > td { border-bottom-color: transparent; }
.review-rows > tbody.review-row > tr.review-entries > td { border-bottom: 1px solid var(--rule); }
.review-rows > tbody.review-row:nth-last-child(1 of :not(.over-cap)) > tr > td { border-bottom: 0; }
.review-row:hover > tr:first-child > td { background: var(--row-hover); }
.review-row:focus { outline: 2px solid var(--ink); outline-offset: -2px; }  /* the Ink Focus Rule, WCAG 1.4.11 (#83) */
.review-row:target:not(:focus) > tr:first-child > td { background: var(--panel); }  /* a jumped-to row: the tonal step, like the glossary */
/* #157 (PL7): an answer the page lands on takes focus for screen readers and the next Tab, without a ring (Frederick's
   rule for the Fragen answer, 17 Nov 2026); the controls inside it keep theirs. */
.review-saved:focus, .review-undone:focus, .result:focus, .saved-line:focus { outline: none; }
/* „Gespeichert … · Rückgängig“ in the place of the decided row (#83): the saved line, panel grey like Einstellungen';
   „Rückgängig“ at its end (#157, PL7), where the row's decision stood. */
.review-rows > .review-saved > tr:hover, .review-saved:hover > tr > td { background: none; }
.review-row.review-saved > tr > td { padding-top: 8px; padding-bottom: 8px; }
.review-saved-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; background: var(--panel); border-radius: var(--radius-control); font-size: 14px; }
.review-saved-line p { flex: 1 1 32ch; margin: 0; max-width: 80ch; }
.review-saved-line form { margin: 0; }
.review-undone { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--ink); scroll-margin-top: calc(var(--filter-h, 65px) + 64px); }
.review-sub { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.open-count { margin: 12px 0 0; font-size: 14px; font-weight: 500; }
.result-undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.result-undo p { flex: 1 1 32ch; margin: 0; }
.result-undo form { margin: 0; }
.saved-line { margin-top: 16px; max-width: 80ch; }
/* „Einträge und Quellen“ (#157, PL3): a toggle under the text, the shared chevron of „Original anzeigen“; it opens a
   full-width row under the text and its decision, the entries in a RuledTable of their own, each with its one-line
   source and its own „Original anzeigen“ row. Without JavaScript the row opens as the link's target. */
.review-dive { display: inline-block; margin-top: 2px; padding: 4px 0; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-strong); text-decoration: none; }
.review-dive::before { content: ""; display: inline-block; width: 10px; height: 6px; margin-right: 6px; vertical-align: 2px; background: url("icons/chevron.svg") no-repeat center; transform: rotate(-90deg); }
.review-dive[aria-expanded="true"]::before { transform: none; }
.review-dive:hover { color: var(--ink); text-decoration: underline; }
.review-entries { display: none; }
.review-entries.is-open, .review-entries:target:not(.is-closed) { display: table-row; }
.review-rows > tbody > tr.review-entries > td { padding-top: 0; padding-bottom: 12px; font-size: 13px; }
.review-entries .table-wrap { overflow-x: auto; }  /* an opened entries table scrolls inside its row */
.review-entries .ruled { width: auto; min-width: 640px; }  /* as wide as its columns: a figure stays near its day */
.review-entries .ruled thead th { position: static; padding: 8px 12px; font-size: 12px; font-weight: 500; color: var(--ink-muted); white-space: normal; background: none; }
/* Prüfen › Entscheidungen (#83): a RuledTable. #157 (Frederick's ED2 a): „Ändern“ and „Rückgängig“ are two quiet
   buttons in one column without a head; each opens a row under its decision (the „Original anzeigen“ sub-row, so the
   shared rules show, hide and rule it) that says what the step touches, then the step or „Abbrechen“. */
.ruled tbody th.decision-text { min-width: 20ch; max-width: 36ch; white-space: normal; font-weight: 400; }
.decisions .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-muted); }
.decisions td.action, .runs td.action { white-space: nowrap; }
.decisions .col-action, .runs .col-action { width: 1%; }
.decisions form, .runs form { margin: 0; }
.decision-actions { display: flex; align-items: center; gap: 8px; }
.decision-toggle[aria-expanded="true"] { border-color: var(--field); background: var(--panel); }  /* open: its row shows */
.ruled td a.decision-toggle:hover, .ruled td .decision-buttons a:hover { text-decoration: none; }  /* buttons, not figures */
/* The second sub-row („Rückgängig“) opened: no hairline between it and its decision, nor between two open sub-rows. */
.ruled tbody tr:has(+ .decision-sub + .decision-sub:is(.is-open, :target:not(.is-closed))) > *,
.ruled tbody .decision-sub:is(.is-open, :target:not(.is-closed)):has(+ .decision-sub:is(.is-open, :target:not(.is-closed))) > * { border-bottom-color: transparent; }
.ruled .decision-sub > td { padding-bottom: 16px; }
.decision-confirm { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 640px; }
.decision-impact { margin: 0; color: var(--ink); }
.decision-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
/* The Störgrund list (#157): a list box, the most used of the Anlagenteil first under their own head, then A–Z; with
   JavaScript the search field above filters it. */
.cause-pick { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 360px; }
.cause-pick-label { font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.cause-pick .cause-search { width: 100%; }
/* Whole lines only (finish review): group heads and options share one row height, so the box's own height for eight
   lines ends on a line in every browser and font; no padding on the rows, which would break that. */
.cause-pick select { width: 100%; height: auto; padding: 4px !important; background-image: none; border-color: var(--field); }
.cause-pick optgroup { font-size: 13px; font-weight: 600; font-style: normal; color: var(--ink-muted); }
.cause-pick option { padding: 0.5px 8px; font-size: 13px; font-weight: 400; color: var(--ink); }
.cause-count { margin: 0; font-size: 12px; color: var(--ink-muted); }
.cause-count:empty { position: absolute; }  /* out of the flow while it says nothing; a screen reader still hears it fill */
.review-text { margin: 0; font-weight: 500; color: var(--ink); overflow-wrap: break-word; hyphens: auto; }
/* The decision: the suggestion and up to three „oder …“, then the list with „Zuordnen“ and „Überspringen“ (the evidence
   stands under the text, #157 PL2 a). Long Störgrund names wrap inside their button, never cut. */
.decide-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.decide-pick form, .decide-row form { margin: 0; }
.decide-cell .btn, .decide-cell .btn-quiet { height: auto; min-height: 32px; padding: 5px 10px; font-size: 13px; line-height: 20px; white-space: normal; text-align: left; overflow-wrap: break-word; }
.decide-or { display: contents; }  /* its buttons flow beside the suggestion and wrap one by one (a row stays ~110 px) */
.decide-or-first { display: inline-flex; align-items: center; gap: 6px; }  /* „Oder:“ wraps with its first alternative */
.decide-cell .decide-or .btn-quiet { min-height: 26px; padding: 2px 6px; font-size: 12px; }
.decide-row { display: flex; align-items: center; gap: 8px 12px; margin-top: 8px; }
.decide-other { display: flex; flex: 1; gap: 8px; align-items: center; min-width: 0; }
.decide-other select { flex: 1; min-width: 0; }
.decide-skip-room { visibility: hidden; }  /* #157 (PL8): the last row keeps the room of „Überspringen“, so its list is as wide */
.decide-cell .decide-other .btn-quiet { flex: none; white-space: nowrap; }
.decide-skip { flex: none; padding: 6px 2px; font-size: 13px; font-weight: 500; color: var(--ink-strong); text-decoration: none; white-space: nowrap; }
.decide-skip:hover { color: var(--ink); text-decoration: underline; }
/* Lesen (#137 follow-up): the suggestion as text, its alternatives in one muted line; the text column takes the room
   the controls had. */
.review-rows.read-only .col-decide { width: 34%; }
.decide-pick .pick { font-size: 13px; line-height: 20px; font-weight: 600; color: var(--ink); overflow-wrap: break-word; }
.decide-pick .pick-or { overflow-wrap: break-word; }
.worse-text { color: var(--alert); font-weight: 500; }
/* #157 (Frederick's addition to PL2): the words the suggestion rests on stand out by weight on a quiet Panel Grey ground;
   never amber (The Selection Only Rule), never underlined like a link. The hint under the text names them in words. */
.review-text mark { background: var(--panel); color: var(--ink); font-weight: 700; padding: 0 2px; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.review-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.review-hint .tag-safe { color: var(--ink); font-weight: 600; }
.safe-panel { margin: 0 0 8px; max-width: none; padding: 12px 16px; background: var(--panel); border: 0; border-radius: var(--radius-control); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.safe-none { display: flex; align-items: center; gap: 4px; margin: 0 0 8px; font-size: 13px; color: var(--ink-muted); }
.card h2 .muted { margin-left: 6px; font-size: 13px; font-weight: 400; }
.safe-panel p { margin: 0 0 12px; color: var(--ink-muted); }
p.safe-panel { margin-bottom: 0; }
.safe-title { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
/* The page's other cards read as the same RuledTable (B5): a folded table runs to the card's padding too. */
.explained-fold > summary { display: inline-block; font-size: 13px; font-weight: 500; color: var(--ink-strong); cursor: pointer; }
.explained-fold > .table-wrap { margin: 8px -12px 0; }
@media screen and (max-width: 1439px) { .explained-fold > .table-wrap { margin: 8px -8px 0; } }
/* Prüfliste on paper (#157): every row, the cap's too (D5); the suggestion and its evidence as words, the controls that
   only work on screen (the list, „Zuordnen“, „Überspringen“, „Alle sicheren übernehmen“, the toggles) gone. */
@media print {
  .review-rows > tbody.over-cap { display: table-row-group !important; }
  .decide-row, .safe-panel, .safe-none, .review-dive { display: none !important; }
  .decide-cell .btn, .decide-cell .btn-quiet, .decide-cell .decide-or .btn-quiet { min-height: 0; padding: 0; }  /* words at the hint's edge */
  .decide-or > form button::before { content: "· "; color: var(--ink-muted); }  /* „Oder: Bänder · Band HA“ */
  .explained-fold > summary, .earlier-fold > summary { display: none !important; }  /* „… anzeigen“ asks for a click */
  .review-keys { display: none; }  /* „Tastenkürzel“: keys are for the screen */
  /* Entscheidungen: the decisions and runs as a list; „Ändern“, „Rückgängig“ and the rows they open stay off paper. */
  .decisions .col-action, .decisions td.action, .runs .col-action, .runs td.action, .decision-sub { display: none !important; }
}

/* Einstellungen › Regeln (#75): each rule is the sentence that explains it, its numbers typed in place. */
.rule-scope { margin: 24px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.rule { max-width: 760px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
.rules .rule:first-of-type { margin-top: 16px; }
.rule h2 { margin-bottom: 8px; }
.rule-sentence { margin: 0; font-size: 16px; line-height: 28px; }
.num-field { width: 64px; height: 28px; margin: 2px 0; padding: 0 8px; vertical-align: baseline; font: 600 16px/1 var(--body); text-align: right; color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: var(--radius-control); }
.num-field:hover { border-color: var(--ink-muted); }
.num-field[aria-invalid="true"] { border: 2px solid var(--ink); }
#safe_threshold { width: 72px; }
.num-value { font-weight: 600; color: var(--ink); }  /* Lesen (#137 follow-up): the value in place of its field */
.rule-lead { margin: 0 0 4px; font-size: 14px; color: var(--ink); }
.rule-detail { margin: 8px 0 0; max-width: 80ch; font-size: 13px; color: var(--ink-muted); }
p.rule-lead { color: var(--ink); }
.rule .field-error { margin-top: 4px; }
.rule-preview { margin: 12px 0 0; padding: 8px 12px; background: var(--panel); border-radius: var(--radius-control); font-size: 13px; }
.rule-preview strong { font-weight: 600; }
.rule-preview.htmx-request { opacity: .55; transition: opacity 120ms ease-out 120ms; }
.rule-meta { margin: 8px 0 0; font-size: 12px; color: var(--ink-muted); }
.rule-meta a { color: var(--ink); white-space: nowrap; }  /* the word space before it is the gap */
.rule-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.saved { max-width: 760px; margin: 16px 0 0; padding: 8px 12px; background: var(--panel); border-radius: var(--radius-control); font-size: 13px; }
.saved a { font-weight: 600; white-space: nowrap; }
.history { max-width: 760px; }
.history th { position: static; }  /* no filter bar on this page to stick below */
.rule-line a { color: var(--ink); white-space: nowrap; }

/* Hilfe & Begriffe (#75; #116 round 2, Frederick): how to read the pages and whom to ask at the top; the terms at the
   bottom as one list on hairlines, each name opening its text. A link to a term opens it (app.js). */
.help-list { margin: 0; padding-left: 20px; max-width: 80ch; }
.help-list li { margin: 0 0 6px; }
.help-list li:last-child { margin-bottom: 0; }
.help-text { margin: 0; max-width: 72ch; }
.gloss { border-top: 1px solid var(--rule); }
.gloss-row { border-bottom: 1px solid var(--rule); scroll-margin-top: 24px; }
.gloss-row:last-child { border-bottom: 0; }
.gloss-row > summary { display: flex; align-items: center; min-height: 44px; margin: 0 -8px; padding: 10px 8px; font-size: 14px; font-weight: 600; color: var(--ink); border-radius: 6px; cursor: pointer; }
.gloss-row > summary:hover { background: var(--panel); }
.gloss-row.is-target, .gloss-row:target { margin: 0 -8px; padding: 0 8px; background: var(--panel); border-radius: 8px; }  /* the term a link (a popover's „Mehr“) landed on, text and all (#125) */
.gloss-text { max-width: 72ch; padding: 0 0 16px 16px; }
.mark { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; border-radius: 3px; }
.mark-stillstand { background: var(--data); }
.mark-ohne-stillstand { background: var(--data-2); }
.gloss-text p { margin: 0 0 8px; }
.gloss-text p:last-child { margin-bottom: 0; }
.gloss ul { margin: 0 0 8px; padding-left: 20px; }
.gloss .formulas { padding-left: 0; list-style: none; font-size: 13px; }
.formulas li { padding: 2px 0; }
.gloss-current { font-size: 13px; color: var(--ink-muted); }
.gloss-current a { color: var(--ink); white-space: nowrap; }

/* Print (#82): the Übersicht on one A4 landscape page for the 9-Uhr-Runde. The frame goes; a head names the period,
   the Datenstand, the filters and the demo mark. Marks and weekend columns keep their fills on paper.
   Every page (#154, Frederick's D2, 17 Nov 2026): the same head in two lines (title and period; filters, Datenstand
   with the time of the last import, the print date, the demo mark), the sheet's foot „Seite x von y“ (base.html), no
   controls on paper; long pages run on over several sheets, their table heads repeated on each. */
@media print {
  @page { size: A4 landscape; margin: 8mm 10mm; }
  html { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  body { font-size: 12px; }
  .side, .page-head, .filter, .notice, .skip, .loading, .tip, .pop, .overview-bar, .strip-table, .rule-line, .more,
  .overview-where .hint, .info, .compare-switch, .card-link { display: none !important; }
  /* #154: what only works on screen stays off paper: the list's own filters, buttons, fields, the other views' tabs,
     closed sources and the chevrons. A page that brought its own print head kept it alone; since #164 none does
     (Berichte prints the frame's head), so the last selector below only guards a future one. */
  tr.over-cap:not(.original-row) { display: table-row !important; }
  .over-cap-note { display: block !important; }
  .list-controls, .list-state, .list-cap, .back, .entries-export, .view-export, .empty-actions, .icon-btn, .link-button, select,
  input, textarea, .seg a:not([aria-current]), .source details:not([open]), .check-mark, .original-toggle, .list-all,
  a.drill svg, main:has(.page-body .print-head) > .print-head { display: none !important; }
  summary::before { display: none !important; }
  /* A button's words can be content (a Prüfliste proposal): on paper they print as plain text, without the frame. */
  .btn, .btn-quiet { height: auto; padding: 0; color: var(--ink); background: none; border: 0; font-weight: 500; }
  .seg a[aria-current], .seg-tabs { height: auto; padding: 0; border: 0; background: none; }
  tr { break-inside: avoid; }
  .legend { font-size: 10px; }  /* on paper too the dashed line keeps its name */
  .card-foot { margin-top: 4px; padding-top: 4px; font-size: 11px; }
  html, body { background: #fff; }
  .body { padding: 0; }
  .card { margin-top: 8px; padding: 0; border: 0; border-radius: 0; }
  .card-head { margin-bottom: 4px; }
  .finding { margin-top: 0; font-size: 12px; }
  .shell { display: block; min-height: 0; }
  .page-body { max-width: none; }
  a { color: inherit; text-decoration: none; }
  .term { text-decoration: none; }
  .print-head { display: flex; align-items: center; gap: 12px; margin: 0; padding-bottom: 4px; border-bottom: 1px solid var(--rule-strong); font-size: 12px; }
  .print-lines { min-width: 0; }
  .print-meta { font-size: 10px; line-height: 13px; color: var(--ink-muted); }
  .print-demo { font-size: 12px; font-weight: 500; color: var(--ink-strong); }
  .print-legend { display: block; margin: 4px 0 0; font-size: 10px; line-height: 13px; color: var(--ink-muted); max-width: none; }
  .bar-label, .rec-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .print-head strong { font: 600 14px/20px var(--head); }
  .compare-note { margin-top: 4px; font-size: 12px; }
  .overview-measures { margin-top: 8px; }
  .overview-measures h2, .overview-strip h2, .overview-where h2 { font-size: 13px; line-height: 18px; }
  .deltas { margin-top: 0; gap: 4px; }
  .delta { font-size: 10px; line-height: 13px; }
  .block { margin-top: 12px; }
  .ruled th { position: static; padding: 2px 6px; }
  .ruled td, .ruled tbody th { padding: 2px 6px; }
  .overview-table .figure strong { font-size: 12px; }
  .overview-table .sub { margin-top: 0; font-size: 10px; line-height: 13px; }
  .strip { margin-top: 4px; --label-w: 180px; }
  .strip-row h3 { padding-top: 2px; font-size: 12px; line-height: 16px; }
  .strip-note { margin-top: 2px; padding-top: 2px; font-size: 10px; }
  .split { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .cause-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
  .cause-columns h3 { font-size: 12px; line-height: 16px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 2px; gap: 0 8px; }
  .bar-label { grid-area: 1 / 1; }
  .bar-value { grid-area: 1 / 2; white-space: nowrap; }
  .bar-track { grid-area: 2 / 1 / 3 / 3; }
  .print-head img { width: 36px; }
  .bar-label, .bar-value { font-size: 10px; line-height: 13px; }
  .bar-track { height: 6px; }
  .panel { padding: 8px; }
  .recurring { margin-top: 4px; }
  .recurring li { padding: 2px 0; font-size: 10px; line-height: 13px; }
  .recurring li { display: flex; align-items: baseline; gap: 8px; }
  .recurring a { display: flex; flex: 1; min-width: 0; justify-content: space-between; gap: 8px; }
  .recurring .trend { white-space: nowrap; font-size: 10px; }
  .recurring .trend svg { width: 10px; height: 10px; }
  .rec-figures { white-space: nowrap; }
  .strip { --track-h: 16px; }
  .strip-values .track-cells { height: var(--track-h); }
  .strip-values .cell { padding-top: 0; }
  .cell-value { display: none; }
  .empty-compact { margin-top: 4px; padding: 4px 8px; font-size: 11px; }
  .overview-measures, .overview-strip, .split, .strip-row, .overview-measures table, .overview-where table { break-inside: avoid; }
  /* #116: one A4 page still: no per-track scale or day dates on paper, tight card heads and feet. */
  .track-scale, .day-num { display: none; }
  .card-head { margin-bottom: 2px; }
  .finding { font-size: 11px; line-height: 14px; }
  .card-foot { margin-top: 2px; padding-top: 2px; font-size: 10px; line-height: 13px; }
  .overview-table td.num { padding-top: 2px; padding-bottom: 2px; }
  .strip-row h3 { padding-top: 0; }
  .split > .card { margin-top: 6px; }
  /* #116 round 2: the column chart, the top five and the recurring table fit the one A4 sheet. */
  .cchart { --plot-h: 72px; margin-top: 8px; }  /* #127: 8px under the head, the unit's row 10px over the plot */
  .cchart-axis span, .cchart-unit, .cchart-x, .ccol-value { font-size: 9px; line-height: 11px; }
  .cchart-unit { margin-bottom: 10px; }
  .cchart-x { padding-top: 2px; }
  .split.overview-where { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 24px; }
  .top-list a { grid-template-columns: minmax(0, 1.6fr) minmax(40px, 1fr) 7em; gap: 8px; padding: 2px 0; font-size: 10px; line-height: 13px; }
  .top-name { flex-direction: row; gap: 6px; align-items: baseline; }
  .top-where { font-size: 9px; line-height: 12px; }
  .top-bar { height: 6px; }
  .recurring-table tbody th, .recurring-table td, .recurring-table thead th { padding: 2px 4px; font-size: 10px; line-height: 13px; }
  .recurring-table .top-where { font-size: 9px; }
  .card > .table-wrap { margin: 0; }
}
