/* =========================================================================
   AgentBuddy – Stylesheet
   Bildidee: Ein kleiner, freundlicher Agent liest deine Seite und erzählt dir,
   was er verstanden hat. Warmes Papier, weiche Radien, ein Gesicht, das
   auf das Ergebnis reagiert. Nichts hier soll dich anschreien.
   ========================================================================= */

:root {
    color-scheme: light dark;

    /* Flächen – warmes Papier statt kaltem Weiß */
    --bg:          #FBF9F6;
    --bg-tint:     #F3EFFF;
    --surface:     #FFFFFF;
    --surface-2:   #F5F2EC;
    --surface-3:   #EDE9E1;
    --line:        #E7E1D6;
    --line-2:      #D6CEC0;

    /* Schrift */
    --ink:         #251F35;
    --muted:       #6C6580;
    --faint:       #9B95AC;

    /* Marke */
    --brand:       #0F6E72;
    --brand-deep:  #0A4E51;
    --brand-soft:  #DCEFF0;
    --brand-ring:  rgba(15, 110, 114, .28);
    --on-brand:    #FFFFFF;   /* Text auf Markenflaeche */
    --on-status:   #1A1A1A;   /* Text auf ok/warn/bad – Weiss traegt dort nicht */
    --sun:         #F0A93E;
    --sun-soft:    #FFF3D6;

    /* Bewertung */
    --ok:          #12A87A;
    --ok-soft:     #DFF5EC;
    --warn:        #D9860F;
    --warn-soft:   #FDF0D9;
    --bad:         #E05252;
    --bad-soft:    #FCE8E8;

    /* Typo */
    --display: "Outfit", "Segoe UI", system-ui, sans-serif;
    --body:    "Inter", "Segoe UI", system-ui, sans-serif;
    --mono:    ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

    /* Raster */
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --max:    1160px;
    --r-sm:   10px;
    --r:      16px;
    --r-lg:   24px;
    --r-xl:   32px;

    /* Buddy-Gesicht */
    --buddy-screen:    var(--surface);
    --buddy-face:      var(--ink);
    --buddy-blush-op:  .45;
    --buddy-bulb-glow: 0;

    --shadow-sm: 0 2px 6px -2px rgba(37, 31, 53, .10);
    --shadow:    0 14px 34px -22px rgba(37, 31, 53, .45);
    --shadow-lg: 0 34px 70px -40px rgba(37, 31, 53, .55);
}

/* Dunkler Modus: automatisch nach Systemeinstellung, per Schalter uebersteuerbar. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:        #141220;
        --bg-tint:   #1B1730;
        --surface:   #1D192C;
        --surface-2: #241F37;
        --surface-3: #2C2642;
        --line:      #322B4A;
        --line-2:    #443B62;

        --ink:       #F3F0FA;
        --muted:     #A79FC0;
        --faint:     #7E769A;

        --brand:      #45D6E8;
        --brand-deep: #9BE9F2;
        --brand-soft: #0E2E33;
        --brand-ring: rgba(69, 214, 232, .32);
        --on-brand:   #052226;
        --on-status:  #10231C;
        --sun:        #FFC65C;
        --sun-soft:   #3A2E12;

        --ok:        #3DD9A4;
        --ok-soft:   #12332A;
        --warn:      #F0AC4A;
        --warn-soft: #37290F;
        --bad:       #FF7B7B;
        --bad-soft:  #3A1D22;

        /* Buddy: dunkles Display, helles Gesicht – sonst blendet der Bildschirm */
        --buddy-screen:    #171326;
        --buddy-face:      #F5F2FF;
        --buddy-blush-op:  .28;
        --buddy-bulb-glow: .5;

        --shadow-sm: 0 2px 6px -2px rgba(0, 0, 0, .5);
        --shadow:    0 14px 34px -22px rgba(0, 0, 0, .8);
        --shadow-lg: 0 34px 70px -40px rgba(0, 0, 0, .9);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg:        #141220;
    --bg-tint:   #1B1730;
    --surface:   #1D192C;
    --surface-2: #241F37;
    --surface-3: #2C2642;
    --line:      #322B4A;
    --line-2:    #443B62;

    --ink:       #F3F0FA;
    --muted:     #A79FC0;
    --faint:     #7E769A;

    --brand:      #45D6E8;
    --brand-deep: #9BE9F2;
    --brand-soft: #0E2E33;
    --brand-ring: rgba(69, 214, 232, .32);
    --on-brand:   #052226;
    --on-status:  #10231C;
    --sun:        #FFC65C;
    --sun-soft:   #3A2E12;

    --ok:        #3DD9A4;
    --ok-soft:   #12332A;
    --warn:      #F0AC4A;
    --warn-soft: #37290F;
    --bad:       #FF7B7B;
    --bad-soft:  #3A1D22;

    /* Buddy: dunkles Display, helles Gesicht – sonst blendet der Bildschirm */
    --buddy-screen:    #171326;
    --buddy-face:      #F5F2FF;
    --buddy-blush-op:  .28;
    --buddy-bulb-glow: .5;

    --shadow-sm: 0 2px 6px -2px rgba(0, 0, 0, .5);
    --shadow:    0 14px 34px -22px rgba(0, 0, 0, .8);
    --shadow-lg: 0 34px 70px -40px rgba(0, 0, 0, .9);
}

:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Weiche Lichtstimmung hinter dem Seitenkopf */
body::before {
    content: "";
    position: fixed;
    inset: -30vh 0 auto 0;
    height: 90vh;
    background:
        radial-gradient(48rem 32rem at 12% 0%, var(--brand-soft), transparent 62%),
        radial-gradient(40rem 28rem at 88% 6%, var(--sun-soft), transparent 60%);
    opacity: .8;
    pointer-events: none;
    z-index: 0;
}

img, svg { max-width: 100%; }
a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

.shell {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
    position: relative;
    z-index: 1;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px; top: 0;
    background: var(--brand);
    color: var(--on-brand);
    padding: .8rem 1.3rem;
    border-radius: 0 0 var(--r) 0;
    font-weight: 600;
    z-index: 99;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------- Typografie */

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.12;
    margin: 0 0 .5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 1.6rem + 3.4vw, 4.1rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: clamp(1.05rem, 1rem + .45vw, 1.28rem);
    color: var(--muted);
    line-height: 1.62;
    max-width: 56ch;
}

.eyebrow {
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: var(--brand-soft);
    border-radius: 999px;
    padding: .38rem .85rem .38rem .7rem;
    margin: 0 0 1.3rem;
}
.eyebrow::before {
    content: "";
    width: .5rem; height: .5rem;
    border-radius: 50%;
    background: var(--brand);
    flex: none;
}

/* Das freundliche Gegenstück zum Marker: eine weiche Unterlegung */
.hi {
    font-style: normal;
    color: var(--brand-deep);
    background: linear-gradient(transparent 62%, var(--brand-soft) 62%);
    padding-inline: .1em;
    border-radius: 4px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.section {
    padding: clamp(3.25rem, 7vw, 6.5rem) 0 0;
    position: relative;
}
.section__head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }

/* --------------------------------------------------------------- Der Buddy */

.buddy {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}
.buddy__shell { fill: var(--brand); }
.buddy__screen { fill: var(--buddy-screen); }
.buddy__eye { fill: var(--buddy-face); transform-origin: center; }
.buddy__mouth { fill: none; stroke: var(--buddy-face); stroke-width: 3.2; stroke-linecap: round; }
.buddy__blush { fill: var(--sun); opacity: var(--buddy-blush-op); }
.buddy__antenna { stroke: var(--brand); stroke-width: 3.4; stroke-linecap: round; fill: none; }
.buddy__bulb { fill: var(--sun); filter: drop-shadow(0 0 3px rgba(255, 198, 92, var(--buddy-bulb-glow))); }

.buddy--good .buddy__shell { fill: var(--ok); }
.buddy--good .buddy__antenna { stroke: var(--ok); }
.buddy--mid  .buddy__shell { fill: var(--warn); }
.buddy--mid  .buddy__antenna { stroke: var(--warn); }
.buddy--low  .buddy__shell { fill: var(--bad); }
.buddy--low  .buddy__antenna { stroke: var(--bad); }

@keyframes blink {
    0%, 92%, 100% { transform: scaleY(1); }
    95%           { transform: scaleY(.08); }
}
@keyframes bulb {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}
@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

.buddy__eye { animation: blink 5.5s infinite; }
.buddy__eye--r { animation-delay: .12s; }
.buddy__bulb { animation: bulb 2.4s ease-in-out infinite; }

