/* base.css — /ui/v1 · reset, type ground, focus ring, selection of every trinsik app. Load after fonts.css and tokens.css.
   v1 changelog: 08.10.2026 split from static/css/portal.css (design system stage DS1); values as tokens.
   11.10.2026 density: body text --fs-text / --lh (14 / 1.4, was 15 / 1.5); fields 16 px below 1024 px via --fs-input.
   13.10.2026 base reset (P2): controls inherit the page font (no browser Arial 13.33 px in buttons and fields); a radio
   looks like the checkbox (ink, 18 px). */
* { box-sizing: border-box; }
/* Welle 6: `hidden` wins over component display rules (.k-msg is flex, so a script's empty message slot showed as a bare
   bullet). Scripts show such slots by removing the attribute. */
[hidden]:not([hidden="until-found"]) { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--fs-text)/var(--lh) var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
/* controls take the type of their context, not the browser's (Arial 13.33 px); components set size and weight on top */
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
fieldset { min-width: 0; }  /* browsers default to min-content: a scrolling row inside would widen the page (Abnahme 13.10.2026) */
::selection { background: var(--accent); color: var(--accent-ink); }
a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, button:focus-visible { outline: var(--focus-width) solid var(--ink); outline-offset: var(--focus-offset); }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 18px; height: 18px; }
/* a box or dot that starts a line sits on the content edge, not 4 px in (the browser's margin; guidelines §9) */
input[type="checkbox"], input[type="radio"] { margin-inline-start: 0; }
:focus-visible { outline: var(--focus-width) solid var(--ink); outline-offset: var(--focus-offset); }

/* Design panel 08.10.2026 (_docs/REVIEW_DESIGNSYSTEM_PANEL_2026-10-08.md): accessibility and phone defects only, no change
   to the default look on desktop. */
/* reduced motion (WCAG 2.3.3, guidelines.md §5): nothing moves for people who chose it */
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
/* phones: focus is never hidden under the top and bottom bar (WCAG 2.4.11; s-top/s-bottom 64 px + the home indicator),
   and fields have 16 px text so iOS does not zoom the page on focus */
@media (max-width: 1023px) {
  html { scroll-padding-top: 72px; scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: var(--fs-input) !important; }
}
/* Windows high contrast (forced colours): fills that carry meaning keep their colour, selected states use the system
   highlight, the borderless buttons get an edge; nothing changes outside forced-colors mode */
@media (forced-colors: active) {
  .k-st::before, .k-mark, .k-msg::before, .k-cal td, .k-bar > span, .k-band-dot, .k-band-third,
  .k-plan-bar, .k-plan-slot, .k-plan-over, .k-plan-dh { forced-color-adjust: none; }
  .k-btn, .k-tick { border: 1px solid ButtonText; }
  .k-chip.on, .k-tick.on, .s-seg label:has(input:checked), .s-seg button[aria-pressed="true"], .s-nav a.on, .k-combo-opt.on {
    forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .k-tabs a.on, .s-bottom a.on { border-color: Highlight; }
  .k-field input:focus, .k-field select:focus, .k-field textarea:focus { outline: 2px solid Highlight; }
}
