/* Website: Seiten ohne Login (layouts/public.html, aufgebaut wie dabei.findig.io) und Bereich
   nach dem Login (layouts/app.html). Farben, Schriften und kleine Bausteine aus css/shared.css.
   Ruhig gehalten: keine Bewegung beim Darueberfahren, nur Farbwechsel. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--f-body); color: var(--ink); background: var(--paper);
       min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 1.75rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 .75rem; }
a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
code { font: 500 .9em var(--f-mono); }

/* Textmarker hinter einem Wort, wie auf findig.io. Nur auf den Seiten ohne Login, fest
   (keine Animation). Die Schrift bleibt dunkel, auch im Dunkelmodus (heller Marker). */
.mk { background: url("../img/marker.da4220dfaf29.svg") center / 100% 100% no-repeat; color: var(--on-accent);
      padding: 0 .08em; margin: 0 -.04em; white-space: nowrap; }

/* ==========================================================================================
   Bereich nach dem Login: Kopfzeile, Navigation links, Inhalt rechts
   ========================================================================================== */
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: .5rem;
             padding: .6rem 1.5rem; background: var(--card); border-bottom: 1px solid var(--line); }
.kopfzeile .brand { display: flex; border-radius: 6px; }
.kopfzeile .logo { height: 30px; width: auto; }

/* Konto-Menue: <details> klappt ohne JavaScript auf und zu */
.konto-menue { position: relative; }
.konto-menue summary { display: flex; align-items: center; gap: .5rem; cursor: pointer;
                       list-style: none; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; }
.konto-menue summary::-webkit-details-marker { display: none; }
.konto-menue summary:hover, .konto-menue[open] summary { background: var(--paper-2); }
.avatar { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
          font: 600 .8rem/1 var(--f-head); background: var(--ink); color: var(--paper); }
.konto-menue .pfeil { width: .9rem; height: .9rem; fill: none; stroke: var(--ink-3);
                      stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menue { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 10; min-width: 16rem;
         padding: .4rem 0; background: var(--card); border: 1px solid var(--line);
         border-radius: 14px; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .25); }
.menue-kopf { padding: .55rem 1rem .7rem; margin: 0 0 .3rem; border-bottom: 1px solid var(--line);
              line-height: 1.35; }
.menue-kopf small { color: var(--ink-3); }
.menue a, .menue .menue-knopf { display: block; width: 100%; padding: .5rem 1rem; text-align: left;
                                font: inherit; font-weight: 400; color: var(--ink);
                                text-decoration: none; background: none; border: none;
                                border-radius: 0; min-height: 0; cursor: pointer; }
.menue a:hover, .menue .menue-knopf:hover { background: var(--paper-2); }
.menue form { margin: 0; }
/* Darstellung im Konto-Menue (der Schalter selbst steht in shared.css) */
.menue-abschnitt { padding: .5rem 1rem .7rem; margin: .3rem 0; border-top: 1px solid var(--line);
                   border-bottom: 1px solid var(--line); }
.menue-titel { display: block; font-size: .8rem; color: var(--ink-3); margin-bottom: .4rem; }

.app { flex: 1; display: flex; width: 100%; }
.sidenav { flex: 0 0 15rem; display: flex; flex-direction: column; gap: .2rem;
           padding: 1.25rem .75rem; background: var(--card); border-right: 1px solid var(--line); }
.sidenav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem;
             border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.sidenav a:hover { background: var(--paper-2); color: var(--ink); }
.sidenav svg { width: 1.2rem; height: 1.2rem; flex: none; fill: none; stroke: currentColor;
               stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* Aktiver Punkt: abgesetzte Flaeche, Limetten-Strich links (nur Deko, Schrift bleibt dunkel) */
.sidenav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); font-weight: 700;
                                  box-shadow: inset 4px 0 0 var(--accent); }
.app main { flex: 1; min-width: 0; max-width: 62rem; padding: 2rem 2.5rem 3rem; }
.app-fuss { display: flex; gap: 1.25rem; justify-content: flex-end; padding: .9rem 1.5rem;
            border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3);
            background: var(--card); }
.app-fuss a { color: var(--ink-3); text-decoration: none; }
.app-fuss a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 48rem) {
  .app { flex-direction: column; }
  .sidenav { flex-direction: row; flex-wrap: wrap; flex-basis: auto; padding: .5rem .75rem;
             border-right: none; border-bottom: 1px solid var(--line); }
  .sidenav a { padding: .45rem .65rem; }
  .app main { padding: 1.5rem 1rem 2.5rem; }
  .kopfzeile { padding: .5rem 1rem; }
}

