/*
 * TYPO3 Website Doctor – "Tech + Medical + Playful".
 * System fonts only (no third-party requests), tokens on :root.
 */

:root {
    --ink: #0b1220;
    --ink-2: #111a2e;
    --ink-3: #1a2540;
    --line-dark: #26324f;
    --text-on-dark: #eef2fb;
    --muted-on-dark: #9aa6c3;

    --paper: #f5f7fb;
    --card: #ffffff;
    --line: #dfe4ee;
    --text: #141b2d;
    --muted: #5d6882;

    --orange: #ff8700;
    --orange-strong: #e67600;
    --mint: #2fd39b;
    --mint-ink: #0f8a60;
    --amber: #ffb547;
    --amber-ink: #a86200;
    --red: #ff5d5d;
    --red-ink: #c63838;
    --blue: #5ab0ff;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgb(11 18 32 / 0.08);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --focus: 0 0 0 4px rgb(255 135 0 / 0.55);
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.5;
    color: var(--text);
    background: var(--paper);
}

a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

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

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--orange);
}

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark svg { width: 2.2rem; height: 2.2rem; display: block; }
.brand-mark rect { fill: var(--ink); }
.brand-mark path { fill: none; stroke: var(--orange); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-weight: 800; letter-spacing: 0.02em; }

/* ---------- Buttons & inputs ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.55rem 1.1rem;
    border: 2px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn--primary { background: var(--orange); border-color: var(--orange); color: #1b0f00; }
.btn--primary:hover { background: var(--orange-strong); border-color: var(--orange-strong); }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--danger { color: var(--red-ink); border-color: #f3c4c4; }
.btn--lg { min-height: 52px; padding: 0.7rem 1.4rem; font-size: 1.05rem; }
.btn--xl { min-height: 76px; padding: 1rem 2.4rem; font-size: clamp(1.25rem, 2.2vw, 1.8rem); }
.btn__icon { width: 1.4em; height: 1.4em; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.input {
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font: inherit;
}
.input--lg { min-height: 52px; font-size: 1.1rem; }

.notice {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: rgb(90 176 255 / 0.1);
    border-left: 4px solid var(--blue);
}
.notice h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.notice ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.notice--friendly { background: rgb(255 181 71 / 0.14); border-left-color: var(--amber); }
.notice--partial { background: rgb(255 181 71 / 0.12); border-left-color: var(--amber); }
.notice--friendly ul { list-style: none; padding: 0; margin: 0; }

/* ---------- Heartbeat & scan ---------- */

.heartbeat { display: block; width: 100%; height: 80px; overflow: visible; }
.heartbeat__line {
    fill: none;
    stroke: var(--orange);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    filter: drop-shadow(0 0 6px rgb(255 135 0 / 0.6));
    animation: heartbeat 2.8s ease-in-out infinite;
}
@keyframes heartbeat {
    0% { stroke-dashoffset: 700; opacity: 0.2; }
    45% { stroke-dashoffset: 0; opacity: 1; }
    80% { stroke-dashoffset: -700; opacity: 0.4; }
    100% { stroke-dashoffset: -700; opacity: 0; }
}

.scan-dot {
    display: inline-block;
    width: 0.8rem; height: 0.8rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 0 rgb(47 211 155 / 0.6);
    animation: ping 1.6s ease-out infinite;
    vertical-align: middle;
}
@keyframes ping {
    0% { box-shadow: 0 0 0 0 rgb(47 211 155 / 0.6); }
    100% { box-shadow: 0 0 0 14px rgb(47 211 155 / 0); }
}

/* ---------- Kiosk ---------- */

.area-kiosk {
    background:
        radial-gradient(1200px 600px at 85% -10%, rgb(255 135 0 / 0.12), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgb(47 211 155 / 0.08), transparent 60%),
        var(--ink);
    color: var(--text-on-dark);
    min-height: 100vh;
    min-height: 100dvh;
}
.area-kiosk .brand-mark rect { fill: var(--ink-3); }

.kiosk {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(1rem, 3vw, 2.5rem);
    background-image:
        linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}
