/* ═══════════════════════════════════════════════════════════════
   MAHARO · CONTROL CENTER — app-shell design system
   The site is drawn as the desktop app itself: a window with a title
   bar, menu bar, sidebar, workspace, and a live status bar.
   Arabic-first, dense, quiet. One accent colour. No decoration for
   decoration's sake.
   ═══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --font-ui: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --font-mono: 'Cascadia Code', 'SF Mono', ui-monospace, Consolas, monospace;

  --r-window: 14px;
  --r-panel: 10px;
  --r-ctrl: 7px;
  --r-input: 6px;

  --tb-h: 44px;
  --mb-h: 38px;
  --sb-h: 30px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --desk: #070c0a;
  --bg: #0c1311;
  --panel: #111a17;
  --raised: #17221e;
  --sunken: #0a100e;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #e6efeb;
  --dim: #a3b8b1;
  --faint: #6f857e;
  --accent: #41cfb7;
  --accent-press: #2fb9a2;
  --accent-ink: #04211b;
  --accent-wash: rgba(65, 207, 183, .1);
  --ok: #5bd9a4;
  --warn: #e2b96b;
  --danger: #e8746a;
  --titlebar: #0e1614;
  --titlebar-line: rgba(255, 255, 255, .06);
  --shadow-win: 0 24px 80px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
  --field-bg: #0d1513;
}

:root[data-theme='light'] {
  color-scheme: light;
  --desk: #d6ddd8;
  --bg: #eef2ef;
  --panel: #f6f9f6;
  --raised: #fdfefe;
  --sunken: #e5eae6;
  --line: rgba(18, 33, 28, .11);
  --line-strong: rgba(18, 33, 28, .22);
  --text: #14201c;
  --dim: #52625c;
  --faint: #7f9089;
  --accent: #0b5b55;
  --accent-press: #094b46;
  --accent-ink: #f2fbf9;
  --accent-wash: rgba(11, 91, 85, .08);
  --ok: #0e7d4f;
  --warn: #946e1f;
  --danger: #b3402f;
  --titlebar: #e2e8e4;
  --titlebar-line: rgba(18, 33, 28, .1);
  --shadow-win: 0 24px 70px rgba(20, 40, 34, .28), 0 2px 6px rgba(20, 40, 34, .12);
  --field-bg: #ffffff;
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--desk);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[dir='ltr'] body { letter-spacing: .005em; }

.mono { font-family: var(--font-mono); font-size: .86em; letter-spacing: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

a { color: inherit; }

/* ── The window ─────────────────────────────────────────────── */
.desktop {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(0px, 2.5vw, 34px);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.app {
  width: min(1440px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-window);
  box-shadow: var(--shadow-win);
  overflow: clip;
}

@media (max-width: 760px) {
  .desktop { padding: 0; }
  .app { border-radius: 0; border: none; }
}

/* ── Title bar ──────────────────────────────────────────────── */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--tb-h);
  padding-inline: 14px;
  background: var(--titlebar);
  border-bottom: 1px solid var(--titlebar-line);
  flex: none;
  user-select: none;
}

.titlebar-id { display: flex; align-items: center; gap: 10px; min-width: 0; }

.app-icon {
  width: 22px; height: 16px; flex: none;
  display: inline-flex;
}
.app-icon svg { width: 100%; height: 100%; fill: var(--accent); }

.app-name { font-size: 14px; font-weight: 700; letter-spacing: 0; }

.titlebar-sep {
  width: 1px; height: 14px;
  background: var(--line-strong);
}

.app-view {
  font-size: 12.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar-actions { display: flex; align-items: center; gap: 6px; }

.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  font: 600 11.5px var(--font-mono);
  color: var(--dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-ctrl);
  cursor: pointer;
  transition: color .12s var(--ease), background .12s var(--ease), border-color .12s var(--ease);
}
.tb-btn:hover { color: var(--text); background: var(--accent-wash); border-color: var(--line); }
.tb-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:root[data-theme='dark'] .theme-icon-sun { display: none; }
:root[data-theme='light'] .theme-icon-moon { display: none; }
:root:not([data-theme]) .theme-icon-sun { display: none; }

.win-glyphs {
  display: inline-flex;
  gap: 2px;
  margin-inline-start: 10px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--titlebar-line);
}
.win-glyphs svg { width: 10px; height: 10px; stroke: var(--faint); stroke-width: 1.2; fill: none; }
.win-glyphs svg:last-child:hover { stroke: var(--danger); }

