/* =====================================================================
   MrBridy.net — site theme
   ---------------------------------------------------------------------
   A single committed dark identity: obsidian canvas, bone-white type,
   one bordered button style, flat surfaces (no shadows, no gradients),
   and an RGB "prism" accent triad reused semantically:
       red  = active enforcement
       cyan = under review / informational
       lime = cleared / resolved
   Type: Familjen Grotesk (display) / Hanken Grotesk (body) /
         IBM Plex Mono (labels, IDs, numbers).
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@400;500;600;700&family=Hanken+Grotesk:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --obsidian:      #101010;
    --obsidian-lift: #161616;
    --graphite:      #495764;
    --graphite-dim:  #1c2126;
    --ash:           #403f3f;
    --bone:          #fffdf9;
    --fog:           #6f879c;

    --prism-red:  #ff2a2a;
    --prism-cyan: #2a7fff;
    --prism-lime: #2aff2a;

    /* legacy token names still referenced in a few inline styles */
    --text:       var(--bone);
    --text-muted: var(--fog);
    --border:     var(--ash);
    --danger:     var(--prism-red);

    --display: 'Familjen Grotesk', 'Neue Montreal', 'Helvetica Neue', Arial, sans-serif;
    --body:    'Hanken Grotesk', 'Söhne', 'Helvetica Neue', Arial, sans-serif;
    --mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

    --gutter: clamp(20px, 5vw, 56px);
    --ease: cubic-bezier(0.52, 0.01, 0, 1);
}

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

body {
    margin: 0;
    background: var(--obsidian);
    color: var(--bone);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0 0 14px; }
h1 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.03em; line-height: 1.04; margin-bottom: 22px; }
h2 { font-size: clamp(23px, 2.6vw, 31px); letter-spacing: -0.02em; }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
a { color: var(--bone); text-decoration: none; }
a:hover { opacity: .78; }
code { font-family: var(--mono); font-size: .92em; color: var(--bone); }
:focus-visible { outline: 2px solid var(--prism-cyan); outline-offset: 3px; }

.container { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- utility strip ---------- */

.utility { background: #0b0b0b; border-bottom: 1px solid var(--ash); }
.utility-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; padding-block: 9px;
    font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--graphite);
}
.utility a { color: var(--fog); }
.utility a:hover { color: var(--bone); opacity: 1; }

/* ---------- header ---------- */

.site-header { border-bottom: 1px solid var(--ash); background: var(--obsidian); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; height: 72px; }

.brand {
    font-family: var(--display); font-size: 19px; font-weight: 700;
    letter-spacing: -0.02em; text-transform: uppercase;
    display: inline-flex; align-items: baseline; gap: 1px; white-space: nowrap;
}
.brand .tld { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .04em; color: var(--fog); text-transform: lowercase; }

.main-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.main-nav a {
    font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em;
    text-transform: uppercase; color: var(--fog);
    padding-bottom: 3px; border-bottom: 1px solid transparent;
    transition: color .4s var(--ease), border-color .4s var(--ease);
}
.main-nav a:hover { color: var(--bone); opacity: 1; }
.main-nav a.active { color: var(--bone); border-bottom-color: var(--bone); }

.header-user { display: flex; align-items: center; gap: 11px; font-family: var(--mono); font-size: 12.5px; color: var(--fog); }
.avatar-sm { width: 26px; height: 26px; border-radius: 9999px; border: 1px solid var(--ash); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--ash); margin-top: 84px; padding-block: 40px 32px; }
.site-footer .footer-cols {
    display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 30px;
}
.site-footer h5 {
    font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--graphite); margin: 0 0 14px; font-weight: 500;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer li a { color: var(--fog); font-size: 14px; }
.site-footer li a:hover { color: var(--bone); opacity: 1; }
.site-footer .blurb { color: var(--fog); font-size: 14px; line-height: 1.5; max-width: 34ch; margin-top: 12px; }
.footer-base {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ash);
    font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--graphite);
}
.footer-base .powered { color: var(--fog); }
.footer-base .powered a { color: var(--bone); }

main.container { padding-top: 44px; padding-bottom: 20px; min-height: 58vh; }

/* ---------- buttons: one bordered style, one danger variant ---------- */

