/* ==========================================================================
   Online Checkers — application stylesheet

   A single hand-written sheet, no framework. Layout is CSS grid/flex, colour
   comes from custom properties so a dark scheme is a variable swap rather
   than a second set of rules.
   ========================================================================== */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --border: #e3e6ec;
  --border-strong: #cfd4de;

  --text: #16181d;
  --text-soft: #5b6472;
  --text-faint: #8a94a4;

  --accent: #2f5cff;
  --accent-dark: #2247d6;
  --accent-soft: #eaefff;

  --ok: #12805c;
  --ok-soft: #e2f6ee;
  --warn: #9a6207;
  --warn-soft: #fdf3e0;
  --danger: #c0342b;
  --danger-soft: #fdecea;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 12px rgba(16, 24, 40, 0.05);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --surface-2: #1e232b;
    --border: #272d36;
    --border-strong: #39414d;

    --text: #e8ebf0;
    --text-soft: #9aa4b2;
    --text-faint: #6b7583;

    --accent: #6b8bff;
    --accent-dark: #5878f0;
    --accent-soft: #1b2440;

    --ok: #43c495;
    --ok-soft: #10291f;
    --warn: #e0a33c;
    --warn-soft: #2a2113;
    --danger: #f0736a;
    --danger-soft: #2c1715;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.65rem; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; letter-spacing: -0.01em; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }

code, kbd, pre { font-family: var(--mono); font-size: .875em; }
pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
}
code:not(pre code) {
  background: var(--surface-2);
  border-radius: 4px;
  padding: .12em .38em;
}

/* --------------------------------------------------------------- header -- */

.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 680; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  border-radius: 7px;
  font-size: .72rem; font-weight: 750; letter-spacing: .02em;
}
.brand-text { white-space: nowrap; }

.main-nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.main-nav a {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 500;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.main-nav a.is-active { background: var(--accent-soft); color: var(--accent); }

.head-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.balance-pill {
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  font-size: .875rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid transparent;
}
.balance-pill:hover { text-decoration: none; border-color: var(--ok); }

/* Telegram admin contact in the header (user panel). */
.tg-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #e4e4e7);
  color: inherit;
  font-size: .875rem;
}
.tg-contact img { display: block; }
.tg-contact:hover { text-decoration: none; border-color: #229ed9; }
@media (max-width: 640px) { .tg-contact-label { display: none; } }

/* Dropdown built on <details> — no JavaScript required. */
.menu { position: relative; }
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: .875rem;
  font-weight: 550;
  user-select: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--surface-2); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: 50;
}
.menu-panel a, .menu-panel .linklike {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .875rem;
  text-align: left;
}
.menu-panel a:hover, .menu-panel .linklike:hover { background: var(--surface-2); text-decoration: none; }

.linklike {
  background: none; border: 0; width: 100%;
  font: inherit; color: inherit; cursor: pointer;
}

/* ----------------------------------------------------------------- main -- */