/* ------------------------------------------------------------------ Header */

.masthead {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s, background-color .25s;
}
.masthead.is-stuck { border-bottom-color: var(--line); }

.masthead__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 74px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -.03em;
    text-decoration: none;
    color: var(--ink);
}
.wordmark .buddy { width: 34px; flex: none; }
.wordmark b { font-weight: 600; color: var(--brand); }

.nav {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .93rem;
}
.nav a {
    text-decoration: none;
    color: var(--muted);
    padding: .45rem .85rem;
    border-radius: 999px;
    transition: background-color .2s, color .2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }

@media (max-width: 760px) { .nav a:not(.nav__cta) { display: none; } }

.nav__cta {
    background: var(--ink) !important;
    color: var(--bg) !important;
    font-weight: 500;
}
.nav__cta:hover { background: var(--brand) !important; color: var(--on-brand) !important; }

/* Hell / Dunkel */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    margin-left: .2rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line-2); }
.theme-toggle__icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.theme-toggle__icon--moon { fill: currentColor; stroke: none; }
.theme-toggle__icon--sun  { display: none; }

/* Angezeigt wird das Ziel des Klicks: im Dunkeln die Sonne. */
:root[data-theme="dark"] .theme-toggle__icon--sun  { display: block; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle__icon--sun  { display: block; }
    :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: none; }
}
:root[data-theme="light"] .theme-toggle__icon--sun  { display: none; }
:root[data-theme="light"] .theme-toggle__icon--moon { display: block; }

/* -------------------------------------------------------------------- Hero */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}
@media (max-width: 980px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: .4em; }
.hero .lead { margin-bottom: 1.9rem; }

/* Formular */

.scan-form { display: flex; flex-direction: column; gap: .95rem; max-width: 38rem; }

.scan-field {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--surface);
    border: 1.5px solid var(--line-2);
    border-radius: 999px;
    padding: .45rem .45rem .45rem 1.35rem;
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.scan-field:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 5px var(--brand-ring), var(--shadow);
}

.scan-field__prefix {
    font-family: var(--mono);
    font-size: .82rem;
    color: var(--faint);
    flex: none;
}

.scan-field input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    color: var(--ink);
    font: inherit;
    font-size: 1.02rem;
    padding: .8rem 0;
}
.scan-field input::placeholder { color: var(--faint); }
.scan-field input:focus { outline: none; }

.btn {
    font-family: var(--display);
    font-weight: 500;
    font-size: .97rem;
    border: 0;
    border-radius: 999px;
    padding: .85rem 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .18s cubic-bezier(.2, .7, .3, 1), background-color .2s, color .2s, box-shadow .2s, border-color .2s;
}

.btn--primary {
    background: var(--brand);
    color: var(--on-brand);
    box-shadow: 0 10px 22px -14px var(--brand);
}
.btn--primary:hover { background: var(--brand-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -16px var(--brand); }
.btn--primary:active { transform: translateY(0); }
.btn--primary[disabled] { opacity: .6; cursor: progress; transform: none; }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--line-2);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn--sm { padding: .5rem .95rem; font-size: .85rem; }

@media (max-width: 560px) {
    .scan-field { flex-wrap: wrap; border-radius: var(--r-lg); padding: .9rem; gap: .6rem; }
    .scan-field__prefix { display: none; }
    .scan-field input { flex: 1 1 100%; padding: .4rem .3rem; }
    .scan-field .btn { flex: 1 1 100%; }
}

.form-note {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.2rem;
    font-size: .87rem;
    color: var(--muted);
    margin: 0;
    padding-inline: .4rem;
}
.form-note span { display: inline-flex; align-items: center; gap: .4rem; }
.form-note span::before {
    content: "";
    width: 1.05rem; height: 1.05rem;
    flex: none;
    border-radius: 50%;
    background: var(--ok-soft);
    background-image:
        linear-gradient(45deg, transparent 44%, var(--ok) 44%, var(--ok) 60%, transparent 60%),
        linear-gradient(-45deg, transparent 44%, var(--ok) 44%, var(--ok) 60%, transparent 60%);
    background-size: 46% 2px, 28% 2px;
    background-repeat: no-repeat;
    background-position: 60% 44%, 32% 56%;
}

