:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dfe3e8;
  --text: #14181f;
  --muted: #5b6573;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: #ccfbf1;
  --green: #15803d;
  --green-soft: #dcfce7;
  --yellow: #a16207;
  --yellow-soft: #fef3c7;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --gray-soft: #e5e7eb;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 16px rgba(16, 24, 40, 0.04);
  --mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f14;
    --surface: #131820;
    --surface-2: #1a212b;
    --border: #262f3b;
    --text: #e6eaf0;
    --muted: #93a0b1;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #0f3b37;
    --green: #4ade80;
    --green-soft: #12301f;
    --yellow: #facc15;
    --yellow-soft: #33290b;
    --red: #f87171;
    --red-soft: #3a1515;
    --gray-soft: #262f3b;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-strong); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 16px; }
.health { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.chip.ok { color: var(--green); border-color: transparent; background: var(--green-soft); }
.chip.warn { color: var(--yellow); border-color: transparent; background: var(--yellow-soft); }

.hero { padding: 40px 0 8px; }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; max-width: 760px; }
.lede { color: var(--muted); font-size: 16px; max-width: 700px; margin: 0 0 26px; }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.input-row { display: flex; gap: 8px; }
input#ca {
  flex: 1; min-width: 0; font: 15px var(--mono); padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); outline: none;
}
input#ca:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input#ca.invalid { border-color: var(--red); }
.hint { display: block; min-height: 20px; font-size: 13px; color: var(--red); margin-top: 6px; }

