/* Corebird Website
   Aufbau: Tokens, Grundlagen, Layout, Bausteine, Bewegung, schmale Geräte.
   Werte und Regeln stammen aus docs/design-konzept.md. */

/* ---------------------------------------------------------------- Tokens */
:root {
    color-scheme: light;

    --paper: #ffffff;
    --surface: #fafafa;
    --ink: #0a0a0a;
    --muted: #6b6b6b;
    --line: #e4e4e4;
    --brand: #0a0a0a;
    --brand-soft: #262626;
    --accent: #e0342b;
    --accent-ink: #a3231c;     /* Signalfarbe für Text auf Weiss, 7,5:1 */
    --accent-light: #f04a40;   /* Signalfarbe auf schwarzer Fläche, 5,4:1 */

    --container: 1120px;
    --gap: 24px;
    --radius-s: 4px;
    --radius-m: 12px;
    --section: clamp(72px, 10vw, 160px);

    --ease: cubic-bezier(.2, 0, 0, 1);
    --fast: 180ms;
    --slow: 320ms;

    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis-weight: none;
}

.mono,
.chip,
.facts dt,
.facts dd,
.eyebrow {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ------------------------------------------------------------ Grundlagen */
* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    color: var(--ink);
    background: var(--paper);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

h1, h2, h3 {
    text-wrap: balance;
    letter-spacing: -.03em;
}

p {
    text-wrap: pretty;
}

img,
svg {
    display: block;
    max-width: 100%;
}

:where(a, button, summary, input, textarea, select):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-s);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    padding: 10px 16px;
    background: var(--brand);
    color: var(--surface);
    border-radius: var(--radius-s);
    text-decoration: none;
    z-index: 20;
}

.skip-link:focus {
    left: 16px;
}

/* ---------------------------------------------------------------- Layout */
.site-header,
main,
footer {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: relative;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    display: block;
    width: 200px;
    height: auto;
}

nav {
    display: flex;
    gap: var(--gap);
}

nav a,
footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--fast) var(--ease);
}

nav a:hover,
nav a[aria-current="page"],
footer a:hover {
    color: var(--ink);
}

main {
    padding-block: 0 var(--section);
}

section + section {
    margin-top: var(--section);
}

.section-head {
    max-width: 640px;
    margin-bottom: 48px;
}

.section-head h2 {
    margin: 12px 0 0;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    line-height: 1.15;
}

.section-head p {
    margin: 16px 0 0;
    color: var(--muted);
}

.eyebrow {
    margin: 0;
    color: var(--brand);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.lede {
    max-width: 46ch;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
}

.actions {
    margin-top: 36px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.button {
    display: inline-block;
    padding: 13px 22px;
    color: var(--surface);
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--radius-s);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--fast) var(--ease);
}

.button:hover {
    background: var(--brand-soft);
}

.button-quiet {
    color: var(--brand);
    background: transparent;
    border-color: var(--line);
}

.button-quiet:hover {
    background: var(--surface);
    border-color: var(--brand);
}

.text-link {
    color: var(--brand);
    font-weight: 600;
    text-underline-offset: 4px;
}

.bar.w-90 { width: 90%; }
.bar.w-70 { width: 70%; }
.bar.w-55 { width: 55%; }
.bar.w-45 { width: 45%; }
.bar.w-35 { width: 35%; }

/* ------------------------------------------------------------- App-Karten */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
}

.card {
    position: relative;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    text-decoration: none;
    transition: border-color var(--fast) var(--ease);
}

.card:hover {
    border-color: var(--brand);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--brand);
    display: grid;
    place-items: center;
}

.card-icon img {
    width: 34px;
}

.card h3 {
    margin: 0;
    font-size: 1.2rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: .96rem;
}

.chips {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.chip {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .04em;
}

/* ------------------------------------------------------------- Faktentafel */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--gap);
    margin: 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
}

