/*
 * Kassanova - eine Datei, weil eine Datei genuegt.
 *
 * Die Schrift liegt unter /schrift und wird von hier ausgeliefert, nicht
 * von Google Fonts. Sonst stuende in der Datenschutzerklaerung "keine
 * Weitergabe an Dritte" und der Browser jedes Mitglieds meldete sich
 * beim Laden trotzdem bei einem Dritten.
 */
@font-face {
    font-family: "Inter";
    src: url("/schrift/inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Farben. Warmes Grau statt Blaugrau - eine Kassanova ist Papier,
       kein Cockpit. */
    --grund: #f6f6f4;
    --flaeche: #ffffff;
    --flaeche-leise: #fbfbfa;
    --rand: #e2e1dd;
    --rand-stark: #cfcdc7;
    --text: #1c1b19;
    --text-weich: #3a3833;
    --gedaempft: #6d6a64;
    --akzent: #9a3412;
    --akzent-dunkel: #7c2d12;
    --akzent-hell: #fdf3ee;
    --akzent-rand: #e7c9b8;
    /* Tinte als zweite Farbe: Das Rostrot traegt alles, was Handlung
       ist. Fuer Ruhepunkte - Zahlen, Marken, Linien - braucht es eine
       Farbe, die nicht nach Knopf aussieht. */
    --tinte: #1f3a5f;
    --tinte-hell: #eef2f7;
    --tinte-rand: #cbd6e4;
    --gut: #166534;
    --gut-hell: #f2f9f4;
    --gut-rand: #bfdcc6;
    --warn: #92400e;
    --warn-hell: #fdf8ef;
    --warn-rand: #e6d3b5;
    --schlecht: #b91c1c;
    --schlecht-hell: #fdf2f2;
    --schlecht-rand: #e8c4c4;

    /* Ecken und Schatten. Der Schatten liegt knapp ueber der
       Wahrnehmungsschwelle - er soll Flaechen trennen, nicht auffallen. */
    --ecke: 10px;
    --ecke-klein: 7px;
    --ecke-gross: 14px;
    --schatten: 0 1px 2px rgba(28, 27, 25, 0.04);
    --schatten-hoch: 0 8px 28px rgba(28, 27, 25, 0.10);
    --ring: 0 0 0 3px rgba(154, 52, 18, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    /* Ein Hauch Verlauf von oben: Die Seite wirkt wie ein Blatt unter
       Licht statt wie eine gleichmaessig graue Flaeche. Ueber 900px
       ist davon nichts mehr zu sehen. */
    background: var(--grund)
        linear-gradient(180deg, #fbfbf9 0, rgba(251, 251, 249, 0) 900px);
    background-attachment: fixed;
    color: var(--text);
    font: 15px/1.55 "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Zahlen in gleicher Breite - sonst wandern Betraege in einer Spalte
   sichtbar hin und her, sobald sich eine Ziffer aendert. */
table,
.zahl,
.betrag,
input[type="number"],
input[type="date"] {
    font-variant-numeric: tabular-nums;
}

/* Ein sichtbarer Ring, aber nur fuer die Tastatur - wer klickt, will
   keinen Rahmen sehen. */
:focus-visible {
    outline: 2px solid var(--akzent);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Wer Bewegung abgestellt hat, bekommt keine. */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

a {
    color: var(--akzent);
}

header.kopf {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--rand);
    position: sticky;
    top: 0;
    z-index: 20;
}

.kopf-innen,
main {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
}

.kopf-innen {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 62px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}

.marke {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 17px;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
}

.marke span {
    color: var(--akzent);
}

nav {
    display: flex;
    gap: 18px;
    margin-left: auto;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--gedaempft);
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.12s ease, border-color 0.12s ease;
    white-space: nowrap;
}

nav a:hover {
    color: var(--text);
}

nav a.aktiv {
    color: var(--text);
    border-bottom-color: var(--akzent);
}

main {
    padding-top: 32px;
    padding-bottom: 64px;
}

h1 {
    font-size: 26px;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}

.unterzeile {
    color: var(--gedaempft);
    margin: 0 0 28px;
}

.karten {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.karte {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke);
    padding: 18px 20px;
    box-shadow: var(--schatten);
}

.karte .zahl {
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.karte .beschriftung {
    color: var(--gedaempft);
    font-size: 13px;
    margin-top: 4px;
}

.karte.hervor {
    border-color: var(--akzent-rand);
    background: var(--akzent-hell);
}

.karte.hervor .zahl {
    color: var(--akzent);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke);
    overflow: hidden;
    box-shadow: var(--schatten);
}

/* Eine breite Tabelle rollt in ihrem eigenen Kasten, damit nie die
   ganze Seite seitwaerts wandert. */
.tabelle-rollt {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: var(--ecke);
}

.tabelle-rollt table {
    min-width: 700px;
}

/* Was zusammengehoert, bleibt zusammen: ein Name, ein Betrag, ein
   Datum, eine Referenz. Umbrochen wird nur die Adresse. */
.tabelle-rollt td.zahl,
.tabelle-rollt td.ref,
.tabelle-rollt td.name,
.tabelle-rollt td.datum {
    white-space: nowrap;
}

tbody tr {
    transition: background-color 0.1s ease;
}

tbody tr:hover {
    background: var(--flaeche-leise);
}

th,
td {
    text-align: left;
    padding: 11px 16px;
    border-bottom: 1px solid var(--rand);
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gedaempft);
    font-weight: 600;
    background: var(--flaeche-leise);
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: none;
}

td.zahl,
th.zahl {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

td.ref {
    font-family: "SF Mono", "Cascadia Mono", Consolas, monospace;
    font-size: 12.5px;
    color: var(--gedaempft);
}

.knopf {
    display: inline-block;
    background: var(--akzent);
    color: #fff;
    border: 1px solid var(--akzent);
    border-radius: var(--ecke-klein);
    padding: 8px 15px;
    font: inherit;
    font-weight: 550;
    line-height: 1.3;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--schatten);
    transition: background-color 0.12s ease, border-color 0.12s ease,
        transform 0.06s ease, box-shadow 0.12s ease;
}

.knopf:hover {
    background: var(--akzent-dunkel);
    border-color: var(--akzent-dunkel);
}

/* Der Knopf gibt beim Druecken einen Hauch nach - das bestaetigt den
   Klick auch dann, wenn die Seite eine Sekunde zum Antworten braucht. */
.knopf:active {
    transform: translateY(1px);
    box-shadow: none;
}

.knopf.leise {
    background: var(--flaeche);
    color: var(--text);
    border-color: var(--rand);
}

.knopf.leise:hover {
    background: var(--flaeche-leise);
    border-color: var(--rand-stark);
}

.zeile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.zeile .rechts {
    margin-left: auto;
}

.marke-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid;
}

.status-offen {
    color: var(--warn);
    border-color: var(--warn-rand);
    background: var(--warn-hell);
}

.status-bezahlt {
    color: var(--gut);
    border-color: var(--gut-rand);
    background: var(--gut-hell);
}

.status-teilzahlung {
    color: var(--warn);
    border-color: var(--warn-rand);
    background: var(--warn-hell);
}

.status-storniert {
    color: var(--gedaempft);
    border-color: var(--rand);
    background: #f4f4f2;
}

.hinweis {
    background: var(--gut-hell);
    border: 1px solid var(--gut-rand);
    color: var(--gut);
    padding: 12px 16px;
    border-radius: var(--ecke-klein);
    margin-bottom: 20px;
}

.hinweis strong {
    color: inherit;
}

.hinweis.neutral {
    background: var(--flaeche);
    border-color: var(--rand);
    color: var(--gedaempft);
}

.hinweis ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

form.maske {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke);
    padding: 24px;
    max-width: 620px;
    box-shadow: var(--schatten);
}

