/* IP Proxy Checker. Tokens and rules are described in DESIGN.md. */

:root {
    color-scheme: dark;

    /* Spruce surfaces, from the page ground up to the raised layers */
    --ground: oklch(0.172 0.025 164);
    --ground-lift: oklch(0.318 0.064 156);
    --ground-warm: oklch(0.272 0.050 118);
    --well: oklch(0.181 0.024 164);
    --panel: oklch(0.231 0.030 163);
    --panel-top: oklch(0.256 0.034 161);
    --raised: oklch(0.290 0.034 162);
    --raised-hover: oklch(0.328 0.038 161);
    --line: oklch(0.345 0.033 161);
    --line-strong: oklch(0.470 0.040 158);

    /* Ink */
    --text: oklch(0.958 0.012 125);
    --text-2: oklch(0.852 0.022 145);
    --text-3: oklch(0.748 0.030 155);

    /* Sand: actions, current selection, focus */
    --sand: oklch(0.888 0.075 91);
    --sand-hover: oklch(0.928 0.062 93);
    --sand-ink: oklch(0.232 0.042 163);
    --sand-wash: oklch(0.888 0.075 91 / 0.11);

    /* Verdicts. These four hues mean a result and nothing else. */
    --ok: oklch(0.822 0.150 155);
    --low: oklch(0.868 0.150 101);
    --mid: oklch(0.768 0.155 58);
    --high: oklch(0.736 0.170 26);
    --high-wash: oklch(0.736 0.170 26 / 0.13);
    --low-wash: oklch(0.868 0.150 101 / 0.10);

    --radius-lg: 20px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 18px 40px -18px oklch(0.06 0.02 165 / 0.75);

    --font: 'Schibsted Grotesk', system-ui, sans-serif;
    --mono: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--ground); scrollbar-color: var(--line-strong) var(--ground); }

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sand); color: var(--sand-ink); }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }
input, textarea { caret-color: var(--sand); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
    width: 17px; height: 17px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.mono { font-family: var(--mono); }
.muted { color: var(--text-3); font-weight: 400; }
.sr-only {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

/* ---------------- Backdrop: address grid, inspection lamp, reticle ---------------- */
.backdrop {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background:
        radial-gradient(90% 70% at 88% -8%, var(--ground-lift), transparent 68%),
        radial-gradient(75% 65% at -8% 108%, var(--ground-warm), transparent 70%),
        var(--ground);
}
.backdrop-grid {
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, oklch(0.86 0.05 140 / 0.2) 1px, transparent 1.6px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.35) 100%);
    mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.35) 100%);
}
.backdrop-lamp {
    position: absolute; width: 70vmax; height: 70vmax; left: -20vmax; top: -25vmax;
    background: radial-gradient(closest-side, oklch(0.80 0.090 120 / 0.13), transparent);
}
.backdrop-reticle {
    position: absolute; width: min(900px, 120vw); height: min(900px, 120vw);
    right: max(-420px, -48vw); top: -330px;
    fill: none; stroke: oklch(0.88 0.06 110 / 0.15); stroke-width: 1;
}
.backdrop-reticle .ticks { stroke-width: 12; stroke-dasharray: 1.2 12.52; }
.backdrop-reticle .dashes { stroke-dasharray: 34 18; }

/* ---------------- Top bar ---------------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: oklch(0.162 0.024 164 / 0.97);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    max-width: 1360px; margin: 0 auto; min-height: 66px;
    padding: 10px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.mark-tile { fill: var(--sand); }
.mark-bracket { fill: none; stroke: var(--sand-ink); stroke-width: 2.8; }
.mark-dot { fill: var(--sand-ink); }
.brand-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.brand-sub { font-size: 0.8rem; color: var(--text-3); }

.topbar-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.metric-chip, .status-pill {
    display: inline-flex; align-items: center; gap: 8px; min-height: 32px;
    padding: 4px 13px; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--panel);
    font-size: 0.8rem; color: var(--text-2); white-space: nowrap;
}
.metric-chip strong { font-family: var(--mono); font-weight: 600; color: var(--text); }
.status-pill { font-weight: 600; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.ok { color: var(--ok); }
.status-pill.warn { color: var(--low); background: var(--low-wash); border-color: oklch(0.868 0.150 101 / 0.45); }
.status-pill.demo { color: var(--sand); background: var(--sand-wash); border-color: oklch(0.888 0.075 91 / 0.45); }
.btn.header-link { text-decoration: none; border-radius: var(--radius-pill); }

/* ---------------- Layout ---------------- */
.layout {
    width: 100%; max-width: 1360px; margin: 0 auto; padding: 24px;
    display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px;
    flex: 1 0 auto; align-content: start;
}
.banner-warning, .banner-demo, .summary, .results, .empty-state { grid-column: 1 / -1; }

