/* nascho Website · Textrollen übernommen am 17.10.2026 aus R32.
   Quelle: input/2026-10-17-website-textfarben-in-guidelines.md
   Übrige Farbrollen aus der bestehenden Website-/Flutter-Palette. */
@font-face {
  font-family: 'Instrument Sans';
  src: url('instrument-sans.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ns-bg: #efeee8;
  --ns-surface: #e2e4dd;
  --ns-paper: #f4f3ed;
  --ns-ink: #2b2e2c;
  --ns-muted: #68635c;
  --ns-line: #d1d5d1;
  --ns-border: #778179;
  --ns-orange: #f2a65a;
  --ns-on-orange: #2b2e2c;
  --ns-orange-hover: #f6b776;
  --ns-accent-text: #a95100;
  --ns-focus: #a95100;
  --ns-success: #007b37;
  --ns-error: #c52720;
  --ns-warning: #9c5800;
  --ns-inverse-bg: #111317;
  --ns-inverse-ink: #f3f2ef;
  --ns-font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ns-display: clamp(2.5rem, 6vw, 4.5rem);
  --ns-heading: clamp(1.875rem, 3.5vw, 2.5rem);
  --ns-subheading: 1.375rem;
  --ns-body: 1rem;
  --ns-lead: 1.125rem;
  --ns-label: .875rem;
  --ns-leading-display: 1.04;
  --ns-leading-heading: 1.12;
  --ns-leading-body: 1.55;
  --ns-weight-normal: 400;
  --ns-weight-strong: 600;
  --ns-tracking-display: -.045em;
  --ns-tracking-heading: -.025em;
  --ns-space-1: .5rem;
  --ns-space-2: .75rem;
  --ns-space-3: 1rem;
  --ns-space-4: 1.5rem;
  --ns-space-5: 2rem;
  --ns-space-6: 3rem;
  --ns-space-7: 4rem;
  --ns-space-8: 6rem;
  --ns-gutter: clamp(1.25rem, 4vw, 3rem);
  --ns-max-width: 75rem;
  --ns-reading-width: 38rem;
  --ns-control-height: 3rem;
  --ns-radius-field: .75rem;
  --ns-radius-panel: 1.5rem;
  --ns-radius-pill: 999px;
}
[data-theme='dark'] {
  color-scheme: dark;
  --ns-bg: #111317;
  --ns-surface: #181b20;
  --ns-paper: #1b1e24;
  --ns-ink: #f3f2ef;
  --ns-muted: #969aa1;
  --ns-line: #292d34;
  --ns-border: #6c7480;
  --ns-accent-text: #f2a65a;
  --ns-focus: #f2a65a;
  --ns-success: #4cd08a;
  --ns-error: #ff6b5e;
  --ns-warning: #f2b540;
}

:root {
  --ns-motion-fast: 140ms;
  --ns-motion-base: 200ms;
  --ns-motion-theme: 160ms;
  --ns-motion-ease: cubic-bezier(.2, .8, .2, 1);
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ns-bg); color: var(--ns-ink); font-family: var(--ns-font); font-size: var(--ns-body); line-height: var(--ns-leading-body); }
body, .theme-surface { transition: background-color var(--ns-motion-theme), color var(--ns-motion-theme); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--ns-accent-text); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ns-focus); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--ns-display); line-height: var(--ns-leading-display); letter-spacing: var(--ns-tracking-display); font-weight: var(--ns-weight-strong); }
h2 { font-size: var(--ns-heading); line-height: var(--ns-leading-heading); letter-spacing: var(--ns-tracking-heading); font-weight: var(--ns-weight-strong); }
h3 { font-size: var(--ns-subheading); line-height: 1.25; letter-spacing: var(--ns-tracking-heading); font-weight: var(--ns-weight-strong); }
.ns-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--ns-space-2); min-height: var(--ns-control-height); padding: var(--ns-space-2) var(--ns-space-4); border: 1px solid transparent; border-radius: var(--ns-radius-pill); font-weight: var(--ns-weight-strong); text-decoration: none; line-height: 1.3; transition: background-color var(--ns-motion-fast), color var(--ns-motion-fast), transform var(--ns-motion-fast) var(--ns-motion-ease); }
.ns-button--brand { background: var(--ns-orange); color: var(--ns-on-orange); }
.ns-button--brand:hover { background: var(--ns-orange-hover); }
.ns-button--quiet { background: transparent; color: var(--ns-ink); border-color: var(--ns-border); }
.ns-button--quiet:hover { background: var(--ns-surface); }
.ns-button:active { transform: translateY(1px); }
.ns-button:disabled { cursor: not-allowed; background: var(--ns-surface); color: var(--ns-muted); border-color: var(--ns-line); transform: none; }
.ns-field { width: 100%; min-height: var(--ns-control-height); border: 1px solid var(--ns-border); border-radius: var(--ns-radius-field); background: var(--ns-bg); color: var(--ns-ink); padding: var(--ns-space-2) var(--ns-space-3); }
.ns-field::placeholder { color: var(--ns-muted); opacity: 1; }
.ns-field[aria-invalid='true'] { border-color: var(--ns-error); border-width: 2px; }
.ns-label { display: block; font-size: var(--ns-label); font-weight: var(--ns-weight-strong); margin-bottom: var(--ns-space-1); }
.ns-helper { color: var(--ns-muted); font-size: var(--ns-label); }
.ns-error { color: var(--ns-error); font-size: var(--ns-label); }

