/* XR Adoption Readiness — shared styles */
:root {
  --bg: #0a0f1d;
  --bg-2: #0e1528;
  --surface: #121a30;
  --surface-2: #18223d;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.34);
  --text: #e8edf5;
  --muted: #9aa7b8;
  --accent: #7aa2ff;
  --accent-ink: #0a0f1d;
  --accent-soft: rgba(122, 162, 255, 0.14);
  --teal: #3ad7a5;
  --high: #3ad7a5;
  --high-soft: rgba(58, 215, 165, 0.14);
  --med: #f5b544;
  --med-soft: rgba(245, 181, 68, 0.14);
  --low: #ff7a7a;
  --low-soft: rgba(255, 122, 122, 0.14);
  --ev-data: #3ad7a5;
  --ev-weak: #f5b544;
  --ev-plan: #a5b4fc;
  --shadow: 0 18px 40px rgba(2, 6, 18, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs: 1rem;
  --lh: 1.55;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f7fb;
    --bg-2: #eef2f8;
    --surface: #ffffff;
    --surface-2: #f3f6fb;
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 23, 42, 0.22);
    --text: #0f172a;
    --muted: #556274;
    --accent: #2f5fe0;
    --accent-ink: #ffffff;
    --accent-soft: rgba(47, 95, 224, 0.10);
    --teal: #0e9f75;
    --high: #0e8f69;
    --high-soft: rgba(14, 143, 105, 0.10);
    --med: #b26b00;
    --med-soft: rgba(178, 107, 0, 0.10);
    --low: #c93434;
    --low-soft: rgba(201, 52, 52, 0.09);
    --ev-data: #0e8f69;
    --ev-weak: #a86400;
    --ev-plan: #4f46e5;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.22);
  --text: #0f172a;
  --muted: #556274;
  --accent: #2f5fe0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(47, 95, 224, 0.10);
  --teal: #0e9f75;
  --high: #0e8f69;
  --high-soft: rgba(14, 143, 105, 0.10);
  --med: #b26b00;
  --med-soft: rgba(178, 107, 0, 0.10);
  --low: #c93434;
  --low-soft: rgba(201, 52, 52, 0.09);
  --ev-data: #0e8f69;
  --ev-weak: #a86400;
  --ev-plan: #4f46e5;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  color-scheme: light;
}

/* High contrast (toggle) */
:root.hc {
  --bg: #000000;
  --bg-2: #000000;
  --surface: #000000;
  --surface-2: #0b0b0b;
  --border: #ffffff;
  --border-strong: #ffffff;
  --text: #ffffff;
  --muted: #f1f1f1;
  --accent: #ffd400;
  --accent-ink: #000000;
  --accent-soft: rgba(255, 212, 0, 0.18);
  --high: #4dff9a;
  --med: #ffd400;
  --low: #ff6b6b;
  --ev-data: #4dff9a;
  --ev-weak: #ffd400;
  --ev-plan: #9ecbff;
  --shadow: none;
  color-scheme: dark;
}
:root.readable { --fs: 1.15rem; --lh: 1.75; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs);
  line-height: var(--lh);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 0% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 480px at 100% 0%, rgba(58, 215, 165, 0.08), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
:root.hc body { background-image: none; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.92em; }
.tiny { font-size: 0.82em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--teal)); flex: none; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 650; font-size: 0.94rem; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .nav .icon-btn { align-self: flex-start; margin-top: 6px; }
}

main { flex: 1; padding: 28px 0 56px; }

/* Cards & surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 2.5vw, 28px);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.76rem; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.lead { font-size: 1.12em; color: var(--muted); max-width: 66ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 0.96rem; line-height: 1.2;
  padding: 11px 16px; min-height: 44px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, transform .08s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; min-height: 36px; font-size: 0.88rem; border-radius: 10px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; }

/* Badges */
.level {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-weight: 900; letter-spacing: 0.06em; font-size: 0.9rem; border: 1px solid currentColor;
}
.level::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.level.high { color: var(--high); background: var(--high-soft); }
.level.medium { color: var(--med); background: var(--med-soft); }
.level.low { color: var(--low); background: var(--low-soft); }
.level.none { color: var(--muted); background: var(--surface-2); }

.ev {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap;
}
.ev.data { color: var(--ev-data); }
.ev.weak { color: var(--ev-weak); }
.ev.plan { color: var(--ev-plan); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); line-height: 1.1; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Callout */
.note {
  border: 1px solid var(--border); border-left: 4px solid var(--ev-weak);
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.93rem;
}
.note.info { border-left-color: var(--accent); }

details.disclose { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
details.disclose > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.disclose > summary::-webkit-details-marker { display: none; }
details.disclose > summary::after { content: "+"; margin-left: auto; font-weight: 800; color: var(--muted); }
details.disclose[open] > summary::after { content: "−"; }
details.disclose > div { padding: 0 14px 14px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 22px 0 28px; color: var(--muted); font-size: 0.88rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; }

/* Toolbar (a11y) */
.a11y-bar { display: flex; flex-wrap: wrap; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --muted: #333; --border: #bbb; --border-strong: #888; --shadow: none; }
  body { background: #fff; }
  .site-header, .site-footer .no-print, .no-print, .a11y-bar { display: none !important; }
  main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