/* ---------------- Panels ---------------- */
.panel {
    min-width: 0;
    background: linear-gradient(180deg, var(--panel-top), var(--panel) 190px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px 24px;
}
.panel-title { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.012em; line-height: 1.3; text-wrap: balance; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hint { font-size: 0.82rem; color: var(--text-3); }

/* ---------------- Banners ---------------- */
.banner {
    display: flex; align-items: flex-start; gap: 12px;
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 13px 16px; font-size: 0.9rem;
}
.banner .icon { width: 20px; height: 20px; margin-top: 1px; }
.banner code {
    font-family: var(--mono); font-size: 0.84em;
    background: oklch(1 0 0 / 0.09); border-radius: 5px; padding: 1px 6px;
}
.banner-warning { background: oklch(0.31 0.058 98); border-color: oklch(0.868 0.150 101 / 0.5); color: var(--text); }
.banner-warning .icon { color: var(--low); }
.banner-demo { background: var(--panel-top); border-color: oklch(0.888 0.075 91 / 0.45); color: var(--text-2); }
.banner-demo .icon { color: var(--sand); }
.banner-demo strong { color: var(--text); }
.demo-reset { white-space: nowrap; color: var(--text); font-weight: 600; margin-left: 4px; }
.demo-reset span { font-family: var(--mono); color: var(--sand); }
.banner-error { background: oklch(0.29 0.067 26); border-color: oklch(0.736 0.170 26 / 0.55); color: var(--text); margin-top: 14px; }

/* ---------------- Inputs ---------------- */
input[type="text"], textarea, select.ctl,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: var(--well);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    min-height: 42px;
    padding: 9px 13px;
    transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
input[type="text"], textarea { width: 100%; }
input.mono, textarea.mono { font-family: var(--mono); font-size: 0.85rem; }
input::placeholder, textarea::placeholder { color: oklch(0.685 0.026 156); opacity: 1; }
input[type="text"]:hover, textarea:hover, select.ctl:hover,
.dataTables_wrapper .dataTables_filter input:hover,
.dataTables_wrapper .dataTables_length select:hover { border-color: var(--line-strong); }
input[type="text"]:focus-visible, textarea:focus-visible, select.ctl:focus-visible,
.dataTables_wrapper .dataTables_filter input:focus-visible,
.dataTables_wrapper .dataTables_length select:focus-visible { outline: 2px solid var(--sand); outline-offset: 1px; border-color: transparent; }

select.ctl, .dataTables_wrapper .dataTables_length select {
    -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23c3d2c5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='m1.500 1.500 4.500 4.500 4.500-4.500'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
option { background: var(--panel); color: var(--text); }

input[type="checkbox"] {
    -webkit-appearance: none; appearance: none; flex: none; cursor: pointer;
    width: 19px; height: 19px; display: inline-grid; place-content: center;
    background: var(--well); border: 1.5px solid var(--line-strong); border-radius: 6px;
    transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}
input[type="checkbox"]:hover { border-color: var(--sand); }
input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate { background: var(--sand); border-color: var(--sand); }
input[type="checkbox"]:checked::before {
    content: ''; width: 5px; height: 10px; margin-top: -2px;
    border: solid var(--sand-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
input[type="checkbox"]:indeterminate::before { content: ''; width: 9px; height: 2.5px; border-radius: 2px; background: var(--sand-ink); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 8px 17px;
    border: 1px solid transparent; border-radius: var(--radius);
    font-family: var(--font); font-size: 0.9rem; font-weight: 700; line-height: 1.2;
    cursor: pointer; white-space: nowrap;
    transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
                transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-lg { min-height: 48px; padding: 10px 28px; font-size: 0.98rem; min-width: 180px; }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: 0.83rem; }
.btn-primary { background: var(--sand); color: var(--sand-ink); }
.btn-primary:hover:not(:disabled) { background: var(--sand-hover); box-shadow: 0 10px 22px -12px oklch(0.06 0.02 165 / 0.9); }
.btn-secondary { background: var(--raised); color: var(--text); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { background: var(--raised-hover); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--raised); color: var(--text); border-color: var(--line-strong); }
.btn-danger { background: transparent; color: var(--high); border-color: oklch(0.736 0.170 26 / 0.45); }
.btn-danger:hover:not(:disabled) { background: var(--high-wash); border-color: var(--high); }

.link-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    font: inherit; font-weight: 700; color: var(--sand);
    text-decoration: underline; text-underline-offset: 3px; border-radius: 3px;
}
.link-btn:hover { color: var(--sand-hover); }
.link-btn.danger { color: var(--high); font-size: 0.83rem; font-weight: 600; text-decoration: none; padding: 5px 2px; }
.link-btn.danger:hover { text-decoration: underline; }

/* ---------------- Scan panel ---------------- */
.scan-panel { display: flex; flex-direction: column; }
.scan-panel form { display: flex; flex-direction: column; flex: 1; margin-top: 16px; }
.scan-grid { display: grid; grid-template-columns: minmax(0, 4fr) auto minmax(0, 6fr); gap: 16px; flex: 1; }

.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 24px 16px; text-align: center; min-width: 0;
    border-radius: var(--radius); background-color: var(--well);
    /* Four corner brackets frame the drop area */
    --c: var(--line-strong);
    --arm: 22px;
    background-image:
        linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
        linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
        linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
        linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c));
    background-repeat: no-repeat;
    background-size:
        var(--arm) 2px, 2px var(--arm), var(--arm) 2px, 2px var(--arm),
        var(--arm) 2px, 2px var(--arm), var(--arm) 2px, 2px var(--arm);
    background-position:
        10px 10px, 10px 10px,
        right 10px top 10px, right 10px top 10px,
        left 10px bottom 10px, left 10px bottom 10px,
        right 10px bottom 10px, right 10px bottom 10px;
    transition: background-color 0.18s var(--ease), background-size 0.28s var(--ease);
}
.dropzone.drag { --c: var(--sand); --arm: 44px; background-color: oklch(0.275 0.042 130); }
.dropzone-icon {
    width: 30px; height: 30px; color: var(--sand);
    fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.28s var(--ease);
}
.dropzone.drag .dropzone-icon { transform: translateY(-4px); }
.dropzone-text { font-size: 0.92rem; color: var(--text-2); }
.dropzone-text strong { color: var(--text); font-family: var(--mono); font-weight: 600; }
.dropzone-file { max-width: 100%; }
.dropzone-file:empty { display: none; }
.file-chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    padding: 5px 13px; border-radius: var(--radius-pill);
    background: var(--sand-wash); border: 1px solid oklch(0.888 0.075 91 / 0.45);
    color: var(--sand); font-family: var(--mono); font-size: 0.8rem;
}
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.or-sep { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-3); }
.or-sep::before, .or-sep::after { content: ''; flex: 1; width: 1px; background: var(--line); }