.feldgruppe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.feld {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feld.breit {
    grid-column: 1 / -1;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gedaempft);
}

/* Ein Pflichtfeld erkennt man am Sternchen, nicht erst an der
   Fehlermeldung nach dem Absenden. */
.feld label.pflicht::after {
    content: " *";
    color: var(--akzent);
    font-weight: 700;
}

input,
select,
textarea {
    font: inherit;
    padding: 8px 11px;
    border: 1px solid var(--rand);
    border-radius: var(--ecke-klein);
    background: #fff;
    color: var(--text);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:hover,
select:hover {
    border-color: var(--rand-stark);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--akzent);
    box-shadow: var(--ring);
}

/* Ein Feld, das beanstandet wurde, bleibt sichtbar markiert - nicht nur
   der Text darunter. Sonst sucht man in einer langen Maske die Stelle. */
input.hat-fehler,
select.hat-fehler {
    border-color: var(--schlecht-rand);
    background: var(--schlecht-hell);
}

.fehler {
    color: var(--schlecht);
    font-size: 12.5px;
}

.feldhinweis {
    font-size: 12.5px;
    color: var(--gedaempft);
    line-height: 1.45;
}

.leer {
    background: var(--flaeche);
    border: 1px dashed var(--rand-stark);
    border-radius: var(--ecke);
    padding: 44px 24px;
    text-align: center;
    color: var(--gedaempft);
    line-height: 1.6;
}