.site-main { flex: 1; padding: 28px 0 56px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head h1 { margin-bottom: .15em; }
.page-head .sub { color: var(--text-soft); margin: 0; font-size: .925rem; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.site-foot {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
  font-size: .85rem;
  color: var(--text-faint);
}
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 16px; }
.site-foot a { color: var(--text-soft); }

/* ---------------------------------------------------------------- cards -- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card > :last-child { margin-bottom: 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: -20px -20px 18px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .hint { font-size: .85rem; color: var(--text-soft); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- stats -- */

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-label {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 1.6rem;
  font-weight: 660;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-sub { font-size: .82rem; color: var(--text-soft); margin-top: 2px; }
.stat-value.ok { color: var(--ok); }
.stat-value.danger { color: var(--danger); }
.stat-value.accent { color: var(--accent); }

/* ---------------------------------------------------------------- forms -- */

.field { margin-bottom: 16px; }
.field label, .label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.field .help { font-size: .8rem; color: var(--text-soft); margin: 4px 0 0; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], select, textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: .925rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] {
  border-color: var(--danger);
}
textarea { resize: vertical; min-height: 120px; font-family: var(--mono); font-size: .85rem; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }

.field-error { color: var(--danger); font-size: .82rem; margin-top: 5px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.check-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 8px; }
.check-row input[type=checkbox], .check-row input[type=radio] { margin-top: 3px; flex: none; }
.check-row label { margin: 0; font-weight: 500; }

/* --------------------------------------------------------------- button -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  font: inherit;
  font-size: .9rem;
  font-weight: 570;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.93); }

.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------- tables -- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td {
  padding: 9px 13px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  background: var(--surface-2);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-soft);
  font-weight: 650;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: var(--mono); font-size: .82rem; }
td.nowrap, th.nowrap { white-space: nowrap; }

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
}
.empty p { margin: 0 0 12px; }

/* --------------------------------------------------------------- badges -- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 620;
  letter-spacing: .01em;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--text-soft);
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-no { background: var(--surface-2); color: var(--text-soft); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.dot-ok { background: var(--ok); }
.dot-run { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.dot-idle { background: var(--text-faint); }
.dot-danger { background: var(--danger); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .dot-run { animation: none; }
  * { transition: none !important; }
}

/* --------------------------------------------------------------- alerts -- */

.alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 16px;
  font-size: .9rem;
}
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: currentColor; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: currentColor; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: currentColor; }
.alert-info { background: var(--accent-soft); color: var(--accent); border-color: currentColor; }
.alert > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- progress -- */