.btn {
    display: inline-flex; align-items: center; gap: 9px;
    border: 1px solid var(--bone); border-radius: 5px; background: transparent;
    color: var(--bone); font-family: var(--mono); font-size: 12.5px; font-weight: 500;
    letter-spacing: .1em; text-transform: uppercase; padding: 11px 18px;
    cursor: pointer; transition: background .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
}
.btn:hover { background: var(--bone); color: var(--obsidian); opacity: 1; }
.btn-small { padding: 7px 12px; font-size: 11px; }
.btn-primary { border-color: var(--bone); }
.btn-danger { border-color: var(--prism-red); color: var(--prism-red); }
.btn-danger:hover { background: var(--prism-red); color: var(--obsidian); border-color: var(--prism-red); }
.btn-success { border-color: var(--prism-lime); color: var(--prism-lime); }
.btn-success:hover { background: var(--prism-lime); color: var(--obsidian); border-color: var(--prism-lime); }

/* ---------- cards & panels ---------- */

.card {
    border: 1px solid var(--ash); border-radius: 15px; background: var(--obsidian-lift);
    padding: clamp(20px, 2.6vw, 30px); margin-bottom: 24px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 1px;
    background: var(--ash); border: 1px solid var(--ash); border-radius: 15px; overflow: hidden; margin-bottom: 26px; }
.stat-card {
    background: var(--obsidian); padding: 24px; display: flex; flex-direction: column; gap: 7px;
    transition: background .45s var(--ease);
}
a.stat-card:hover { background: var(--obsidian-lift); opacity: 1; }
.stat-card .value {
    font-family: var(--display); font-size: 38px; font-weight: 500; letter-spacing: -0.03em;
    line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-card .label {
    font-family: var(--mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--fog);
}

/* ---------- tables ---------- */

table { width: 100%; border-collapse: collapse; }
.card > table, .table-scroll { overflow-x: auto; }
th {
    text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--graphite); font-weight: 500;
    padding: 12px 14px 12px 0; border-bottom: 1px solid var(--ash); white-space: nowrap;
}
td {
    padding: 14px 14px 14px 0; border-bottom: 1px solid color-mix(in srgb, var(--ash) 55%, var(--obsidian));
    font-size: 14.5px; color: color-mix(in srgb, var(--bone) 84%, var(--obsidian)); vertical-align: middle;
}
tr:last-child td { border-bottom: 0; }
td a { color: var(--prism-cyan); font-family: var(--mono); font-size: 13.5px; }
td small { color: var(--fog); }

/* ---------- badges / pills ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px;
    padding: 3px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em;
    text-transform: uppercase; border: 1px solid currentColor; white-space: nowrap;
}
.badge-red { color: var(--prism-red); }
.badge-green { color: var(--prism-lime); }
.badge-yellow { color: var(--prism-cyan); }
.badge-gray { color: var(--fog); }

/* ---------- alerts ---------- */

.alert {
    border: 1px solid currentColor; border-radius: 15px; padding: 15px 18px; margin-bottom: 22px;
    font-size: 14.5px;
}
.alert-error { color: var(--prism-red); }
.alert-success { color: var(--prism-lime); }
.alert strong, .alert code, .alert a { color: var(--bone); }

/* ---------- forms ---------- */

.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.form-group label {
    font-family: var(--mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--fog);
}
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"],
input[type="password"], select, textarea {
    width: 100%; background: var(--obsidian); border: 1px solid var(--ash); border-radius: 5px;
    color: var(--bone); font-family: var(--mono); font-size: 14px; padding: 11px 13px;
}
textarea { font-family: var(--body); font-size: 15px; line-height: 1.55; min-height: 108px; resize: vertical; }
select { appearance: none; cursor: pointer; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--fog) 68%, var(--obsidian)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--graphite); }
input[type="checkbox"] {
    appearance: none; width: 16px; height: 16px; border: 1px solid var(--fog); border-radius: 3px;
    background: var(--obsidian); cursor: pointer; display: inline-grid; place-content: center;
    vertical-align: -3px; margin-right: 6px;
}
input[type="checkbox"]::before {
    content: ''; width: 8px; height: 8px; border-radius: 1px; background: var(--prism-lime);
    transform: scale(0); transition: transform .25s var(--ease);
}
input[type="checkbox"]:checked { border-color: var(--prism-lime); }
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="file"] { font-family: var(--mono); font-size: 12px; color: var(--fog); }