.kiosk__brand { display: flex; align-items: center; gap: 0.7rem; font-size: 1.1rem; }
.kiosk__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
.kiosk__footer { display: flex; justify-content: center; gap: 0.75rem; color: var(--muted-on-dark); font-size: 0.95rem; }
.kiosk__footer a { display: inline-block; padding: 0.75rem 0.5rem; color: inherit; }

/* Start */
.start { text-align: center; max-width: 60rem; width: 100%; }
.start__title { margin: 0; line-height: 0.95; font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 900; letter-spacing: -0.03em; }
.start__app { display: block; }
.start__app--accent { color: var(--orange); }
.start__pulse { margin: 1.5rem auto; max-width: 42rem; }
.start__headline { margin: 0 0 2.5rem; font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 600; }
.start__hint { margin-top: 1.25rem; color: var(--muted-on-dark); font-size: 1.1rem; }

/* Enter */
.enter { width: 100%; max-width: 56rem; }
.enter__title { margin: 0 0 1.5rem; font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
.enter__label { display: block; }
.enter__field {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 3px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--ink-2);
    transition: border-color 0.15s ease;
}
.enter__field:focus-within { border-color: var(--orange); box-shadow: 0 0 0 6px rgb(255 135 0 / 0.18); }
.enter__field--error { border-color: var(--amber); }
.enter__prefix { padding-left: 1.4rem; color: var(--muted-on-dark); font-size: clamp(1.4rem, 3vw, 2.2rem); font-family: var(--mono); }
.enter__input {
    flex: 1;
    min-width: 0;
    min-height: 96px;
    padding: 0.5rem 1.4rem 0.5rem 0.3rem;
    border: 0;
    background: transparent;
    color: var(--text-on-dark);
    font-family: var(--mono);
    font-size: clamp(1.75rem, 3.6vw, 2.6rem);
    outline: none;
}
.enter__input::placeholder { color: #56627f; }
.enter__scan {
    position: absolute;
    inset: 0 auto 0 -30%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgb(47 211 155 / 0.35), transparent);
    opacity: 0;
    pointer-events: none;
}
.is-scanning .enter__scan { opacity: 1; animation: scan 1.1s linear infinite; }
@keyframes scan { to { left: 100%; } }
.enter__actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.enter__actions .btn--ghost { color: var(--muted-on-dark); }
.enter__privacy { margin-top: 2rem; color: var(--muted-on-dark); font-size: 1rem; }
.enter__privacy a { color: var(--text-on-dark); }
.area-kiosk .notice--friendly { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text-on-dark); background: rgb(255 181 71 / 0.12); }
.area-kiosk .notice--friendly ul { margin: 0; }
.btn__spinner { display: none; width: 1.2em; height: 1.2em; border: 3px solid rgb(27 15 0 / 0.3); border-top-color: #1b0f00; border-radius: 50%; animation: spin 0.8s linear infinite; }
.is-scanning .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ticket */
.ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; width: 100%; max-width: 90rem; }
.ticket__number {
    margin: 0;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: clamp(4.5rem, 16vw, 15rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--text-on-dark);
    text-shadow: 0 0 40px rgb(255 135 0 / 0.35);
}
.ticket__started { margin: 1rem 0 0; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--muted-on-dark); overflow-wrap: anywhere; }
.ticket__nowait { margin: 1.5rem 0; font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 800; color: var(--mint); }
.ticket__todo { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.ticket__todo li {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.9rem 1.3rem;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: rgb(255 255 255 / 0.04);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 600;
}
.ticket__todo svg { width: 2.4rem; height: 2.4rem; fill: none; stroke: var(--orange); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ticket__call { color: var(--muted-on-dark); font-size: 1.2rem; }
.ticket__side { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.qr { margin: 0; text-align: center; color: var(--muted-on-dark); }
.qr__code { width: clamp(10rem, 18vw, 15rem); padding: 0.75rem; background: #fff; border-radius: var(--radius); }
.qr__code svg { display: block; width: 100%; height: auto; }
.qr__code svg .dark, .qr__code svg path { fill: var(--ink); }
.qr figcaption { margin-top: 0.75rem; }
.ticket__done { width: 100%; }
.countdown { width: 1.6em; height: 1.6em; transform: rotate(-90deg); }
.countdown circle { fill: none; stroke: currentColor; stroke-width: 4; opacity: 0.6; }

/* ---------- Public pages ---------- */

.area-public { background: var(--ink); color: var(--text-on-dark); }
.area-public .brand-mark rect { fill: var(--ink-3); }
.page { max-width: 60rem; margin: 0 auto; padding: 1.25rem; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page__main { flex: 1; padding: 2rem 0; }
.page__footer { color: var(--muted-on-dark); font-size: 0.9rem; border-top: 1px solid var(--line-dark); padding-top: 1rem; }
.page__footer a { color: inherit; }

.status { text-align: center; padding: 2rem 0; }
.status__ticket { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 800; font-size: clamp(3rem, 16vw, 6rem); line-height: 1; }
.status__pulse { max-width: 26rem; margin: 1.5rem auto; }
.status__title { font-size: clamp(1.6rem, 6vw, 2.4rem); margin: 1rem 0 0.5rem; }
.status p { color: var(--muted-on-dark); font-size: 1.15rem; max-width: 32rem; margin-left: auto; margin-right: auto; }
.status__icon .sev-icon { width: 4.5rem; height: 4.5rem; margin-top: 1.5rem; }

.prose { max-width: 42rem; }
.prose--wide { max-width: none; }
.prose h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; }
.prose .lead { font-size: 1.2rem; }
.prose p { color: var(--text-on-dark); }
.area-public .notice { color: var(--text-on-dark); background: rgb(90 176 255 / 0.1); }
.area-public .btn--ghost { color: var(--text-on-dark); }

.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin: 2rem 0; }
.criteria__group { padding: 1rem 1.25rem; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); }
.criteria__group h2 { margin: 0 0 0.5rem; font-size: 1.2rem; color: var(--orange); }
.criteria__table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.criteria__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.criteria__table td { padding: 0.4rem 0; border-top: 1px solid var(--line-dark); }
.criteria__weight { text-align: right; white-space: nowrap; }
.dots { display: inline-flex; gap: 4px; }
.dots__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-dark); }
.dots__dot--on { background: var(--orange); }

