/* Radar — design tokens */
:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f1f0ec;
  --border: #e4e2dc;
  --border-strong: #d4d1c9;
  --text: #16161a;
  --muted: #696973;
  --faint: #9a9aa3;
  --accent: #3f3cbb;
  --accent-hover: #34319f;
  --accent-soft: #ecebff;
  --accent-ink: #ffffff;
  --ok: #157a3c;       --ok-soft: #e4f4ea;
  --warn: #a35a06;     --warn-soft: #fcf0dc;
  --crit: #c8261d;     --crit-soft: #fde9e7;
  --expired: #ffffff;  --expired-bg: #a3170f;
  --err: #6d3fd1;      --err-soft: #efe8fd;
  --pending: #696973;  --pending-soft: #ecebe7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 4px 16px rgba(20, 20, 30, .04);
  --shadow-lg: 0 2px 4px rgba(20, 20, 30, .05), 0 16px 48px rgba(20, 20, 30, .08);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0f;
    --surface: #141418;
    --surface-2: #1b1b21;
    --border: #26262e;
    --border-strong: #34343e;
    --text: #ececf1;
    --muted: #a0a0ab;
    --faint: #6f6f7a;
    --accent: #8f8cff;
    --accent-hover: #a4a2ff;
    --accent-soft: #23224a;
    --accent-ink: #0c0c0f;
    --ok: #4ed28a;       --ok-soft: #12291c;
    --warn: #f2b14f;     --warn-soft: #2e2210;
    --crit: #ff7a6e;     --crit-soft: #33150f;
    --expired: #ffffff;  --expired-bg: #c0271c;
    --err: #b79bff;      --err-soft: #241a3d;
    --pending: #a0a0ab;  --pending-soft: #1f1f25;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.035em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hide-sm { }
@media (max-width: 720px) { .hide-sm { display: none !important; } }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 680; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand small { color: var(--faint); font-weight: 500; font-size: .78rem; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav button.linklike {
  color: var(--muted); padding: 7px 11px; border-radius: 8px; font-size: .93rem; font-weight: 500;
}
.nav a:hover, .nav button.linklike:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav form { margin: 0; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  font: 600 .93rem/1 var(--font); letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--crit); border-color: var(--border-strong); }
.btn-danger:hover { background: var(--crit-soft); border-color: var(--crit); }
.btn-sm { height: 32px; padding: 0 11px; font-size: .85rem; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
button.linklike { background: none; border: 0; cursor: pointer; font: inherit; }
.iconbtn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.iconbtn svg { width: 16px; height: 16px; }
.inline-form { display: inline; margin: 0; }

label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], select, textarea {
  width: 100%; height: 42px; padding: 0 13px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  font: 400 .95rem var(--font);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; min-height: 76px; padding: 10px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
input::placeholder { color: var(--faint); }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .input-group { flex-direction: column; } .input-group .btn { width: 100%; } }