.search-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.search-bar input[type="search"] { flex: 1 1 260px; }
.search-bar select { flex: 0 1 200px; }

/* ---------- case detail ---------- */

.case-header { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; margin-bottom: 22px; }
.field-label {
    font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--graphite); margin-bottom: 5px;
}
.field-value { font-size: 15px; color: var(--bone); }
.notes-list { display: flex; flex-direction: column; gap: 14px; }
.note {
    border-top: 1px solid color-mix(in srgb, var(--ash) 55%, var(--obsidian));
    padding-top: 14px; font-size: 15px;
}
.divider { height: 1px; background: var(--ash); border: 0; margin: 26px 0; }

/* Evidence screenshots, with a graceful fallback when the host has died */
.evidence-shot { display: inline-block; margin: 6px 0; }
.evidence-shot img {
    display: block; max-width: 340px; max-height: 260px;
    border: 1px solid var(--ash); border-radius: 8px;
}
.evidence-fallback { display: none; }
.evidence-shot.evidence-dead .evidence-fallback {
    display: inline-block; font-family: var(--mono); font-size: 13px;
    color: var(--fog); word-break: break-all;
}
.evidence-shot.evidence-dead .evidence-fallback em { color: var(--graphite); font-style: normal; }
.subtitle { color: var(--fog); font-size: 15px; max-width: 68ch; }

/* ---------- pagination ---------- */

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.page-link {
    font-family: var(--mono); font-size: 12px; padding: 7px 12px;
    border: 1px solid var(--ash); border-radius: 5px; color: var(--fog);
}
.page-link:hover { color: var(--bone); opacity: 1; }
.page-link.active { border-color: var(--bone); color: var(--bone); }

/* ---------- stats charts ---------- */

.bar-chart { display: flex; flex-direction: column; gap: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr auto; gap: 14px; align-items: center; }
.bar-label { font-size: 14px; color: var(--fog); }
.bar-track { height: 8px; background: var(--graphite-dim); border-radius: 9999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--prism-red); border-radius: 9999px; }
.bar-value { font-family: var(--mono); font-size: 13px; color: var(--bone); font-variant-numeric: tabular-nums; }
.trend-chart { display: flex; align-items: flex-end; gap: 3px; height: 130px; margin-top: 18px; }
.trend-bar { flex: 1; background: var(--graphite); border-radius: 2px 2px 0 0; min-height: 2px; }
.trend-bar:hover { background: var(--prism-cyan); }

/* ---------- landing page ---------- */

.eyebrow {
    font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .16em;
    text-transform: uppercase; color: var(--fog); margin: 0;
}
.lede { font-size: clamp(16px, 1.6vw, 20px); line-height: 1.5;
    color: color-mix(in srgb, var(--bone) 78%, var(--obsidian)); max-width: 60ch; }

.hero { padding-block: clamp(30px, 5vw, 60px) clamp(60px, 9vw, 110px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: clamp(30px, 5vw, 70px); align-items: center; }
.hero-title { font-size: clamp(40px, 7.6vw, 104px); line-height: .95; letter-spacing: -0.035em;
    font-weight: 500; margin: 20px 0 24px; }
.hero-title .dim { color: var(--graphite); }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0;
    color: var(--fog); font-family: var(--mono); font-size: 12.5px; font-weight: 500;
    letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.btn-ghost:hover { color: var(--bone); opacity: 1; }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--ash); }
.hero-meta div { display: flex; align-items: center; gap: 9px; }
.hero-meta span:last-child { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--fog); }
.dot { width: 7px; height: 7px; border-radius: 9999px; flex: none; display: inline-block; }
.dot-red { background: var(--prism-red); }
.dot-cyan { background: var(--prism-cyan); }
.dot-lime { background: var(--prism-lime); }

.lattice { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
    aspect-ratio: 1/1; max-width: 400px; margin-left: auto; width: 100%; }