.facts div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.facts dt {
    color: var(--muted);
    font-size: .74rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.facts dd {
    margin: 0;
    font-size: .95rem;
}

/* ------------------------------------------------------- Karten und Status */
.status-card,
.empty-state {
    margin-top: 48px;
    padding: 24px;
    display: flex;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.status-card {
    max-width: 520px;
}

.status-dot {
    width: 10px;
    height: 10px;
    margin-top: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.status-card p,
.empty-state p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.empty-state {
    display: block;
    max-width: 650px;
}

.content-page {
    max-width: 760px;
    padding-top: clamp(48px, 8vw, 96px);
}

.content-page h1 {
    margin: 12px 0 0;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.05;
}

/* --------------------------------------------------------------- Formulare */
.form {
    max-width: 640px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.field label {
    font-size: .9rem;
    font-weight: 600;
}

.optional {
    margin-left: 6px;
    color: var(--muted);
    font-weight: 400;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 11px 13px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    font: inherit;
    font-size: 1rem;
}

.field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.55;
}

.field input:hover,
.field textarea:hover,
.field select:hover {
    border-color: var(--muted);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: var(--accent);
}

.field-error,
.form-error {
    color: var(--accent-ink);
    font-size: .88rem;
}

.form-error {
    margin: 24px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-s);
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.form-note {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
}

.form button {
    align-self: flex-start;
    cursor: pointer;
}

/* Falle für Maschinen: für Menschen unerreichbar, aber nicht display:none,
   weil manche Programme genau darauf achten. */
.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ----------------------------------------------------------------- Verlauf */
.thread {
    max-width: 720px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.message {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    background: var(--surface);
}

.message-team,
.message-ai {
    border-left: 3px solid var(--accent);
}

.message-meta {
    margin: 0 0 10px;
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-size: .8rem;
}

.message-meta span {
    font-weight: 600;
    color: var(--ink);
}

.message-body {
    line-height: 1.6;
}

.form-reply {
    margin-top: 32px;
}

/* ---------------------------------------------------------------- Fußzeile */
footer {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: var(--gap);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}

footer span {
    margin-right: auto;
}

/* --------------------------------------------------------------- Bewegung */
/* Fortschrittslinie im Kopfbereich */
.progress {
    position: fixed;
    inset: 0 0 auto;
    height: 2px;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: var(--accent);
    z-index: 10;
}

/* Eintritt: Startwerte werden erst gesetzt, wenn JavaScript läuft.
   Ohne JavaScript steht der Inhalt sofort und ohne Bewegung da. */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
}

.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}

@supports (animation-timeline: view()) {
    .js [data-reveal] {
        opacity: 1;
        transform: none;
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
    }

    .js [data-reveal].is-in {
        transition: none;
    }

    .progress {
        transform: scaleX(0);
        animation: progress linear both;
        animation-timeline: scroll(root block);
    }
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@keyframes progress {
    to { transform: scaleX(1); }
}

/* ------------------------------------------------------- Schmale Geräte */
@media (max-width: 900px) {
}

@media (max-width: 620px) {
    .site-header,
    main,
    footer {
        width: min(100% - 28px, var(--container));
    }

    .site-header {
        min-height: 72px;
    }

    .brand img {
        width: 168px;
    }

    nav {
        gap: 14px;
        font-size: .9rem;
    }

    .actions {
        gap: 14px;
    }

    footer {
        padding-block: 22px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    footer span {
        width: 100%;
    }
}

/* ------------------------------------------------------------ Startseite */
.home-hero {
    padding-top: clamp(56px, 9vw, 120px);
    max-width: 46ch;
}

.home-hero h1 {
    margin: 0 0 20px;
}

.home-note {
    margin-top: 40px;
    max-width: 60ch;
    color: var(--muted);
}

.card-status {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .03em;
}

/* ------------------------------------------------------- Bildschirmfotos */
.shot,
.themes {
    margin: 0;
}

.shot img,
.theme-shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
}

.shot figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: .88rem;
    max-width: 62ch;
}

/* Der Umschalter kommt ohne JavaScript aus: drei Radioknöpfe, deren
   Zustand über den Geschwisterselektor das passende Bild zeigt. Die Knöpfe
   selbst sind unsichtbar, aber mit der Tastatur erreichbar, und die
   Beschriftung ist ihr Label. */
.theme-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.theme-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.theme-tabs label {
    padding: 7px 18px;
    border-radius: 999px;
    cursor: pointer;
    color: var(--muted);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .74rem;
    letter-spacing: .04em;
    transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.theme-tabs label:hover {
    color: var(--ink);
}

.theme-shot {
    display: none;
}

.theme-radio:checked + .theme-radio + .theme-radio ~ .theme-stage .theme-shot:nth-child(1),
.theme-radio + .theme-radio:checked + .theme-radio ~ .theme-stage .theme-shot:nth-child(2),
.theme-radio + .theme-radio + .theme-radio:checked ~ .theme-stage .theme-shot:nth-child(3) {
    display: block;
}

.theme-radio:checked + .theme-radio + .theme-radio ~ .theme-tabs label:nth-child(1),
.theme-radio + .theme-radio:checked + .theme-radio ~ .theme-tabs label:nth-child(2),
.theme-radio + .theme-radio + .theme-radio:checked ~ .theme-tabs label:nth-child(3) {
    background: var(--brand);
    color: var(--paper);
}

.theme-radio:focus-visible + .theme-radio + .theme-radio ~ .theme-tabs label:nth-child(1),
.theme-radio + .theme-radio:focus-visible + .theme-radio ~ .theme-tabs label:nth-child(2),
.theme-radio + .theme-radio + .theme-radio:focus-visible ~ .theme-tabs label:nth-child(3) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ----------------------------------------------------------- App-Symbole */
/* Das Symbol bringt seine eigene abgerundete Form mit, deshalb hier kein
   Hintergrund und keine Kachel darunter. */
.card-icon-app {
    width: 56px;
    height: 56px;
    background: none;
    border-radius: 0;
}

.card-icon-app img {
    width: 56px;
    height: 56px;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.app-title h1 {
    margin: 0;
}

.app-icon {
    flex: none;
    width: 96px;
    height: 96px;
}

.app-name {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .04em;
}

@media (max-width: 620px) {
    .app-title {
        gap: 16px;
    }

    .app-icon {
        width: 64px;
        height: 64px;
    }
}

/* ------------------------------------------------- Produktseite und Text */

/* Die Verfuegbarkeit ist keine Eigenschaft wie "macOS 14", sondern eine
   Aussage ueber den Stand. Deshalb traegt sie die Signalfarbe. */
.chip-status {
    border-color: var(--accent);
    color: var(--accent-ink);
}

.app-hero .actions {
    align-items: center;
}

.app-price {
    margin: 12px 0 0;
    max-width: 62ch;
}

.app-requirements {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.7;
    max-width: 62ch;
}

/* Steht direkt unter dem Stand, damit niemand die Seite für ein Angebot
   hält und erst unten erfährt, dass es die App noch nicht gibt. */
.app-note {
    margin-top: 28px;
    max-width: 62ch;
}

.app-section {
    max-width: 68ch;
}

.app-section h2 {
    margin-bottom: 16px;
}

.app-section h3 {
    margin: 32px 0 12px;
    font-size: 1rem;
}

.app-section p {
    margin: 0 0 16px;
}

/* Aufzaehlung ohne Punkt, stattdessen ein Strich in der Signalfarbe. */
.marks {
    list-style: none;
    margin: 0;
    padding: 0;
}

.marks li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--muted);
}

.marks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .7em;
    width: 12px;
    height: 1px;
    background: var(--accent);
}

.app-more {
    margin-top: 48px;
    max-width: 68ch;
}

.app-more h3 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.link-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.link-list a {
    display: block;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}

.link-list a:hover {
    color: var(--accent-ink);
}

.link-list span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .9rem;
}

