/* =====================================================
   ChannelGrave homepage (dark ward)
   Requires tokens.css. Loaded AFTER style.css (the report
   stylesheet) so this page's body/header/h1 rules win over
   that file's globals. The grafted report DOM under #cg-app
   is still styled by style.css and is not restyled here.
   ===================================================== */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: var(--text-1);
    font-weight: 400;
    line-height: var(--leading-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

@media (min-width: 720px) {
    .wrap {
        padding: 0 32px;
    }
}

/* ---------- Type ---------- */
.home h1,
.home h2,
.home h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: var(--tracking-heading);
    line-height: var(--leading-tight);
    color: var(--paper);
}

.home p {
    max-width: var(--measure);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.94em;
}

.home a {
    color: var(--seal-hi);
    text-decoration: none;
    transition: color var(--dur-fast);
}

.home a:hover {
    color: var(--paper);
}

/* ---------- Focus ---------- */
.home a:focus-visible,
.home button:focus-visible,
.home input:focus-visible,
.home summary:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

.reveal-2 { transition-delay: 90ms; }
.reveal-3 { transition-delay: 180ms; }
.reveal-4 { transition-delay: 270ms; }

/* ---------- Controls ---------- */
.form-label {
    display: block;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    display: block;
    width: 100%;
    font-family: var(--font-mono);
    font-size: var(--text-1);
    line-height: 1.3;
    padding: 15px 16px;
    color: var(--paper);
    background: rgba(24, 36, 33, 0.8);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}

.form-input::placeholder {
    color: var(--muted);
}

.form-input:focus {
    border-color: var(--seal-hi);
    box-shadow: 0 0 0 4px rgba(69, 166, 127, 0.18);
    background: var(--bg-3);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: var(--text-1);
    font-weight: 500;
    line-height: 1.3;
    padding: 14px 24px;
    color: #FFFFFF;
    background: linear-gradient(180deg, var(--seal-hi), var(--seal));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-control);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(47, 138, 102, 0.28);
    transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), filter var(--dur-fast);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(47, 138, 102, 0.38);
    filter: brightness(1.06);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    filter: grayscale(0.6);
    cursor: default;
    transform: none;
}

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn--ghost {
    background: transparent;
    color: var(--paper);
    border-color: var(--line-strong);
    box-shadow: none;
}

.btn--ghost:hover {
    background: var(--bg-3);
    box-shadow: none;
}

/* ---------- Icons ---------- */
.icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    text-align: left;            /* overrides style.css `header` centering */
    margin-bottom: 0;
    background: rgba(10, 18, 17, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-2);
    letter-spacing: var(--tracking-heading);
}

.home .wordmark {
    color: var(--paper);
}

.home .wordmark:hover {
    color: var(--seal-hi);
}

