/* Vexora BLE Reader — design tokens taken from the Vexora main site (vexorium.pages.dev). */

@font-face { font-family: Montserrat; src: url(./assets/montserrat-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url(./assets/montserrat-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Montserrat; src: url(./assets/montserrat-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  --bg: #0e0e10;
  --panel: #151518;
  --panel-2: #1b1b1f;
  --sunken: #121215;
  --line: #26262b;
  --line-2: #34343b;
  --text: #f2f2f4;
  --muted: #9d9da7;
  --muted-2: #73737d;
  --fg: #0e0e10;

  /* Brand accent of the main site. Used only for waiting/attention states. */
  --wait: #d9a50f;
  --ok: #5fb37d;
  --err: #e0706e;

  --sans: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --mark: url(./assets/vexora-mark.png);

  --radius: 10px;
  --wrap: 780px;
  --pad: 20px;
}

@media (max-width: 480px) { :root { --pad: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(1100px 460px at 50% -10%, #1c1c24 0%, rgba(28,28,36,0) 62%);
  background-repeat: no-repeat;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

[hidden] { display: none !important; }

code, kbd, samp, pre, textarea { font-family: var(--mono); }
code { font-size: .92em; color: var(--text); background: var(--sunken); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

a { color: var(--text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }

.skiplink {
  position: absolute; left: var(--pad); top: -200px; z-index: 50;
  background: var(--text); color: var(--fg); font-size: 13px; font-weight: 600;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skiplink:focus { top: 10px; }

/* ── Topbar ─────────────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(14,14,16,.82);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}
.topbar-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad);
  min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.mk { width: 22px; height: 22px; flex: 0 0 auto; background: var(--mark) center / contain no-repeat; }
.brand-text { display: flex; align-items: baseline; gap: 9px; }
.brand-text b { font-size: 12.5px; font-weight: 700; letter-spacing: .28em; }
.brand-text span { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 420px) { .brand-text span { display: none; } }

.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: var(--muted-2); box-shadow: 0 0 0 3px rgba(255,255,255,.04); }
.conn[data-state="busy"] .conn-dot { background: var(--wait); }
.conn[data-state="linked"] .conn-dot { background: var(--wait); }
.conn[data-state="ready"] .conn-dot { background: var(--ok); }
.conn[data-state="ready"] .conn-label,
.conn[data-state="busy"] .conn-label { color: var(--text); }

/* ── Stepper ────────────────────────────────────────────────────── */

.stepper { border-bottom: 1px solid var(--line); background: rgba(14,14,16,.6); }
.stepper-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad);
  display: flex; list-style: none;
}
.stepper-in li { flex: 1 1 0; min-width: 0; }

.stepdot {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  font: inherit; font-size: 12.5px; color: var(--muted-2); cursor: pointer;
  padding: 6px 4px; transition: color .15s ease, border-color .15s ease;
}
.stepdot:hover { color: var(--text); }
.stepdot .n {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid var(--line-2); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.stepdot .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepdot[data-done="1"] { color: var(--muted); }
.stepdot[data-done="1"] .n { border-color: var(--muted); color: var(--muted); }
.stepdot[aria-current="step"] { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.stepdot[aria-current="step"] .n { background: var(--text); border-color: var(--text); color: var(--fg); }

.stepper-now {
  display: none; max-width: var(--wrap); margin: 0 auto;
  padding: 0 var(--pad) 10px; font-size: 12px; color: var(--muted);
}
@media (max-width: 720px) {
  .stepdot .t { display: none; }
  .stepdot { min-height: 48px; }
  .stepper-now { display: block; }
}

/* ── Layout ─────────────────────────────────────────────────────── */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.step { padding: 34px 0 10px; }
.step:focus { outline: none; }

.eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); }
h1 { font-size: clamp(1.5rem, 5.5vw, 1.95rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-top: 8px; }
.lead { color: var(--muted); margin-top: 8px; max-width: 62ch; }

.block { border-top: 1px solid var(--line); padding: 22px 0 4px; margin-top: 24px; }
.block > * + * { margin-top: 12px; }
h2 { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.step p { max-width: 68ch; }
.note { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted-2); font-size: 12px; margin-top: 6px; }

ul.plain, ol.steps { padding-left: 1.15em; color: var(--muted); font-size: 13.5px; }
ul.plain li, ol.steps li { margin-top: 6px; }
ul.plain li::marker { color: var(--muted-2); }
ol.steps li::marker { color: var(--muted-2); font-weight: 600; }

/* ── Form controls ──────────────────────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 14px 18px; } }

.field { min-width: 0; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }

input[type="text"], input:not([type]), select, textarea {
  width: 100%; min-height: 44px;
  background: var(--sunken); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font: inherit; font-size: 14px;
  transition: border-color .15s ease;
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover { border-color: var(--line-2); }
input:disabled, select:disabled { color: var(--muted); cursor: not-allowed; background: #0f0f12; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239d9da7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px;
}
select option { background: var(--panel); color: var(--text); }

/* Native file inputs render an English, unstyleable button label. The real
   input stays in the DOM and keeps keyboard focus; only its box is hidden. */
.filefield { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
input.file-input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 20px; border-radius: 999px;
  background: transparent; color: var(--text); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.file-btn:hover { background: var(--panel-2); border-color: #43434c; }
.filefield:focus-within .file-btn { outline: 2px solid var(--text); outline-offset: 2px; }
.file-name { font-size: 13px; color: var(--muted); min-width: 0; word-break: break-word; }

textarea { min-height: 220px; font-size: 12px; line-height: 1.55; resize: vertical; }

.consentbox {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); padding: 14px 16px;
}
.consentbox input[type="checkbox"] {
  appearance: none; flex: 0 0 auto; width: 24px; height: 24px; margin-top: 0;
  border: 1px solid var(--line-2); border-radius: 5px; background: var(--sunken); cursor: pointer;
}
.consentbox input[type="checkbox"]:checked {
  background: var(--text); border-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230e0e10' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 18px;
}
.consentbox label { font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ── Buttons ────────────────────────────────────────────────────── */

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 13.5px; line-height: 20px;
  padding: 11px 20px; min-height: 44px; border-radius: 999px;
  background: var(--text); color: var(--fg); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:not(:disabled):hover { background: #e4e4e7; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:not(:disabled):hover { background: var(--panel-2); border-color: #43434c; }
.btn:disabled { opacity: .42; cursor: not-allowed; }

.stepnav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); margin-top: 28px; padding: 20px 0 40px;
}
@media (max-width: 480px) {
  .stepnav { flex-direction: column-reverse; align-items: stretch; }
  .stepnav .btn { width: 100%; }
  .stepnav > span { display: none; }
}

/* ── Status, callout ────────────────────────────────────────────── */

.status {
  position: relative; display: block; padding-left: 24px;
  font-size: 13px; color: var(--muted); min-height: 20px;
}
.status::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px;
  background: center / 15px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2373737d' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M8 5.2v.1M8 7.4v3.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
.status.ok { color: var(--ok); }
.status.ok::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235fb37d' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.2' stroke-width='1.4'/%3E%3Cpath d='M5 8.2 7.2 10.4 11 5.9'/%3E%3C/svg%3E");
}
.status.err { color: var(--err); }
.status.err::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e0706e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 1.9 15 14.1H1z'/%3E%3Cpath d='M8 6.1v3.2M8 11.6v.1' stroke-width='1.8'/%3E%3C/svg%3E");
}

.callout {
  border: 1px solid rgba(217,165,15,.38);
  background: rgba(217,165,15,.07);
  border-radius: var(--radius);
  padding: 12px 14px 12px 40px; font-size: 13.5px; color: var(--text);
  position: relative;
}
.callout::before {
  content: ""; position: absolute; left: 14px; top: 14px; width: 16px; height: 16px;
  background: center / 16px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23d9a50f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3Cpath d='M8 4.6v4.2M8 11.3v.1' stroke-width='1.8'/%3E%3C/svg%3E");
}

/* ── Register table ─────────────────────────────────────────────── */

.regs { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13.5px; }
.regs th, .regs td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.regs thead th { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding-bottom: 8px; }
.regs tbody th { font-weight: 400; white-space: nowrap; }
.regs th:first-child { width: 110px; }
.regs th:nth-child(2), .regs td:nth-child(2) { width: 110px; }
.regs td { color: var(--muted); }
.regs tbody tr:last-child th, .regs tbody tr:last-child td { border-bottom: 0; }

/* ── Read progress ──────────────────────────────────────────────── */

.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; }
.progress li { display: flex; align-items: center; gap: 8px; color: var(--muted-2); }
.progress li::before {
  content: ""; width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid var(--line-2); background: center / 14px no-repeat;
}
.progress li[data-state="active"] { color: var(--text); }
.progress li[data-state="active"]::before { border-color: var(--wait); background-color: rgba(217,165,15,.18); }
.progress li[data-state="ok"] { color: var(--text); }
.progress li[data-state="ok"]::before {
  border-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235fb37d' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.2' stroke-width='1.4'/%3E%3Cpath d='M5 8.2 7.2 10.4 11 5.9'/%3E%3C/svg%3E");
}
.progress li[data-state="fail"] { color: var(--muted); }
.progress li[data-state="fail"]::before {
  border-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e0706e' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.2' stroke-width='1.4'/%3E%3Cpath d='M5.6 5.6 10.4 10.4M10.4 5.6 5.6 10.4'/%3E%3C/svg%3E");
}
.progress .pn { font-family: var(--mono); font-size: 12px; }
.progress .pt { color: inherit; }

/* ── Key/value lists and flags ──────────────────────────────────── */

.kvlist { border-top: 1px solid var(--line); margin-top: 14px; }
.kv {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 620px) { .kv { grid-template-columns: 190px 1fr; gap: 16px; align-items: baseline; } }
.kv b { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.kv code { display: block; background: none; border: 0; padding: 0; font-size: 12.5px; line-height: 1.55; color: var(--text); word-break: break-word; }
.kv code.muted { color: var(--muted); }
/* file names must not be shouted in caps */
.kvlist.files .kv b { text-transform: none; letter-spacing: .01em; font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); }

.flags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; font-size: 12px; }
.flag { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-2); font-family: var(--mono); }
.flag::before {
  content: ""; width: 13px; height: 13px; flex: 0 0 auto; background: center / 13px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2373737d' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.2' stroke-width='1.3'/%3E%3Cpath d='M5.6 5.6 10.4 10.4M10.4 5.6 5.6 10.4'/%3E%3C/svg%3E");
}
.flag.is-ok { color: var(--text); }
.flag.is-ok::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235fb37d' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.2' stroke-width='1.3'/%3E%3Cpath d='M5 8.2 7.2 10.4 11 5.9'/%3E%3C/svg%3E");
}

/* ── Checklist (step 5) ─────────────────────────────────────────── */

.checklist { list-style: none; border-top: 1px solid var(--line); }
.checklist li {
  position: relative; padding: 11px 0 11px 26px; border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 15px; height: 15px;
  background: center / 15px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2373737d' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3C/svg%3E");
}
.checklist li.is-ok { color: var(--text); }
.checklist li.is-ok::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235fb37d' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.2' stroke-width='1.4'/%3E%3Cpath d='M5 8.2 7.2 10.4 11 5.9'/%3E%3C/svg%3E");
}
.checklist li.is-missing { color: var(--text); }
.checklist li.is-missing::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23d9a50f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3Cpath d='M8 4.6v4.2M8 11.3v.1' stroke-width='1.8'/%3E%3C/svg%3E");
}
.checklist .where { display: block; font-size: 12px; color: var(--muted-2); }

/* ── Disclosure ─────────────────────────────────────────────────── */

.disclosure { border-top: 1px solid var(--line); margin-top: 24px; }
.disclosure summary {
  list-style: none; cursor: pointer; position: relative;
  min-height: 48px; display: flex; align-items: center; gap: 10px;
  padding: 12px 0 12px 24px; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:hover { color: var(--text); }
.disclosure summary::before {
  content: ""; position: absolute; left: 1px; width: 14px; height: 14px;
  background: center / 14px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239d9da7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5 10.5 8 6 12.5'/%3E%3C/svg%3E");
  transition: transform .15s ease;
}
.disclosure[open] > summary { color: var(--text); }
.disclosure[open] > summary::before { transform: rotate(90deg); }
.disclosure-body { padding: 4px 0 22px; }
.disclosure-body > * + * { margin-top: 14px; }

pre {
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; font-size: 12px; line-height: 1.5; color: var(--muted);
  white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto;
  min-height: 60px;
}

/* ── Footer ─────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); margin-top: 20px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 26px var(--pad) 44px; display: flex; flex-direction: column; gap: 12px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand .mk { width: 16px; height: 16px; }
.foot-brand b { font-size: 10.5px; letter-spacing: .28em; font-weight: 700; }
.legal { color: var(--muted-2); font-size: 11.5px; line-height: 1.65; max-width: 70ch; }

/* ── Motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root { --line: #45454d; --line-2: #5c5c66; --muted: #c2c2cb; --muted-2: #a0a0aa; }
}
