/* NHP, the Planner page as it was before the «Studio» look (owner, 2026-11-27: «lo rimetterei come prima»), inside the
   skeleton every demo shares: the page's own earlier rules, then the skeleton's (rail and top band). */
:root {
    --bg: #eceae4;
    --surface: #fff;
    --sunk: #f6f4ef;
    --ink: #1d211f;
    --ink-2: #3a403c;
    --ink-3: #5a605c;
    --line: #d9d6cc;
    --line-2: #cfcbbf;
    --line-3: #e3e0d6;
    --line-4: #eeece6;
    --accent: #14684a;
    --accent-soft: #e6f2ec;
    --amber: #d99a14;
    --amber-soft: #fdecc8;
    --amber-ink: #7a4a00;
    --red: #c0392b;
    --red-soft: #fbd5d5;
    --red-ink: #8a1c1c;
    --cost: #a16207;
    --pay-progress: var(--cost);   /* the current month's amount (css/demo-stats.css) */
    --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'Menlo', monospace;
    --font-mono: var(--mono);
    --info-accent: var(--accent);
    --rail: 80px;
    --top: 68px;
    --r-card: 16px;
}
:root {
    --bg: #0b0f12;
    --pay-progress: #38bdf8;   /* "In corso" status + the current month's amount (css/demo-stats.css) */
    --surface: #10161a;
    --surface-2: #151d22;
    --inset: #0a0e11;
    --border: rgba(170, 205, 220, 0.11);
    --border-2: rgba(170, 205, 220, 0.20);
    --accent: #34d399;
    --accent-hi: #7ae9bc;
    --accent-soft: rgba(52, 211, 153, 0.09);
    --accent-ink: #04170f;
    --ok: #34d399;
    --warn: #e0a93f;
    --danger: #ef5b60;
    --steel: #9fb0b8;
    --text: #e8eef0;
    --muted: #9fb0b8;
    --faint: #8b9ba4;
    --sans: 'Plus Jakarta Sans', 'DM Sans', system-ui, -apple-system, sans-serif;
    --disp: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'IBM Plex Mono', 'Menlo', monospace;
    --r-s: 2px;
    --r-m: 3px;
    --r-l: 4px;
    --wrap: 1120px;
    --hdr-h: 60px;
    --pad-x: clamp(0.75rem, 3vw, 1.25rem);
    --white: #fff;
    --border2: rgba(170, 205, 220, 0.20);
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    background-color: var(--bg);
    background-image: radial-gradient(rgba(150, 215, 235, 0.13) 1px, transparent 1.2px);
    background-size: 24px 24px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    word-spacing: .06em; /* lo spazio di Plus Jakarta Sans e' stretto (0,19em) */
    min-height: calc(100vh / var(--mv-zoom, 1));
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: none;
    z-index: 0;
    pointer-events: none;
}
::selection {
    background: rgba(52, 211, 153, 0.28);
    color: #fff;
}
a { color: var(--accent); }
::placeholder { color: var(--faint); opacity: 1; font-style: italic; }
code {
    font-family: var(--mono);
    font-size: 0.84em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 5px;
    color: var(--text);
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.badge-app {
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 3px 10px;
    font-family: var(--mono);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--muted);
    white-space: nowrap;
}
.content {
    flex: 1;
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2rem) var(--pad-x) 3.5rem;
    position: relative;
    z-index: 1;
}
.sec-title {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.65rem;
    margin-bottom: 1.25rem;
}
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1.25rem;
}
.form-card h2 {
    font-family: var(--disp);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.form-card > p { color: var(--muted); font-size: 0.88rem; margin-bottom: 1rem; max-width: 62ch; }
.nhp-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    background: var(--inset);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.nhp-points > div { padding: 0.7rem 0.9rem; min-width: 0; }
.nhp-points > div + div { border-left: 1px solid var(--border); }
.nhp-points b { display: block; font-family: var(--disp); font-size: 0.82rem; font-weight: 600; color: var(--text); }
.nhp-points span { display: block; font-size: 0.74rem; color: var(--faint); margin-top: 0.1rem; }
.h-ico { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.seg-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    background: var(--inset);
    margin-bottom: 1.25rem;
}
.seg-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: var(--r-s);
    padding: 0.6rem 0.75rem;
    min-height: 44px;
    font-size: 0.83rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.upload-zone {
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: var(--r-m);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--inset);
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(52, 211, 153, 0.04);
}
.upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    color: var(--muted);
}
.upload-icon svg { width: 20px; height: 20px; }
.upload-zone h3 { font-family: var(--disp); font-size: 0.98rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.upload-hint { font-size: 0.82rem; color: var(--faint); }
.file-chip {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
}
.file-chip.show { display: flex; }
#json-editor {
    width: 100%;
    height: 300px;
    background: var(--inset);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    padding: 1rem 1.1rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: #dbe1ea;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
#json-editor:focus { border-color: var(--accent); }
#json-editor::placeholder { color: var(--faint); }
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}
.json-pill {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-2);
    color: var(--muted);
}
.json-pill.ok { background: var(--accent-soft); border-color: rgba(52, 211, 153, 0.35); color: var(--accent); }
.json-pill.bad { background: rgba(229, 72, 77, 0.08); border-color: rgba(229, 72, 77, 0.35); color: #f08a8e; }
.editor-error { margin-top: 0.5rem; color: #f08a8e; font-size: 0.82rem; display: none; }
.editor-examples { display: flex; gap: 0.5rem; margin-left: auto; flex-wrap: wrap; }
.btn-go {
    padding: 0.8rem 1.5rem;
    min-height: 48px;
    background: var(--accent);
    color: #04170f;
    border: none;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-go:hover:not(:disabled) { background: var(--accent-hi); }
.btn-go:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-go.block { width: 100%; margin-top: 1rem; }
.btn-ghost {
    padding: 0.55rem 1.1rem;
    min-height: 44px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-2);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.28); }
.btn-reset {
    padding: 0.55rem 1.2rem;
    min-height: 44px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.btn-reset:hover { border-color: rgba(229, 72, 77, 0.5); color: #f08a8e; }
.nhp-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1rem;
}
.nhp-radar { position: relative; width: 148px; height: 148px; margin-bottom: 1.1rem; }
.nhp-ring { position: absolute; border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 50%; }
.nhp-ring.r1 { inset: 0; }
.nhp-ring.r2 { inset: 22px; }
.nhp-ring.r3 { inset: 44px; }
.nhp-sweep {
    position: absolute; inset: 4px; border-radius: 50%;
    background: conic-gradient(from 0deg,
        rgba(52, 211, 153, 0.55) 0deg,
        rgba(52, 211, 153, 0.12) 40deg,
        transparent 90deg);
    animation: nhpSpin 2.4s linear infinite;
}
.nhp-node {
    position: absolute; width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    animation: nhpBlip 2.6s ease-in-out infinite;
}
.nhp-node.n1 { top: 14%; left: 62%; }
.nhp-node.n2 { top: 52%; left: 82%; animation-delay: 0.5s; }
.nhp-node.n3 { top: 76%; left: 38%; animation-delay: 1s; }
.nhp-node.n4.vuln { top: 32%; left: 18%; background: var(--danger); animation-delay: 0.7s; }
.nhp-node.n5.crit { top: 60%; left: 52%; width: 6px; height: 6px; background: var(--warn); animation-delay: 1.3s; }
.nhp-core {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--inset);
    border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
}
.nhp-core svg { width: 20px; height: 20px; }
.nhp-time {
    font-family: var(--mono); font-size: 0.95rem; font-weight: 500;
    color: var(--text); margin-bottom: 0.7rem;
    font-variant-numeric: tabular-nums;
}
.pl-status-wrap {
    height: 1.4em; overflow: hidden; position: relative;
    width: 100%; max-width: 320px; margin-bottom: 0.9rem;
}
.pl-status {
    font-size: 0.85rem; color: var(--muted);
    text-align: center; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    position: absolute; left: 0; right: 0; top: 0;
}
.pl-dots { display: flex; gap: 6px; }
.pl-dots span {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--faint);
    animation: plDotPulse 1.4s ease-in-out infinite;
}
.pl-dots span:nth-child(2) { animation-delay: 0.2s; }
.pl-dots span:nth-child(3) { animation-delay: 0.4s; }
.result-dashboard { display: none; }
.result-dashboard.show { display: block; }
.dash-head {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.dash-status {
    width: 38px; height: 38px; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; font-weight: 600; flex-shrink: 0;
    border: 1px solid;
}
.dash-status.ok { background: var(--accent-soft); color: var(--accent); border-color: rgba(52, 211, 153, 0.3); }
.dash-status.fail { background: rgba(229, 72, 77, 0.08); color: #f08a8e; border-color: rgba(229, 72, 77, 0.3); }
.dash-head h3 { font-family: var(--disp); font-size: 1.05rem; font-weight: 600; color: var(--text); }
.dash-head .dash-reply { font-size: 0.83rem; color: var(--muted); margin-top: 0.15rem; max-width: 70ch; }
.dash-head .dash-badges { margin-left: auto; display: flex; gap: 0.45rem; flex-wrap: wrap; }
.nhp-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border: 1px solid;
    white-space: nowrap;
}
.nhp-badge.green { background: var(--accent-soft); color: var(--accent); border-color: rgba(52, 211, 153, 0.3); }
.nhp-badge.red { background: rgba(229, 72, 77, 0.08); color: #f08a8e; border-color: rgba(229, 72, 77, 0.3); }
.nhp-badge.blue { background: rgba(154, 163, 178, 0.10); color: #c3c9d4; border-color: rgba(154, 163, 178, 0.3); }
.nhp-badge.yellow { background: rgba(217, 164, 65, 0.09); color: #e3b869; border-color: rgba(217, 164, 65, 0.32); }
.nhp-badge.slate { background: rgba(154, 163, 178, 0.10); color: #c3c9d4; border-color: rgba(154, 163, 178, 0.3); }
.nhp-badge.purple { background: rgba(154, 163, 178, 0.10); color: #c3c9d4; border-color: rgba(154, 163, 178, 0.3); }
.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    padding: 1rem 1.1rem;
    min-width: 0;
}
.kpi-label {
    font-size: 0.6875rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--faint);
}
.kpi-val {
    font-family: var(--disp);
    font-size: 1.75rem; font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text); margin-top: 0.3rem; line-height: 1.1;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}
.kpi-val.accent, .kpi-val.good { color: var(--accent); }
.kpi-sub { font-size: 0.75rem; color: var(--faint); margin-top: 0.25rem; }
.dash-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}
.dash-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    padding: 1.15rem 1.2rem;
    min-width: 0;
}
.panel h3 { font-family: var(--disp); font-size: 0.95rem; font-weight: 600; color: var(--text); }
.panel .panel-sub {
    font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--faint); margin: 0.3rem 0 1rem;
}
.act-tbl { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.act-tbl th {
    text-align: left; font-size: 0.6875rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--faint); padding: 0.5rem 0.55rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.act-tbl th.c-num, .act-tbl td.c-num { width: 2.2rem; color: var(--faint); }
.act-tbl th.c-cost, .act-tbl td.c-cost { text-align: right; font-weight: 600; }
.panel-empty { font-size: 0.82rem; color: var(--muted); }
.act-tbl td {
    padding: 0.5rem 0.55rem;
    border-bottom: 1px solid var(--border);
    color: var(--text); vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.act-tbl tr:last-child td { border-bottom: none; }
.act-port { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); white-space: nowrap; }
.act-arrow { color: var(--faint); margin: 0 0.25rem; }
.total-row td { font-weight: 600; border-top: 1px solid var(--border-2); }
.total-row .total-val { color: var(--accent); font-family: var(--mono); }
.bar-row { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.55rem; font-size: 0.8rem; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label {
    flex: 0 0 clamp(92px, 24vw, 118px);
    text-align: right; color: var(--muted);
    font-size: 0.76rem; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-track { flex: 1; background: rgba(255, 255, 255, 0.06); border-radius: 5px; overflow: hidden; min-width: 0; }
.bar-fill {
    height: 20px; border-radius: 5px;
    display: flex; align-items: center; padding: 0 0.55rem;
    font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
    color: #0b0d11;
    white-space: nowrap;
}
.topo-host {
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    background: var(--inset);
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.55rem;
}
.topo-host:last-child { margin-bottom: 0; }
.topo-host-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.topo-host-name { font-weight: 500; font-size: 0.82rem; color: var(--text); font-family: var(--mono); overflow-wrap: anywhere; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.svc-chip {
    font-size: 0.72rem; font-family: var(--mono);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: #c3c9d4;
    padding: 2px 9px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.svc-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; flex-shrink: 0; }
.svc-chip.vuln { border-color: rgba(229, 72, 77, 0.4); color: #f3b8bb; }
.svc-chip.vuln .dot { background: var(--danger); }
.svc-chip.crit { border-color: rgba(217, 164, 65, 0.4); }
.run-rows { font-size: 0.83rem; }
.run-row {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.run-row:last-child { border-bottom: none; }
.run-row .k { color: var(--muted); flex-shrink: 0; }
.run-row .v {
    color: var(--text); font-weight: 500; text-align: right;
    font-family: var(--mono); font-size: 0.76rem;
    overflow-wrap: anywhere; max-width: 62%;
}
.dash-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-bottom: 1.25rem; }
.stat-grid.stat-grid--reduced { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .stat-grid, .stat-grid.stat-grid--reduced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    padding: 1.15rem 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.stat-val {
    display: block;
    font-family: var(--disp);
    font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-label {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere;
    font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--faint); margin-top: 0.3rem; line-height: 1.35;
}
.stat-label .lbl-short { display: none; }
.stat-val { overflow-wrap: anywhere; }
.stat-val.ep-on { color: var(--ok); }
.stat-val.ep-off { color: #f08a8e; }
.stat-val--est { opacity: 0.75; }
.chart-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    padding: 1rem 1.1rem 0.9rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.chart-box h3 { font-family: var(--disp); font-size: 0.92rem; font-weight: 600; margin-bottom: 0.7rem; color: var(--text); }
.chart-box canvas { max-width: 100%; display: block; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 0.8rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.chart-head h3 { margin: 0; font-size: 0.78rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.sync-wrap { display: flex; align-items: center; gap: 0.6rem; }
.btn-sync {
    font: inherit; font-size: 0.78rem; font-weight: 500; min-height: 44px; padding: 0 0.95rem;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-2); border-radius: 8px;
    color: var(--text); cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.btn-sync:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.28); }
.btn-sync:disabled { opacity: 0.5; cursor: not-allowed; }
.sync-status { color: var(--faint); font-size: 0.74rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.stats-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.stats-table th {
    text-align: left; font-size: 0.6875rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--faint); padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap; vertical-align: bottom;
}
.stats-table th.col-text, .stats-table td.col-text { text-align: left; }
.stats-table th.col-num, .stats-table td.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table td.col-strong { font-weight: 600; }
.stats-table .nowrap { white-space: nowrap; }
.stats-table--execs td.col-num { font-family: var(--mono); font-size: 0.8rem; min-width: 4.5rem; }
.stats-table--execs th.col-num { min-width: 4.5rem; }
.stats-table--execs td:first-child, .stats-table--hist td:first-child { font-variant-numeric: tabular-nums; }
.stats-table .st-paid, .stats-table .st-user { color: var(--ok); }
.stats-table .st-prog { color: var(--pay-progress); }
.stats-table .st-unpaid { color: #fbbf24; }
.stats-table .st-guest { color: var(--faint); }
.stats-table--hist td, .stats-table--hist th { padding-left: 0.6rem; padding-right: 0.6rem; }
.stats-table td {
    padding: 0.5rem 0.7rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stats-table tr:last-child td { border: none; }
.info-grid { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin-bottom: 1.25rem; }
@media (min-width: 900px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
    .info-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    padding: 1.3rem 1.35rem;
}
.info-card h3 {
    font-family: var(--disp);
    font-size: 0.98rem; font-weight: 600;
    margin-bottom: 0.6rem; color: var(--text);
    display: flex; align-items: baseline; gap: 0.65rem;
}
.info-idx { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--accent); }
body { --info-accent: var(--accent); }
.info-sub { font-family: var(--disp); font-size: 1.05rem; font-weight: 600; color: var(--text); letter-spacing: -0.015em; }
.info-sub__n { font-family: var(--mono); font-weight: 500; letter-spacing: 0; padding: 1px 6px; border: 1px solid rgba(52, 211, 153, 0.4); border-radius: 2px; background: var(--accent-soft); }
.info-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.info-card p + p { margin-top: 0.5rem; }
.info-card ol { margin: 0.5rem 0 0 1.2rem; color: var(--muted); line-height: 1.75; font-size: 0.87rem; }
.test-result {
    background: var(--inset);
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    padding: 1rem;
    font-family: var(--mono);
    font-size: 0.76rem;
    line-height: 1.65;
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #dbe1ea;
}
.field label {
    display: block; font-size: 0.6875rem; font-weight: 500;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 0.45rem;
}
.field select, .field input[type="text"] {
    width: 100%; background: var(--inset);
    border: 1px solid var(--border-2); border-radius: 3px;
    color: var(--text); font-family: var(--mono); font-size: 0.82rem;
    padding: 0.7rem 0.9rem; min-height: 46px; outline: none;
    transition: border-color 0.15s;
}
.field select:focus, .field input[type="text"]:focus { border-color: var(--accent); }
.field select option { background: #151d22; color: var(--text); }
#testing-base-url-display { overflow-wrap: anywhere; font-size: 0.82rem; color: var(--text); }
#testing-payload {
    font-family: var(--mono); font-size: 0.8rem; min-height: 220px; border-radius: 3px;
    background: var(--inset); border: 1px solid var(--border-2); color: #dbe1ea;
    padding: 1rem; line-height: 1.7; resize: vertical; width: 100%; outline: none;
    transition: border-color 0.15s;
}
#testing-payload:focus { border-color: var(--accent); }
.test-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.test-meta-row { display: flex; gap: 0.75rem; align-items: center; }
.test-meta-row--wrap { flex-wrap: wrap; }
.test-meta-k { color: var(--muted); font-size: 0.78rem; min-width: 70px; }
.radio-opt { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-size: 0.82rem; min-height: 44px; padding: 0 0.4rem; cursor: pointer; }
.radio-opt input[type="radio"] { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--accent); color-scheme: dark; cursor: pointer; }
.test-timing { margin-top: 0.6rem; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.test-status { margin-left: 0.5rem; }
.form-card--stack, .panel--stack { margin-top: 1rem; }
.field--gap { margin-bottom: 1rem; }
.info-ai-anchor { scroll-margin-top: calc((var(--hdr-h) + 58px) * var(--mv-bar-k, 1)); }
.no-ep {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-l);
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--muted);
}
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 0.9rem; }
.f-host {
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    background: var(--inset);
    padding: 1rem;
    margin-bottom: 0.8rem;
}
.f-host-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.f-host-title { font-family: var(--mono); font-weight: 500; font-size: 0.8rem; color: var(--text); letter-spacing: 0.02em; }
.f-host input[type="text"], .f-host input[type="number"] {
    width: 100%; background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-2); border-radius: 3px;
    color: var(--text); font-family: var(--mono); font-size: 0.8rem;
    padding: 0.6rem 0.75rem; min-height: 44px; outline: none;
    transition: border-color 0.15s;
}
.f-host input:focus { border-color: var(--accent); }
.f-host .f-lab--id { margin-bottom: 0.4rem; }
.f-lab { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.f-lab > span { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.f-feat { padding: 0.7rem 0; border-top: 1px solid var(--border); }
.f-feat:first-of-type { border-top: none; padding-top: 0.3rem; }
.f-feat-main { display: grid; grid-template-columns: minmax(0, 1.4fr) 104px auto auto 32px; gap: 0.4rem 0.55rem; align-items: end; }
.f-lab--dep { margin-top: 0.5rem; }
.f-check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; color: var(--muted); white-space: nowrap; cursor: pointer; min-height: 44px; padding: 0 0.3rem; }
.f-check input[type="checkbox"] { width: 24px; height: 24px; flex-shrink: 0; margin: 0; accent-color: var(--accent); color-scheme: dark; cursor: pointer; }
.f-spacer { flex: 1; }
.f-x {
    background: none; border: 1px solid transparent; color: var(--faint);
    border-radius: var(--r-s); width: 32px; height: 32px; font-size: 0.8rem;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.f-x:hover { color: #f08a8e; border-color: rgba(229, 72, 77, 0.4); }
.f-invalid { border-color: var(--danger) !important; }
.f-add { margin-top: 0.5rem; font-size: 0.8rem; }
.form-run-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.topo-preview {
    margin-top: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--r-m);
    background: var(--inset);
    padding: 1rem 1.1rem;
}
.topo-preview h3 { font-family: var(--disp); font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.topo-empty { color: var(--faint); font-size: 0.83rem; padding: 0.7rem 0; }
.topo-svg { width: 100%; height: auto; max-height: min(380px, 70vh); display: block; }
@media (max-width: 700px) {
    .topo-svg { max-height: 300px; }
}
.recap { margin-bottom: 1rem; }
.recap-toggle {
    width: 100%; background: none; border: none; padding: 0; min-height: 44px;
    color: var(--text); font-family: var(--disp); font-size: 0.92rem; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    cursor: pointer; text-align: left;
}
.recap-chev { color: var(--faint); font-size: 0.75rem; transition: transform 0.2s; }
.recap-body { margin-top: 0.9rem; }
.recap-json summary { cursor: pointer; font-size: 0.8rem; color: var(--muted); margin: 0.4rem 0 0.3rem; padding: 0.7rem 0; min-height: 44px; }
.recap-json pre {
    background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-m);
    padding: 0.9rem; font-family: var(--mono); font-size: 0.74rem; line-height: 1.6;
    color: #dbe1ea; max-height: 280px; overflow: auto;
    white-space: pre-wrap; overflow-wrap: anywhere; margin: 0;
}
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.dash-main > .panel { display: flex; flex-direction: column; min-width: 0; }
.dash-main > .panel .tbl-scroll { flex: 1 1 auto; }
#scroll-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px;
    background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 200;
}
.code-copy {
    display: inline-block; margin-top: 0.6rem; padding: 0.35rem 0.85rem; min-height: 44px;
    font-size: 0.74rem; font-family: inherit; border-radius: var(--r-s);
    background: transparent; border: 1px solid var(--border-2);
    color: var(--muted); cursor: pointer;
}
.code-copy.is-copied { color: var(--accent); border-color: rgba(52, 211, 153, 0.4); }
.ai-notice { border-color: rgba(52, 211, 153, 0.25); background: rgba(52, 211, 153, 0.05); }
.ai-notice .ai-notice-link { color: rgba(52, 211, 153, 0.85); }
.ai-notice .ai-notice-link:hover { color: var(--accent); }
.ai-info-card { border-color: rgba(52, 211, 153, 0.2); background: rgba(52, 211, 153, 0.04); }
.ai-info-card h3 .ai-ico, [data-theme="light"] .ai-info-card h3 .ai-ico { color: var(--accent); }
.form-hint { font-size: 0.79rem; color: var(--muted); line-height: 1.65; margin: 0.1rem 0 0.9rem; }
.form-hint strong { color: var(--text); font-weight: 600; }
.topo-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.74rem; color: var(--muted); margin-bottom: 0.7rem; font-family: var(--mono); }
.topo-legend .lg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.35rem; }
.iss { border-radius: var(--r-m); padding: 0.7rem 0.9rem; font-size: 0.8rem; margin-top: 0.6rem; line-height: 1.6; }
.iss b { display: block; margin-bottom: 0.3rem; font-size: 0.76rem; font-weight: 600; }
.iss ul { margin: 0 0 0 1.1rem; }
.iss-err { background: rgba(229, 72, 77, 0.07); border: 1px solid rgba(229, 72, 77, 0.3); color: #f3b8bb; }
.iss-warn { background: rgba(217, 164, 65, 0.07); border: 1px solid rgba(217, 164, 65, 0.3); color: #e8c98a; }
.form-warn { display: none; margin-top: 0.5rem; font-size: 0.8rem; line-height: 1.6; color: #e8c98a; background: rgba(217, 164, 65, 0.07); border: 1px solid rgba(217, 164, 65, 0.3); border-radius: var(--r-m); padding: 0.6rem 0.9rem; }
.form-warn strong { display: block; margin-bottom: 0.2rem; }
@media (min-width: 1500px) {
    :root { --wrap: 1280px; }
    .dash-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; }
    .dash-kpis { gap: 1rem; }
}
@media (max-width: 1024px) {
    .dash-main { grid-template-columns: minmax(0, 1fr); }
    .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .dash-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
    .dash-side .panel:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .frow { grid-template-columns: 1fr; }
    .f-feat-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; row-gap: 0.35rem; }
    .f-feat-main .f-lab--svc { grid-column: 1 / -1; }
    .f-feat-main .f-lab--port { grid-column: 1 / -1; }
    .f-feat-main .f-x { grid-row: 3; grid-column: 3; }
    .f-check { min-height: 44px; }
    .act-tbl { min-width: 600px; }
    .stats-table { min-width: 0; }
    .dash-head .dash-badges { margin-left: 0; width: 100%; }
    .run-row .v { max-width: 58%; }
}
@media (max-width: 700px) {
    :root { --hdr-h: 56px; }
    .stat-val { font-size: 1.45rem; }
    .stat-card { padding: 1rem 0.85rem; }
    .stat-label { font-size: 0.6875rem; letter-spacing: 0.06em; }
    .stat-label .lbl-long { display: none; }
    .stat-label .lbl-short { display: inline; }
    .chart-box { padding: 0.9rem 0.85rem 0.8rem; }
    .stats-table th, .stats-table td { padding-left: 0.45rem; padding-right: 0.45rem; }
    .editor-examples { margin-left: 0; width: 100%; }
    .editor-examples .btn-ghost { flex: 1 1 auto; text-align: center; }
    .bar-label { flex-basis: 92px; }
}
@media (max-width: 560px) {
    body { font-size: 14.5px; }
    .seg-control { grid-template-columns: 1fr; }
    .seg-btn { min-height: 46px; }
    .nhp-points { grid-template-columns: 1fr; }
    .nhp-points > div + div { border-left: none; border-top: 1px solid var(--border); }
    .form-card h2 { font-size: 1.08rem; }
    .kpi-card { padding: 0.8rem 0.85rem; }
    .kpi-val { font-size: 1.35rem; }
    .kpi-sub { font-size: 0.7rem; }
    .dash-actions > * { flex: 1 1 calc(50% - 0.6rem); text-align: center; }
    .upload-zone { padding: 2rem 1rem; }
    .topo-host-head { align-items: flex-start; }
}
@media (max-width: 380px) {
    .dash-kpis { gap: 0.6rem; }
    .kpi-val { font-size: 1.2rem; }
    .bar-label { flex-basis: 84px; font-size: 0.7rem; }
}
@keyframes nhpSpin { from { transform: rotate(0); } to { transform: rotate(1turn); } }
@keyframes nhpBlip { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes plDotPulse { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .nhp-sweep, .nhp-node, .pl-dots span { animation: none; }
    * { transition-duration: 0.01ms !important; }
}
@media print {
    body { background: #fff !important; color: #000 !important; display: block; }
    body::before { display: none !important; }
    #form-card, #nhp-actions, .no-ep, .ai-notice { display: none !important; }
    .content { max-width: 100% !important; padding: 0 !important; }
    .result-dashboard { display: block !important; }
    .dash-head, .kpi-card, .panel { background: #fff !important; border: 1px solid #999 !important; }
    .dash-head h3, .panel h3, .kpi-val, .act-tbl td, .act-tbl th, .run-row .v, .topo-host-name { color: #000 !important; }
    .dash-reply, .kpi-label, .kpi-sub, .panel-sub, .run-row .k, .svc-chip { color: #333 !important; }
    .nhp-badge { background: #fff !important; }
    .bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: #000 !important; text-decoration: none !important; }
}
.badge-app { border-radius: 2px; color: var(--accent); border-color: rgba(52, 211, 153, 0.4); text-transform: uppercase; }
@media (max-width: 420px) {
    .f-feat-main .f-check { grid-column: 1 / 3; white-space: normal; }
}
.sec-title { position: relative; padding-left: 1rem; }
.sec-title::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 6px; height: 6px; background: var(--accent); }
.form-card, .dash-head, .kpi-card, .panel, .stat-card, .chart-box, .info-card, .no-ep, .topo-preview { position: relative; }
.form-card::before, .dash-head::before, .kpi-card::before, .panel::before, .stat-card::before, .chart-box::before, .info-card::before, .no-ep::before, .topo-preview::before {
    content: ""; position: absolute; inset: -1px; pointer-events: none;
    --b: rgba(52, 211, 153, 0.55);
    background:
        linear-gradient(var(--b), var(--b)) top left / 12px 1px no-repeat,
        linear-gradient(var(--b), var(--b)) top left / 1px 12px no-repeat,
        linear-gradient(var(--b), var(--b)) top right / 12px 1px no-repeat,
        linear-gradient(var(--b), var(--b)) top right / 1px 12px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom left / 12px 1px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom left / 1px 12px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom right / 12px 1px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom right / 1px 12px no-repeat;
    transition: filter 0.2s ease;
}
.form-card:hover::before, .panel:hover::before, .stat-card:hover::before, .kpi-card:hover::before, .info-card:hover::before, .chart-box:hover::before { filter: brightness(1.5); }
.stat-card, .kpi-card, .info-card { transition: border-color 0.2s; }
.stat-card:hover, .kpi-card:hover, .info-card:hover { border-color: var(--border-2); }
.form-card h2, .panel h3, .info-card h3, .dash-head h3 { letter-spacing: -0.015em; }
.form-card h2 { font-size: 1.3rem; }
.nhp-points { counter-reset: pt; border-radius: 3px; }
.nhp-points > div { counter-increment: pt; }
.nhp-points b::before {
    content: "0" counter(pt); font-family: var(--mono); font-weight: 500; font-size: 0.6875rem;
    color: var(--accent); margin-right: 0.5rem; letter-spacing: 0.06em;
}
.seg-control { gap: 0; padding: 0; border-radius: 3px; overflow: hidden; }
.seg-btn { border-radius: 0; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; border-right: 1px solid var(--border); }
.seg-btn:last-child { border-right: none; }
.seg-btn.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.seg-btn:hover:not(.active) { background: rgba(255, 255, 255, 0.03); }
.upload-zone { border-color: rgba(52, 211, 153, 0.32); border-radius: 3px; }
.upload-icon { border-radius: 3px; color: var(--accent); border-color: rgba(52, 211, 153, 0.4); }
.json-pill { border-radius: 2px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6875rem; }
.btn-ghost, .btn-reset, .btn-sync, .code-copy { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-go { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nhp-badge { border-radius: 2px; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.6875rem; border-left-width: 3px; }
.svc-chip { border-radius: 2px; border-left: 3px solid var(--accent); }
.svc-chip.vuln { border-left-color: var(--danger); }
.svc-chip.crit { border-left-color: var(--warn); }
.dash-status { border-radius: 3px; }
.kpi-label, .stat-label, .panel .panel-sub { font-family: var(--mono); letter-spacing: 0.08em; }
.kpi-val, .stat-val { font-weight: 500; letter-spacing: -0.03em; }
.kpi-card { border-top: 2px solid var(--border-2); }
.kpi-card:first-child { border-top-color: var(--accent); }
.act-tbl th, .stats-table th { font-family: var(--mono); letter-spacing: 0.1em; border-bottom-color: var(--border-2); }
.act-tbl tbody tr:hover td, .stats-table tbody tr:hover td { background: rgba(52, 211, 153, 0.04); }
.bar-track, .bar-fill { border-radius: 2px; }
.topo-host, .f-host { border-left: 2px solid var(--accent); }
.run-row .k { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; }
.info-idx { border: 1px solid rgba(52, 211, 153, 0.4); padding: 1px 6px; border-radius: 2px; background: var(--accent-soft); }
.nhp-radar::before, .nhp-radar::after { content: ""; position: absolute; background: var(--border-2); pointer-events: none; }
.nhp-radar::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.nhp-radar::after { top: 50%; left: 0; right: 0; height: 1px; }
.nhp-ring.r1 { border-style: dashed; border-color: rgba(52, 211, 153, 0.25); }
.nhp-core { border-radius: 3px; }
.f-host input[type="text"], .f-host input[type="number"], .field select, .field input[type="text"] { border-radius: 3px; }
.iss, .form-warn { border-radius: 3px; }
::selection { background: rgba(52, 211, 153, 0.3); }
@media (prefers-reduced-motion: reduce) {
    .stat-card, .kpi-card, .info-card { transition: none; }
    .form-card::before, .panel::before, .stat-card::before, .kpi-card::before, .info-card::before, .chart-box::before { transition: none; }
}
.f-x { position: relative; }
.f-x::after { content: ""; position: absolute; inset: -7px; }
.dash-retry { margin-top: 1rem; display: flex; }
@media (max-width: 560px) {
    .nhp-points { display: none; }
}
.stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-grid > .stat-card { grid-column: span 2; }
.stat-grid > .stat-card:nth-child(n+4) { grid-column: span 3; }
.stat-grid.stat-grid--reduced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid.stat-grid--reduced > .stat-card:nth-child(n) { grid-column: auto; }
.stat-grid.stat-grid--reduced > .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 900px) {
    .stat-grid, .stat-grid.stat-grid--reduced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid > .stat-card:nth-child(n) { grid-column: auto; }
    .stat-grid > .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.content { margin-top: 23px; }
@media (max-width: 600px) {
    .content { margin-top: 20px; }
}
.test-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .9rem; }
.test-row .field { margin: 0; }
#testing-method-display.is-readonly { opacity: .6; cursor: not-allowed; }
@media (max-width: 600px) {
    .test-row { grid-template-columns: minmax(0, 1fr); }
}
#f-hosts.is-loading { min-height: 518px; }
@media (max-width: 760px) {
    #f-hosts.is-loading { min-height: 758px; }
}
@media (max-width: 420px) {
    #f-hosts.is-loading { min-height: 857px; }
}

/* ── the skeleton ── */
html body > header.nq-hd { position: static; display: block; height: 0; padding: 0; border: 0; background: none; zoom: 1; }
.nq-rail {
    position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: var(--rail); display: flex; flex-direction: column; align-items: center;
    padding: 16px 0; gap: 4px; background: #fff; border-right: 1px solid var(--line);
}
html body > header.nq-hd .back-arrow {
    width: 48px; height: 48px; margin: 0 0 16px; border: 0; border-radius: 14px; background: var(--accent-soft); color: var(--accent);
    display: block; overflow: hidden; flex: none;
}
html body > header.nq-hd .back-arrow svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
html body > header.nq-hd .back-arrow:hover { background: #d9ebe1; }
html body > header.nq-hd .tabs-bar {
    position: static; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; width: 100%; height: auto; padding: 0; margin: 0;
    background: transparent; border: 0; box-shadow: none; overflow: visible;
}
html body > header.nq-hd .tab-link {
    width: 60px; height: 56px; padding: 0; margin: 0; border: 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; font: 500 11px/1.1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-3); background: transparent; box-shadow: none; text-decoration: none;
}
html body > header.nq-hd .tab-link::before, html body > header.nq-hd .tab-link::after { content: none; }
html body > header.nq-hd .tab-link svg { display: block; width: 22px; height: 22px; }
html body > header.nq-hd .tab-link:hover { color: var(--ink); background: var(--sunk); }
html body > header.nq-hd .tab-link.active { color: var(--accent); background: var(--accent-soft); }
html body > header.nq-hd .tab-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html body > header.nq-hd .tabs-bar > .tab-link:not(.is-ico) + .tab-link.is-ico, html body > header.nq-hd .tabs-bar > .tab-link.is-ico:first-child { margin-top: auto; }
.nq-top { position: fixed; z-index: 30; top: 0; left: var(--rail); right: 0; height: var(--top); padding: 0 28px; display: flex; align-items: center; background: rgba(236, 234, 228, .94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.nq-wm {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    pointer-events: none; color: var(--ink); font: 700 21px/1 var(--mono); letter-spacing: .06em;
}
.nq-wm svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nq-wm b { font-weight: 700; }
html body > header.nq-hd .back-arrow[hidden] { display: block !important; }
@media (max-width: 640px) {
    html body > header.nq-hd .nq-rail { display: contents; }
    html body > header.nq-hd .back-arrow { position: fixed; z-index: 45; top: 8px; left: 16px; width: 44px; height: 44px; margin: 0; border-radius: 12px; }
    html body > header.nq-hd .tabs-bar {
        position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 40; flex-direction: row; align-items: center; justify-content: flex-start; gap: 4px; width: auto; flex: none;
        padding: 6px 12px max(17px, calc(5px + env(safe-area-inset-bottom))); background: #fff; border-top: 1px solid var(--line);
    }
    html body > header.nq-hd .tab-link { flex: none; width: auto; min-width: 84px; height: 52px; padding: 0 18px; border-radius: 14px; font-size: 12px; gap: 1px; }
    html body > header.nq-hd .tab-link.is-ico { min-width: 0; width: 52px; padding: 0; }
    html body > header.nq-hd .tabs-bar > .tab-link:not(.is-ico) + .tab-link.is-ico, html body > header.nq-hd .tabs-bar > .tab-link.is-ico:first-child { margin-top: 0; margin-left: auto; }
    .nq-top { left: 0; height: 60px; padding: 0 16px; }
    .nq-wm { left: auto; right: 16px; transform: translateY(-50%); zoom: .85; }
}
@media (max-width: 360px) {
    html body > header.nq-hd .tab-link { min-width: 72px; padding: 0 12px; }
}
@keyframes nhpSpin { from { transform: rotate(0); } to { transform: rotate(1turn); } }
@keyframes nhpBlip { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes plDotPulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.sr, .nq-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html body header.nq-hd { position: static; height: 0; min-height: 0; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html body header.nq-hd a { text-decoration: none; }
html body header.nq-hd .tab-link { text-transform: none; letter-spacing: 0; }
html body header.nq-hd .nq-top { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html body { padding-left: var(--rail, 80px); }
html body > .content { padding-top: 80px; }
@media (max-width: 640px) {
    html body { padding-left: 0; }
    html body > .content { padding-top: 70px; padding-bottom: 110px; }
}
/* the Planner is the dark page it was: the rail and the name follow it */
html body header.nq-hd .nq-rail { background: #0f1218; border-color: #1f2630; }
html body header.nq-hd .tab-link { color: #9aa6b6; }
html body header.nq-hd .tab-link:hover { color: #e6edf5; background: rgba(255, 255, 255, .05); }
html body header.nq-hd .tab-link.active { color: #34d399; background: rgba(52, 211, 153, .12); }
html body header.nq-hd a.back-arrow:not(#mv) { color: #34d399; }
html body header.nq-hd .nq-wm:not(#mv), html body header.nq-hd .nq-wm b { color: #eef3f8; }
@media (max-width: 640px) {
    html body header.nq-hd .nq-top { background: rgba(11, 13, 17, .94); }
    html body header.nq-hd .tabs-bar { background: #0f1218; border-top: 1px solid #1f2630; }
}
/* soft light over the page's ground, so the open space is not blank (owner, 2026-11-27) */
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(56% 48% at 8% 0%, rgba(45, 164, 120, .16), transparent 70%), radial-gradient(50% 44% at 96% 12%, rgba(56, 130, 246, .10), transparent 70%), radial-gradient(64% 52% at 82% 104%, rgba(45, 164, 120, .12), transparent 70%); }

/* Final review (2026-11-27): no text under 12px, the AI notice is never cut. */
html body .ai-notice .ai-notice-text { white-space: normal; overflow: visible; text-overflow: clip; }
html body .form-hint code { font-size: 12px; }

/* the same air under the top band on every page (--mv-top, css/demo-shell.css) */
html body > .content:not(#mv) { margin-top: 0; padding-top: var(--mv-top); }

/* Type at its size (owner, 2026-11-27: placeholders and fields read far too big). */
html body > .content ::placeholder { font-style: normal; font-size: 13px; }
html body > .content :is(.field select, .field input[type="text"]):not(#mv), html body .f-host :is(input[type="text"], input[type="number"]):not(#mv) { font-size: 13.5px; }
html body > .content :is(.f-lab, .f-check, .field label):not(#mv) { font-size: 12px; }
html body > .content .panel .panel-sub:not(#mv) { font-size: 13px; }
html body > .content .form-hint:not(#mv) { font-size: 12px; }
@media (max-width: 640px) {
    /* the three ways to describe the network on one row */
    html body > .content .seg-btn:not(#mv) { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 4px; font-size: 11px; letter-spacing: .03em; border-right: 1px solid var(--border); white-space: normal; line-height: 1.3; }
    html body > .content .seg-btn:not(#mv):last-child { border-right: 0; }
    html body > .content .seg-control:not(#mv) { display: flex; flex-direction: row; flex-wrap: nowrap; }
}

/* The AI line under the planner: readable, in the page's green (owner, 2026-11-27: it was black on black). */
html body .ai-notice:not(#mv) { background: var(--surface-2); border: 1px solid rgba(52, 211, 153, .45); color: var(--text); opacity: 1; }
html body .ai-notice:not(#mv) .ai-notice-text { color: var(--text); opacity: 1; }
html body .ai-notice:not(#mv) .ai-ico, html body .ai-notice:not(#mv) .ai-notice-link { color: var(--accent); opacity: 1; }