.form-error {
    background: var(--bad-soft);
    border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent);
    color: var(--bad);
    border-radius: var(--r);
    padding: .8rem 1.1rem;
    font-size: .93rem;
    margin: 0;
}
.form-error:empty { display: none; }

/* Buddy-Karte im Hero: was der Agent gerade sieht */

.peek {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem 1.5rem 1.3rem;
    position: relative;
    animation: float-soft 7s ease-in-out infinite;
}

.peek__buddy {
    width: 82px;
    position: absolute;
    top: -34px;
    right: 26px;
    filter: drop-shadow(0 12px 18px rgba(37, 31, 53, .18));
}

.peek__head {
    font-family: var(--mono);
    font-size: .76rem;
    color: var(--faint);
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .9rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px dashed var(--line-2);
    max-width: 60%;
}
.peek__head::before {
    content: "";
    width: .55rem; height: .55rem;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px var(--ok-soft);
    flex: none;
}

.peek__line {
    display: grid;
    grid-template-columns: 1.4rem 1fr auto;
    align-items: center;
    gap: .7rem;
    padding: .62rem 0;
    font-size: .93rem;
    border-bottom: 1px solid var(--line);
}
.peek__line:last-of-type { border-bottom: 0; }
.peek__line i {
    font-style: normal;
    width: 1.4rem; height: 1.4rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .78rem;
    background: var(--ok-soft);
    color: var(--ok);
}
.peek__line--warn i { background: var(--warn-soft); color: var(--warn); }
.peek__line b { font-weight: 500; }
.peek__line span {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--muted);
}

.peek__say {
    margin-top: 1.2rem;
    background: var(--brand-soft);
    color: var(--brand-deep);
    border-radius: var(--r) var(--r) var(--r) 6px;
    padding: .85rem 1.05rem;
    font-size: .92rem;
    line-height: 1.5;
}

/* ------------------------------------------------------------- Scan-Status */

.scan-status {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-sm);
    display: none;
}
.scan-status[data-active="true"] { display: grid; gap: .55rem; }

.scan-status__line {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .92rem;
    color: var(--faint);
    transition: color .3s;
}
.scan-status__line::before {
    content: "";
    width: 1.15rem; height: 1.15rem;
    border-radius: 50%;
    flex: none;
    border: 2px solid var(--line-2);
    transition: border-color .3s, background-color .3s;
}
.scan-status__line[data-state="active"] { color: var(--ink); }
.scan-status__line[data-state="active"]::before {
    border-color: var(--brand);
    border-right-color: transparent;
    animation: spin .8s linear infinite;
}
.scan-status__line[data-state="done"] { color: var(--muted); }
.scan-status__line[data-state="done"]::before {
    border-color: var(--ok);
    background: var(--ok);
    background-image: linear-gradient(45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%),
                      linear-gradient(-45deg, transparent 45%, #fff 45%, #fff 55%, transparent 55%);
    background-size: 55% 2px, 32% 2px;
    background-repeat: no-repeat;
    background-position: 58% 42%, 30% 55%;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------- Boxen */

.box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 1.1rem;
}

.card {
    padding: 1.6rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    transition: transform .25s cubic-bezier(.2, .7, .3, 1), box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card h3 { margin: 0; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

.card__weight {
    align-self: flex-start;
    font-family: var(--display);
    font-weight: 600;
    font-size: .8rem;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: .3rem .7rem;
    margin-bottom: .35rem;
}

.card__count {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--faint);
    margin-top: auto;
    padding-top: .8rem;
}

/* ------------------------------------------------------------------ Report */

.section--result.is-empty { display: none; }
.section--result { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.report { scroll-margin-top: 96px; }
.report:focus { outline: none; }

.report__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.report__url { font-size: .9rem; color: var(--muted); word-break: break-all; margin: 0; }
.report__url strong { font-family: var(--display); font-size: 1.15rem; color: var(--ink); display: block; }
.report__url span { font-family: var(--mono); font-size: .8rem; }
.report__tools { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Score-Karte mit Ring und Gesicht */

.score {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    display: grid;
    grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
    gap: clamp(1.75rem, 4vw, 3.25rem);
    align-items: center;
    margin-bottom: 1.25rem;
    overflow: hidden;
    position: relative;
}
@media (max-width: 840px) { .score { grid-template-columns: 1fr; text-align: left; } }

.score__ring {
    position: relative;
    width: min(230px, 60vw);
    margin-inline: auto;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}
.score__ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.score__track { fill: none; stroke: var(--surface-3); stroke-width: 10; }
.score__arc {
    fill: none;
    stroke: var(--ok);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: var(--dash, 0) 999;
    animation: draw 1.15s .15s cubic-bezier(.25, .8, .3, 1) both;
}
.score--mid .score__arc { stroke: var(--warn); }
.score--low .score__arc { stroke: var(--bad); }
@keyframes draw { from { stroke-dasharray: 0 999; } }

.score__face { width: 56%; position: relative; z-index: 1; margin-bottom: 2.6rem; }

.score__value {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--display);
    font-weight: 600;
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--ok);
    display: flex;
    align-items: baseline;
    gap: .15em;
}
.score--mid .score__value { color: var(--warn); }
.score--low .score__value { color: var(--bad); }
.score__value small { font-size: .38em; color: var(--faint); font-family: var(--body); font-weight: 500; }

.score__grade {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 999px;
    padding: .3rem .35rem .3rem .85rem;
    margin: .9rem 0 0;
    justify-self: center;
}
.score__grade b {
    font-family: var(--display);
    font-size: .95rem;
    background: var(--ok);
    color: var(--on-status);
    border-radius: 999px;
    width: 1.75rem; height: 1.75rem;
    display: grid; place-items: center;
}
.score--mid .score__grade b { background: var(--warn); }
.score--low .score__grade b { background: var(--bad); }

.score__col { display: grid; justify-items: center; }
@media (max-width: 840px) { .score__col { justify-items: start; } .score__ring { margin-inline: 0; } .score__grade { justify-self: start; } }

.score__verdict h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.9rem); margin-bottom: .4rem; }
.score__verdict > p { color: var(--muted); max-width: 54ch; }