.wordmark-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--seal-hi);
    box-shadow: 0 0 0 0 rgba(69, 166, 127, 0.6);
    animation: pulse-ring 2.2s ease-out infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(69, 166, 127, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(69, 166, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(69, 166, 127, 0); }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.home .site-nav-link {
    color: var(--paper);
    font-weight: 500;
    padding: 9px 2px;
}

.home .site-nav-link:hover,
.home .site-nav-link[aria-current="page"] {
    color: var(--seal-hi);
}

.site-header-link {
    font-weight: 500;
    padding: 9px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.home .site-header-link {
    color: var(--paper);
}

.home .site-header-link:hover {
    background: var(--bg-3);
    border-color: var(--seal-hi);
}

/* ---------- Hero with verdict slideshow ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 56px;
    isolation: isolate;
}

.hero[data-verdict="autopsy"]   { --accent: var(--autopsy); }
.hero[data-verdict="wellness"]  { --accent: var(--wellness); }
.hero[data-verdict="discharge"] { --accent: var(--discharge); }

/* Blurred color fields behind the hero. Solid blobs blurred heavily; their
   color follows the active verdict and drifts slowly. */
.hero-bg {
    position: absolute;
    inset: -20%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    transition: background-color 1.4s var(--ease-out);
    will-change: transform;
}

.blob-1 {
    width: 46vw; height: 46vw; min-width: 420px; min-height: 420px;
    left: 4%; top: 6%;
    background-color: var(--accent);
    animation: drift-1 22s ease-in-out infinite alternate;
}

.blob-2 {
    width: 38vw; height: 38vw; min-width: 340px; min-height: 340px;
    right: 6%; top: 18%;
    background-color: var(--seal);
    opacity: 0.4;
    animation: drift-2 26s ease-in-out infinite alternate;
}

.blob-3 {
    width: 30vw; height: 30vw; min-width: 260px; min-height: 260px;
    left: 42%; bottom: -4%;
    background-color: var(--accent);
    opacity: 0.32;
    animation: drift-3 19s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(9vw, 6vh) scale(1.15); }
}

@keyframes drift-2 {
    from { transform: translate(0, 0) scale(1.05); }
    to   { transform: translate(-8vw, 10vh) scale(0.92); }
}

@keyframes drift-3 {
    from { transform: translate(0, 0) scale(0.95); }
    to   { transform: translate(-6vw, -8vh) scale(1.12); }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.94em;
    color: var(--muted);
    margin: 0 0 18px;
}

.hero-kicker .icon {
    width: 18px;
    height: 18px;
    color: var(--seal-hi);
}

.home .hero h1 {
    font-size: clamp(var(--text-5), 3.4vw + 26px, var(--text-6));
    max-width: 16ch;
    margin: 0 0 18px;
    text-indent: 0;
}

.hero-sub {
    color: var(--muted);
    margin: 0 0 32px;
}

.intake {
    max-width: 640px;
}

.intake .btn {
    margin-top: 14px;
}

/* ECG trace: paper at 1.5px with a soft glow, looping a normal rhythm. On
   submit the rhythm is replaced by a flatline in --flatline that draws once
   and holds. */
.ecg {
    display: block;
    width: 100%;
    height: 64px;
    margin: 28px 0 10px;
    overflow: hidden;   /* the scrolling rhythm must not spill past the column */
}

.ecg path {
    fill: none;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.ecg-rhythm {
    stroke: var(--paper);
    filter: drop-shadow(0 0 6px rgba(69, 166, 127, 0.7));
    animation: ecg-scroll 1s linear infinite;
}

@keyframes ecg-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-250px); }
}

.ecg-flat {
    stroke: var(--flatline);
    filter: drop-shadow(0 0 8px rgba(228, 80, 63, 0.8));
    display: none;
}

.ecg.is-flat .ecg-rhythm {
    display: none;
    animation: none;
}

.ecg.is-flat .ecg-flat {
    display: block;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: ecg-flatline 0.9s linear forwards;
}

@keyframes ecg-flatline {
    to { stroke-dashoffset: 0; }
}

.hero-note {
    color: var(--muted);
    margin: 0;
}

/* Verdict slideshow */
.verdict-show {
    position: relative;
    background: rgba(17, 27, 25, 0.62);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 28px 28px 22px;
    min-height: 330px;
    overflow: hidden;
}

.verdict-show::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--accent);
    transition: background var(--dur-slow);
}

.verdict-track {
    position: relative;
    min-height: 240px;
}

.verdict-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(28px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
    pointer-events: none;
}

.verdict-slide.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.verdict-slide.is-leaving {
    opacity: 0;
    transform: translateX(-28px);
}

.verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-strong);
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--muted);
    margin-bottom: 18px;
}

.verdict-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #FFFFFF;
}

.verdict-slide[data-verdict="autopsy"]   .verdict-icon { background: var(--autopsy); }
.verdict-slide[data-verdict="wellness"]  .verdict-icon { background: var(--wellness); }
.verdict-slide[data-verdict="discharge"] .verdict-icon { background: var(--discharge); }

.verdict-icon .icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.home .verdict-slide h2 {
    font-size: var(--text-4);
    margin: 0 0 12px;
}

.verdict-slide h2 span {
    color: var(--accent);
}