.node { border: 1px solid var(--ash); border-radius: 3px; background: var(--obsidian-lift); position: relative; }
.node.filled { background: var(--graphite-dim); border-color: #2d3238; }
.node.split { border-color: transparent; }
.node.split::before, .node.split::after {
    content: ''; position: absolute; inset: 0; border-radius: 3px;
    border: 1px solid currentColor; mix-blend-mode: screen;
}
.node.split::before { transform: translate(-3px, -2px); opacity: .85; }
.node.split::after { transform: translate(3px, 2px); opacity: .85; }
.node.split-red { color: var(--prism-red); animation: node-idle 6.65s var(--ease) infinite; }
.node.split-cyan { color: var(--prism-cyan); animation: node-idle 6.65s var(--ease) infinite .9s; }
.node.split-lime { color: var(--prism-lime); animation: node-idle 6.65s var(--ease) infinite 1.8s; }
@keyframes node-idle { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .node.split { animation: none !important; opacity: .9; } }

.band { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--ash); }
.statement { font-family: var(--display); font-size: clamp(26px, 4vw, 52px); line-height: 1.12;
    letter-spacing: -0.02em; font-weight: 400; max-width: 20ch; margin: 0; }
.statement em { font-style: normal; color: var(--graphite); }
.statement-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    gap: clamp(26px, 5vw, 70px); align-items: end; }

/* Fixed 3 columns rather than auto-fit: the hairline grid is drawn by the
   container's background showing through 1px gaps, so a partly-filled last
   row would leave a bare grey block. Six cards divide evenly by 3, 2 and 1. */
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
    background: var(--ash); border: 1px solid var(--ash); border-radius: 15px; overflow: hidden; margin-top: 50px; }
@media (max-width: 1080px) { .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .caps { grid-template-columns: minmax(0, 1fr); } }
.cap { background: var(--obsidian); padding: clamp(24px, 3vw, 34px); display: flex; flex-direction: column;
    gap: 10px; min-height: 210px; transition: background .45s var(--ease); }
.cap:hover { background: var(--obsidian-lift); }
.cap h3 { font-size: clamp(20px, 2vw, 27px); line-height: 1.18; letter-spacing: -0.02em; font-weight: 400; margin: 0; }
.cap p { color: var(--fog); font-size: 15px; line-height: 1.55; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: clamp(22px, 3vw, 40px); margin-top: 50px; }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 1px solid var(--ash); }
.step .num { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--graphite); }
.step h4 { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.step p { color: var(--fog); font-size: 14.5px; line-height: 1.55; margin: 0; }

.lookup { border: 1px solid var(--ash); border-radius: 15px; padding: clamp(24px, 4vw, 42px);
    background: var(--obsidian-lift); margin-top: 42px; }
.lookup-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.lookup-form input { flex: 1 1 260px; width: auto; }

/* The form is the smaller half now: the copy beside it carries the weight,
   and a compact card reads as "this is quick" rather than "fill in a form". */
.report-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: clamp(28px, 5vw, 64px); align-items: start; }
.report-grid .form-card { max-width: 440px; padding: clamp(18px, 2.2vw, 26px); }
.report-grid .form-card .form-group { margin-bottom: 13px; }
.report-grid .form-card .form-row { gap: 12px; }
.report-grid .form-card label { font-size: 10px; }
.report-grid .form-card input,
.report-grid .form-card select { padding: 9px 11px; font-size: 13px; }
.report-grid .form-card textarea { min-height: 78px; font-size: 14px; padding: 9px 11px; }
.report-grid .form-note { font-size: 12.5px; margin: 14px 0 16px; }
.report-points { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.report-point { display: flex; gap: 12px; align-items: flex-start; }
.report-point p { color: var(--fog); font-size: 15px; line-height: 1.5; margin: 0; }
.report-point strong { color: var(--bone); font-weight: 500; }
.report-point .dot { margin-top: 8px; }

.form-card { border: 1px solid var(--ash); border-radius: 15px; background: var(--obsidian-lift);
    padding: clamp(22px, 3.2vw, 38px); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.form-group .req { color: var(--prism-red); }
.form-note { color: var(--fog); font-size: 13.5px; line-height: 1.5; margin: 18px 0 22px; }
.form-note code { color: var(--bone); }

.inline-link {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
    font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--bone); border-bottom: 1px solid var(--ash); padding-bottom: 4px;
}
.inline-link:hover { border-bottom-color: var(--bone); opacity: 1; }

.cta-band { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--ash); }
.cta-title { font-size: clamp(30px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.03em;
    font-weight: 500; max-width: 16ch; margin: 18px 0 0; }

.scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: 1px;
    background: var(--ash); border: 1px solid var(--ash); border-radius: 15px; overflow: hidden; margin-top: 44px; }