.progress {
  height: 9px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-bar.is-done { background: var(--ok); }
.progress-bar.is-failed { background: var(--danger); }

/* --------------------------------------------------------------- result -- */

.result-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 16px;
}
.result-hero.is-hit { background: var(--ok-soft); border-color: var(--ok); }
.result-hero.is-miss { background: var(--surface-2); }
.result-hero.is-error { background: var(--danger-soft); border-color: var(--danger); }
.result-hero.is-warn { background: var(--surface-2); border-color: #d97706; }
.result-icon { font-size: 1.9rem; line-height: 1; }
.result-title { font-size: 1.05rem; font-weight: 650; margin: 0; }
.result-meta { font-size: .875rem; color: var(--text-soft); margin: 2px 0 0; }

.result-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 0;
}
.result-extra div {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.result-extra dt {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  font-weight: 620;
}
.result-extra dd { margin: 2px 0 0; font-weight: 550; word-break: break-word; }

.avatar-thumb {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* Compact avatar + full-detail chips in table rows (history, live batches) */
.svc-avatar {
  width: 28px; height: 28px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
  vertical-align: middle;
  margin-right: 6px;
  flex: none;
}
.detail-line { display: flex; align-items: center; min-width: 0; }
.detail-error { color: #dc2626; font-weight: 550; }
.smaller { font-size: .72rem; }

/* ----------------------------------------------------------------- auth -- */

.auth-shell {
  max-width: 420px;
  margin: 40px auto;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.4rem; margin-bottom: .2em; }
.auth-card .sub { color: var(--text-soft); font-size: .9rem; margin-bottom: 22px; }
.auth-alt { text-align: center; margin: 18px 0 0; font-size: .9rem; color: var(--text-soft); }
.auth-alt-split { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.captcha-row { display: flex; gap: 12px; align-items: flex-start; }
.captcha-row .captcha-input { flex: 1; }
.captcha-box {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f4f4f5;
  line-height: 0;
  flex: none;
}
.captcha-box img { display: block; width: 180px; height: 60px; }
.captcha-reload {
  display: block;
  width: 100%;
  padding: 3px;
  font-size: .74rem;
  text-align: center;
  border: 0;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}
.captcha-reload:hover { background: var(--border); color: var(--text); }

/* ----------------------------------------------------------- pagination -- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  font-size: .875rem;
}
.pagination .disabled { color: var(--text-faint); }
.pagination .page-info { color: var(--text-soft); }

/* --------------------------------------------------------------- filter -- */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar .field { margin: 0; flex: 1; min-width: 130px; }
.filter-bar .field label { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }

/* ----------------------------------------------------- service selector -- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.service-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .875rem;
  transition: border-color .12s, background .12s;
}
.service-opt:hover { border-color: var(--accent); }
.service-opt input { flex: none; margin: 0; }
.service-opt .svc-name { flex: 1; font-weight: 550; }
.service-opt .svc-price {
  font-variant-numeric: tabular-nums;
  font-size: .8rem;
  color: var(--text-soft);
}
.service-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.selector-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.selector-tools .spacer { flex: 1; }

/* --------------------------------------------------------------- misc  -- */

.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.nums { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.key-reveal {
  font-family: var(--mono);
  font-size: .875rem;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  word-break: break-all;
  user-select: all;
}

.inline-form { display: inline; }

/* ------------------------------------------------------------- landing -- */

.hero { padding: 56px 0 44px; text-align: center; }
.hero-badge { margin: 0 0 16px; }
h1 .badge { vertical-align: middle; margin-left: 10px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  letter-spacing: -0.03em;
  margin-bottom: .3em;
}
.hero p.lede {
  font-size: 1.075rem;
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto 26px;
}
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}
.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 550;
  color: var(--text-soft);
}

/* Service brand icons (public/img/services) */
.svc-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 5px;
  flex: none;
}
.logo-chip .svc-icon { margin-right: 0; }
.service-opt { display: flex; align-items: center; }
.service-opt .svc-icon { margin-right: 6px; }
.service-opt .svc-name { flex: 1; }

.feature { padding: 20px; }
.feature h3 { margin-bottom: .35em; }
.feature p { color: var(--text-soft); font-size: .9rem; margin: 0; }
.feature-icon { font-size: 1.5rem; margin-bottom: 8px; }

@media (max-width: 720px) {
  .site-head .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; }
  .head-right { order: 2; }
  .truncate { max-width: 150px; }
}

/* Service picker — icon dropdown on the single check form */
.service-picker { position: relative; }
.service-picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.service-picker-btn[aria-invalid="true"] { border-color: #dc2626; }
.service-picker-panel {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  padding: 4px;
}
.service-picker-panel.is-open { display: block; }
.sp-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: none;
  border: 0;
  border-radius: 6px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.sp-option:hover { background: rgba(127, 127, 127, .12); }
.sp-option.is-selected { background: rgba(59, 130, 246, .16); }
.sp-name { flex: 1; font-weight: 550; }
.sp-meta { font-size: .78rem; color: var(--text-soft); white-space: nowrap; }
.sp-caret { color: var(--text-soft); font-size: .8rem; }

/* Submit feedback for slow forms (single check, bulk preview/confirm) */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 7px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn[disabled] { opacity: .65; cursor: not-allowed; }
.form-status {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-soft);
}
.form-status[hidden] { display: none; }
.form-status strong { color: var(--text); }

/* ----------------------------------------------------------------- docs -- */

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.docs-toc {
  position: sticky;
  top: 72px; /* sticky site-head (60px) + breathing room */
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  font-size: .9rem;
}
.toc-title {
  font-size: .75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.docs-toc nav {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}
.docs-toc nav a {
  padding: 5px 12px;
  color: var(--text-soft);
  border-left: 2px solid transparent;
  margin-left: -1px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.docs-toc nav a:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
}
.docs-toc nav a.sub { padding-left: 26px; font-size: .84rem; }
.toc-count { color: var(--text-faint); font-size: .78rem; }
.docs-body { min-width: 0; }
.docs-body [id] { scroll-margin-top: 76px; }
.shape-block { padding-top: 6px; border-top: 1px dashed var(--border); }
.shape-block:first-of-type { border-top: 0; padding-top: 0; }
.svc-search { width: 100%; margin-bottom: 12px; }
.svc-group td {
  background: var(--surface-2);
  font-weight: 650;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-soft);
}
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; max-height: none; margin-bottom: 4px; }
  .docs-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px; border-left: 0; }
  .docs-toc nav a {
    border-left: 0; margin-left: 0;
    border: 1px solid var(--border); border-radius: 999px;
    padding: 3px 10px;
  }
  .docs-toc nav a.sub { padding-left: 10px; }
}

/* ---------------------------------------------------------------- tabs --- */
.tabs-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: .9rem;
  font-weight: 550;
  cursor: pointer;
}
.tab-btn:hover { color: var(--text); background: var(--surface-2); }
.tab-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tab-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 650;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