.verdict-slide p {
    color: var(--muted);
    margin: 0;
}

.verdict-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.verdict-dots {
    display: flex;
    gap: 8px;
}

.verdict-dot {
    width: 34px;
    height: 6px;
    border-radius: var(--radius-pill);
    border: 0;
    padding: 0;
    background: var(--line-strong);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: background var(--dur-fast);
}

.verdict-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

.verdict-dot.is-active::after {
    animation: dot-fill 5s linear forwards;
}

.verdict-dot.is-done::after {
    transform: scaleX(1);
}

@keyframes dot-fill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

.verdict-arrows {
    display: flex;
    gap: 6px;
}

.verdict-arrow {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--paper);
    cursor: pointer;
    transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}

.verdict-arrow:hover {
    background: var(--bg-3);
    border-color: var(--seal-hi);
    transform: translateY(-1px);
}

.verdict-arrow .icon {
    width: 16px;
    height: 16px;
}

/* ---------- Sections ---------- */
.lp {
    padding: 72px 0 0;
}

.lp:last-of-type {
    padding-bottom: 88px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.94em;
    color: var(--seal-hi);
    margin: 0 0 12px;
}

.home .section-title {
    font-size: var(--text-4);
    margin: 0 0 12px;
    max-width: 24ch;
}

.section-lede {
    color: var(--muted);
    margin: 0 0 32px;
}

/* How it works: four rows with icon tiles. */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    align-items: start;
    padding: 22px 24px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.step:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-glow);
}

.step-tile {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--step-accent);
    background: color-mix(in srgb, var(--step-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--step-accent) 30%, transparent);
}

.step:nth-child(1) { --step-accent: var(--seal-hi); }
.step:nth-child(2) { --step-accent: var(--wellness); }
.step:nth-child(3) { --step-accent: #7FB4FF; }
.step:nth-child(4) { --step-accent: var(--autopsy); }

.step-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--step-accent);
}

.home .step h3 {
    font-size: var(--text-2);
    margin: 0;
}

.step p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 480px) {
    .step {
        grid-template-columns: 44px 1fr;
        gap: 14px;
        padding: 18px;
    }

    .step-tile {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
}

/* Revival Protocol block */
.protocol-card {
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
    border-radius: var(--radius-card);
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(47, 138, 102, 0.35), transparent 60%),
        radial-gradient(70% 90% at 0% 100%, rgba(228, 80, 63, 0.18), transparent 60%),
        var(--bg-2);
    box-shadow: var(--shadow-card);
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
    align-items: center;
}

.protocol-card .section-title {
    margin-bottom: 12px;
}

.protocol-card .section-lede {
    margin-bottom: 0;
}

.protocol-side {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.protocol-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.94em;
    color: var(--muted);
}

.protocol-meta .icon {
    color: var(--seal-hi);
    width: 18px;
    height: 18px;
}

@media (max-width: 760px) {
    .protocol-card {
        grid-template-columns: 1fr;
        padding: 32px 22px;
    }
}

/* ---------- Footer ---------- */
.home-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0 56px;
}

.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 32px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.home .footer-links a {
    color: var(--muted);
}

.home .footer-links a:hover {
    color: var(--paper);
}

.footer-note {
    color: var(--muted);
    margin: 0;
}

/* ---------- Graft compatibility ----------
   The grafted diagnostic UI (#cg-app) is styled by style.css and rendered by
   app.js. Keep its legacy intake hidden: the hero form is the only entry. */
#cg-app {
    padding: 0 var(--gutter);   /* collapsed while nothing is rendered */
    scroll-margin-top: 72px;
}

#cg-app:has(#result:not(.hidden)),
#cg-app:has(#error:not(.hidden)),
#cg-app:has(#rerun-bar:not(.hidden)) {
    padding-top: 40px;
    padding-bottom: 40px;
}

#cg-app #intake {
    display: none !important;
}