.scope { background: var(--obsidian); padding: clamp(22px, 3vw, 32px); }
.scope h3 { font-size: 19px; font-weight: 500; margin: 12px 0 14px; }
.scope ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.scope li { display: flex; gap: 11px; align-items: flex-start; color: var(--fog); font-size: 14.5px; line-height: 1.5; }
.scope li .dot { margin-top: 8px; }
.scope li strong { color: var(--bone); font-weight: 500; }

fieldset { border: 0; margin: 0; padding: 0; }
fieldset + fieldset { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--ash); }
legend { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--graphite); padding: 0; margin-bottom: 12px; }
.check-row { display: flex; gap: 11px; align-items: flex-start; margin-top: 16px; }
.check-row label { color: var(--fog); font-size: 14.5px; line-height: 1.5; cursor: pointer;
    font-family: var(--body); letter-spacing: normal; text-transform: none; }
.check-row label strong { color: var(--bone); font-weight: 500; }

/* ---------- legal pages ---------- */

.legal { max-width: 68ch; padding-block: clamp(24px, 4vw, 48px) 0; }
.legal h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.03em; margin: 16px 0 14px; }
.legal h2 {
    font-size: 21px; font-weight: 500; letter-spacing: -0.01em;
    margin: 42px 0 12px; padding-top: 22px; border-top: 1px solid var(--ash);
}
.legal p { color: color-mix(in srgb, var(--bone) 76%, var(--obsidian)); line-height: 1.65; }
.legal strong { color: var(--bone); font-weight: 500; }
.legal a { color: var(--prism-cyan); }
.legal-meta {
    font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
    color: var(--graphite); margin-bottom: 32px;
}
.legal-meta a { color: var(--fog); }
.legal-summary {
    border: 1px solid var(--ash); border-radius: 15px;
    background: var(--obsidian-lift); padding: clamp(20px, 2.6vw, 28px);
}
.legal-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.legal-summary li {
    display: flex; gap: 11px; align-items: flex-start;
    color: var(--fog); font-size: 15px; line-height: 1.55;
}
.legal-summary li::before {
    content: ''; width: 7px; height: 7px; border-radius: 9999px;
    background: var(--prism-cyan); flex: none; margin-top: 8px;
}
.legal-summary li:nth-child(2)::before { background: var(--prism-red); }
.legal-summary li:nth-child(3)::before { background: var(--prism-lime); }
.legal-foot {
    margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--ash);
    font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--graphite);
}

/* ---------- motion ----------
   Only applies once motion.js adds .motion to <html>, so the page is
   never left invisible when JS is off or reduced-motion is set. */

.motion .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    will-change: opacity, transform;
}
.motion .reveal.is-revealed { opacity: 1; transform: none; }