@media (max-width: 760px) { .win-glyphs { display: none; } }

.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 14px; height: 1.6px; background: currentColor; border-radius: 2px; }
.menu-toggle span + span { margin-top: 3.5px; width: 9px; }
@media (max-width: 860px) { .menu-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; } }

/* ── Menu bar ───────────────────────────────────────────────── */
.menubar {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: var(--mb-h);
  padding-inline: 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
}
.menubar::-webkit-scrollbar { display: none; }
.menubar a {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .12s var(--ease);
}
.menubar a:hover { color: var(--text); }
.menubar a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
@media (max-width: 860px) { .menubar { display: none; } }

.mobile-menu {
  display: none;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px 14px;
}
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu a {
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-ctrl);
}
.mobile-menu a:hover { background: var(--accent-wash); }
.mobile-menu[data-open] { display: block; }

/* ── Body grid ──────────────────────────────────────────────── */
.app-body {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
@media (max-width: 1100px) { .app-body { grid-template-columns: minmax(0, 1fr); } }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  border-inline-end: 1px solid var(--line);
  background: var(--panel);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
@media (max-width: 1100px) { .sidebar { display: none; } }

.side-label {
  margin: 0 0 8px;
  padding-inline: 10px;
  font: 600 10.5px var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.side-nav { display: grid; gap: 1px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dim);
  text-decoration: none;
  border-radius: var(--r-ctrl);
  transition: color .12s var(--ease), background .12s var(--ease);
}
.side-nav a i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
  transition: background .12s var(--ease);
}
.side-nav a:hover { color: var(--text); background: var(--accent-wash); }
.side-nav a.is-here { color: var(--accent); background: var(--accent-wash); }
.side-nav a.is-here i { background: var(--accent); }

.side-info { margin: 0; display: grid; gap: 7px; }
.side-info > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
}
.side-info dt { font-size: 12px; color: var(--faint); }
.side-info dd { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }

.api-dot, .sb-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}
.api-dot[data-state='ok'], .sb-dot[data-state='ok'] { background: var(--ok); }
.api-dot[data-state='down'], .sb-dot[data-state='down'] { background: var(--danger); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.side-foot a {
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--faint);
  text-decoration: none;
  border-radius: var(--r-ctrl);
}
.side-foot a:hover { color: var(--text); background: var(--accent-wash); }

/* ── Workspace ──────────────────────────────────────────────── */
.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Download board ─────────────────────────────────────────── */
.board {
  padding: clamp(34px, 5vw, 64px) clamp(20px, 4.5vw, 60px) clamp(28px, 4vw, 48px);
  background:
    linear-gradient(180deg, var(--accent-wash) 0%, transparent 340px),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.board h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  max-width: 22ch;
}

.board-sub {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--dim);
}

.installers {
  margin-top: clamp(26px, 3vw, 40px);
  display: grid;
  gap: 12px;
}

.installer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  transition: border-color .15s var(--ease);
}
.installer:hover { border-color: var(--line-strong); }

.installer-id { display: flex; align-items: center; gap: 16px; min-width: 0; }

.installer-glyph {
  width: 44px; height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-wash);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
}
.installer-glyph svg { width: 22px; height: 22px; fill: var(--accent); }

.installer h2 { margin: 0; font-size: 17px; font-weight: 700; }
.installer-meta {
  margin: 3px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 12.5px;
  color: var(--faint);
}
.installer-meta .mono { color: var(--dim); }

.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); align-self: center; }

.installer-side { grid-row: span 2; }

.installer-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--faint);
}

.hash-chip {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: var(--faint);
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: copy;
  transition: color .12s var(--ease), border-color .12s var(--ease);
}
.hash-chip span { font-family: var(--font-ui); font-weight: 500; }
.hash-chip:hover { color: var(--dim); border-color: var(--line-strong); }
.hash-chip[data-copied] { color: var(--ok); border-color: var(--ok); }

.board-note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--faint);
  max-width: 70ch;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-ctrl);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease), transform .06s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-block { width: 100%; }

.inline-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.inline-link:hover { border-bottom-color: var(--accent); }

.text-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
}
.text-link:hover { text-decoration-color: var(--accent); }
.text-link:disabled { color: var(--faint); cursor: default; }