/* ---------- Data-deletion request modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(4, 9, 8, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gutter);
    animation: fade-in var(--dur-fast) ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-2);
    color: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 32px 28px 28px;
    animation: rise-in 320ms var(--ease-out);
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: var(--text-3);
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--dur-fast);
}

.modal-close:hover {
    color: var(--paper);
}

.home .modal-card h2 {
    font-size: var(--text-3);
    margin: 0 0 8px;
}

.modal-sub {
    color: var(--muted);
    margin: 0 0 20px;
}

.modal-card .form-label {
    margin-top: 12px;
}

.modal-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 0 20px;
    cursor: pointer;
    color: var(--muted);
}

.modal-check input {
    margin-top: 5px;
    flex-shrink: 0;
    accent-color: var(--seal-hi);
}

.modal-card .btn {
    width: 100%;
    justify-content: center;
}

.modal-status {
    margin: 12px 0 0;
    min-height: 1.5em;
    font-family: var(--font-mono);
    font-size: 0.94em;
    color: var(--muted);
}

.modal-status.ok {
    color: var(--discharge);
}

.modal-status.err {
    color: var(--wellness);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .blob,
    .wordmark-pulse,
    .ecg-rhythm,
    .verdict-dot.is-active::after,
    .modal-overlay,
    .modal-card {
        animation: none;
    }

    .verdict-dot.is-active::after {
        transform: scaleX(1);
    }

    .ecg.is-flat .ecg-flat {
        animation: none;
        stroke-dashoffset: 0;
    }

    .verdict-slide,
    .btn,
    .step,
    .verdict-arrow {
        transition: none;
    }

    .btn:hover,
    .step:hover,
    .verdict-arrow:hover {
        transform: none;
    }
}

/* ---------- Pre-Mortem report (shared by the page and the report route) ---------- */
.scan-head {
    padding: 26px 28px; border-radius: var(--radius-card); border: 1px solid var(--line-strong);
    background: var(--bg-2); box-shadow: var(--shadow-card); border-left: 6px solid var(--v);
}
.scan-head[data-state="STRIKE_RISK"], .scan-head[data-state="NO_ADS"] { --v: var(--autopsy); }
.scan-head[data-state="LIMITED_ADS"], .scan-head[data-state="REVIEW"] { --v: var(--wellness); }
.scan-head[data-state="CLEAR"] { --v: var(--discharge); }
.scan-head[data-state="PENDING"] { --v: var(--muted); }
.scan-kicker { font-family: var(--font-mono); font-size: 0.88em; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.home .scan-head h2 { font-size: var(--text-4); margin: 0 0 8px; color: var(--v); }
.scan-sub { margin: 0; color: var(--muted); }

.issues { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: issue; }
.issue { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; padding: 16px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; border-left: 4px solid var(--v); }
.issue[data-state="STRIKE_RISK"], .issue[data-state="NO_ADS"] { --v: var(--autopsy); }
.issue[data-state="LIMITED_ADS"], .issue[data-state="REVIEW"] { --v: var(--wellness); }
.issue[data-state="CLEAR"] { --v: var(--discharge); opacity: 0.75; }
.issue-state { font-family: var(--font-display); font-weight: 700; color: var(--v); line-height: 1.2; }
.issue-line { margin: 0 0 4px; color: var(--paper); font-weight: 500; }
.issue-ev { margin: 0 0 4px; color: var(--muted); } .issue-ev q { font-style: italic; }
.issue-meta { margin: 0; font-family: var(--font-mono); font-size: 0.85em; color: var(--muted); }
@media (max-width: 600px) { .issue { grid-template-columns: 1fr; gap: 6px; } }

.rp-block { margin-top: 32px; }
.home .rp-block h3 { font-size: var(--text-3); margin: 0 0 4px; }
.home .rp-block h4 { font-size: var(--text-2); margin: 24px 0 8px; }
.rp-lede { color: var(--muted); margin: 0 0 14px; }
.rp-note { font-family: var(--font-mono); font-size: 0.94em; color: var(--wellness); margin: 12px 0 0; }
.one-line { margin: 18px 0 0; padding: 16px 20px; border-left: 3px solid var(--seal-hi); background: var(--bg-2); border-radius: 0 12px 12px 0; }
.fixes { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--muted); } .fixes strong { color: var(--paper); font-weight: 500; }
.score-row { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; margin-top: 10px; }
@media (max-width: 720px) { .score-row { grid-template-columns: 1fr; } }
.score-big { font-family: var(--font-display); font-weight: 700; font-size: 88px; line-height: 1; color: var(--paper); } .score-big small { font-size: 26px; color: var(--muted); }
.score-conf { font-family: var(--font-mono); font-size: 0.9em; color: var(--muted); margin: 8px 0 0; }
.components { display: grid; gap: 12px; }
.comp { display: grid; grid-template-columns: 180px 1fr 60px; gap: 14px; align-items: center; }
@media (max-width: 560px) { .comp { grid-template-columns: 1fr; gap: 6px; } }
.comp .name { font-weight: 500; } .comp .w { font-family: var(--font-mono); font-size: 0.85em; color: var(--muted); }
.bar { height: 10px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--seal-hi); border-radius: 999px; width: 0; transition: width 900ms var(--ease-out); }
.bar.warn i { background: var(--wellness); } .bar.fail i { background: var(--autopsy); }
.comp .val { font-family: var(--font-mono); text-align: right; }
.rp-details { margin-top: 32px; } .rp-details summary { cursor: pointer; color: var(--seal-hi); font-weight: 500; font-size: var(--text-2); }
.rp-details-inner { margin-top: 8px; }
.kills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kill { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.kill .st { font-family: var(--font-mono); font-size: 0.88em; }
.kill[data-state="fired"] .st { color: var(--autopsy); } .kill[data-state="possible"] .st { color: var(--wellness); } .kill[data-state="clear"] .st { color: var(--discharge); }
.kill .kev { margin: 2px 0 0; color: var(--muted); font-size: 0.94em; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pgroup { font-family: var(--font-mono); font-size: 0.88em; color: var(--muted); margin: 18px 0 6px; }
.princ { display: grid; grid-template-columns: 84px 1fr 56px; gap: 14px; align-items: start; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.princ .st { font-family: var(--font-mono); font-size: 0.85em; padding: 3px 8px; border-radius: 999px; text-align: center; border: 1px solid var(--line-strong); color: var(--muted); }
.princ[data-status="pass"] .st { color: var(--discharge); border-color: var(--discharge); }
.princ[data-status="warn"] .st { color: var(--wellness); border-color: var(--wellness); }
.princ[data-status="fail"] .st { color: var(--autopsy); border-color: var(--autopsy); }
.princ .pname { font-weight: 500; } .princ .pid { font-family: var(--font-mono); font-size: 0.85em; color: var(--muted); margin-left: 8px; }
.princ .pev { margin: 4px 0 0; color: var(--muted); font-size: 0.94em; } .princ .sc { font-family: var(--font-mono); text-align: right; } .princ .mult { font-family: var(--font-mono); font-size: 0.8em; color: var(--seal-hi); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); } .facts strong { color: var(--paper); font-weight: 500; }

/* ---------- Pre-Mortem progress ---------- */
.progress-card { margin-top: 24px; padding: 22px 24px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius-card); }
.progress-bar { height: 12px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--seal), var(--seal-hi)); border-radius: 999px; transition: width 600ms var(--ease-out); }
.progress-bar.is-error i { background: var(--autopsy); }
.progress-label { display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 0.94em; color: var(--paper); margin: 12px 0 0; }
.progress-patience { margin: 10px 0 0; color: var(--muted); }
.progress-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.progress-steps li { font-family: var(--font-mono); font-size: 0.85em; color: var(--muted); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.progress-steps li.is-done { color: var(--discharge); border-color: var(--discharge); }
.progress-steps li.is-now { color: var(--paper); border-color: var(--seal-hi); }
.progress-error { margin: 12px 0 0; color: var(--wellness); } .progress-error a { color: var(--seal-hi); }