.motion .hero-enter .hero-title,
.motion .hero-enter .lede,
.motion .hero-enter .hero-cta,
.motion .hero-enter .hero-meta,
.motion .hero-enter .stats-meta,
.motion .hero-enter .lookup-panel,
.motion .hero-enter .eyebrow {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.motion .hero-entered .eyebrow    { opacity: 1; transform: none; transition-delay: .05s; }
.motion .hero-entered .hero-title { opacity: 1; transform: none; transition-delay: .13s; }
.motion .hero-entered .lede       { opacity: 1; transform: none; transition-delay: .26s; }
.motion .hero-entered .hero-cta   { opacity: 1; transform: none; transition-delay: .36s; }
.motion .hero-entered .hero-meta  { opacity: 1; transform: none; transition-delay: .44s; }
.motion .hero-entered .stats-meta   { opacity: 1; transform: none; transition-delay: .36s; }
.motion .hero-entered .lookup-panel { opacity: 1; transform: none; transition-delay: .40s; }

.motion .hero-enter .lattice .node { opacity: 0; transition: opacity .9s var(--ease); }
.motion .hero-entered .lattice .node { opacity: 1; }
.motion .hero-entered .lattice .node:nth-child(3n)   { transition-delay: .18s; }
.motion .hero-entered .lattice .node:nth-child(3n+1) { transition-delay: .30s; }
.motion .hero-entered .lattice .node:nth-child(3n+2) { transition-delay: .42s; }

/* Hover: cards lift their hairline rather than moving - the theme is flat,
   so the feedback is contrast, not depth. */
.cap, .stat-card, .scope, .tile { transition: background .45s var(--ease); }
a.stat-card:hover .value { color: var(--prism-cyan); transition: color .35s var(--ease); }
.btn, .btn-ghost, .main-nav a, .page-link { transition: all .4s var(--ease); }

@media (prefers-reduced-motion: reduce) {
    .motion .reveal,
    .motion .hero-enter .hero-title,
    .motion .hero-enter .lede,
    .motion .hero-enter .hero-cta,
    .motion .hero-enter .hero-meta,
    .motion .hero-enter .stats-meta,
    .motion .hero-enter .lookup-panel,
    .motion .hero-enter .eyebrow,
    .motion .hero-enter .lattice .node {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .site-footer .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .field-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-grid, .statement-grid, .report-grid { grid-template-columns: minmax(0, 1fr); }
    .lattice { max-width: 280px; margin-inline: 0; }
}
@media (max-width: 760px) {
    .header-inner { height: auto; padding-block: 14px; flex-wrap: wrap; }
    .main-nav { order: 3; width: 100%; gap: 16px; }
    .bar-row { grid-template-columns: 1fr; gap: 5px; }
}

/* ---------- saved reason presets ---------- */

.preset-picker {
    margin: 0 0 10px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.preset-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.preset-chip {
    font-family: var(--body);
    font-size: 12.5px;
    line-height: 1;
    padding: 7px 11px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.preset-chip:hover { color: var(--text); border-color: var(--fog); }
.preset-chip.is-active { color: var(--obsidian); background: var(--bone); border-color: var(--bone); }

/* Built-in / disabled markers in the category manager. */
.tag {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 2px 6px;
    margin-left: 6px;
}

/* ---------- public stats ---------- */

.stats-meta {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--ash);
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fog);
}
.stats-meta > span { display: inline-flex; align-items: center; gap: 9px; }

.stat-card .value.red  { color: var(--prism-red); }
.stat-card .value.cyan { color: var(--prism-cyan); }
.stat-card .value.lime { color: var(--prism-lime); }

/* Secondary figures: the ones that need a sentence of context under them,
   which is exactly what the tile grid has no room for. */
.figure-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: clamp(20px, 3vw, 34px);
    margin-top: clamp(30px, 4vw, 46px);
}
.figure { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 1px solid var(--ash); }
.figure-value {
    font-family: var(--display);
    font-size: clamp(30px, 3.4vw, 42px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.figure-label { font-size: 14.5px; color: color-mix(in srgb, var(--bone) 82%, var(--obsidian)); line-height: 1.4; }
.figure-note { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--graphite); margin-top: 2px; }
.figure-note.up   { color: var(--prism-red); }
.figure-note.down { color: var(--prism-lime); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--ash);
}
.section-title { font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em; margin: 10px 0 0; }

.bar-share { color: var(--graphite); margin-left: 7px; }
.trend-bar.peak { background: var(--prism-red); }
.trend-axis {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--graphite);
}

/* ---------- public lookup ---------- */

.lookup-panel {
    border: 1px solid var(--ash);
    border-radius: 15px;
    background: var(--obsidian-lift);
    padding: clamp(22px, 3vw, 34px);
    margin-top: clamp(30px, 4vw, 44px);
}
.lookup-label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--fog);
    margin-bottom: 10px;
}
.lookup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lookup-row .field {
    flex: 1 1 300px;
    width: auto;
    font-size: 16px;
    padding: 14px 16px;
    letter-spacing: .03em;
}
.lookup-hint { color: var(--fog); font-size: 13.5px; line-height: 1.55; margin: 16px 0 0; max-width: 62ch; }
.lookup-hint strong { color: var(--bone); font-weight: 500; }

/* The verdict card. One border colour carries the whole answer, so the
   result is readable before a word of it is read. */