/* Kategorie-Balken */

.bars { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 1rem; }
.bar__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .35rem;
}
.bar__name { font-weight: 500; font-size: .94rem; }
.bar__name span { font-family: var(--mono); font-size: .73rem; color: var(--faint); margin-left: .45rem; }
.bar__value { font-family: var(--display); font-size: .88rem; color: var(--muted); }

.bar__track {
    height: 9px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.bar__fill {
    height: 100%;
    border-radius: 999px;
    background: var(--ok);
    transform-origin: left;
    animation: grow .95s cubic-bezier(.25, .8, .3, 1) both;
}
.bar__fill[data-tone="mid"] { background: var(--warn); }
.bar__fill[data-tone="low"] { background: var(--bad); }
@keyframes grow { from { transform: scaleX(0); } }

/* Report-Blöcke */

.report__block { margin-top: 2.5rem; }
.report__block > h3 {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .3rem .7rem;
    margin-bottom: 1.15rem;
}
.report__block > h3 small { font-family: var(--body); font-size: .88rem; font-weight: 400; color: var(--faint); letter-spacing: 0; }

/* Maßnahmen */

.actions { display: grid; gap: .7rem; }

.action { overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.action[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.action > summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .5rem 1rem;
    padding: 1.05rem 1.3rem;
    cursor: pointer;
    list-style: none;
}
.action > summary::-webkit-details-marker { display: none; }
.action > summary:hover { background: var(--surface-2); }

.action__rank {
    font-family: var(--display);
    font-weight: 600;
    font-size: .85rem;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 999px;
    width: 2rem; height: 2rem;
    display: grid; place-items: center;
    flex: none;
}
.action__title { font-weight: 500; min-width: 0; }
.action__title small { display: block; font-weight: 400; font-size: .8rem; color: var(--faint); margin-top: .1rem; }
.action__meta { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 680px) {
    .action > summary { grid-template-columns: auto 1fr; }
    .action__meta { grid-column: 1 / -1; justify-content: flex-start; }
}

.action__body {
    padding: 0 1.3rem 1.4rem;
    border-top: 1px solid var(--line);
    margin-top: -1px;
    padding-top: 1.2rem;
}
.action__why { color: var(--muted); font-size: .95rem; }

.steps { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: step; display: grid; gap: .6rem; }
.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    gap: .75rem;
    font-size: .95rem;
    align-items: start;
}
.steps li::before {
    content: counter(step);
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 50%;
    width: 1.6rem; height: 1.6rem;
    display: grid; place-items: center;
}

.tag {
    font-size: .76rem;
    font-family: var(--mono);
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 999px;
    padding: .28rem .68rem;
    white-space: nowrap;
}
.tag--quick { background: var(--sun-soft); color: #8A5B00; }
.tag--points { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

@media (prefers-color-scheme: dark) { .tag--quick { color: var(--sun); } }

.code {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 1rem 1.15rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: .82rem;
    line-height: 1.65;
    margin: 0;
    color: var(--ink);
}

/* Prüf-Panels */

.panels { display: grid; gap: .6rem; }

.panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.3rem;
    cursor: pointer;
    font-family: var(--display);
    font-weight: 500;
    list-style: none;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary:hover { background: var(--surface-2); }
.panel[open] > summary { border-bottom: 1px solid var(--line); }
.panel__score { font-family: var(--mono); font-size: .82rem; color: var(--muted); font-weight: 400; }

.signals { list-style: none; margin: 0; padding: .5rem .6rem 1rem; display: grid; gap: .1rem; }

.signal {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr) auto;
    gap: .3rem .8rem;
    padding: .7rem;
    border-radius: var(--r-sm);
    align-items: baseline;
}
.signal:hover { background: var(--surface-2); }

.signal__dot {
    width: 1.1rem; height: 1.1rem;
    border-radius: 50%;
    background: var(--surface-3);
    align-self: center;
    position: relative;
}
.signal__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
}
.signal[data-status="pass"] .signal__dot { background: var(--ok); }
.signal[data-status="warn"] .signal__dot { background: var(--warn); }
.signal[data-status="fail"] .signal__dot { background: var(--bad); }
.signal[data-status="skip"] .signal__dot { background: var(--surface-3); box-shadow: inset 0 0 0 2px var(--line-2); }

.signal__label { font-size: .95rem; }
.signal__value { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-align: right; }
.signal__detail {
    grid-column: 2 / -1;
    font-size: .87rem;
    color: var(--faint);
    line-height: 1.55;
    margin-top: .2rem;
}

@media (max-width: 620px) {
    .signal { grid-template-columns: 1.4rem 1fr; }
    .signal__value { grid-column: 2; text-align: left; }
}

/* Bot-Tabelle */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }

.bots { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 540px; }
.bots th, .bots td { padding: .8rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }
.bots th {
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--faint);
    background: var(--surface-2);
}
.bots tr:last-child td { border-bottom: 0; }
.bots td:first-child { font-family: var(--mono); font-size: .84rem; }

.state {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 500;
    border-radius: 999px;
    padding: .22rem .7rem;
}
.state--ok { background: var(--ok-soft); color: var(--ok); }
.state--warn { background: var(--warn-soft); color: var(--warn); }
.state--no { background: var(--bad-soft); color: var(--bad); }

/* Rohdaten */

.facts {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: .7rem;
}
.facts li { padding: .95rem 1.1rem; }
.facts dl { margin: 0; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: .3rem; }
.facts dd { margin: 0; font-size: .93rem; word-break: break-word; }

.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .85rem; color: var(--faint); }
.notes li { padding-left: 1.2rem; position: relative; line-height: 1.55; }
.notes li::before { content: "·"; position: absolute; left: .4rem; font-weight: 700; }

/* ---------------------------------------------------------------- Playbook */

.play { display: grid; gap: 1rem; }

.play__item {
    display: grid;
    grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    transition: border-color .25s, box-shadow .25s;
}
.play__item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
@media (max-width: 820px) { .play__item { grid-template-columns: 1fr; } }

.play__phase {
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--brand);
    margin: 0 0 .6rem;
}
.play__title { margin-bottom: .45rem; }
.play__aside p { color: var(--muted); font-size: .95rem; }

.play__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.play__list li {
    display: grid;
    grid-template-columns: 1.35rem 1fr;
    gap: .8rem;
    font-size: .95rem;
    line-height: 1.55;
}
.play__list li::before {
    content: "";
    width: 1.35rem; height: 1.35rem;
    border-radius: 50%;
    background: var(--brand-soft);
    background-image: linear-gradient(45deg, transparent 45%, var(--brand) 45%, var(--brand) 58%, transparent 58%),
                      linear-gradient(-45deg, transparent 45%, var(--brand) 45%, var(--brand) 58%, transparent 58%);
    background-size: 46% 2px, 28% 2px;
    background-repeat: no-repeat;
    background-position: 60% 44%, 32% 56%;
    margin-top: .1rem;
}
.play__list b { font-weight: 600; color: var(--ink); }
.play__list span { color: var(--muted); }