/* ── Panels ─────────────────────────────────────────────────── */
.panel {
  padding: clamp(30px, 3.6vw, 48px) clamp(20px, 4.5vw, 60px);
  border-bottom: 1px solid var(--line);
}
.panel:last-of-type { border-bottom: none; }

.panel-head { margin-bottom: clamp(18px, 2.4vw, 28px); max-width: 64ch; }
.panel h2 { margin: 0; font-size: clamp(21px, 2.2vw, 27px); font-weight: 700; }
.panel-sub { margin: 6px 0 0; color: var(--dim); font-size: 14px; }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.steps li {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.step-no {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  padding-top: 3px;
}
.steps h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; }
.steps p { margin: 0; font-size: 13.5px; color: var(--dim); }

/* Feature ledger */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}
.ledger li:last-child { border-bottom: none; }
.ledger-key {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-align: end;
  padding-top: 3px;
}
html[dir='ltr'] .ledger-key { text-align: start; }
.ledger h3 { margin: 0 0 3px; font-size: 15.5px; font-weight: 700; }
.ledger p { margin: 0; font-size: 13.5px; color: var(--dim); max-width: 72ch; }
@media (max-width: 620px) {
  .ledger li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* Spec table */
.table-wrap { overflow-x: auto; }
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec caption {
  caption-side: top;
  text-align: start;
  padding: 0 0 10px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--faint);
}
.spec th, .spec td {
  text-align: start;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: none; }
.spec th { font-weight: 700; white-space: nowrap; color: var(--text); width: 1%; }
.spec td { color: var(--dim); }

/* FAQ */
.faq { display: grid; gap: 8px; max-width: 860px; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  overflow: clip;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 9px; height: 9px;
  border-inline-end: 1.7px solid var(--faint);
  border-bottom: 1.7px solid var(--faint);
  transform: rotate(45deg);
  transition: transform .15s var(--ease);
  margin-inline-start: auto;
}
html[dir='rtl'] .faq summary::after { transform: rotate(-45deg); }
.faq details[open] summary::after { transform: rotate(135deg); }
html[dir='rtl'] .faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 18px 16px; font-size: 13.5px; color: var(--dim); max-width: 70ch; }

/* Cert form */
.cert-form { max-width: 560px; }
.cert-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--faint); }
.cert-row { display: flex; gap: 10px; }
.cert-row input { flex: 1; min-width: 0; }
.field-hint { margin: 10px 0 0; font-size: 12px; color: var(--faint); }

/* ── Inputs ─────────────────────────────────────────────────── */
input[type='text'], input[type='tel'], input[type='password'] {
  height: 40px;
  padding: 0 13px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
input::placeholder { color: var(--faint); }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

/* ── Status bar ─────────────────────────────────────────────── */
.statusbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--sb-h);
  padding-inline: 14px;
  background: var(--titlebar);
  border-top: 1px solid var(--titlebar-line);
  font-size: 11.5px;
  color: var(--faint);
  flex: none;
  user-select: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.statusbar::-webkit-scrollbar { display: none; }
.statusbar .mono { font-size: 11px; }

.sb-group { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.sb-group svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.sb-group.grow { flex: 1; min-width: 12px; }
.sb-sep { width: 1px; height: 11px; background: var(--titlebar-line); }

/* ── Dialog ─────────────────────────────────────────────────── */
.dlg {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-panel);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-win);
}
.dlg::backdrop { background: rgba(4, 8, 7, .62); backdrop-filter: blur(3px); }

.dlg-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-ctrl);
  cursor: pointer;
  transition: color .12s var(--ease), background .12s var(--ease);
}
.dlg-close:hover { color: var(--text); background: var(--accent-wash); }

.download-form { padding: 26px 26px 24px; }