.result-card {
    border: 1px solid var(--ash);
    border-left: 3px solid var(--ash);
    border-radius: 15px;
    background: var(--obsidian-lift);
    padding: clamp(22px, 3vw, 32px);
    margin-top: clamp(26px, 3.5vw, 38px);
}
.result-banned  { border-left-color: var(--prism-red); }
.result-past    { border-left-color: var(--prism-cyan); }
.result-clean   { border-left-color: var(--prism-lime); }
.result-unknown { border-left-color: var(--fog); }
.result-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.result-card h2 { font-size: clamp(20px, 2.4vw, 27px); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.result-card h2 code, .result-card p code { font-family: var(--mono); font-size: .88em; color: var(--bone); }
.result-card p { color: var(--fog); font-size: 15px; line-height: 1.6; margin: 14px 0 0; max-width: 72ch; }
.result-card p strong { color: var(--bone); font-weight: 500; }
.result-caveat { border-top: 1px solid var(--ash); padding-top: 14px; margin-top: 18px !important; font-size: 14px !important; }

.result-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 14px;
    color: var(--fog);
}
.result-appeal {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--ash);
}
.result-appeal .dot { margin-top: 8px; flex: none; }
.result-appeal p { color: var(--fog); font-size: 14.5px; line-height: 1.6; margin: 0; max-width: 74ch; }
.result-appeal strong { color: var(--bone); font-weight: 500; }

.evidence-label {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--graphite);
    margin-bottom: 6px;
}

@media (max-width: 620px) {
    .section-head { align-items: flex-start; }
    .stats-meta { gap: 12px; }
}

.lookup-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--ash);
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.lookup-links a { color: var(--fog); transition: color .4s var(--ease); }
.lookup-links a:hover { color: var(--bone); }

/* ---------- touch & small screens ---------- */

/* Apple asks for 44px tap targets, Google for 48dp. The compact desktop
   buttons come in at 34px, which is a real miss on a phone — so give every
   control a floor on any touch-primary device, regardless of width (a
   touchscreen laptop counts, a narrow desktop window doesn't). */
@media (pointer: coarse) {
    .btn, .btn-small, button, input[type="submit"], .preset-chip, .sample-id {
        min-height: 44px;
        padding-block: 10px;
    }
    .main-nav a, .footer li a, .lookup-links a {
        display: inline-block;
        padding-block: 8px;
    }
    /* Inputs under 16px make iOS Safari zoom the whole page on focus. */
    .field, input[type="text"], input[type="email"], input[type="number"],
    input[type="search"], select, textarea {
        font-size: 16px;
    }
}

@media (max-width: 760px) {
    /* The mono micro-labels are legible at 10–11px on a desktop monitor and
       genuinely hard to read on a phone. Nudge the smallest ones up; the
       letter-spacing that makes them work as labels is kept. */
    .form-group label, .lookup-label, .stat-card .label, .tile .k,
    .evidence-label, .badge, th, .eyebrow {
        font-size: 12px;
    }
    .stats-meta, .trend-axis, .lookup-links, .page-foot, .footer-base, .utility-inner {
        font-size: 12px;
    }
    .figure-note { font-size: 12.5px; }

    /* Five tiles across becomes one very tall column on a phone; two up
       keeps the headline numbers comparable at a glance. */
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card .value { font-size: 30px; }

    /* A 30-bar chart at 375px gives each day ~10px. Taller bars keep the
       shape readable even when each one is hairline-thin. */
    .trend-chart { height: 160px; gap: 2px; }

    .lookup-row .field { flex: 1 1 100%; }
    .lookup-row .btn { width: 100%; justify-content: center; }
    .result-head { gap: 10px; }
    .result-card { padding: 20px 18px; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-title { font-size: clamp(34px, 11vw, 46px); }
}

/* The report card is deliberately compact beside its copy on a desktop.
   On a phone the grid is already one column, so there's no reason to keep
   shrinking its labels — 10px was the smallest text on the whole site. */
@media (max-width: 760px) {
    .report-grid .form-card { max-width: none; }
    .report-grid .form-card label { font-size: 12px; }
    .report-grid .form-card .field { padding: 12px 14px; font-size: 16px; }
}

/* ---------- flagged communities ---------- */

.filter-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--ash);
}
.filter { display: flex; flex-direction: column; gap: 7px; flex: 1 1 190px; }
.filter label {
    font-family: var(--mono); font-size: 11px; letter-spacing: .13em;
    text-transform: uppercase; color: var(--fog);
}