input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.card-tight { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: 4px; }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- flash ---------- */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: 12px; margin: 18px 0 0;
  background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  font-size: .93rem;
}
.flash.error { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 30%, transparent); }
.flash.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.warn { color: var(--warn); background: var(--warn-soft); }
.pill.crit { color: var(--crit); background: var(--crit-soft); }
.pill.expired { color: var(--expired); background: var(--expired-bg); }
.pill.error { color: var(--err); background: var(--err-soft); }
.pill.pending { color: var(--pending); background: var(--pending-soft); }
.pill.risk { color: var(--crit); background: var(--crit-soft); }
.pill.watch { color: var(--warn); background: var(--warn-soft); }
.pill.unknown { color: var(--pending); background: var(--pending-soft); }
.pill.plain::before { display: none; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 650; letter-spacing: .02em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 1.9rem; font-weight: 720; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.stat.expired::after { background: var(--expired-bg); }
.stat.crit::after { background: var(--crit); }
.stat.warn::after { background: var(--warn); }
.stat.ok::after { background: var(--ok); }
.stat.error::after { background: var(--err); }
.stat.risk::after { background: var(--accent); }
.stat.zero .value { color: var(--faint); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.items { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.items th {
  text-align: left; font-size: .76rem; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; padding: 11px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.items td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.items tr:last-child td { border-bottom: 0; }
table.items tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.item-name { font-weight: 620; word-break: break-all; }
.item-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.days { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.days.crit, .days.expired { color: var(--crit); }
.days.warn { color: var(--warn); }
.cell-actions { white-space: nowrap; text-align: right; }
.cell-actions form { display: inline; }
.err-text { font-size: .8rem; color: var(--err); margin-top: 3px; max-width: 420px; }

progress.life {
  -webkit-appearance: none; appearance: none; width: 110px; height: 6px; border: 0; border-radius: 99px;
  background: var(--surface-2); overflow: hidden; display: block; margin-top: 6px;
}
progress.life::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
progress.life::-webkit-progress-value { background: var(--ok); border-radius: 99px; }
progress.life::-moz-progress-bar { background: var(--ok); border-radius: 99px; }
progress.life.warn::-webkit-progress-value { background: var(--warn); }
progress.life.warn::-moz-progress-bar { background: var(--warn); }
progress.life.crit::-webkit-progress-value, progress.life.expired::-webkit-progress-value { background: var(--crit); }
progress.life.crit::-moz-progress-bar, progress.life.expired::-moz-progress-bar { background: var(--crit); }

/* ---------- client chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: .88rem; font-weight: 560;
}
.chip:hover { border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.chip.active { border-color: var(--accent); background: var(--accent-soft); }
.chip .count { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

/* ---------- page heads ---------- */
.page-head { padding: 30px 0 18px; }
.page-head h1 { font-size: 1.9rem; margin: 0; }
.eyebrow { font-size: .78rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.section { padding: 8px 0 26px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 12px; }
.section-title h2 { font-size: 1.1rem; margin: 0; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty .glyph { width: 56px; height: 56px; margin: 0 auto 14px; opacity: .9; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }

/* ---------- discovery ---------- */
.found { max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.found label {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 14px;
  font-weight: 500; font-size: .93rem; border-bottom: 1px solid var(--border); cursor: pointer;
}
.found label:last-child { border-bottom: 0; }
.found label:hover { background: var(--surface-2); }
.found .mono { word-break: break-all; }

/* ---------- landing ---------- */
.hero { padding: 72px 0 40px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -80px 0 auto 0; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 280px at 18% 20%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(520px 260px at 85% 0%, color-mix(in srgb, var(--ok) 10%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: .84rem; font-weight: 560; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.kicker b { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 8px; font-size: .74rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin-bottom: 26px; }
.hero-check { max-width: 540px; }
.hero-check .hint { margin-top: 10px; }
.hero-cta { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.preview { border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.preview .bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.preview .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.preview-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.preview-row:last-child { border-bottom: 0; }
.preview-row .item-name { font-size: .92rem; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
@media (max-width: 900px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .timeline { grid-template-columns: 1fr; } }
.tl { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.tl .when { font-size: .8rem; font-weight: 650; color: var(--muted); }
.tl .big { font-size: 2.1rem; font-weight: 760; letter-spacing: -0.04em; margin: 4px 0; font-variant-numeric: tabular-nums; }
.tl .big span { font-size: .95rem; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.tl p { font-size: .88rem; color: var(--muted); margin: 0; }
.tl.now { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feature .ic svg { width: 19px; height: 19px; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.band { padding: 56px 0; }
.band-title { max-width: 640px; margin-bottom: 26px; }
.band-title p { color: var(--muted); font-size: 1.05rem; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.plan .price { font-size: 2.3rem; font-weight: 760; letter-spacing: -0.04em; margin: 10px 0 2px; }
.plan .price span { font-size: .95rem; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.plan li { padding: 6px 0 6px 24px; position: relative; font-size: .92rem; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 11px; width: 11px; height: 6px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg);
}

.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 620; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* check result */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
@media (max-width: 560px) { .result-hero { grid-template-columns: 1fr; } }
.ring {
  width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  border: 10px solid var(--ok-soft); color: var(--ok);
}
.ring.warn { border-color: var(--warn-soft); color: var(--warn); }
.ring.crit, .ring.expired { border-color: var(--crit-soft); color: var(--crit); }
.ring.error, .ring.pending { border-color: var(--err-soft); color: var(--err); }
.ring b { display: block; font-size: 2.3rem; font-weight: 780; letter-spacing: -0.04em; line-height: 1; }
.ring small { font-size: .78rem; font-weight: 600; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: .93rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 560; word-break: break-word; }
.callout { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.callout.risk { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 25%, transparent); }
.callout.watch { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.callout h3 { font-size: .95rem; margin-bottom: 4px; }
.callout p { margin: 0; font-size: .92rem; }

/* auth */
.auth { min-height: calc(100vh - 62px - 120px); display: grid; place-items: center; padding: 40px 20px; }
.auth .card { width: 100%; max-width: 420px; padding: 30px; }
.auth h1 { font-size: 1.6rem; }

/* legal */
.prose { max-width: 720px; padding: 34px 0 60px; }
.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.15rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.2em; }

/* footer */
.footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 40px; color: var(--muted); font-size: .88rem; }
.footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* report (print) */
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 28px 0 18px; border-bottom: 2px solid var(--text); margin-bottom: 18px; flex-wrap: wrap; }
@media print {
  .topbar, .footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .card, .stat { box-shadow: none; }
  table.items th { background: #f2f2f2; }
  .wrap { max-width: none; padding: 0; }
}
.mt { margin-top: 18px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--accent-ink); background: var(--accent); }
.nav a.btn-primary:hover { background: var(--accent-hover); }
@media (max-width: 560px) {
  .input-group input { flex: none; }
  .kicker { font-size: .78rem; }
}
button.btn:disabled { opacity: .5; cursor: not-allowed; }