.app-closing {
    max-width: 62ch;
}

/* -------------------------------------------------------------------- FAQ */
.faq {
    max-width: 68ch;
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    padding: 18px 32px 18px 0;
    position: relative;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-ink);
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

.faq details[open] summary::after {
    content: "\2212";
}

.faq summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.faq details p {
    margin: 0 0 20px;
    padding-right: 32px;
    color: var(--muted);
}

/* ------------------------------------------------------------ Fliesstext */
/* Gilt fuer Hilfeartikel und Rechtstexte. Das HTML entsteht beim Import aus
   Markdown, deshalb steht hier die ganze Bandbreite und nicht nur das, was
   heute zufaellig vorkommt. */
.prose {
    max-width: 70ch;
    line-height: 1.75;
}

.prose > :first-child {
    margin-top: 0;
}

.prose h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin: 48px 0 16px;
}

.prose h2 {
    font-size: 1.25rem;
    margin: 48px 0 12px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.prose h3 {
    font-size: 1rem;
    margin: 32px 0 8px;
}

.prose h1:first-child,
.prose h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.prose p,
.prose li {
    color: var(--brand-soft);
}

.prose ul,
.prose ol {
    padding-left: 20px;
}

.prose li {
    margin-bottom: 8px;
}

.prose a {
    color: var(--accent-ink);
    text-underline-offset: 3px;
}

.prose code {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .85em;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    padding: 1px 5px;
}

.prose pre {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    padding: 16px;
    overflow-x: auto;
}

.prose pre code {
    background: none;
    border: 0;
    padding: 0;
}

/* Ein breiter Block darf scrollen, aber nie die Seite breiter machen. */
.prose .table-wrap,
.prose table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.prose table {
    border-collapse: collapse;
    font-size: .9rem;
}

.prose th,
.prose td {
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 10px 0;
    text-align: left;
    vertical-align: top;
}

.prose th {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--muted);
    text-transform: uppercase;
}