/* ==========================================================================================
   Seiten ohne Login (Anmelden, Registrieren, Passwort vergessen ...): wie dabei.findig.io.
   Handy: Formular, darunter die Graphit-Karte, ganz unten die Fusszeile.
   Ab 960px: links Formular und Fusszeile, rechts die Karte ueber die ganze Hoehe.
   ========================================================================================== */
.links { flex: 1; display: flex; flex-direction: column; padding: 20px 20px 0; }
.links__kopf { flex: none; }
.links .brand { display: inline-flex; border-radius: 6px; }
.links .logo { height: 34px; width: auto; }
.links__inhalt { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 48px 0;
                 display: flex; flex-direction: column; justify-content: center; }
.links__inhalt.breit { max-width: 560px; }
.fuss { flex: none; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between;
        padding: 20px 20px 24px; font-size: .85rem; color: var(--ink-3); }
.fuss nav { display: flex; gap: 18px; }
.fuss a { color: inherit; text-decoration: none; }
.fuss a:hover { text-decoration: underline; }

.kicker { display: block; font: 600 .78rem/1 var(--f-body); letter-spacing: .14em;
          text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.geteilt h1 { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; letter-spacing: -.03em;
              margin-bottom: 14px; }
.lead { font-size: 1.08rem; color: var(--ink-2); margin: 0 0 4px; }

.rechts { margin: 0 12px; border-radius: 24px; padding: 40px 28px;
          background: var(--graphite); color: var(--graphite-text); }
.rechts__in { max-width: 460px; margin: 0 auto; }
.rechts .kicker { color: var(--graphite-muted); }
.rechts h2 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); font-weight: 700; line-height: 1.1;
             letter-spacing: -.03em; margin: 0 0 16px; }
/* Der Marker beginnt etwas innerhalb seiner Flaeche; auf Graphit waere dunkle Schrift daneben
   unsichtbar, deshalb mehr Innenabstand als auf heller Seite */
.rechts .mk { padding: 0 .2em 0 .28em; margin: 0; }
.rechts__text { color: var(--graphite-muted); margin: 0 0 28px; }
.rechts a { color: var(--graphite-text); }
.rechts :focus-visible { outline-color: var(--graphite-text); }
/* Beispiel-FIN, wie die Ergebniszeile im Scanner. Bewusst ohne Markierung und gerade. */
.karte { margin: 0 0 28px; background: #FFFFFF; color: #1F2328; border-radius: 18px;
         padding: 16px 20px 18px; display: grid; gap: 10px; }
.karte__l { font: 600 .75rem/1 var(--f-body); letter-spacing: .14em; color: #5C6167; }
.karte__fin { font: 700 clamp(1rem, 4.2vw, 1.3rem)/1.3 var(--f-mono); letter-spacing: .02em;
              white-space: nowrap; }
.karte__ok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.karte__btn { display: inline-flex; align-items: center; gap: 6px; background: #1F2328;
              color: #F7F5EF; font: 700 .85rem/1 var(--f-body); padding: 8px 13px;
              border-radius: 999px; }
.karte__btn svg { fill: none; stroke: #D2EC4E; stroke-width: 2.6; stroke-linecap: round;
                  stroke-linejoin: round; }
.karte__s { font: 600 .85rem/1.2 var(--f-body); color: #2E7A4C; }
.punkte { list-style: none; padding: 0; margin: 0 0 28px; }
.punkte li { display: flex; align-items: center; gap: 12px; padding: 12px 0;
             border-top: 1px solid var(--graphite-line); font: 600 1rem/1.35 var(--f-head); }
.punkte li:last-child { border-bottom: 1px solid var(--graphite-line); }
.punkte svg { width: 20px; height: 20px; flex: none; fill: none; stroke: #D2EC4E; stroke-width: 2.4;
              stroke-linecap: round; stroke-linejoin: round; }
.rechts__mehr { font-weight: 700; text-decoration: none; }
.rechts__mehr:hover { text-decoration: underline; text-underline-offset: 5px; }

@media (min-width: 960px) {
  .geteilt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
             grid-template-rows: 1fr auto; }
  .geteilt .links { grid-column: 1; grid-row: 1; padding: 28px 40px 0; }
  .geteilt .fuss { grid-column: 1; grid-row: 2; padding: 20px 40px 28px; }
  .rechts { grid-column: 2; grid-row: 1 / span 2; margin: 12px 12px 12px 0; position: sticky;
            top: 12px; height: calc(100vh - 24px); height: calc(100dvh - 24px); display: flex;
            align-items: center; padding: 48px; }
  .rechts__in { width: 100%; }
}

/* Unter dem Formular: "Noch kein Konto?" bzw. weitere Wege */
.konto { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
         font-size: .95rem; color: var(--ink-2); }
.konto p { margin: 0 0 12px; }
.konto a:not(.button) { color: var(--ink); font-weight: 700; }
.nebenwege { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 14px; font-size: .95rem; }

/* ==========================================================================================
   Bausteine: Formulare, Knoepfe, Meldungen, Kaesten, Tabellen
   ========================================================================================== */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
/* Formulare auf den Seiten ohne Login stehen ohne Kasten direkt auf der Seite (wie dabei) */
.formular { margin-top: 24px; display: grid; gap: 18px; }
.formular > p { margin: 0; }

.feld { display: grid; gap: 6px; }
.panel .feld + .feld, .panel .feld + .actions, .panel .errorlist + .feld { margin-top: 1rem; }
label { display: block; font-weight: 500; font-size: .95rem; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 14px;
                          font: 400 1rem/1.3 var(--f-body); color: var(--ink);
                          background: var(--card); border: 2px solid var(--line);
                          border-radius: 12px; }
input:hover:not(:disabled), select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px; }
input:disabled { color: var(--ink-3); background: var(--paper-2); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0;
                                             accent-color: var(--ink); }