.leer strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    margin-bottom: 6px;
}

.hinweis.fehlerkasten {
    background: var(--schlecht-hell);
    border-color: var(--schlecht-rand);
    color: var(--schlecht);
}

input[type="file"] {
    padding: 6px 8px;
    background: #fbfbfa;
}

/* --- Anmeldung ------------------------------------------------------ */
.anmeldeseite {
    background: var(--grund);
}

main.anmeldung {
    display: flex;
    justify-content: center;
    padding-top: 90px;
}

.anmeldekasten {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 12px;
    padding: 34px;
    width: 100%;
    max-width: 400px;
}

.marke.gross {
    font-size: 26px;
    display: block;
    margin-bottom: 4px;
}

.knopf.breit {
    width: 100%;
    text-align: center;
    padding: 10px;
}

/* --- Kopfzeile mit Benutzer ------------------------------------------ */
.abmelden {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--rand);
}

@media (max-width: 820px) {
    .abmelden {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        width: 100%;
    }
}

.abmelden .wer {
    font-size: 13px;
    color: var(--gedaempft);
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abmelden button {
    background: none;
    border: none;
    font: inherit;
    font-size: 13px;
    color: var(--akzent);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* --- Werkzeugleiste der Laeufe --------------------------------------- */
.werkzeuge {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.werkzeuge form {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.werkzeuge .erklaerung {
    font-size: 12.5px;
    color: var(--gedaempft);
    line-height: 1.4;
}

.notiz {
    font-size: 12.5px;
    color: var(--gedaempft);
    line-height: 1.4;
}

h2 {
    letter-spacing: -0.01em;
}

/* --- Oeffentliche Seiten --------------------------------------------- */
main.breit {
    max-width: 1000px;
}

main.text {
    max-width: 720px;
}

main.text h2 {
    font-size: 17px;
    margin: 30px 0 8px;
}

main.text p,
main.text li {
    color: var(--text-weich);
    line-height: 1.65;
    max-width: 68ch;
}

main.text ul {
    padding-left: 20px;
}

.aufmacher {
    padding: 40px 0 24px;
}

.aufmacher.schmal {
    max-width: 640px;
}

.aufmacher h1 {
    font-size: clamp(30px, 5.2vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    text-wrap: balance;
}

.lead {
    font-size: clamp(16px, 2vw, 17.5px);
    line-height: 1.6;
    color: var(--text-weich);
    max-width: 620px;
    margin: 0 0 24px;
    text-wrap: pretty;
}

.klein {
    font-size: 13px;
    color: var(--gedaempft);
    margin-top: 12px;
}

.knopf.gross {
    padding: 11px 22px;
    font-size: 15.5px;
}

.dreier {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin: 32px 0;
}

.dreier > div {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke);
    padding: 22px;
    box-shadow: var(--schatten);
}

.dreier h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.dreier p {
    margin: 0;
    color: var(--text-weich);
    line-height: 1.6;
    font-size: 14.5px;
}

.hervorgehoben {
    background: var(--akzent-hell);
    border: 1px solid #e7c9b8;
    border-radius: 12px;
    padding: 28px 30px;
    margin: 32px 0;
}

.hervorgehoben h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.hervorgehoben p {
    color: #4a3529;
    line-height: 1.65;
    max-width: 720px;
}

.preistafel {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 28px;
    margin: 24px 0 40px;
    align-items: start;
}

.preis {
    background: var(--flaeche);
    border: 2px solid var(--akzent);
    border-radius: var(--ecke-gross);
    padding: 28px;
    box-shadow: var(--schatten-hoch);
}

/* Nebeneinander laeuft die Erklaerung neben dem Preis weiter, der
   stehen bleibt. Untereinander waere ein klebender Kasten nur im Weg. */
@media (min-width: 861px) {
    .preis {
        position: sticky;
        top: 84px;
    }
}

.preis .betrag {
    font-size: 34px;
    font-weight: 650;
    letter-spacing: -0.03em;
    color: var(--akzent);
}

.preis .periode {
    color: var(--gedaempft);
    margin-bottom: 18px;
}

.preis ul {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}

.preis li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: 14.5px;
}

.preis li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--akzent);
    font-weight: 700;
}

.preis-erklaerung h3 {
    font-size: 16px;
    margin: 0 0 6px;
}

.preis-erklaerung h3 + p {
    margin-top: 0;
}

.preis-erklaerung p {
    color: #47443e;
    line-height: 1.6;
    margin-bottom: 20px;
}

label.ankreuz {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-weight: 400;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

label.ankreuz input {
    margin-top: 3px;
    width: auto;
}

.fuss {
    border-top: 1px solid var(--rand);
    background: var(--flaeche);
    margin-top: 40px;
}

.fuss-innen {
    max-width: 1000px;
    margin: 0 auto;
    padding: 22px 24px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--gedaempft);
}

.fuss-innen a {
    color: var(--gedaempft);
    text-decoration: none;
}

.fuss-innen a:hover {
    color: var(--akzent);
}

a.wer {
    text-decoration: none;
}

a.wer:hover {
    color: var(--akzent);
}

code {
    background: #f0efec;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12.5px;
}

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

.stand {
    color: var(--gedaempft);
    font-size: 13px;
    margin: -4px 0 24px;
}

main.text table {
    margin: 12px 0 20px;
    font-size: 14.5px;
}

main.text .lead {
    margin-bottom: 26px;
}

/* --- Beitragskategorien ---------------------------------------------- */
.kategorien {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.kategorie {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
}

/* --- Startseite: Aufmacher mit Belegbild ----------------------------- */
.aufmacher.zweispaltig {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 380px);
    gap: 40px;
    align-items: center;
}

.beleg {
    margin: 0;
}

.beleg img {
    width: 100%;
    height: auto;
    display: block;
    background: #fff;
    border: 1px solid var(--rand);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(28, 27, 25, 0.10);
}

.beleg figcaption {
    font-size: 12.5px;
    color: var(--gedaempft);
    line-height: 1.5;
    margin-top: 10px;
}

/* --- Häufige Fragen --------------------------------------------------- */
.fragen {
    margin: 44px 0;
    max-width: 780px;
}

.fragen h2 {
    font-size: 22px;
    margin-bottom: 16px;
}

.fragen details {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.fragen summary {
    padding: 15px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

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

.fragen summary::after {
    content: "+";
    color: var(--akzent);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
}

.fragen details[open] summary::after {
    content: "−";
}

.fragen summary:hover {
    color: var(--akzent);
}

.fragen details p {
    margin: 0;
    padding: 0 18px 17px;
    color: #47443e;
    line-height: 1.65;
    font-size: 14.5px;
}

.abschluss {
    border-top: 1px solid var(--rand);
    padding-top: 34px;
}

/* --- Handy ------------------------------------------------------------ */
@media (max-width: 800px) {
    .aufmacher.zweispaltig {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .aufmacher {
        padding-top: 24px;
    }
    .aufmacher h1 {
        font-size: 27px;
        line-height: 1.2;
    }
    .lead {
        font-size: 16px;
    }
    /* Die beiden Knöpfe nebeneinander statt gestapelt */
    .aufmacher .zeile .knopf {
        flex: 1;
        text-align: center;
        min-width: 140px;
    }
    .oeffentlich-kopf .knopf {
        padding: 7px 13px;
        font-size: 13.5px;
    }
}

@media (max-width: 420px) {
    .aufmacher h1 {
        font-size: 24px;
    }
    main, .kopf-innen, .fuss-innen {
        padding-left: 18px;
        padding-right: 18px;
    }
}

/* --- Kopfzeile der oeffentlichen Seiten ------------------------------- */
/* Bewusst getrennt von der App-Kopfzeile: dort steht der abmelden-Block
   mit Trennlinie, der hier auf dem Handy eine ganze Zeile belegt hat. */
.oeffentlich-kopf .kopf-innen {
    flex-wrap: nowrap;
    gap: 14px;
}

.oeffentlich-kopf nav {
    gap: 18px;
    flex-wrap: nowrap;
}

.kopf-aktion {
    margin-left: 8px;
    flex-shrink: 0;
}

/* Auf dem Handy hat nicht alles Platz. Statt umzubrechen oder zu
   ueberlaufen faellt weg, was doppelt vorhanden ist: "Kostenlos testen"
   steht ohnehin zweimal im Aufmacher. */
@media (max-width: 620px) {
    .oeffentlich-kopf .marke {
        font-size: 16px;
    }
    .oeffentlich-kopf nav {
        gap: 14px;
    }
    .oeffentlich-kopf nav a {
        font-size: 14px;
    }
    .kopf-aktion {
        display: none;
    }
}


/* --- Freischaltung in der Verwaltung ---------------------------------- */
.freischalten {
    display: flex;
    gap: 6px;
    align-items: center;
}

.freischalten input {
    font-size: 13px;
    padding: 5px 8px;
}

/* --- Details, die man erst beim Benutzen merkt ------------------------ */

/* Ein Anker springt nicht mehr unter die stehende Kopfzeile. */
html {
    scroll-padding-top: 84px;
}

/* Lange Vereins- und Mitgliedernamen sprengen sonst die Spalte. */
td,
.karte .beschriftung {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

.fragen summary {
    transition: color 0.12s ease;
}

.hervorgehoben {
    box-shadow: var(--schatten);
}

.dreier > div,
.karte,
.anmeldekasten {
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.dreier > div:hover {
    box-shadow: var(--schatten-hoch);
    border-color: var(--rand-stark);
}

.anmeldekasten {
    box-shadow: var(--schatten-hoch);
}

/* --- Druck ------------------------------------------------------------ */
/*
 * Eine Mitglieder- oder Rechnungsliste wird an einer
 * Vorstandssitzung ausgedruckt. Dann stoeren Navigation, Knoepfe und
 * Schatten - und farbige Flaechen kosten Toner.
 */
@media print {
    header.kopf,
    .fuss,
    .werkzeuge,
    .knopf,
    form.maske button,
    .abmelden {
        display: none !important;
    }

    body {
        background: #fff;
    }

    main {
        max-width: none;
        padding: 0;
    }

    table,
    .karte {
        box-shadow: none;
        break-inside: avoid;
    }

    th {
        background: #fff;
    }

    /* Eine Tabelle ueber mehrere Seiten braucht auf jeder ihre
       Ueberschriften, sonst ist Blatt zwei nicht lesbar. */
    thead {
        display: table-header-group;
    }

    a[href]::after {
        content: "";
    }
}

/* --- Fristzeile unter den Kennzahlen ---------------------------------- */
.fristen {
    color: var(--gedaempft);
    font-size: 13.5px;
    margin: -12px 0 28px;
}

.fristen strong {
    color: var(--text);
    font-weight: 600;
}

.fristen a {
    margin-left: 6px;
}

/* --- Kopfzeile auf schmalen Schirmen ---------------------------------- */
/*
 * Sieben Menuepunkte brauchen umgebrochen drei Zeilen und damit den
 * halben Schirm. Stattdessen bleiben sie in einer Zeile und lassen sich
 * seitwaerts schieben - wie die Registerkarten einer Banking-App.
 */
@media (max-width: 720px) {
    .kopf-innen {
        gap: 10px 14px;
        min-height: 54px;
    }

    header.kopf nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 16px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    header.kopf nav::-webkit-scrollbar {
        display: none;
    }

    .abmelden {
        margin-left: auto;
        width: auto;
        padding-left: 0;
        border-left: none;
        gap: 8px;
    }

    .abmelden .wer {
        max-width: 130px;
    }
}

/* --- Kennzahlen auf dem Handy ----------------------------------------- */
/*
 * Einspaltig gestapelt braucht die Uebersicht drei Bildschirmhoehen,
 * bevor der Kassier den ersten Hinweis sieht. Zu zweit nebeneinander
 * passen alle Zahlen auf einen Blick.
 */
@media (max-width: 560px) {
    .karten {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .karte {
        padding: 14px;
    }

    .karte .zahl {
        font-size: 24px;
    }

    .karte .beschriftung {
        font-size: 12px;
    }
}

/* --- Handlungsknoepfe auf dem Handy ----------------------------------- */
/*
 * Nebeneinander bricht "30 Tage kostenlos testen" auf drei Zeilen und
 * wird doppelt so hoch wie der Knopf daneben. Untereinander und ueber
 * die volle Breite sind beide gleich hoch - und mit dem Daumen sicher
 * zu treffen.
 */
@media (max-width: 480px) {
    .aufmacher .zeile {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .aufmacher .zeile .knopf {
        width: 100%;
        text-align: center;
    }
}

/* --- Werkstatt: die Rechnung entsteht beim Tippen ---------------------- */
.werkstatt {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 36px;
    align-items: center;
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke-gross);
    padding: 32px;
    margin: 40px 0;
    box-shadow: var(--schatten);
}

.werkstatt h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.werkstatt p {
    color: var(--text-weich);
    line-height: 1.6;
    margin: 0 0 18px;
}

.werkstatt .feld {
    margin-bottom: 12px;
}

.werkstatt input {
    width: 100%;
}

.werkstatt .klein {
    margin-top: 16px;
    margin-bottom: 0;
}

/* Waehrend das neue Bild laedt, bleibt das alte stehen und wird nur
   leicht blass - ein Platzhalter waere unruhiger als gar nichts. */
.werkstatt-beleg img {
    transition: opacity 0.2s ease;
}

.werkstatt-beleg img.laedt {
    opacity: 0.45;
}

/* --- Der Kontoauszug zum Anklicken ------------------------------------ */
.abgleich {
    margin: 48px 0;
}

.abgleich h2 {
    font-size: clamp(21px, 3vw, 27px);
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.auszug {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke);
    overflow: hidden;
    box-shadow: var(--schatten);
}

.buchung {
    display: grid;
    grid-template-columns: 1fr auto 24px;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 18px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--rand);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.buchung:last-child {
    border-bottom: none;
}

.buchung:hover {
    background: var(--flaeche-leise);
}

.zahler {
    font-weight: 550;
}

.summe {
    font-variant-numeric: tabular-nums;
    color: var(--gedaempft);
}

.pfeil {
    color: var(--akzent);
    transition: transform 0.18s ease;
    text-align: right;
}

.buchung.geloest .pfeil {
    transform: rotate(90deg);
}

/* Die Aufloesung liegt in der Zeile und klappt auf. Grid-Zeilen von 0fr
   auf 1fr laesst sich anders als "height: auto" weich bewegen. */
.aufloesung {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.22s ease;
}

.buchung.geloest .aufloesung {
    grid-template-rows: 1fr;
}

.aufloesung > * {
    overflow: hidden;
}

.aufloesung .ref {
    font-family: "SF Mono", "Cascadia Mono", Consolas, monospace;
    font-size: 12.5px;
    color: var(--gedaempft);
    display: block;
    padding-top: 10px;
}

.aufloesung .wer {
    display: block;
    color: var(--gut);
    font-weight: 600;
    font-size: 14px;
}

.abgleich-fuss {
    margin-top: 14px;
    max-width: 66ch;
}

/* --- Einblenden beim Blaettern ---------------------------------------- */
/*
 * Sehr zurueckhaltend: acht Pixel Weg, zwei Zehntelsekunden. Es soll
 * wirken, als kaeme der Abschnitt zur Ruhe, nicht als tanze die Seite.
 */
.kommt {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.kommt.da {
    opacity: 1;
    transform: none;
}

@media (max-width: 860px) {
    .werkstatt {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .buchung {
        grid-template-columns: 1fr auto;
        gap: 6px 12px;
    }

    .pfeil {
        display: none;
    }
}

/* --- Rechner: was der Beitragseinzug kostet --------------------------- */
.rechner {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke-gross);
    padding: 32px;
    margin: 44px 0;
    box-shadow: var(--schatten);
}

.rechner-kopf h2 {
    margin: 0 0 6px;
    font-size: clamp(21px, 3vw, 26px);
    letter-spacing: -0.02em;
}

.rechner .lead {
    margin-bottom: 24px;
}

.regler {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 16px;
    margin-bottom: 26px;
}

.regler label {
    grid-column: 1 / -1;
}

.regler input[type="range"] {
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    accent-color: var(--akzent);
    cursor: pointer;
}

.regler output {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
    text-align: right;
}

/*
 * Zwei Balken untereinander, nicht als Kreisdiagramm: Der Vergleich
 * lebt vom Laengenunterschied, und der ist nur nebeneinanderliegend
 * ehrlich abzulesen.
 */
.waage {
    display: grid;
    gap: 18px;
}

.schale .wert {
    display: block;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.schale .was {
    display: block;
    color: var(--gedaempft);
    font-size: 13.5px;
    margin-bottom: 8px;
}

.balken {
    height: 12px;
    background: var(--grund);
    border-radius: 999px;
    overflow: hidden;
}

.balken span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.von-hand .wert {
    color: var(--akzent);
}

.von-hand .balken span {
    background: var(--akzent);
}

.mit-uns .wert {
    color: var(--gut);
}

.mit-uns .balken span {
    background: var(--gut);
}

.gewinn {
    margin: 24px 0 0;
    color: var(--text-weich);
    line-height: 1.6;
}

.gewinn strong {
    color: var(--text);
}

.annahmen {
    margin-top: 18px;
    border-top: 1px solid var(--rand);
    padding-top: 14px;
}

.annahmen summary {
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gedaempft);
}

.annahmen summary:hover {
    color: var(--text);
}

.annahmen ul {
    margin: 12px 0;
    padding-left: 20px;
}

.annahmen li,
.annahmen p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-weich);
    margin-bottom: 6px;
}

/* --- Das Vereinsjahr als Band ---------------------------------------- */
.jahr {
    margin: 48px 0;
}

.jahr h2 {
    font-size: clamp(21px, 3vw, 27px);
    letter-spacing: -0.02em;
    margin: 0 0 18px;
}

.band {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--ecke);
    padding: 18px 20px 22px;
    box-shadow: var(--schatten);
    overflow-x: auto;
}

.monate,
.spur {
    display: grid;
    grid-template-columns: repeat(12, minmax(64px, 1fr));
    gap: 4px;
    min-width: 780px;
}

.monate {
    margin-bottom: 10px;
}

.monate span {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gedaempft);
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rand);
}

.spur {
    margin-bottom: 8px;
}

/* Jeder Halt sitzt ueber die Spalten, die er im Jahr belegt - dadurch
   sieht man sofort, dass sich fast alles im Januar draengt. */
.halt {
    grid-column: var(--von) / var(--bis);
    background: var(--akzent-hell);
    border: 1px solid var(--akzent-rand);
    border-radius: var(--ecke-klein);
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--akzent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.halt.einmalig {
    background: var(--flaeche-leise);
    border-color: var(--rand);
    color: var(--gedaempft);
}

/* Der lange Balken ist die Ausnahme: Zahlungen laufen das ganze Jahr
   ein, und das soll man sehen. */
.halt.lang {
    background: var(--gut-hell);
    border-color: var(--gut-rand);
}

.halt.lang {
    color: var(--gut);
}

.jahr-legende {
    list-style: none;
    counter-reset: schritt;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.jahr-legende li {
    counter-increment: schritt;
    position: relative;
    padding-left: 34px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-weich);
}

.jahr-legende li::before {
    content: counter(schritt);
    position: absolute;
    left: 0;
    top: -1px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--akzent-hell);
    border: 1px solid var(--akzent-rand);
    color: var(--akzent);
    font-size: 12.5px;
    font-weight: 700;
}

.jahr-legende strong {
    display: block;
    color: var(--text);
    margin-bottom: 2px;
}

.jahr-fuss {
    margin-top: 12px;
    max-width: 66ch;
}

@media (max-width: 620px) {
    .rechner {
        padding: 22px;
    }

    .schale .wert {
        font-size: 21px;
    }
}

/* --- Suchfeld in den Listen ------------------------------------------- */
.suchfeld {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.suchfeld input[type="search"] {
    min-width: 240px;
}

.zuruecksetzen {
    font-size: 13px;
    color: var(--gedaempft);
}

@media (max-width: 560px) {
    .suchfeld {
        width: 100%;
    }

    .suchfeld input[type="search"] {
        min-width: 0;
        flex: 1;
    }
}

/* --- Ein Knopf, der wie ein Verweis aussieht --------------------------- */
/*
 * In einer Tabellenzeile stehen Verweise; eine Aktion mit Nebenwirkung
 * muss aber ein Formular sein. Damit die Zeile nicht auseinanderfaellt,
 * traegt der Knopf die Kleider eines Verweises.
 */
.alsverweis {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--akzent);
    text-decoration: underline;
    cursor: pointer;
}

.alsverweis:hover {
    color: var(--akzent-dunkel);
}

/* --- Gefahrenzone ----------------------------------------------------- */
.gefahrenzone {
    max-width: 620px;
    margin: 36px 0 0;
    padding: 20px 24px;
    border: 1px solid var(--schlecht-rand);
    background: var(--schlecht-hell);
    border-radius: var(--ecke);
}

.gefahrenzone h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--schlecht);
}

.gefahrenzone p {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-weich);
}