/* --------------------------------------------------------------------- FAQ */

.faq { display: grid; gap: .6rem; max-width: 62rem; }

.faq details { overflow: hidden; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary {
    padding: 1.1rem 1.35rem;
    cursor: pointer;
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.02rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface-2); }
.faq summary::after {
    content: "";
    width: .65rem; height: .65rem;
    flex: none;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    margin-top: -.3rem;
    transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: .2rem; }
.faq p { padding: 0 1.35rem 1.3rem; color: var(--muted); font-size: .96rem; margin: 0; max-width: 74ch; }

/* ------------------------------------------------------- Kontakt-Hinweis */

.pitch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(1.75rem, 4vw, 3rem);
}
@media (max-width: 720px) { .pitch { grid-template-columns: 1fr; } }

.pitch h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin: 0 0 .5rem; }
.pitch p { color: var(--muted); margin: 0; max-width: 54ch; }
.pitch .pitch__note { margin-top: .9rem; font-size: .85rem; color: var(--faint); }

.pitch__aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: none;
}
.pitch .buddy { width: 96px; }
@media (max-width: 720px) { .pitch__aside { flex-direction: row; justify-content: flex-start; } .pitch .buddy { width: 72px; } }

/* -------------------------------------------------------------- CTA-Banner */

.cta {
    background: var(--ink);
    color: var(--bg);
    border-radius: var(--r-xl);
    padding: clamp(2rem, 5vw, 3.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    overflow: hidden;
    position: relative;
}
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }
.cta h2 { color: var(--bg); margin-bottom: .35rem; }
.cta p { color: #B9B2CC; color: color-mix(in srgb, var(--bg) 70%, transparent); margin: 0; max-width: 46ch; }
.cta .buddy { width: 118px; }
.cta .btn--primary { background: var(--sun); color: #3A2A00; box-shadow: none; }
.cta .btn--primary:hover { background: #fff; color: var(--ink); }

/* ------------------------------------------------------------------ Footer */

.footer {
    border-top: 1px solid var(--line);
    margin-top: clamp(3rem, 7vw, 6rem);
    padding-block: 2.5rem 3rem;
    font-size: .88rem;
    color: var(--faint);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.footer p { margin: 0; }
.footer__meta { margin-top: 1.25rem; font-size: .8rem; opacity: .75; }
.footer a { color: var(--muted); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.footer a:hover { color: var(--brand); }

/* ------------------------------------------------------------ Einblendungen */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Kurzfassung am Ende des Reports */
.wrapup { padding: 1.6rem 1.75rem; }
.wrapup__lead { margin: 0 0 1rem; font-family: var(--display); font-size: 1.12rem; line-height: 1.5; }
.wrapup__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.wrapup__list li { position: relative; padding-left: 1.35rem; line-height: 1.6; color: var(--muted); }
.wrapup__list li::before {
    content: ""; position: absolute; left: .25rem; top: .62em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.wrapup__list b { color: var(--ink); }
.wrapup__next { margin: 1.4rem 0 .6rem; font-weight: 600; }
.wrapup__top { list-style: none; margin: 0; padding: 0; counter-reset: wrapup; display: grid; gap: .5rem; }
.wrapup__top li {
    counter-increment: wrapup;
    display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
    padding: .7rem .9rem .7rem 2.6rem; position: relative;
    background: var(--surface-2); border-radius: var(--r-sm);
}
.wrapup__top li::before {
    content: counter(wrapup); position: absolute; left: .85rem;
    font-family: var(--display); font-weight: 700; color: var(--brand);
}
.wrapup__title { flex: 1 1 14rem; font-weight: 500; }

@media (max-width: 560px) {
    .wrapup { padding: 1.25rem 1.1rem; }
    .wrapup__lead { font-size: 1.02rem; }
}
.wrapup__hint {
    margin: 0 0 1rem; padding: .75rem 1rem;
    background: var(--sun-soft); color: var(--on-status);
    border-radius: var(--r-sm); font-size: .92rem; line-height: 1.55;
}