.feld--fehler input, .feld--fehler select { border-color: var(--error); }
/* Die aufgeklappte Liste zeichnet der Browser selbst; Farben und Schrift uebernehmen
   Chrome und Firefox, Safari (Mac) teilweise nicht. */
option { font: inherit; color: var(--ink); background: var(--card); }
.help { color: var(--ink-3); font-size: .85rem; }
.help ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.errorlist { color: var(--error); list-style: none; padding: 0; margin: 0; font-size: .9rem;
             font-weight: 500; }

/* Knoepfe: Hauptknopf in Limette, ruhig (nur Farbwechsel beim Darueberfahren) */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .5em;
                  min-height: 46px; padding: .6em 1.35em; border-radius: 999px;
                  font: 700 .98rem/1.1 var(--f-body); text-decoration: none; cursor: pointer;
                  white-space: nowrap; background: var(--accent); color: var(--on-accent);
                  border: 2px solid var(--button-border); transition: background-color .15s, color .15s; }
button:hover, .button:hover { background: color-mix(in srgb, var(--accent) 82%, #000); }
button.quiet, .button.quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
button.quiet:hover, .button.quiet:hover { background: var(--paper-2); }
button.danger { background: transparent; color: var(--error); border-color: var(--error); }
button.danger:hover { background: color-mix(in srgb, var(--error) 10%, transparent); }
.breit { width: 100%; }
/* Kleine Knoepfe in Tabellenzeilen */
form.inline { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
form.inline button { min-height: 0; padding: .3em .85em; font-size: .85rem; border-width: 1.5px; }
.actions { margin-top: 1.5rem; display: flex; gap: .75rem 1.25rem; align-items: center; flex-wrap: wrap; }
.formular .actions { margin-top: 4px; }

.msg { padding: .8rem 1rem; margin: 0 0 1rem; border-radius: 4px 10px 10px 4px;
       border-left: 4px solid var(--ok); background: var(--paper-2); color: var(--ink); }
.msg.note { border-left-color: var(--accent); }
.lead + .msg { margin-top: 20px; }
.msg.error { border-left-color: var(--error); }
.muted { color: var(--ink-3); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
dt { color: var(--ink-3); } dd { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--ink-3); font-weight: 600; font-size: .85rem; }
tbody tr:last-child td { border-bottom: none; }

/* Mehrere Bereiche in einem Formular (Registrierung: "Deine Firma" / "Über dich") */
fieldset { border: none; padding: 0; margin: 0 0 8px; display: grid; gap: 18px; min-width: 0; }
legend { font: 600 1.1rem/1.3 var(--f-head); padding: 0; margin-bottom: 18px; }
/* Registrierung: Honeypot-Feld fuer Bots. Aus dem sichtbaren Bereich geschoben statt
   display:none, weil manche Bots unsichtbare Felder an display:none erkennen. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Rechenaufgabe: Bild und Eingabefeld nebeneinander. Das Bild bleibt hell (wird so erzeugt). */
.captcha-row { display: flex; gap: .75rem; align-items: center; }
.captcha-row img { border: 2px solid var(--line); border-radius: 12px; flex: none; background: #fff; }
.captcha-row input { max-width: 8rem; }

/* --- FIN Scanner ------------------------------------------------------------------------- */
.scanner-seite { max-width: 42rem; }

/* --- Nutzung ------------------------------------------------------------------------------- */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.kennzahl h2 { margin: 0 0 .35rem; font: 600 .9rem/1.3 var(--f-body); color: var(--ink-3); letter-spacing: 0; }
.kennzahl .zahl { font: 700 2.2rem/1.1 var(--f-head); letter-spacing: -.02em; margin: 0; }
.kennzahl p { margin: 0; }
.fin-kurz { font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em;
            white-space: nowrap; }
/* Farbe der Tags im Verlauf nach Wert (Sicherheit, Status) */
.tag[data-wert="very_high"], .tag[data-wert="high"], .tag[data-wert="ok"] { color: var(--ok); }
.tag[data-wert="middle"], .tag[data-wert="no_fin"] { color: var(--orange); }
.tag[data-wert="low"], .tag[data-wert="failed"], .tag[data-wert="llm_error"],
.tag[data-wert="aborted"] { color: var(--error); }
.tabelle-scroll { overflow-x: auto; }
.seiten { display: flex; gap: 1rem; align-items: center; justify-content: center;
          margin-top: 1rem; font-size: .92rem; }

/* --- Uebersicht (Startseite nach dem Login) ------------------------------------------------- */
.begruessung { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
               gap: 1rem; margin-bottom: 1.5rem; }
.begruessung h1 { margin: 0; }
.begruessung p { margin: .2rem 0 0; }
.karten-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.karten-kopf h2 { margin: 0 0 .75rem; }
.karten-kopf a { font-size: .9rem; }
/* Nur auf dieser Seite Abstand zwischen den Karten, andere Seiten bleiben unberuehrt */
.start-karte, .nutzung-karte { margin-bottom: 1.25rem; }
.karten { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.karten .karte-breit { grid-column: 1 / -1; }
.karten h2 { margin-top: 0; }
.karten-zahl { font: 700 1.6rem/1.2 var(--f-head); letter-spacing: -.02em; margin: 0 0 .35rem; }
button.klein { min-height: 0; padding: .3em .85em; font-size: .85rem; border-width: 1.5px; }
.anbieter { font-style: normal; margin: 0 0 1rem; line-height: 1.5; }

/* Einstieg fuer Neue: nummerierte Schritte, erledigte mit Haken (ruhig, Limette nur als Flaeche) */
.schritte { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.schritt { display: flex; gap: .9rem; align-items: flex-start; }
.schritt p { margin: .2rem 0 0; color: var(--ink-2); }
.schritt .actions { margin-top: .75rem; }
.schritt-nr { flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem;
              border-radius: 50%; border: 2px solid var(--ink); font-weight: 700; font-size: .9rem; }
.schritt.erledigt .schritt-nr { background: var(--accent); color: var(--on-accent);
                                border-color: var(--accent); }
.schritt.erledigt strong { color: var(--ink-3); }

/* Saeulen je Tag: Hoehe in Prozent vom staerksten Tag (dashboard.views.usage_by_day) */
.nutzung-karte .kontingent { margin-top: 0; }
.diagramm { display: flex; align-items: stretch; gap: 3px; height: 7.5rem; margin-top: 1.5rem;
            border-bottom: 1px solid var(--line); }
.saeule { flex: 1; display: flex; flex-direction: column-reverse; min-width: 0; }
.saeule span { display: block; }
.saeule .ok { background: var(--ink-3); border-radius: 0 0 2px 2px; }
.saeule .fehl { background: var(--line-strong); border-radius: 2px 2px 0 0; }
.saeule.heute .ok { background: var(--ink); }
.saeule.zukunft { opacity: .35; }
.achse { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-3);
         margin-top: .35rem; }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: 1rem 0 0;
           font-size: .9rem; color: var(--ink-2); }
.legende .punkt { width: .7rem; height: .7rem; border-radius: 2px; }
.legende .punkt.ok { background: var(--ink-3); }
.legende .punkt.fehl { background: var(--line-strong); margin-left: .75rem; }

/* --- Seite Browser-Erweiterung: ein Kasten je Browser ------------------------------------ */
.erweiterung-pakete { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.erweiterung-pakete h2 { margin-top: 0; }
.erweiterung-pakete ol { padding-left: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