.knopf.gefahr {
    background: var(--schlecht);
    border-color: var(--schlecht);
}

.knopf.gefahr:hover {
    background: #991b1b;
    border-color: #991b1b;
}

/* --- Bildmarke -------------------------------------------------------- */
/*
 * Kein gap hier: Flex macht aus "Vereins" und dem span "kasse" zwei
 * eigene Elemente und schiebt sie auseinander. Der Abstand gehoert
 * darum an das Bild, nicht in den Behaelter.
 */
.marke {
    display: inline-flex;
    align-items: center;
}

.marke img {
    display: block;
    border-radius: 6px;
    margin-right: 9px;
}

.marke.gross {
    display: inline-flex;
    align-items: center;
    margin-bottom: 6px;
}

.marke.gross img {
    margin-right: 11px;
}

/* --- Mehr Luft, klarere Stufen ---------------------------------------- */
/*
 * Der haeufigste Grund, warum eine Oberflaeche billig wirkt, ist nicht
 * die Farbe, sondern zu wenig Weissraum und zu wenig Unterschied
 * zwischen den Ebenen.
 */
h1 {
    font-size: clamp(24px, 3.4vw, 30px);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.unterzeile {
    max-width: 62ch;
    line-height: 1.55;
}

main {
    padding-top: 40px;
}

/* Kennzahlen: die Zahl traegt, die Beschriftung ordnet sich unter. */
.karte .zahl {
    font-size: 32px;
    letter-spacing: -0.035em;
}

.karte .beschriftung {
    font-size: 12.5px;
    letter-spacing: 0.01em;
    margin-top: 6px;
}

/* Tabellenkopf ruhiger: die Grossbuchstaben trugen bisher zu viel
   Gewicht fuer eine Zeile, die niemand liest. */
th {
    font-size: 11.5px;
    letter-spacing: 0.07em;
    color: var(--gedaempft);
    border-bottom-color: var(--rand-stark);
}

td {
    padding-top: 13px;
    padding-bottom: 13px;
}

/* Referenzen sind Tinte, nicht Grau: Sie sind das Wichtigste in der
   Zeile, weil an ihnen die Zuordnung haengt. */
td.ref,
.aufloesung .ref {
    color: var(--tinte);
}

/* --- Aufmacher auf hellerem Grund ------------------------------------- */
.aufmacher {
    padding-top: 52px;
}

.aufmacher h1 {
    font-size: clamp(30px, 5.2vw, 46px);
}

/* --- Statusmarken schaerfer ------------------------------------------- */
.marke-status {
    padding: 3px 10px;
    letter-spacing: 0.01em;
}

/* --- Trennung zwischen den Abschnitten der Startseite ------------------ */
.dreier {
    margin: 40px 0;
}

.werkstatt,
.rechner {
    border-color: var(--rand);
}

/* --- Fussbereich ------------------------------------------------------ */
.fuss {
    margin-top: 8px;
}
