/* Terminportal UI – Grundstile: Reset, Typografie, Fokus. */

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {
    margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
    font: 400 var(--fs-base)/1.55 var(--font); font-feature-settings: "cv11", "ss01", "ss03";
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  }
  h1, h2, h3, h4 { margin: 0 0 var(--sp-2); color: var(--text); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
  h1 { font-size: var(--fs-2xl); letter-spacing: -.022em; }
  h2 { font-size: var(--fs-lg); }
  h3 { font-size: var(--fs-base); }
  h4 { font-size: var(--fs-md); }
  p { margin: 0 0 var(--sp-3); }
  p:last-child { margin-bottom: 0; }
  a { color: var(--primary-text); text-decoration: none; text-underline-offset: 2px; }
  a:hover { text-decoration: underline; }
  small { font-size: var(--fs-sm); }
  b, strong { font-weight: 600; }
  img, svg, video { display: block; max-width: 100%; }
  code, kbd, pre { font-family: var(--font-mono); font-size: .875em; }
  code { padding: 1px 6px; border-radius: var(--r-sm); background: var(--surface-sunken); border: 1px solid var(--border); word-break: break-word; }
  pre { overflow: auto; padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-sunken); border: 1px solid var(--border); }
  pre code { padding: 0; border: 0; background: none; }
  hr { height: 1px; margin: var(--sp-6) 0; border: 0; background: var(--border); }
  ul, ol { padding-left: 1.25rem; }
  li + li { margin-top: 2px; }
  table { border-collapse: collapse; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { cursor: pointer; }
  [hidden] { display: none !important; }
  summary { cursor: pointer; }
  ::selection { background: var(--accent-5); }
  :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
  details > summary::-webkit-details-marker { display: none; }

  .skip-link { position: fixed; z-index: 1000; top: var(--sp-2); left: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md);
    background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-200%); }
  .skip-link:focus { transform: none; }
  .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

  .i { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; }
  .i-sm { width: 14px; height: 14px; }
  .i-lg { width: 20px; height: 20px; }
  .i-xl { width: 24px; height: 24px; }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}