.login { max-width: 24rem; margin: 2rem auto; }
.login__form { display: grid; gap: 0.75rem; }
.login__label { font-weight: 700; }
.area-public .input { background: var(--ink-2); border-color: var(--line-dark); color: var(--text-on-dark); }

/* ---------- Staff ---------- */

.area-staff { background: var(--paper); color: var(--text); }
.staff__bar {
    position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem clamp(1rem, 3vw, 2rem);
    background: var(--ink);
    color: var(--text-on-dark);
}
.staff__bar .brand-mark rect { fill: var(--ink-3); }
.staff__logout { color: var(--muted-on-dark); padding: 0.6rem; }
.staff__main { max-width: 80rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem; }

.dash-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.dash-head h1 { margin: 0 0 1rem; }
.live { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; margin: 0; }
.live__dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--mint); animation: ping 1.6s ease-out infinite; }
.dash-filter { display: grid; grid-template-columns: 1fr minmax(10rem, 14rem) auto; gap: 0.75rem; margin-bottom: 1.25rem; }

.checks { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.checks th { text-align: left; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.checks td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.checks tr:last-child td { border-bottom: 0; }
.checks__num { text-align: right; font-variant-numeric: tabular-nums; }
.checks__ticket a { display: inline-block; padding: 0.35rem 0; font-family: var(--mono); font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.checks__ticket a::after { content: " →"; color: var(--orange); }
.checks__host { overflow-wrap: anywhere; }
.checks__score { font-weight: 800; font-size: 1.15rem; }
.checks__score--good { color: var(--mint-ink); }
.checks__score--fair { color: var(--amber-ink); }
.checks__score--low { color: var(--red-ink); }
.checks__row--discussed, .checks__row--expired { opacity: 0.55; }
.empty { padding: 3rem; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); }

.badge { display: inline-block; padding: 0.25rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; background: #e8ecf4; color: var(--muted); }
.badge--queued, .badge--created { background: #e7f1ff; color: #2463a8; }
.badge--analyzing { background: #fff1de; color: var(--amber-ink); }
.badge--analyzing::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.4em; border-radius: 50%; background: currentColor; animation: ping 1.4s ease-out infinite; }
.badge--ready { background: #dcf8ec; color: var(--mint-ink); }
.badge--partial { background: #fff4d6; color: var(--amber-ink); }
.badge--failed { background: #ffe5e5; color: var(--red-ink); }
.badge--discussed, .badge--expired { background: #eceff5; color: var(--muted); }

.back { color: var(--muted); text-decoration: none; display: inline-block; padding: 0.4rem 0; }
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin: 0.5rem 0 1rem; }
.detail-head__ticket { margin: 0; font-family: var(--mono); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--orange-strong); }
.detail-head__host { margin: 0.25rem 0 0; font-size: 1.8rem; overflow-wrap: anywhere; }
.detail-head__meta { text-align: right; }
.detail-head .muted { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 1.5rem; }
.actions form { margin: 0; }

.waiting { padding: 3rem 1rem; text-align: center; color: var(--muted); background: var(--ink); border-radius: var(--radius); }
.waiting p { color: var(--muted-on-dark); font-size: 1.2rem; }
.waiting__pulse { max-width: 24rem; margin: 0 auto; }

/* Result */
.result-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.5rem 2rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.no-score { color: var(--muted); max-width: 12rem; }
.counts__lead { margin: 0 0 0.5rem; font-weight: 700; }
.counts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.counts__item { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }

.ring { position: relative; margin: 0; width: 9rem; aspect-ratio: 1; }
.ring--lg { width: 10rem; }
.ring--xl { width: min(46vh, 22rem); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: #e7ebf3; stroke-width: 10; }
.ring__value { fill: none; stroke: var(--mint); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ring--fair .ring__value { stroke: var(--amber); }
.ring--low .ring__value { stroke: var(--red); }
.ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring__score { font-size: 2.6rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.ring--xl .ring__score { font-size: clamp(4rem, 12vh, 7rem); }
.ring__caption { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 0.3rem; }
.ring--xl .ring__caption { font-size: 1rem; color: var(--muted-on-dark); }
.area-kiosk .ring__track { stroke: var(--ink-3); }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.bars__item { display: grid; grid-template-columns: 8rem 1fr 3.5rem; gap: 0.75rem; align-items: center; }
.bars__label { font-weight: 600; }
.bars__track { height: 10px; border-radius: 999px; background: #e7ebf3; overflow: hidden; }
.bars__fill { display: block; height: 100%; border-radius: inherit; background: var(--mint); }
.bars__item--fair .bars__fill { background: var(--amber); }
.bars__item--low .bars__fill { background: var(--red); }
.bars__value { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.bars__item--none .bars__value { font-weight: 400; font-size: 0.8rem; color: var(--muted); }

.sev-icon { flex: none; width: 1.3rem; height: 1.3rem; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sev-icon--critical { stroke: var(--red-ink); }
.sev-icon--improvement { stroke: var(--amber-ink); }
.sev-icon--strength { stroke: var(--mint-ink); }
.sev-icon--neutral { stroke: var(--muted); }
.area-public .sev-icon--strength { stroke: var(--mint); }
.area-public .sev-icon--neutral { stroke: var(--muted-on-dark); }

.result-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; margin: 1rem 0; }
.card { padding: 1.25rem 1.5rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h2 { margin: 0 0 0.75rem; font-size: 1.1rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.card--talk { border-top: 4px solid var(--orange); }
.talk { margin: 0; padding: 0; list-style: none; counter-reset: talk; display: grid; gap: 0.6rem; }
.talk__item { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 1.12rem; font-weight: 600; line-height: 1.4; }
.talk__item .sev-icon { width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; }

.tech { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech__item { display: inline-flex; flex-direction: column; padding: 0.45rem 0.8rem; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); cursor: help; }
.tech__item--typo3 { border-color: var(--orange); background: #fff4e8; }
.tech__name { font-weight: 800; }
.tech__type { font-size: 0.75rem; color: var(--muted); }

.notes h2 { margin: 2rem 0 0.75rem; }
.notes__group { margin-bottom: 1rem; padding: 1rem 1.5rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.notes__group h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 0.5rem; }
.notes__score { font-variant-numeric: tabular-nums; }
.notes__score--good { color: var(--mint-ink); }
.notes__score--fair { color: var(--amber-ink); }
.notes__score--low { color: var(--red-ink); }
.notes__score--none { font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.notes__list { list-style: none; margin: 0; padding: 0; }
.note { display: flex; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.note:first-child { border-top: 0; }
.note .sev-icon { margin-top: 0.15rem; }
.note__body { min-width: 0; flex: 1; }
.note__text { margin: 0; font-weight: 600; }
.note__evidence { margin-top: 0.4rem; font-size: 0.85rem; }
.note__evidence summary { cursor: pointer; color: var(--muted); padding: 0.2rem 0; }
.note__evidence pre { margin: 0.4rem 0 0; padding: 0.6rem 0.8rem; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); background: var(--paper); border-radius: 8px; }
.note--neutral .note__text { font-weight: 400; }
.disclaimer { color: var(--muted); font-size: 0.85rem; margin-top: 1.5rem; }

/* ---------- Presentation mode ---------- */

.present { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: clamp(1rem, 3vw, 2rem); }
.present__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted-on-dark); }
.present__ticket { font-family: var(--mono); font-weight: 800; font-size: 1.4rem; color: var(--text-on-dark); }
.present__exit { padding: 0.8rem 1rem; color: inherit; }
.present__stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1rem 0; }
.slide { width: 100%; max-width: 70rem; text-align: center; }
.slide.is-active { animation: slide-in 0.45s ease both; }
@keyframes slide-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.slide__title { margin: 0 0 2rem; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; letter-spacing: -0.02em; }
.slide__title--good { color: var(--mint); }
.slide__title--found { color: var(--amber); }
.slide .ring--xl { margin: 0 auto 2rem; }
.slide__lead { font-size: clamp(1.4rem, 3vw, 2rem); }
.slide__note { color: var(--muted-on-dark); font-size: 1.1rem; }
.slide__list { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 1rem; max-width: 56rem; text-align: left; }
.slide__list li {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: rgb(255 255 255 / 0.04);
    font-size: clamp(1.25rem, 2.4vw, 1.8rem);
    font-weight: 600;
    line-height: 1.3;
}
.slide__mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-weight: 900; font-size: 1.2rem; }
.slide__list--good .slide__mark { background: rgb(47 211 155 / 0.18); color: var(--mint); }
.slide__list--found .slide__mark { background: rgb(255 181 71 / 0.18); color: var(--amber); }
.slide__list--found .slide__item--critical .slide__mark { background: rgb(255 93 93 / 0.18); color: var(--red); }
.slide__list--topics .slide__mark { background: rgb(255 135 0 / 0.18); color: var(--orange); }

.mini-scores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.mini-scores__item { display: flex; flex-direction: column; min-width: 8.5rem; padding: 0.8rem 1rem; border-radius: var(--radius); background: rgb(255 255 255 / 0.05); border: 1px solid var(--line-dark); }
.mini-scores__value { font-size: 2.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.mini-scores__label { color: var(--muted-on-dark); }
.mini-scores__item--good .mini-scores__value { color: var(--mint); }
.mini-scores__item--fair .mini-scores__value { color: var(--amber); }
.mini-scores__item--low .mini-scores__value { color: var(--red); }

.present__nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.present__nav .btn--ghost { color: var(--muted-on-dark); }
.dots-nav { display: flex; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.dots-nav li { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--line-dark); transition: background-color 0.2s ease, transform 0.2s ease; }
.dots-nav li.is-active { background: var(--orange); transform: scale(1.3); }
.present__disclaimer { margin: 1rem 0 0; text-align: center; color: var(--muted-on-dark); font-size: 0.85rem; }

/* ---------- Print ---------- */

.print { max-width: 60rem; margin: 0 auto; padding: 1.5rem; }
.print__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 3px solid var(--orange); padding-bottom: 1rem; margin-bottom: 1rem; }
.print__head h1 { margin: 0; overflow-wrap: anywhere; }
.print__app { margin: 0; font-weight: 800; color: var(--orange-strong); }
.print__ticket { margin: 0; font-family: var(--mono); font-weight: 800; font-size: 2rem; }

@media print {
    body { background: #fff; }
    .no-print, .staff__bar, .actions { display: none !important; }
    .card, .result-top, .notes__group { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; }
    .note__evidence { display: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .ticket { grid-template-columns: 1fr; text-align: center; }
    .ticket__todo { justify-content: center; }
    .result-top { grid-template-columns: 1fr; justify-items: center; }
    .result-top__bars, .result-top__counts { width: 100%; }
    .result-grid { grid-template-columns: 1fr; }
    .dash-filter { grid-template-columns: 1fr 1fr; }
    .dash-filter__search { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .enter__prefix { display: none; }
    .enter__input { padding-left: 1rem; min-height: 72px; }
    .checks th:nth-child(5), .checks td:nth-child(5) { display: none; }
    .bars__item { grid-template-columns: 6.5rem 1fr 3rem; }
    .detail-head__meta { text-align: left; }
    .present__nav .btn { padding: 0.8rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .heartbeat__line { stroke-dashoffset: 0; opacity: 1; animation: none; }
}

/* ---- Presentation: report request (lead) ------------------------------- */
.report-form {
    display: grid;
    gap: 1rem;
    max-width: 44rem;
    margin: 1.5rem auto 0;
    text-align: left;
}
.report-form__label { color: var(--muted-on-dark); font-size: 1.1rem; }
.report-form__input {
    min-height: 80px;
    padding: 0.5rem 1.4rem;
    border: 2px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--ink-2);
    color: var(--text-on-dark);
    font-family: var(--mono);
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    outline: none;
}
.report-form__input::placeholder { color: #56627f; }
.report-form__input:focus { border-color: var(--orange); box-shadow: 0 0 0 6px rgb(255 135 0 / 0.18); }
.report-form__input--error { border-color: var(--amber); }
.report-form__consent {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-height: 64px;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: var(--ink-2);
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    cursor: pointer;
}
.report-form__consent small { display: block; margin-top: 0.3rem; color: var(--muted-on-dark); font-size: 0.85em; }
.report-form__checkbox {
    flex: none;
    width: 34px;
    height: 34px;
    margin: 0;
    accent-color: var(--orange);
}
.report-form__submit { justify-self: center; margin-top: 0.5rem; }
.report-form__privacy { color: var(--muted-on-dark); font-size: 0.95rem; text-align: center; }
.report-form__privacy a { color: inherit; }
.report-sent__mark {
    display: inline-grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgb(47 211 155 / 0.15);
    color: var(--mint);
    font-size: 3rem;
}

/* ---- Staff: leads --------------------------------------------------------- */
.staff__nav { display: flex; gap: 1.5rem; align-items: center; margin-left: auto; margin-right: 1.5rem; }
.staff__nav a { color: inherit; }
.leads-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.leads-table th, .leads-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.leads-table th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.leads-table td form { display: inline; }
.lead-state--failed { color: var(--red-ink); }
.lead-state--pending { color: var(--amber-ink); }
.lead-state--sent { color: var(--mint-ink); }

/* ---- Finding explanations: why it matters, with TYPO3, what we would do -- */
.finding-note { margin: 0.3rem 0 0; font-size: 0.95rem; font-weight: 400; line-height: 1.45; color: var(--muted); }
.finding-note strong { color: var(--text); font-weight: 600; }
.finding-note--typo3 { padding-left: 0.6rem; border-left: 3px solid var(--orange); }
.talk__body { display: grid; gap: 0.1rem; }
.talk__item .finding-note { font-size: 0.9rem; }

/* Presentation (dark): readable at a distance but clearly secondary. */
.slide__body { display: grid; gap: 0.2rem; }
.area-present .finding-note { font-size: clamp(0.95rem, 1.3vw, 1.15rem); color: var(--muted-on-dark); }
.area-present .finding-note strong { color: var(--orange); }