/* Der Hinweis auf noch fehlende Angaben soll auffallen, nicht schmuecken. */
.prose blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 2px solid var(--accent);
    background: var(--surface);
    color: var(--brand-soft);
}

.prose blockquote p {
    margin: 0 0 8px;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 40px 0;
}

.article-foot {
    max-width: 70ch;
}

/* Steht unter den Schritten, nicht darüber: wer den Artikel liest, hat sie
   dann gesehen, und niemand muss sich durch einen Warnkasten hindurchlesen,
   um an die Anleitung zu kommen. */
.article-note {
    margin-top: 24px;
    color: var(--muted);
    font-size: .88rem;
}

/* Ein inline gesetzter Code-Schnipsel im Fliesstext ausserhalb von .prose */
.lede code,
.app-section code,
.faq code,
.marks code {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .85em;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    padding: 1px 5px;
}

/* ------------------------------------------------------ Vorher und nachher */
/* Zwei Fenster nebeneinander, dasselbe Dokument. Unter 720 Pixeln werden
   daraus zwei beschriftete Bloecke untereinander, wie im Seitenkonzept. */
.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: start;
}

.compare-pane {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
    background: var(--paper);
}

.compare-pane figcaption {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.compare-source,
.compare-preview {
    margin: 0;
    height: 30rem;
    overflow: auto;
    padding: 20px;
}

.compare-source {
    background: none;
    border: 0;
    border-radius: 0;
}

.compare-source code {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .74rem;
    line-height: 1.7;
    color: var(--muted);
    white-space: pre;
    background: none;
    border: 0;
    padding: 0;
}

.compare-preview {
    font-size: .88rem;
}

.compare-preview h1 {
    font-size: 1.3rem;
    margin: 24px 0 12px;
}

.compare-preview h2 {
    font-size: 1.05rem;
}

.compare-preview h3 {
    font-size: .92rem;
}

/* Kopfdaten als Dokumentkopf, nicht als unerklaerter Block oben auf der Seite */
.doc-head {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.doc-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
}

.doc-meta {
    margin: 4px 0 0;
    color: var(--muted);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .7rem;
}

.doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
}

.doc-tags span {
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .65rem;
}

/* Aufgabenlisten kommen als Kaestchen aus dem Markdown, nicht als Punkte. */
.prose ul li:has(> input[type="checkbox"]) {
    list-style: none;
    margin-left: -20px;
}

.prose li input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--accent);
}

/* Fussnoten stehen abgesetzt unter dem Text, nicht mittendrin. */
.prose .footnotes {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: .85em;
    color: var(--muted);
}

.prose sup a {
    text-decoration: none;
    padding: 0 2px;
}

@media (max-width: 720px) {
    .compare {
        grid-template-columns: 1fr;
    }

    .compare-source,
    .compare-preview {
        height: 22rem;
    }
}

/* ------------------------------------------------------------- Anhänge */
.field-hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .82rem;
}

.field input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-m);
    background: var(--paper);
    font-size: .88rem;
    color: var(--muted);
}

.field input[type="file"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.field input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}

.field input[type="file"]::file-selector-button:hover {
    border-color: var(--accent);
}

/* Anhänge hängen sichtbar an ihrer Nachricht, nicht in einer eigenen Liste
   am Seitenende. Sonst ist nicht erkennbar, worauf sie sich beziehen. */
.files {
    list-style: none;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
}

.files li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0;
}

.files a {
    color: var(--accent-ink);
    text-underline-offset: 3px;
    word-break: break-word;
}

.files span {
    color: var(--muted);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .7rem;
}

/* Ein Bildschirmfoto soll man sehen, ohne es erst zu laden. Alles andere
   bleibt ein Verweis: eine PDF im Fenster ist ein fremdes Programm auf
   unserer Adresse. */
.file-preview {
    flex-basis: 100%;
    display: block;
    margin: 8px 0 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-m);
    overflow: hidden;
    background: var(--surface);
    max-width: 420px;
}

.file-preview img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

/* Der Hinweis vor dem Absenden ist kein Kleingedrucktes. */
.form-warn {
    border-left: 2px solid var(--accent);
    padding: 12px 16px;
    background: var(--surface);
    color: var(--brand-soft);
}

.form-warn strong {
    color: var(--ink);
}

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

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .progress {
        display: none;
    }
}
