/* Shared by every page. collect.html runs the probe, which reads the body's
   computed font and colors, the default rendering of inputs and buttons it
   appends to <body>, and the viewport's scrollbar width. So: only classes
   under .site are styled, never elements by tag; nothing is set on body;
   html gets a background only (it does not inherit); no web fonts (a loaded
   family would read as installed); no color-scheme on the probe page (it
   changes system colors). */

:root {
  --page: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #f0efec;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d68;
  --line: #e1e0d9;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-wash: rgba(42, 120, 214, 0.1);
  --bar: #2a78d6;
  --track: #ebeae5;
  --warn: #b26b00;
  --good: #006300;
  --hero-from: #0d366b;
  --hero-to: #1c5cab;
  background: var(--page);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9a988f;
    --line: #2c2c2a;
    --accent: #3987e5;
    --accent-ink: #86b6ef;
    --accent-wash: rgba(57, 135, 229, 0.16);
    --bar: #3987e5;
    --track: #2c2c2a;
    --warn: #fab219;
    --good: #0ca30c;
    --hero-from: #0d1f3a;
    --hero-to: #104281;
  }
}

.site {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page);
  /* The body keeps its default 8px margin (the probe reads the body); this
     covers it edge to edge. No min-height: what the probe appends to <body>
     would then overflow the viewport and add a scrollbar while it measures. */
  margin: -8px;
  -webkit-text-size-adjust: 100%;
}
.site *, .site *::before, .site *::after { box-sizing: border-box; }
.site .link, .site .nav-link { color: var(--accent-ink); text-decoration: none; }
.site .link:hover { text-decoration: underline; }
.site .mono { font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.site .muted { color: var(--muted); }
.site .wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- nav ---------- */
.site .nav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site .nav-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.site .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.site .brand-mark { width: 28px; height: 28px; flex: none; color: var(--accent); }
.site .brand-sub { color: var(--muted); font-weight: 500; }
.site .nav-links { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.site .nav-link { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.site .nav-link:hover { background: var(--surface-2); color: var(--ink); }
.site .nav-link[aria-current="page"] { color: var(--accent-ink); background: var(--accent-wash); }
@media (max-width: 560px) {
  .site .brand-sub { display: none; }
}
@media (max-width: 430px) {
  .site .brand-name { display: none; }
  .site .nav-inner { gap: 8px; }
  .site .nav-link { padding: 8px; }
}

/* ---------- hero ---------- */
.site .hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; }
.site .hero-inner { padding: 40px 16px 44px; text-align: center; }
.site .hero-title { margin: 0 0 10px; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
.site .hero-lead { margin: 0 auto; max-width: 640px; font-size: 16px; color: rgba(255, 255, 255, 0.86); }
.site .hero-status { margin: 24px auto 0; max-width: 440px; }
.site .progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.site .progress-fill { height: 100%; width: 0; border-radius: 3px; background: #fff; transition: width 0.3s ease; }
.site .status-text { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.86); min-height: 21px; }
.site .hero-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.site .btn { font: inherit; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.site .btn:hover:not(:disabled) { background: var(--surface-2); }
.site .btn:disabled { opacity: 0.5; cursor: default; }
.site .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.site .btn-primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }
.site .btn-light { background: #fff; border-color: #fff; color: #0d366b; }
.site .btn-light:hover:not(:disabled) { background: #e6effb; }
.site .btn-small { padding: 5px 12px; font-size: 13px; }

/* ---------- sections, cards ---------- */
.site .main { flex: 1; padding: 28px 0 40px; }
.site .section { margin: 0 0 28px; }
.site .section-title { font-size: 20px; margin: 0 0 4px; letter-spacing: -0.01em; }
.site .section-sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.site .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.site .card-pad { padding: 20px; }

/* ---------- verdict ---------- */
.site .verdict { display: flex; gap: 20px; align-items: center; padding: 24px; margin-bottom: 16px; }
.site .verdict-icon { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent-ink); }
.site .verdict-title { margin: 0 0 4px; font-size: clamp(20px, 3.2vw, 26px); line-height: 1.2; letter-spacing: -0.01em; }
.site .verdict-text { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .site .verdict { flex-direction: column; text-align: center; } }

/* ---------- stat tiles ---------- */
.site .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.site .tile { padding: 16px 18px; }
.site .tile-label { font-size: 13px; color: var(--muted); }
.site .tile-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2px; overflow-wrap: anywhere; }
.site .tile-value-text { font-size: 20px; line-height: 1.3; padding: 4px 0 2px; }
.site .tile-note { font-size: 13px; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }

/* ---------- tabs ---------- */
.site .tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); margin-bottom: 12px; }
.site .tab { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.site .tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }

/* ---------- attribute table ---------- */
.site .table-wrap { overflow-x: auto; }
.site .table { width: 100%; border-collapse: collapse; font-size: 14px; }
.site .table th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.site .table td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.site .table tr:last-child td { border-bottom: 0; }
.site .table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.site .attr-name { font-weight: 600; white-space: nowrap; }
.site .attr-value { overflow-wrap: anywhere; color: var(--ink-2); }
@media (max-width: 640px) {
  .site .table-attrs, .site .table-attrs tbody { display: block; width: 100%; }
  .site .table-attrs thead { display: none; }
  .site .table-attrs tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .site .table-attrs tr:last-child { border-bottom: 0; }
  .site .table-attrs td { padding: 0; border: 0; min-width: 0; }
  .site .table-attrs td.attr-value { grid-column: 1 / -1; }
}

/* ---------- details panels ---------- */
.site .panel { margin-top: 16px; }
.site .panel-summary { cursor: pointer; padding: 14px 20px; font-weight: 600; list-style-position: inside; }
.site .panel-body { padding: 0 20px 20px; }
.site .note { border-left: 3px solid var(--line); padding: 4px 10px; margin: 6px 0; font-size: 14px; }
.site .note-warn { border-color: var(--warn); }
.site .note-ok { border-color: var(--good); }
.site .kv { border-collapse: collapse; font-size: 14px; }
.site .kv td { padding: 3px 16px 3px 0; vertical-align: top; }
.site .kv td:first-child { color: var(--muted); white-space: nowrap; }
.site .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.site .field-label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
.site .field { box-sizing: border-box; width: 100%; font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.site .field-area { resize: vertical; }
.site .hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.site .hint code, .site .code { font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- are you unique? ---------- */
/* Scrolled to on "Show my fingerprint": clear the sticky nav. */
.site .result { scroll-margin-top: 72px; }
.site .unique { overflow: hidden; margin-bottom: 28px; }
.site .unique-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; }
.site .unique-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.site .btn-head { margin-left: auto; background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 0.05em; font-size: 13px; }
.site .btn-head:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.site .periods { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); overflow-x: auto; }
.site .period { font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 12px 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.site .period:hover { color: var(--ink); background: var(--surface-2); }
.site .period[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.site .unique-body { padding: 20px; }
.site .verdict-line { margin: 0 0 8px; font-size: 19px; font-weight: 600; color: var(--ink); }
.site .verdict-line.is-unique { color: var(--good); }
.site .verdict-line.is-unique::before { content: "✓ "; }
.site .verdict-sub { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; }
.site .dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 12px; }
.site .dim-card { display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; padding-top: 22px; }
.site .dim-value { font-size: 20px; font-weight: 700; padding: 0 12px; overflow-wrap: anywhere; }
.site .dim-label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.site .dim-visual { flex: 1; display: grid; place-items: center; padding: 22px 12px; min-height: 140px; color: var(--accent); }
.site .dim-icon { width: 84px; height: 84px; }
.site .dim-badge { display: inline-block; padding: 10px 14px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 22px; font-weight: 700; white-space: nowrap; }
.site .dim-bar { position: relative; align-self: stretch; height: 24px; background: var(--track); }
.site .dim-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bar); opacity: 0.55; transition: width 0.4s ease; }
.site .dim-pct { position: relative; display: block; line-height: 24px; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .site .dims { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .site .periods { grid-template-columns: repeat(3, 1fr); }
  .site .period { padding: 10px 4px; font-size: 12px; }
  .site .unique-title { font-size: 17px; }
  .site .dim-visual { min-height: 100px; padding: 14px 8px; }
  .site .dim-icon { width: 60px; height: 60px; }
  .site .dim-badge { font-size: 15px; padding: 7px 9px; }
  .site .dim-value { font-size: 16px; white-space: nowrap; overflow-wrap: normal; padding: 0 6px; }
  .site .verdict-line { font-size: 17px; }
}
@media (max-width: 380px) { .site .dims { grid-template-columns: 1fr; } }

/* ---------- prose (about) ---------- */
.site .prose { max-width: 720px; }
.site .prose-h { font-size: 18px; margin: 28px 0 8px; }
.site .prose-p { margin: 0 0 12px; color: var(--ink-2); }
.site .prose-list { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); }

/* ---------- footer ---------- */
.site .foot { border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--muted); }
.site .foot-inner { padding: 16px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.site [hidden] { display: none !important; }