/* Shared public-site extensions. Base palette, six type roles and spacing come
   unchanged from design/system/{tokens,components,motion}.css. */
:root {
  --site-display: var(--ns-display);
  --site-inline: max(var(--ns-gutter), calc((100vw - var(--ns-max-width)) / 2));
  --site-header-height: calc(var(--ns-control-height) + var(--ns-space-4));
  --site-control-compact: 2.75rem;
  --site-coffee: #4a2f22;
  --site-crema: #7a4e33;
  --site-foam: #d8c2a6;
  --site-steam: #b7afa3;
  --site-inverse-muted: #a9adb3;
  --site-shadow: 0 8px 24px rgb(43 46 44 / .11);
  --site-shadow-raised: 0 16px 40px rgb(43 46 44 / .11);
}
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--site-header-height) + var(--ns-space-3)); }
img { display: block; max-width: 100%; height: auto; }
.ns-button { font-size: var(--ns-body); align-items: center; cursor: pointer; }
.ns-button--compact { min-height: var(--site-control-compact); padding: var(--ns-space-1) var(--ns-space-3); font-size: var(--ns-label); }
.ns-button--dark, .on-orange .head .ns-button--brand { color: var(--ns-inverse-ink); background: var(--ns-ink); }
.ns-button--dark:hover, .on-orange .head .ns-button--brand:hover { background: color-mix(in srgb, var(--ns-ink) 90%, var(--ns-muted)); }
.ns-button--text { color: inherit; background: transparent; border-color: transparent; }
.ns-button--text:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.ns-button--text[aria-pressed=true] { box-shadow: inset 0 0 0 1px currentColor; }
.ns-button--text:disabled { color: inherit; background: transparent; border-color: transparent; cursor: default; }
.ns-field { height: var(--ns-control-height); font-size: var(--ns-body); }
.ns-field:disabled { color: var(--ns-muted); background: var(--ns-paper); border-color: var(--ns-border); opacity: 1; cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: fixed; left: -9999px; top: var(--ns-space-1); z-index: 50; padding: var(--ns-space-2) var(--ns-space-3); background: var(--ns-paper); color: var(--ns-ink); border-radius: var(--ns-radius-field); }
.skip:focus { left: var(--ns-gutter); }
@media (max-width: 640px) { :root { --site-header-height: calc(var(--ns-control-height) + var(--ns-space-2)); } }
/* A short viewport uses one compact display role, consistently across chapters. */
@media (max-height: 700px) { :root { --site-display: var(--ns-heading); } }

/* Optional field geometry for a row of pill-shaped public-site controls. */
.ns-field--pill { border-radius: var(--ns-radius-pill); padding-inline: var(--ns-space-3); }

/* Shared language control: native disclosure and ordinary static links. */
.language-menu { position: relative; flex: none; font-size: var(--ns-label); font-weight: var(--ns-weight-strong); text-align: left; }
.language-menu summary { display: flex; align-items: center; justify-content: center; gap: .35em; min-width: 52px; min-height: 44px; padding: 0 8px; border-radius: var(--ns-radius-field); cursor: pointer; list-style: none; white-space: nowrap; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.language-options { position: absolute; z-index: 100; top: calc(100% + 4px); right: 0; min-width: 11rem; padding: 8px; background: var(--ns-paper); color: var(--ns-ink); border: 1px solid var(--ns-line); border-radius: var(--ns-radius-panel); box-shadow: var(--site-shadow); }
.language-options a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--ns-radius-field); color: inherit; text-decoration: none; white-space: nowrap; }
.language-options a:hover { background: var(--ns-bg); }
.language-options a[aria-current=true] { font-weight: var(--ns-weight-strong); }

.public-language { display: flex; justify-content: flex-end; margin-bottom: 12px; }
@media(max-width:640px) {
  .head .language-options { position: fixed; top: calc(var(--site-header-height) - 4px); right: var(--site-inline); max-width: calc(100vw - 2 * var(--site-inline)); }
  .head .menu-toggle { padding-inline: 6px; }
  .head .language-menu summary { min-width: 44px; padding-inline: 4px; }
}

.language-menu svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.language-options a { justify-content: space-between; gap: var(--ns-space-4); }
.language-options a svg { width: 16px; height: 16px; }
