/** ChallengeFlow: 01-base.css */
@layer components {
  /* Grundlagen und Hilfsklassen */
  * {
    box-sizing: border-box;
  }
  .hidden {
    display: none;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }
  .error {
    color: var(--danger);
    font-weight: 700;
  }
  .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .tight {
    gap: 6px;
  }
  .challenge-body .row:last-child {
    margin-top: auto;
  }
  .modal-card .muted {
    margin: 0;
  }
  .feed-suggestion-menu.hidden {
    display: none;
  }
  :root {
    /* ------------------------------------------------------------------
       ChallengeFlow Designsystem „Signal“
       Schweizer Strenge: reines Weiss, harte schwarze Linien, ein einziges
       grelles Blau. Keine Radien, keine Schatten, keine Verlaeufe — die
       Ordnung entsteht allein aus Linien, Abstand und Schriftgewicht.
       Alle Farben stehen als Variablen hier; 20-theme.css schaltet mit
       [data-theme="dark"] auf die Nachtfassung um, ohne dass eine einzige
       Komponentenregel angefasst werden muss.
       ------------------------------------------------------------------ */
    --font-display: "Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
    --font-body: "Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    --font-copy: "Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    --font-data: "Roboto Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
    --photo-filter: saturate(1.02) contrast(1.02);
    --photo-ratio: 4/5;
    --media-max-h: min(440px,56vh);
    color-scheme: light;
    --page-a: #ffffff;
    --page-b: #ffffff;
    --text: #0a0a0a;
    --copy: #3a3a3a;
    --muted: #767676;
    --line: #e3e3e3;
    --line-strong: #0a0a0a;
    --card: #ffffff;
    --topbar: #ffffff;
    --nav-muted: #0a0a0a;
    --soft: #f4f4f4;
    --soft-2: #ebebeb;
    --input: #ffffff;
    --accent: #0033ff;
    --accent-2: #0033ff;
    --accent-deep: #0026c4;
    --accent-hot: #3b5bff;
    --accent-ink: #ffffff;
    --accent-soft: #e8ecff;
    --accent-glow: rgba(0,51,255,.20);
    --create-accent: #0b5cff;
    --create-accent-hover: #0045d8;
    --create-accent-ink: #ffffff;
    --vote-up: #14833b;
    --vote-down: #c72a3c;
    --danger: #d10024;
    --danger-soft: #ffe8ea;
    --pill-bg: #e8ecff;
    --icon-soft: #f4f4f4;
    --icon-bg: #ffffff;
    --drop-bg: #fafafa;
    --media-bg: #f4f4f4;
    --track: #e3e3e3;
    --stage: #000000;
    --timeline-bg: #ffffff;
    --editor-surface: #ffffff;
    --editor-head-bg: #ffffff;
    --editor-note-bg: #fafafa;
    --editor-row-bg: #fafafa;
    --editor-line: #e3e3e3;
    --card-radius: 0px;
    --post-radius: 0px;
    --photo-radius: 0px;
    --photo-radius-sm: 0px;
    --card-shadow: none;
    --elevated-shadow: 0 24px 60px rgba(10,10,10,.18);
    --nav-shadow: 0 -1px 0 var(--text);
    --icon-shadow: none;
    --content-width: 1120px;
    --topbar-height: 60px;
  }
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--topbar-height) + 18px);
    /* Der Platz für die Desktop-Scrollbar bleibt reserviert. Beim Wechsel
       zwischen kurzen und langen Ansichten verschiebt sich der rechte Teil
       des Headers dadurch nicht mehr für einen Frame nach links oder rechts. */
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
  }
  html.modal-scroll-locked,
  body.modal-scroll-locked {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background: var(--page-a);
    color: var(--text);
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  ::selection {
    background: rgba(0,51,255,.18);
  }
  img {
    max-width: 100%;
    vertical-align: middle;
  }
  .muted, .meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
  }
  .small-note {
    font-size: 12px;
    line-height: 1.5;
  }
  .stack {
    display: grid;
    gap: 20px;
  }
  /* Fokus wird angezeigt, nicht angeschrien: eine duenne Linie in der
     Signalfarbe, kein Leuchten und kein zweiter heller Ring. */
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
  }
  input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: none;
  }
  .feed-intro .muted {
    margin: 6px 0 0;
  }
  .feed-intro>.row {
    align-items: flex-start;
  }
  .profile-card>h1, .profile-card>.meta {
    text-align: center;
  }
  button {
    cursor: pointer;
    touch-action: manipulation;
    color: var(--text);
    text-shadow: none;
  }
  button:disabled {
    cursor: not-allowed;
    opacity: .62;
  }
}