.input-grid { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-grow { flex: 1; }
.field-label { font-size: 0.83rem; font-weight: 600; color: var(--text-2); }
textarea { min-height: 96px; flex: 1; resize: vertical; line-height: 1.6; }

.scan-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 16px; }
.check-inline { display: inline-flex; align-items: center; gap: 9px; font-size: 0.89rem; color: var(--text-2); cursor: pointer; min-height: 32px; }

/* ---------------- Progress ---------------- */
#progress-container { margin-top: 16px; }
.progress-text { font-size: 0.88rem; color: var(--text-2); margin-bottom: 8px; }
.progress-text span { font-family: var(--mono); font-weight: 600; color: var(--text); }
.progress-track {
    height: 12px; padding: 2px; overflow: hidden;
    border-radius: var(--radius-pill); background: var(--well); border: 1px solid var(--line);
}
.progress-bar { height: 100%; width: 0; border-radius: var(--radius-pill); background-color: var(--sand); transition: width 0.35s var(--ease); }
.is-scanning .progress-bar {
    min-width: 28px;
    background-image: repeating-linear-gradient(115deg, transparent 0 8px, oklch(0.232 0.042 163 / 0.28) 8px 14px);
    background-size: 30.9px 100%;
}

/* ---------------- Rail: history and system ---------------- */
.rail { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rail .panel { padding: 18px 18px 20px; }
.history-panel { flex: 1; display: flex; flex-direction: column; }
.history-list {
    display: flex; flex-direction: column; gap: 6px;
    margin-top: 14px; padding: 3px; margin-inline: -3px;
    /* Five whole entries at least, and a scroll that stops between entries. */
    flex: 1 1 0; min-height: 318px; overflow-y: auto; contain: size; scroll-snap-type: y mandatory;
}
.history-item { display: flex; align-items: stretch; gap: 6px; scroll-snap-align: start; }
.history-load {
    flex: 1; min-width: 0; min-height: 56px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 13px; text-align: left; cursor: pointer;
    background: var(--well); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); font: inherit;
    transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.history-load:hover { background: var(--raised); border-color: var(--line-strong); transform: translateX(2px); }
.history-name { font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-count { font-family: var(--mono); font-size: 0.86rem; color: var(--text-2); white-space: nowrap; }
.history-del {
    width: 52px; flex: none; display: grid; place-items: center; cursor: pointer;
    background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-3);
    transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.history-del:hover { color: var(--high); border-color: var(--high); background: var(--high-wash); }
.system-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.system-actions .btn { flex: 1 1 auto; }

/* ---------------- Summary: verdict ring, findings ledger, score ruler ---------------- */
.summary { padding: 0; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
.summary > div { padding: 22px 28px; min-width: 0; }
.summary > div + div { border-left: 1px dashed var(--line); }
.summary h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }

.verdict { display: flex; align-items: center; gap: 26px; }
.ring { position: relative; width: 172px; height: 172px; flex: none; }
.ring svg { width: 100%; height: 100%; fill: none; }
.ring-ticks { stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 0.8 8.31; }
.ring-track { stroke: var(--well); stroke-width: 11; }
.arc { stroke-width: 11; }
.arc-clean { stroke: var(--ok); }
.arc-flagged { stroke: var(--high); }
.arc-failed { stroke: var(--low); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 2.7rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.ring-text span { font-size: 0.8rem; color: var(--text-2); margin-top: 4px; }
.ring-key { list-style: none; display: flex; flex-direction: column; gap: 10px; min-width: 128px; }
.ring-key li { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; color: var(--text-2); }
.ring-key li span { width: 10px; height: 10px; border-radius: 3px; background: var(--ok); }
.ring-key .key-flagged span { background: var(--high); }
.ring-key .key-failed span { background: var(--low); }
.ring-key b { margin-left: auto; padding-left: 14px; font-family: var(--mono); color: var(--text); }
.ring-key li.zero, .ring-key li.zero b { color: var(--text-3); }

.findings ul { list-style: none; display: flex; flex-direction: column; }
.findings li {
    display: grid; grid-template-columns: 112px minmax(40px, 1fr) 34px; align-items: center; gap: 14px;
    min-height: 36px; font-size: 0.89rem; color: var(--text-2);
}
.findings li + li { border-top: 1px solid var(--line); }
.finding-track { height: 8px; border-radius: var(--radius-pill); background: var(--well); overflow: hidden; }
.finding-track i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--high); }
.findings b { font-family: var(--mono); font-size: 1.05rem; text-align: right; color: var(--high); }
.findings li.zero b { color: var(--text-3); }

.average-value { font-family: var(--mono); font-size: 2.2rem; font-weight: 600; line-height: 1; }
.average-value span { font-size: 0.85rem; color: var(--text-3); margin-left: 8px; }
.average.good .average-value { color: var(--ok); }
.average.low .average-value { color: var(--low); }
.average.mid .average-value { color: var(--mid); }
.average.bad .average-value { color: var(--high); }
.average.zero .average-value { color: var(--text-3); }
.ruler { position: relative; display: grid; grid-template-columns: 10fr 20fr 20fr 50fr; gap: 2px; height: 10px; margin-top: 16px; }
.ruler i { border-radius: 3px; opacity: 0.75; }
.ruler .r-good { background: var(--ok); }
.ruler .r-low { background: var(--low); }
.ruler .r-mid { background: var(--mid); }
.ruler .r-bad { background: var(--high); }
.ruler em {
    position: absolute; top: -6px; width: 4px; height: 22px; margin-left: -2px;
    border-radius: 2px; background: var(--text); box-shadow: 0 0 0 3px var(--panel);
}
.ruler-marks { position: relative; height: 18px; margin-top: 7px; font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); }
.ruler-marks span { position: absolute; transform: translateX(-50%); }
.ruler-marks span:first-child { transform: none; }
.ruler-marks span:last-child { transform: translateX(-100%); }
.average .countries { margin-top: 14px; }
.countries { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.countries-label { font-size: 0.83rem; color: var(--text-2); }
.cc {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 3px 12px; border-radius: var(--radius-pill);
    background: var(--well); border: 1px solid var(--line);
    font-family: var(--mono); font-size: 0.8rem; color: var(--text-2);
}
.cc b { color: var(--sand); font-weight: 600; }

/* ---------------- Results head and export ---------------- */
.results { padding-inline: 18px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.export { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#copyClean { min-width: 130px; }
.export-hint { margin-top: 6px; text-align: right; }

/* ---------------- Filters ---------------- */
.filters { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.filters-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.filters-title { font-size: 0.95rem; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
    padding: 0 5px 0 15px; border-radius: var(--radius-pill);
    background: var(--well); border: 1px solid var(--line);
    font-size: 0.85rem; font-weight: 600; color: var(--text-2);
    transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.pill:hover { border-color: var(--line-strong); }
.pill label { cursor: pointer; white-space: nowrap; }
.pill select.ctl {
    min-height: 30px; padding: 3px 27px 3px 10px; border-radius: var(--radius-pill);
    background-color: var(--raised); background-position: right 10px center; border-color: transparent;
    font-size: 0.83rem; font-weight: 700;
}
.pill:has(option[value="yes"]:checked),
.pill:has(option[value="no"]:checked),
.pill:has(#f-fraud-on:checked) { background: var(--sand-wash); border-color: var(--sand); color: var(--text); }
.pill:has(option[value="yes"]:checked) select.ctl,
.pill:has(option[value="no"]:checked) select.ctl {
    background-color: var(--sand); color: var(--sand-ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%230b2319' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='m1.500 1.500 4.500 4.500 4.500-4.500'/%3E%3C/svg%3E");
}
.pill:has(option[value="yes"]:checked) option,
.pill:has(option[value="no"]:checked) option { background: var(--panel); color: var(--text); }
.fraud-pill { gap: 12px; padding-right: 15px; }
.fraud-pill label { display: inline-flex; align-items: center; gap: 8px; }
.fraud-pill strong { font-family: var(--mono); color: var(--sand); min-width: 3ch; }
.pill-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.pill-actions .btn { border-radius: var(--radius-pill); min-height: 40px; }

input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 130px; height: 22px; background: transparent; cursor: pointer; border-radius: var(--radius-pill);
}
input[type="range"]::-webkit-slider-runnable-track { height: 5px; border-radius: var(--radius-pill); background: var(--line-strong); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: var(--radius-pill); background: var(--line-strong); }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 17px; height: 17px; margin-top: -6px;
    border-radius: 5px; background: var(--sand); border: 3px solid var(--sand-ink); box-shadow: 0 0 0 1px var(--sand);
}
input[type="range"]::-moz-range-thumb {
    width: 11px; height: 11px; border-radius: 5px; background: var(--sand);
    border: 3px solid var(--sand-ink); box-shadow: 0 0 0 1px var(--sand);
}

/* ---------------- Fraud score scale (legend and table share it) ---------------- */
.score-green  { --verdict: var(--ok); }
.score-yellow { --verdict: var(--low); }
.score-orange { --verdict: var(--mid); }
.score-red    { --verdict: var(--high); }

.legend { display: flex; align-items: center; justify-content: flex-end; gap: 6px 16px; flex-wrap: wrap; margin-top: 16px; font-size: 0.8rem; color: var(--text-3); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); color: var(--text-2); }
.legend-item::before { content: ''; width: 16px; height: 6px; border-radius: var(--radius-pill); background: var(--verdict); }

/* ---------------- DataTables chrome ---------------- */
.table-container { min-width: 0; margin-top: 6px; }
.dataTables_wrapper { color: var(--text-3); }
.dt-top, .dt-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.dt-top { padding-bottom: 12px; }
.dt-bottom { padding-top: 14px; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    float: none; clear: none; margin: 0; padding: 0; text-align: left;
    color: var(--text-3); font-size: 0.83rem;
}
.dataTables_wrapper .dataTables_length select { min-height: 36px; padding: 5px 32px 5px 11px; margin: 0 6px; font-size: 0.83rem; }
.dataTables_wrapper .dataTables_filter input { min-height: 36px; padding: 5px 13px; margin-left: 8px; font-size: 0.83rem; width: 230px; border-radius: var(--radius-pill); }
.dataTables_wrapper .dataTables_paginate { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dataTables_wrapper .dataTables_paginate span { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 36px; margin: 0; padding: 6px 12px !important;
    border: 1px solid transparent !important; border-radius: var(--radius-pill) !important;
    background: transparent !important; color: var(--text-2) !important; font-weight: 600;
    transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--raised) !important; border-color: var(--line-strong) !important; color: var(--text) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--sand) !important; border-color: var(--sand) !important; color: var(--sand-ink) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    background: transparent !important; border-color: transparent !important; box-shadow: none; color: oklch(0.6 0.030 156) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:active { box-shadow: none; }

/* ---------------- Table ---------------- */
/* Only this box scrolls sideways; the page never does. */
.dt-scroll {
    position: relative; overflow-x: auto;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--well);
}
table.data.dataTable, table.data {
    width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 0.82rem; color: var(--text);
}
table.data.dataTable.no-footer { border-bottom: 0; }
table.data thead th, table.data.dataTable thead th {
    padding: 10px 8px; text-align: left; vertical-align: bottom;
    background: var(--raised); color: var(--text-2);
    font-size: 0.78rem; font-weight: 700; line-height: 1.3;
    border-bottom: 1px solid var(--line-strong);
}
table.data.dataTable thead tr.section-header th {
    padding: 9px 9px 7px; color: var(--text-3); font-weight: 600;
    border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: left;
}
table.data.dataTable thead tr.section-header th.select-col { border-left: 0; vertical-align: middle; border-bottom-color: var(--line-strong); }
table.data tbody td, table.data.dataTable tbody td {
    padding: 11px 8px; vertical-align: middle;
    border-bottom: 1px solid var(--line); background: var(--panel);
    transition: background-color 0.15s var(--ease);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data.dataTable tbody tr { background: transparent; }
table.data.dataTable tbody tr > * { box-shadow: none; }
table.data tbody tr:hover td { background: var(--raised); }

/* Sort markers, drawn in CSS */
table.data.dataTable thead > tr > th.sorting,
table.data.dataTable thead > tr > th.sorting_asc,
table.data.dataTable thead > tr > th.sorting_desc { position: relative; padding-right: 19px; cursor: pointer; }
table.data.dataTable thead > tr > th.sorting::before,
table.data.dataTable thead > tr > th.sorting_asc::before,
table.data.dataTable thead > tr > th.sorting_desc::before,
table.data.dataTable thead > tr > th.sorting::after,
table.data.dataTable thead > tr > th.sorting_asc::after,
table.data.dataTable thead > tr > th.sorting_desc::after {
    content: ''; position: absolute; right: 7px; width: 0; height: 0; line-height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: 0.28;
}
table.data.dataTable thead > tr > th.sorting::before,
table.data.dataTable thead > tr > th.sorting_asc::before,
table.data.dataTable thead > tr > th.sorting_desc::before { bottom: 18px; top: auto; border-bottom: 5px solid currentColor; }
table.data.dataTable thead > tr > th.sorting::after,
table.data.dataTable thead > tr > th.sorting_asc::after,
table.data.dataTable thead > tr > th.sorting_desc::after { bottom: 10px; top: auto; border-top: 5px solid currentColor; }
table.data.dataTable thead > tr > th.sorting_asc::before,
table.data.dataTable thead > tr > th.sorting_desc::after { opacity: 1; color: var(--sand); }
table.data thead th.sorting:hover, table.data thead th.sorting_asc:hover, table.data thead th.sorting_desc:hover { background: var(--raised-hover); }
table.data thead th:focus-visible { outline: 2px solid var(--sand); outline-offset: -3px; }

/* The selection box and the address stay in view while the rest scrolls */
table.data .select-col { width: 42px; min-width: 42px; max-width: 42px; padding-inline: 0 !important; text-align: center !important; }
table.data .select-col,
table.data thead tr:nth-child(2) th:first-child,
table.data tbody td.col-ip { position: sticky; z-index: 2; }
table.data .select-col { left: 0; }
table.data thead tr:nth-child(2) th:first-child,
table.data tbody td.col-ip { left: 42px; box-shadow: 1px 0 0 var(--line) !important; }
.select-col input { vertical-align: middle; }

/* An IPv4 address stays on one line; a long IPv6 address or a rejected line wraps */
table.data td.col-ip { font-family: var(--mono); font-weight: 500; min-width: 172px; }
.ip { overflow-wrap: anywhere; }
table.data td.col-ip .ip { display: inline-block; vertical-align: middle; width: max-content; max-width: 20ch; }
table.data td.col-isp, table.data td.col-organization { min-width: 100px; max-width: 160px; overflow-wrap: break-word; color: var(--text-2); }
table.data td.col-country { white-space: nowrap; }
.flag-img { display: inline-block; vertical-align: -1px; margin-right: 6px; border-radius: 2px; }
.cc-code { font-family: var(--mono); }
.na { color: var(--text-3); }

/* The address in brackets: the row under inspection (pointed at or ticked) */
.ip::before, .ip::after { color: var(--sand); font-weight: 600; opacity: 0; display: inline-block; transition: opacity 0.18s var(--ease), transform 0.22s var(--ease); }
.ip::before { content: '['; margin-right: 1px; transform: translateX(4px); }
.ip::after { content: ']'; margin-left: 1px; transform: translateX(-4px); }
tr:hover .ip::before, tr:hover .ip::after,
tr:has(.row-select:checked) .ip::before, tr:has(.row-select:checked) .ip::after { opacity: 1; transform: translateX(0); }
table.data tbody tr:has(.row-select:checked) td { background: oklch(0.302 0.043 118); }

.cache-badge { display: inline-flex; vertical-align: -2px; margin-left: 3px; color: var(--text-3); cursor: help; }
.cache-badge .icon { width: 13px; height: 13px; }

/* Yes and No */
.flag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.flag-yes { padding: 3px 8px 3px 7px; border-radius: var(--radius-pill); background: var(--high-wash); border: 1px solid oklch(0.736 0.170 26 / 0.5); color: oklch(0.842 0.110 26); }
.flag-yes::before { content: ''; width: 6px; height: 6px; border-radius: 1px; background: var(--high); }
.flag-no { color: var(--text-3); font-weight: 400; padding-left: 9px; }

/* Fraud score: the number and a gauge with a notch at each band edge (10, 30, 50) */
.score { display: inline-flex; align-items: center; gap: 8px; }
.score-num { font-family: var(--mono); font-weight: 600; font-size: 0.9rem; color: var(--verdict); min-width: 3ch; text-align: right; }
.score-meter { position: relative; width: 46px; height: 7px; border-radius: 2px; background: oklch(0.40 0.028 158); overflow: hidden; }
.score-meter > span { position: absolute; inset: 0 auto 0 0; background: var(--verdict); transform-origin: left; }
.score-meter::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(var(--panel), var(--panel)) 10% 0 / 1px 100% no-repeat,
        linear-gradient(var(--panel), var(--panel)) 30% 0 / 1px 100% no-repeat,
        linear-gradient(var(--panel), var(--panel)) 50% 0 / 1px 100% no-repeat;
}

/* Rows without a result */
table.data tbody tr.row-error td { background: oklch(0.255 0.040 40); }
table.data tbody tr.row-error:hover td { background: oklch(0.295 0.046 40); }
table.data tr.row-error td.col-isp { color: oklch(0.842 0.110 26); min-width: 150px; }
.row-note { display: flex; align-items: flex-start; gap: 7px; }
.row-note .icon { width: 15px; height: 15px; margin-top: 1px; }

table.data td.dataTables_empty { text-align: left; padding: 28px 20px; color: var(--text-2); position: static; }

.empty-msg {
    margin-top: 10px; padding: 36px 20px; text-align: center; color: var(--text-2);
    background: var(--well); border: 1px solid var(--line); border-radius: var(--radius);
}

/* ---------------- Empty state ---------------- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px 28px; }
.empty-mark { width: 96px; height: 64px; margin-bottom: 18px; fill: none; stroke: var(--line-strong); stroke-width: 3; }
.empty-mark circle { fill: var(--sand); stroke: none; }
.empty-state h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.015em; }
.empty-state p { margin-top: 6px; color: var(--text-2); max-width: 46ch; text-wrap: balance; }

/* ---------------- Documentation page ---------------- */
.docs {
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px;
    display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px;
    flex: 1 0 auto; align-items: start;
}
.docs-contents { position: sticky; top: 87px; max-height: calc(100vh - 107px); overflow-y: auto; padding: 18px 14px; }
.docs-contents h2 { padding: 0 10px; }
.docs-contents ol { list-style: none; margin-top: 8px; }
.docs-contents a {
    display: block; padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: 0.89rem; color: var(--text-2); text-decoration: none;
}
.docs-contents a:hover { background: var(--raised); color: var(--text); }
.docs-body { padding: 28px 36px 36px; overflow-wrap: break-word; }
.docs-body h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }
.docs-body section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.docs-body h2 { font-size: 1.18rem; font-weight: 700; letter-spacing: -0.012em; }
.docs-body h3 { font-size: 0.95rem; font-weight: 700; margin-top: 20px; }
.docs-body p, .docs-body dd, .docs-body li { color: var(--text-2); max-width: 70ch; }
.docs-body p, .docs-body ul, .docs-body dl, .docs-body pre { margin-top: 10px; }
.docs-body ul { padding-left: 20px; }
.docs-body li + li { margin-top: 3px; }
.docs-body li::marker { color: var(--sand); }
.docs-body b, .docs-body dt { color: var(--text); font-weight: 700; }
.docs-body dt { margin-top: 10px; }
.docs-body a { color: var(--sand); text-underline-offset: 3px; }
.docs-body a:hover { color: var(--sand-hover); }
.docs-body code {
    font-family: var(--mono); font-size: 0.85em; color: var(--text);
    background: var(--well); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}
.docs-body pre { background: var(--well); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; }
.docs-body pre code { background: none; border: 0; padding: 0; }
.docs-body .code-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 8px; }
.docs-body .code-list li { margin: 0; }
.docs-body .bands { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.docs-body .bands li { margin: 0; }

/* ---------------- Lists that drop down (ui.js). The real select stays, out of sight. ---------------- */
.dd { position: relative; display: inline-flex; }
.dd select.dd-native {
    position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0;
    opacity: 0; pointer-events: none; clip-path: inset(50%);
}
.dd-button {
    display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 42px; padding: 8px 13px; cursor: pointer; white-space: nowrap;
    background: var(--well); border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); font-family: var(--font); font-size: 0.9rem; font-weight: 600;
    transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.dd-button:hover, .dd.open .dd-button { border-color: var(--line-strong); }
.dd-arrow { width: 12px; height: 8px; flex: none; fill: none; stroke: var(--sand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.18s var(--ease); }
.dd.open .dd-arrow { transform: rotate(180deg); }
.dd-list {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
    min-width: max(100%, 104px); max-height: 280px; overflow-y: auto;
    list-style: none; padding: 5px;
    background: var(--panel-top); border: 1px solid var(--line-strong); border-radius: var(--radius);
    box-shadow: 0 18px 40px -14px oklch(0.06 0.02 165 / 0.92);
}
.dd-list[hidden] { display: none; }
.dd.up .dd-list { top: auto; bottom: calc(100% + 6px); }
.dd.end .dd-list { left: auto; right: 0; }
.dd-option {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    min-height: 36px; padding: 6px 11px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.87rem; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.dd-option::after { content: ''; width: 7px; height: 7px; border-radius: 2px; background: transparent; }
.dd-option:hover, .dd-option:focus { background: var(--raised-hover); color: var(--text); }
.dd-option:focus-visible { outline: 2px solid var(--sand); outline-offset: -2px; }
.dd-option[aria-selected="true"] { color: var(--sand); }
.dd-option[aria-selected="true"]::after { background: var(--sand); }

.pill .dd-button { min-height: 30px; padding: 3px 11px; gap: 8px; border-radius: var(--radius-pill); background: var(--raised); border-color: transparent; font-size: 0.83rem; font-weight: 700; }
.pill .dd-button:hover, .pill .dd.open .dd-button { background: var(--raised-hover); }
.export .dd-button { min-width: 200px; }
.dataTables_length .dd { margin: 0 6px; }
.dataTables_length .dd-button { min-width: 78px; }

/* ---------------- Questions ---------------- */
dialog.ask {
    margin: auto; width: min(400px, calc(100vw - 32px)); padding: 22px;
    background: var(--panel-top); color: var(--text);
    border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px -20px oklch(0.05 0.02 165 / 0.95);
}
dialog.ask::backdrop { background: oklch(0.08 0.02 165 / 0.74); }
dialog.ask p { font-size: 1.02rem; font-weight: 700; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------------- Footer ---------------- */
.site-footer { padding: 22px 24px 30px; text-align: center; }
.signature {
    display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px;
    border-radius: var(--radius-sm); text-decoration: none; font-size: 0.86rem; color: var(--text-2);
}
.signature strong { color: var(--text); font-weight: 700; }
.signature .icon { width: 15px; height: 15px; color: var(--sand); }
.signature-bracket { font-family: var(--mono); font-weight: 600; color: var(--sand); transition: transform 0.22s var(--ease); }
.signature:hover .signature-bracket:first-child { transform: translateX(-3px); }
.signature:hover .signature-bracket:last-child { transform: translateX(3px); }
.signature:hover strong { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sand); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
    .summary { grid-template-columns: auto minmax(0, 1fr); }
    .summary > .average { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed var(--line); }
}
@media (max-width: 980px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .rail { order: 1; }
    .history-list { contain: none; flex: 0 1 auto; max-height: 340px; min-height: 0; }
    .docs { grid-template-columns: minmax(0, 1fr); }
    .docs-contents { position: static; max-height: none; }
    .docs-contents ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (max-width: 760px) {
    .scan-grid { grid-template-columns: minmax(0, 1fr); }
    .summary { grid-template-columns: minmax(0, 1fr); }
    .summary > div + div { border-left: 0; border-top: 1px dashed var(--line); }
    .verdict { justify-content: center; flex-wrap: wrap; }
    .or-sep { flex-direction: row; }
    .or-sep::before, .or-sep::after { width: auto; height: 1px; }
    .export-hint { text-align: left; margin-top: 10px; }
    .legend { justify-content: flex-start; }
}
@media (max-width: 560px) {
    body { font-size: 14.5px; }
    .topbar { position: static; }
    .topbar-inner { padding: 12px 16px; }
    .brand-sub { font-size: 0.74rem; }
    .topbar-meta { width: 100%; }
    .btn.header-link { margin-left: auto; }
    .layout { padding: 16px; gap: 14px; }
    .panel { padding: 18px 16px; border-radius: 16px; }
    .summary { padding: 0; }
    .results { padding-inline: 12px; }
    .rail { gap: 14px; }
    .docs { padding: 16px; gap: 14px; }
    .docs-body { padding: 20px 16px 24px; }
    .docs-body h1 { font-size: 1.38rem; }
    .docs-contents ol { grid-template-columns: 1fr 1fr; }
    .docs-contents a { min-height: 36px; font-size: 0.84rem; }
    /* 16px keeps iOS from zooming the page when a field takes focus */
    input[type="text"], textarea, select.ctl, input.mono, textarea.mono,
    .dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { font-size: 16px; }
    .scan-actions { flex-direction: column; align-items: stretch; }
    .btn-lg { width: 100%; }
    .summary > div { padding: 18px 16px; }
    .findings li { grid-template-columns: 100px minmax(30px, 1fr) 28px; gap: 10px; }
    .export { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .export .dd { grid-column: 1 / -1; }
    .export .dd-button { width: 100%; min-width: 0; }
    .pills { display: grid; grid-template-columns: minmax(0, 1fr); }
    .pill { justify-content: space-between; }
    .fraud-pill { flex-wrap: wrap; row-gap: 4px; padding-block: 6px; border-radius: var(--radius); }
    .fraud-pill input[type="range"] { width: 100%; }
    .pill-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .dt-top, .dt-bottom { flex-direction: column; align-items: stretch; }
    .dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; }
    .dataTables_wrapper .dataTables_filter input { flex: 1; width: auto; min-width: 0; }
    .dataTables_wrapper .dataTables_paginate { justify-content: center; }
    /* Room for a full IPv4 address in the pinned column */
    table.data thead th.select-col, table.data tbody td.select-col { width: 36px; min-width: 36px; max-width: 36px; }
    table.data thead tr:nth-child(2) th:first-child, table.data tbody td.col-ip { left: 36px; }
    table.data td.col-ip { min-width: 0; font-size: 0.76rem; }
    table.data td.col-ip .ip { max-width: calc(17ch + 4px); }
    table.data .cache-badge { display: block; margin: 2px 0 0 6px; }
    table.data td.col-isp, table.data td.col-organization { min-width: 132px; }
}

/* ---------------- Motion ----------------
   Only for people who have not asked for less of it. */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    .backdrop-lamp { animation: lamp 38s ease-in-out infinite alternate; }
    .backdrop-reticle { animation: turn 320s linear infinite; }

    .scan-panel, .rail, .empty-state { animation: rise 0.5s var(--ease) backwards; }
    .rail { animation-delay: 0.06s; }
    .empty-state { animation-delay: 0.12s; }

    /* A new set of results arrives: numbers rise, then the gauges fill */
    .summary.fresh > div { animation: rise 0.45s var(--ease) backwards; }
    .summary.fresh > div:nth-child(2) { animation-delay: 0.06s; }
    .summary.fresh > div:nth-child(3) { animation-delay: 0.12s; }
    .summary.fresh .ring svg g { animation: sweep 0.7s var(--ease) 0.15s backwards; transform-box: view-box; transform-origin: center; }
    .summary.fresh .finding-track i { animation: grow 0.6s var(--ease) 0.25s backwards; transform-origin: left; }
    .summary.fresh .ruler em { animation: slide 0.7s var(--ease) 0.25s backwards; }
    .results.fresh .table-container { animation: rise 0.45s var(--ease) 0.1s backwards; }
    .results.fresh .score-meter > span { animation: grow 0.7s var(--ease) 0.3s backwards; }

    #form-error { animation: rise 0.25s var(--ease); }
    .is-scanning .progress-bar { animation: hatch 0.8s linear infinite; }
    .btn.is-busy .icon { animation: spin 0.9s linear infinite; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}

@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes sweep { from { opacity: 0; } }
@keyframes slide { from { left: 0; } }
@keyframes hatch { to { background-position: 30.9px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes lamp {
    0% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(48vw, 16vh, 0) scale(1.12); }
    100% { transform: translate3d(78vw, 52vh, 0) scale(0.94); }
}