.dlg h2 { margin: 10px 0 6px; font-size: 21px; font-weight: 700; }
.dlg-copy { margin: 0 0 18px; font-size: 13.5px; color: var(--dim); line-height: 1.8; }

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  margin-bottom: 18px;
}
.mode-tab {
  height: 32px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: color .12s var(--ease), background .12s var(--ease);
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active { color: var(--accent-ink); background: var(--accent); }
:root[data-theme='light'] .mode-tab.active { color: var(--accent-ink); }

form[data-download-login-form], form[data-verify-form] { display: grid; gap: 14px; }

form label { font-size: 12.5px; font-weight: 600; color: var(--dim); display: block; margin-bottom: 6px; }
form label small { font-weight: 500; color: var(--faint); }

form input { width: 100%; }

.phone-field { position: relative; display: flex; gap: 8px; }
.phone-field input { flex: 1; min-width: 0; }

.country-trigger {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 11px;
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s var(--ease);
}
.country-trigger:hover { border-color: var(--accent); }
.ctry-flag { display: inline-flex; line-height: 0; }
.ctry-flag .fi { display: block; border-radius: 2px; outline: 1px solid var(--line-strong); }
.ctry-arrow { width: 9px; height: 6px; fill: none; stroke: var(--faint); }

.country-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 30;
  width: 280px;
  max-height: 290px;
  overflow: hidden auto;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctrl);
  box-shadow: var(--shadow-win);
  padding: 6px;
}

.ctry-search {
  width: 100%;
  margin-bottom: 6px;
  height: 34px;
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}
.ctry-list { display: grid; gap: 1px; }

.ctry-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  font-size: 13px;
  border-radius: 5px;
  cursor: pointer;
}
.ctry-option:hover, .ctry-option:focus-visible { background: var(--accent-wash); outline: none; }
.ctry-option[aria-selected='true'] { background: var(--accent-wash); }
.ctry-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctry-dial { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.ctry-divider { height: 1px; background: var(--line); margin: 5px 2px; }

.form-error {
  margin: 0;
  padding: 10px 13px;
  font-size: 13px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  border-radius: var(--r-input);
}

.spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  display: none;
}
.download-submit.busy .spinner { display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-footnote { margin: 2px 0 0; font-size: 12px; color: var(--faint); text-align: center; }

/* ── Public pages skin (verify / privacy / terms) ───────────── */
.public-page { background: var(--desk); }
.public-page .app-view { font-size: 12.5px; }

.public-page-main {
  min-height: calc(100vh - 220px);
  padding: clamp(34px, 5vw, 70px) clamp(20px, 5vw, 60px);
}

.public-page-kicker {
  margin: 0 0 10px;
  font: 600 11px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.public-page-title { margin: 0 0 10px; font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; line-height: 1.3; }
.public-page-intro { margin: 0; max-width: 62ch; color: var(--dim); font-size: 15px; }

.verify-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
  max-width: 1160px;
  margin-inline: auto;
}
@media (max-width: 960px) { .verify-layout { grid-template-columns: minmax(0, 1fr); } }

.verify-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  padding: clamp(18px, 3vw, 30px);
}
.verify-form label { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--dim); }
.verify-input-row { display: flex; gap: 10px; }
.verify-input-row input { flex: 1; min-width: 0; }
.verify-hint { margin: 10px 0 0; font-size: 12px; color: var(--faint); }

.verify-empty {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-ctrl);
  color: var(--faint);
  font-size: 13px;
}
.verify-empty svg { width: 26px; height: 26px; fill: none; stroke: var(--faint); stroke-width: 1.5; margin-bottom: 8px; }
.verify-empty p { margin: 0; }

.verify-status {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  background: var(--raised);
}
.verify-status-mark { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); }
.verify-result[data-state='valid'] .verify-status-mark { background: var(--ok); }
.verify-result[data-state='revoked'] .verify-status-mark,
.verify-result[data-state='invalid'] .verify-status-mark { background: var(--danger); }
.verify-status-copy strong { display: block; font-size: 14.5px; }
.verify-status-copy span { display: block; font-size: 12.5px; color: var(--dim); }

.certificate-facts {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.certificate-facts > div {
  padding: 11px 13px;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
}
.certificate-facts dt { font-size: 11.5px; color: var(--faint); }
.certificate-facts dd { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; }

.doc-page { max-width: 760px; margin-inline: auto; }
.doc-page h2 { margin: 34px 0 10px; font-size: 19px; font-weight: 700; }
.doc-page h3 { margin: 24px 0 8px; font-size: 15.5px; font-weight: 700; }
.doc-page p, .doc-page li { color: var(--dim); font-size: 14px; }
.doc-page p { margin: 0 0 12px; }
.doc-page ul, .doc-page ol { padding-inline-start: 22px; margin: 0 0 12px; }
.doc-page li { margin-bottom: 6px; }
.doc-page strong { color: var(--text); }

/* ── Motion discipline ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