.result-count {
    font-family: var(--mono); font-size: 12.5px; letter-spacing: .05em;
    color: var(--fog); margin: 0 0 18px;
}

.flag-list { display: flex; flex-direction: column; gap: 16px; }
.flag-card {
    border: 1px solid var(--ash);
    border-left: 3px solid var(--prism-red);
    border-radius: 15px;
    background: var(--obsidian-lift);
    padding: clamp(20px, 2.6vw, 28px);
}
/* A cleared listing stays on the list but must not read as a live warning. */
.flag-card.is-cleared { border-left-color: var(--prism-lime); opacity: .82; }
.flag-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.flag-card h2 { font-size: clamp(19px, 2.1vw, 24px); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.flag-meta {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 7px;
    font-family: var(--mono); font-size: 12px; color: var(--graphite);
}
.flag-meta code { color: var(--fog); }
.flag-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.flag-reason {
    color: color-mix(in srgb, var(--bone) 84%, var(--obsidian));
    font-size: 15px; line-height: 1.6; margin: 16px 0 0; max-width: 78ch;
}
.flag-cleared {
    display: flex; gap: 11px; align-items: flex-start;
    margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--ash);
    color: var(--fog); font-size: 14px; line-height: 1.55;
}
.flag-cleared .dot { margin-top: 8px; flex: none; }
.flag-cleared strong { color: var(--bone); font-weight: 500; }
.flag-evidence { margin-top: 16px; }
.flag-foot {
    display: flex; gap: 20px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ash);
    font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--graphite);
}
.flag-foot em { font-style: normal; color: var(--ash); }

.pager {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ash);
    font-family: var(--mono); font-size: 12.5px; color: var(--fog);
}

.legend-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px 26px;
}
.legend-item { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.legend-item p { color: var(--fog); font-size: 13.5px; line-height: 1.5; margin: 0; }

@media (max-width: 620px) {
    .flag-head { flex-direction: column; }
}

/* ---------- scroll-linked motion ---------- */

/* Reading progress. Added by motion.js, so it never appears for anyone
   with reduced-motion set or with JS off. scaleX from a left origin means
   the browser animates a transform, not a width. */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    z-index: 100;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--prism-red), var(--prism-cyan) 55%, var(--prism-lime));
    pointer-events: none;
    will-change: transform;
}

/* The lattice is BOTH a reveal target and the parallax target. While it
   still carries `transition: transform .7s` from .reveal, every scroll frame
   animates towards the new offset instead of landing on it - the drift lags
   the scroll by most of a second. Once it has finished revealing, keep the
   opacity transition and drop transform from it, so the parallax is applied
   on the frame it's computed. */
.motion .hero .lattice { will-change: transform; }
.motion .hero .lattice.is-revealed { transition: opacity .7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
    .scroll-progress { display: none; }
    .motion .hero .lattice { transform: none !important; }
}

/* Applied for a single frame so an entrance's starting state can be set
   without animating into it. See the hero entrance in motion.js. */
.no-transition, .no-transition * { transition: none !important; }

.flag-swept {
    display: flex; gap: 11px; align-items: flex-start;
    margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--prism-red);
    color: var(--fog); font-size: 14px; line-height: 1.55;
}
.flag-swept .dot { margin-top: 8px; flex: none; }
.flag-swept strong { color: var(--bone); font-weight: 500; }

/* ---------- case / queue type filters ---------- */

.case-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 22px 0 20px;
}
.queue-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.queue-filter {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fog);
    cursor: pointer;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.queue-filter:hover { color: var(--text); border-color: var(--fog); }
.queue-filter.is-on { color: var(--obsidian); background: var(--bone); border-color: var(--bone); }

.blacklist-note {
    margin-top: 7px;
    padding-left: 10px;
    border-left: 2px solid var(--prism-red);
    color: var(--fog);
    font-size: 12.5px;
    line-height: 1.45;
    white-space: normal;
    max-width: 42ch;
}