.modes { border: 0; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.modes legend { padding: 0; margin-bottom: 8px; }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode-body { display: block; height: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color .15s, background .15s; }
.mode:hover .mode-body { border-color: var(--muted); }
.mode input:checked + .mode-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.mode input:focus-visible + .mode-body { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-title { display: flex; justify-content: space-between; align-items: baseline; font-weight: 650; margin-bottom: 4px; }
.mode-title em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.mode-desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }

.actions { display: flex; gap: 10px; margin-top: 18px; }
button { font: inherit; cursor: pointer; border-radius: 10px; padding: 11px 18px; border: 1px solid var(--border); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--accent); color: #fff; border-color: transparent; font-weight: 650; min-width: 150px; }
@media (prefers-color-scheme: dark) { .primary { color: #042f2e; } }
.primary:hover:not(:disabled) { filter: brightness(1.07); }
.ghost { background: transparent; color: var(--text); }
.ghost:hover { background: var(--surface-2); }

.run { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-top: 22px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.panel-title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.count { font-family: var(--mono); font-weight: 500; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); }
.step:first-child { border-top: 0; }
.step-icon { width: 18px; height: 18px; border-radius: 50%; margin-top: 2px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.step.running .step-icon { border: 2px solid var(--accent); border-right-color: transparent; animation: spin .8s linear infinite; }
.step.done .step-icon { background: var(--green-soft); color: var(--green); }
.step.error .step-icon { background: var(--red-soft); color: var(--red); }
.step.skipped .step-icon { background: var(--gray-soft); color: var(--muted); }
.step-label { font-weight: 550; }
.step.skipped .step-label { color: var(--muted); }
.step-detail { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .step.running .step-icon { animation: none; } }

.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.feed-empty { color: var(--muted); font-size: 14px; }
.feed-item { padding: 8px 0; border-top: 1px dashed var(--border); font-size: 13px; }
.feed-item:first-child { border-top: 0; }
.req { display: flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-size: 12.5px; }
.req-url { overflow-wrap: anywhere; flex: 1; }
.req-reason { color: var(--muted); margin-top: 2px; }
.thought { color: var(--muted); font-style: italic; }
.status { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.status.s2 { background: var(--green-soft); color: var(--green); }
.status.s3 { background: var(--yellow-soft); color: var(--yellow); }
.status.s4, .status.s5, .status.err { background: var(--red-soft); color: var(--red); }
.status.pending { background: var(--surface-2); color: var(--muted); }
.method { color: var(--muted); font-weight: 600; }
.buildlog-wrap { margin-top: 14px; }
.buildlog-wrap summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.log { font: 12px/1.45 var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }

.error { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--red-soft); color: var(--red); font-weight: 550; }

.report { margin: 26px 0 10px; display: grid; gap: 16px; }
.verdict { border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.stamp { font: 800 22px/1 var(--sans); letter-spacing: .04em; padding: 16px 18px; border-radius: 12px; text-align: center; border: 2px solid currentColor; min-width: 170px; text-transform: uppercase; }
.v-WORKS .stamp { color: var(--green); background: var(--green-soft); }
.v-PARTIALLY_WORKS .stamp { color: var(--yellow); background: var(--yellow-soft); }
.v-DOES_NOT_WORK .stamp { color: var(--red); background: var(--red-soft); }
.v-UNVERIFIABLE .stamp, .v-NONE .stamp { color: var(--muted); background: var(--surface-2); }
.stamp small { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0; margin-top: 8px; text-transform: none; }
.headline { font-size: 19px; font-weight: 650; margin: 0 0 6px; line-height: 1.35; }
.summary { color: var(--muted); margin: 0 0 12px; }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; max-width: 320px; }
.meter > span { display: block; height: 100%; background: currentColor; }
.meter-label { font-size: 12px; color: var(--muted); margin-top: 5px; font-family: var(--mono); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; font-weight: 650; }

.token-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.token-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.token-name { font-weight: 700; font-size: 17px; }
.token-ca { font: 12px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 13.5px; overflow-wrap: anywhere; }
.good { color: var(--green); } .bad { color: var(--red); }

.claims { display: grid; gap: 10px; }
.claim { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.claim-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.claim-text { font-weight: 600; }
.claim-evidence { font-size: 13.5px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.claim-how { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; text-transform: uppercase; }
.p-VERIFIED, .p-pass { background: var(--green-soft); color: var(--green); }
.p-PARTIAL, .p-inconclusive { background: var(--yellow-soft); color: var(--yellow); }
.p-FAILED, .p-VAPORWARE, .p-fail { background: var(--red-soft); color: var(--red); }
.p-UNVERIFIED { background: var(--surface-2); color: var(--muted); }

.flags { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.flags li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; }
.dot.red { background: var(--red); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.flag-detail { color: var(--muted); font-size: 13px; }
.flag-src { font: 11px var(--mono); color: var(--muted); margin-left: 6px; }

.tests { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tests li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 14px; }
.tests .details { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.linklist { display: flex; flex-wrap: wrap; gap: 6px; }
.linklist a { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.linklist a:hover { border-color: var(--accent); }
.linkgroup { margin-bottom: 10px; }
.linkgroup-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.repo { border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 10px; }
.repo:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.repo-name { font-weight: 650; }
.repo-desc { color: var(--muted); font-size: 13.5px; margin: 2px 0 8px; }

table.pages { width: 100%; border-collapse: collapse; font-size: 13px; }
.pages td { padding: 6px 4px; border-top: 1px dashed var(--border); vertical-align: top; }
.pages tr:first-child td { border-top: 0; }
.pages td.u { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }

.buildsteps { display: grid; gap: 8px; }
.buildsteps details { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.buildsteps summary { cursor: pointer; display: flex; gap: 10px; align-items: center; }
.bs-name { font-weight: 600; text-transform: capitalize; }
.bs-time { color: var(--muted); font: 12px var(--mono); margin-left: auto; }

.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.foot { color: var(--muted); font-size: 12.5px; padding-top: 18px; padding-bottom: 40px; }

@media (max-width: 820px) {
  .modes { grid-template-columns: 1fr; }
  .run, .grid-2 { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: 1fr; }
  .stamp { min-width: 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .form { padding: 16px; }
  .facts { grid-template-columns: 1fr; }
}

/* ---- test.it additions ---- */
.dot-it { color: var(--accent); }
.modes { grid-template-columns: repeat(2, 1fr); }
.tool-tag { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tool-tag.browser { background: var(--accent-soft); color: var(--accent-strong); }
.tool-tag.code { background: var(--yellow-soft); color: var(--yellow); }
.tool-tag.github { background: var(--gray-soft); color: var(--text); }
.thumb { display: block; margin-top: 6px; max-width: 240px; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shot { margin: 0; }
.shot img { width: 100%; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; display: block; }
.shot figcaption { font: 12px var(--mono); color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.82); display: grid; place-items: center; z-index: 50; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: min(1280px, 100%); max-height: 86vh; border-radius: 8px; }
.lightbox p { color: #ddd; font: 13px var(--mono); margin: 8px 0 0; text-align: center; }
.prose { white-space: pre-wrap; margin: 0; font-size: 14.5px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin: 0 0 12px; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--mono); overflow-wrap: anywhere; }
.tag.bad { color: var(--red); background: var(--red-soft); border-color: transparent; }
.sub { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; font-weight: 650; }
.project { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-top: 10px; }
.project-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-weight: 600; }
.cand { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--border); font-size: 13.5px; }
.cand:first-child { border-top: 0; }
.score { font: 600 12px var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--surface-2); }
.score.hi { background: var(--green-soft); color: var(--green); }
@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } }

/* ---- payments / wallet ---- */
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.wallet-wrap { position: relative; }
.wallet-btn { padding: 7px 12px; font-size: 13.5px; font-family: var(--mono); }
.wallet-btn.connected { border-color: var(--accent); color: var(--accent-strong); }
.wallet-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.18); padding: 6px; }
.wallet-menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); padding: 9px 10px; text-align: left; border-radius: 8px; }
.wallet-menu button:hover { background: var(--surface-2); }
.wallet-menu img { width: 22px; height: 22px; border-radius: 5px; }
.wallet-menu p { margin: 6px 8px; font-size: 13px; color: var(--muted); }
.modes { grid-template-columns: repeat(3, 1fr); }
.mode-title em { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.price { color: var(--accent-strong); font-weight: 600; }
.pay-status { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.pay-status.err { color: var(--red); }
.pay-status.ok { color: var(--green); }
@media (max-width: 820px) { .modes { grid-template-columns: 1fr; } }

.mode.unavailable { opacity: .5; cursor: not-allowed; }

/* ---- queue / shared results ---- */
.queue-note, .info-note { list-style: none; padding: 10px 12px; margin-bottom: 8px; border-radius: 8px; font-size: 14px; }
.queue-note { background: var(--yellow-soft); color: var(--yellow); font-weight: 550; }
.info-note { background: var(--accent-soft); color: var(--accent-strong); }
.cached-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; }
.cached-note button { padding: 7px 12px; font-size: 13px; }

/* ---- pages / nav ---- */
.top-left { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 550; padding: 6px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav-count { font: 600 11px var(--mono); background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; }
.page-head { padding: 34px 0 14px; }
.page-head h1 { margin-bottom: 6px; }
.page-head .lede { margin-bottom: 16px; }
.search { width: 100%; max-width: 520px; font: 15px var(--sans); padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); outline: none; }
.search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.list { display: grid; gap: 10px; margin-bottom: 18px; }
.list-more { text-align: center; margin-bottom: 30px; }
.row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.row:hover { border-color: var(--accent); }
.row-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--muted); font-size: 15px; overflow: hidden; }
.row-main { min-width: 0; }
.row-title { font-weight: 650; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.row-ca { font: 12px var(--mono); color: var(--muted); }
.row-side { text-align: right; display: grid; gap: 4px; justify-items: end; }
.row-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.vp { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; white-space: nowrap; text-transform: uppercase; }
.vp-WORKS { background: var(--green-soft); color: var(--green); }
.vp-PARTIALLY_WORKS { background: var(--yellow-soft); color: var(--yellow); }
.vp-DOES_NOT_WORK { background: var(--red-soft); color: var(--red); }
.vp-UNVERIFIABLE, .vp-NONE { background: var(--surface-2); color: var(--muted); }
.mode-pill { font: 600 11px var(--mono); padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.known { margin-top: 16px; padding: 16px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent); }
.known h3 { margin: 0 0 8px; font-size: 15px; }
.known-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px dashed var(--border); font-size: 14px; }
.known-row:first-of-type { border-top: 0; }
.known-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.known a, .known button { font-size: 14px; }
.btn-link { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); text-decoration: none; background: var(--surface); font-weight: 550; }
.btn-link:hover { border-color: var(--accent); }
.btn-link.primary-link { background: var(--accent); color: #fff; border-color: transparent; }
@media (prefers-color-scheme: dark) { .btn-link.primary-link { color: #042f2e; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }
.tab { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.tab.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.token-title { display: flex; gap: 14px; align-items: center; }
.token-title h1 { margin: 0; font-size: clamp(22px, 3.5vw, 30px); }
.token-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
@media (max-width: 640px) {
  .row { grid-template-columns: 36px 1fr; }
  .row-side { grid-column: 2; justify-items: start; text-align: left; display: flex; gap: 8px; flex-wrap: wrap; }
  .row-img { width: 36px; height: 36px; }
  .top-left { gap: 10px; }
}

/* ================================================================
   Monochrome theme (matches the test.it logo: white on black).
   Overrides the earlier palette; colour is only used for meaning
   (verdicts, pass/fail), never for decoration.
   ================================================================ */
:root, :root:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #151515;
  --border: #242424;
  --border-strong: #3d3d3d;
  --text: #f4f4f4;
  --muted: #8a8a8a;
  --accent: #ffffff;
  --accent-strong: #ffffff;
  --accent-soft: #141414;
  --green: #5ccf8a;
  --green-soft: #0d1a12;
  --yellow: #e6c14a;
  --yellow-soft: #1c1708;
  --red: #ee5d5d;
  --red-soft: #1f0d0d;
  --gray-soft: #1a1a1a;
  --shadow: none;
  --radius: 10px;
  --display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI", system-ui, sans-serif;
}

body { background: var(--bg); }
::selection { background: #ffffff; color: #000000; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: #ffffff; }

/* Header + brand */
.top { background: #000; border-bottom-color: var(--border); }
.brand { gap: 9px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.logo-img { width: 30px; height: 30px; display: block; }
.dot-it { color: inherit; }
.nav a.active { background: transparent; color: #fff; box-shadow: inset 0 -2px 0 #fff; border-radius: 0; }
.nav a:hover { background: transparent; color: #fff; }

/* Headlines echo the logo's heavy rounded wordmark */
h1, .page-head h1, .token-title h1 { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; }
.lede { color: var(--muted); }

/* Surfaces: flat, thin borders, no glow */
.form, .panel, .card, .verdict, .row, .claim, .project { background: var(--surface); box-shadow: none; }
.field-label, .panel-title, .card h3, .sub { color: var(--muted); letter-spacing: .08em; }

/* Inputs */
input#ca, .search, #access { background: #000; border-color: var(--border-strong); }
input#ca:focus, .search:focus { border-color: #fff; box-shadow: none; }

/* Mode cards */
.mode-body { background: #000; border-color: var(--border-strong); }
.mode:hover .mode-body { border-color: #6b6b6b; }
.mode input:checked + .mode-body { background: #000; border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.mode input:focus-visible + .mode-body { outline-color: #fff; }
.price { color: var(--text); }

/* Buttons */
button { border-color: var(--border-strong); }
.primary, .btn-link.primary-link { background: #fff; color: #000; border-color: #fff; }
.primary:hover:not(:disabled), .btn-link.primary-link:hover { background: #d9d9d9; filter: none; color: #000; }
.ghost { color: var(--text); }
.ghost:hover, .btn-link:hover { background: var(--surface-2); border-color: #6b6b6b; }
.btn-link { background: transparent; border-color: var(--border-strong); }

/* Header chips: quiet, with a status dot instead of coloured blobs */
.chip { background: transparent; border-color: var(--border); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #555; }
.chip.ok { background: transparent; border-color: var(--border); color: #cfcfcf; }
.chip.ok::before { background: var(--green); }
.chip.warn { background: transparent; border-color: var(--border); color: var(--yellow); }
.chip.warn::before { background: var(--yellow); }

/* Progress + feed */
.step.running .step-icon { border-color: #fff; border-right-color: transparent; }
.step.done .step-icon { background: transparent; color: var(--green); border: 1px solid var(--green); }
.step.error .step-icon { background: transparent; color: var(--red); border: 1px solid var(--red); }
.step.skipped .step-icon { background: transparent; border: 1px solid var(--border-strong); }
.tool-tag, .tool-tag.browser, .tool-tag.code, .tool-tag.github { background: transparent; color: var(--muted); border: 1px solid var(--border-strong); }

/* Notices */
.info-note, .cached-note, .known { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.known h3 { font-family: var(--display); }
.queue-note { background: transparent; border: 1px solid var(--yellow); color: var(--yellow); }
.error { background: transparent; border: 1px solid var(--red); color: var(--red); }

/* Verdicts: outlined, not candy-coloured */
.stamp { background: transparent !important; border-width: 2px; font-family: var(--display); letter-spacing: .02em; }
.vp, .pill, .status { background: transparent !important; border: 1px solid currentColor; }
.vp-UNVERIFIABLE, .vp-NONE, .p-UNVERIFIED, .status.pending { color: var(--muted); }
.mode-pill, .tag, .score { background: transparent; border: 1px solid var(--border-strong); color: var(--muted); }
.tag.bad { background: transparent; border-color: var(--red); color: var(--red); }
.score.hi { background: transparent; border-color: var(--green); color: var(--green); }
.dot.green { background: var(--green); }

/* Lists, tabs, misc */
.row:hover { border-color: #6b6b6b; }
.row-img { background: var(--surface-2); color: #fff; border: 1px solid var(--border-strong); }
.tab { background: transparent; border-color: var(--border-strong); }
.tab.active { background: transparent; border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.linklist a { background: transparent; border-color: var(--border-strong); }
.linklist a:hover { border-color: #fff; }
.log { background: #000; border-color: var(--border); }
.meter { background: var(--surface-2); }
.empty { border-color: var(--border-strong); }
.wallet-btn.connected { border-color: #fff; color: #fff; }
.wallet-menu { background: var(--surface); }
.lightbox { background: rgba(0, 0, 0, .9); }
.foot { color: #5e5e5e; }
