/* ============================================================
   EXASIM – Design System CSS
   Stack: Bootstrap 5.2.3 + HTMX 1.9.10
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --brand-blue:   #143D5E;
  --brand-blue-1: #1D517C;
  --brand-blue-2: #2A6FA3;
  --brand-blue-soft: #D8E4ED;
  --brand-ink:    #0F1116;

  --bg:           #F6F7F9;
  --surface:      #FFFFFF;
  --surface-alt:  #F0F2F5;

  --ink:          #0F1116;
  --ink-soft:     #2E333D;
  --ink-muted:    #626873;
  --ink-faint:    #9CA2AD;

  --rule:         rgba(15,17,22,0.12);
  --rule-soft:    rgba(15,17,22,0.06);
  --rule-strong:  rgba(15,17,22,0.22);

  --success:      #1F6B3F;
  --success-soft: #D8EBE0;
  --warn:         #7A5412;
  --warn-soft:    #F1E4C9;
  --danger:       #9B2B2B;
  --danger-soft:  #F0D8D8;

  --accent:       var(--brand-blue);
  --accent-soft:  var(--brand-blue-soft);
  --accent-ink:   #0A2840;

  --radius-card:  12px;
  --radius-btn:   8px;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-sans:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', monospace;
}

[data-theme="dark"] {
  --brand-blue:      #2A6FA3;
  --brand-blue-soft: #1A2E3D;

  --bg:           #0A0B0F;
  --surface:      #11141A;
  --surface-alt:  #161A22;

  --ink:          #ECEEF2;
  --ink-soft:     #B8BCC6;
  --ink-muted:    #848993;
  --ink-faint:    #545861;

  --rule:         rgba(236,238,242,0.10);
  --rule-soft:    rgba(236,238,242,0.05);
  --rule-strong:  rgba(236,238,242,0.20);

  --success-soft: #0E2B1A;
  --warn-soft:    #2A1F06;
  --danger-soft:  #2A0C0C;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}
a:hover { color: var(--brand-blue-2); }

/* ── Masthead ─────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  height: 56px;
}

.masthead__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.masthead__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.masthead__mark {
  display: block;
  flex-shrink: 0;
}

.masthead__logo {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: -0.01em;
  line-height: 1;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  flex: 1;
}

.masthead__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.masthead__link:hover {
  color: var(--ink);
  background: var(--surface-alt);
}
.masthead__link.is-active {
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.masthead__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.masthead__theme {
  display: flex;
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 3px 4px;
  gap: 2px;
  cursor: pointer;
}
.masthead__theme span {
  padding: 3px 8px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
  color: var(--ink-muted);
  user-select: none;
}
.masthead__theme span.is-on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px var(--rule);
}

.masthead__user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.masthead__user:hover {
  border-color: var(--brand-blue);
  background: var(--surface);
}
.masthead__user.show {
  border-color: var(--brand-blue);
}

.masthead__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  flex-shrink: 0;
}

.masthead__username {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Bootstrap dropdown overrides ─────────────────────────── */
.dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 180px;
}
.dropdown-item {
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 7px 12px;
  transition: background 0.12s, color 0.12s;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--surface-alt);
  color: var(--ink);
}
.dropdown-item.text-danger {
  color: var(--danger) !important;
}
.dropdown-item.text-danger:hover {
  background: var(--danger-soft);
}
.dropdown-item-text {
  font-size: 12px;
  color: var(--ink-faint);
  padding: 4px 12px;
  display: block;
}
.dropdown-divider {
  border-color: var(--rule);
  margin: 4px 0;
}

/* ── Page ─────────────────────────────────────────────────── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* ── Typography ───────────────────────────────────────────── */
.kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
}
.kicker--muted {
  color: var(--ink-muted);
}

.headline {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.headline--xl { font-size: 48px; }
.headline--l  { font-size: 36px; }
.headline--m  { font-size: 28px; }
.headline--s  { font-size: 22px; }

.subhead {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
  background: var(--brand-blue);
  color: #fff;
  line-height: 1.4;
}
.btn:hover {
  background: var(--brand-blue-1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20,61,94,0.25);
}
.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink-soft);
}
.btn--ghost:hover {
  background: var(--surface-alt);
  border-color: var(--rule);
  color: var(--ink);
  box-shadow: none;
}

.btn--danger {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}
.btn--danger:hover {
  background: #e0bfbf;
  color: var(--danger);
  box-shadow: none;
}

.btn--sm {
  font-size: 13px;
  padding: 5px 12px;
}
.btn--lg {
  font-size: 16px;
  padding: 12px 28px;
}

[data-theme="dark"] .btn {
  background: var(--brand-blue);
  color: #fff;
}
[data-theme="dark"] .btn:hover {
  background: #2A6FA3;
}
[data-theme="dark"] .btn--ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink-soft);
}
[data-theme="dark"] .btn--ghost:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

/* ── Status pills ─────────────────────────────────────────── */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  line-height: 1.5;
}
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status--done {
  background: var(--success-soft);
  color: var(--success);
}
.status--active {
  background: var(--warn-soft);
  color: var(--warn);
}
.status--paused {
  background: var(--surface-alt);
  color: var(--ink-muted);
}

/* ── Form controls ────────────────────────────────────────── */
.form-control,
.search-input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-btn);
  padding: 9px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  appearance: none;
}
.form-control:focus,
.search-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(20,61,94,0.12);
}
.form-control::placeholder,
.search-input::placeholder {
  color: var(--ink-faint);
}

/* Range slider */
input[type="range"].range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--surface-alt);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"].range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-blue);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px var(--rule);
  cursor: pointer;
  transition: transform 0.12s;
}
input[type="range"].range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type="range"].form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--surface-alt);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"].form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-blue);
  border: 2px solid var(--surface);
  box-shadow: 0 1px 4px var(--rule);
  cursor: pointer;
}

/* ── Dashboard ────────────────────────────────────────────── */
.dash-hero {
  margin-bottom: 36px;
}
.dash-hero__title {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.dash-hero__sub {
  color: var(--ink-muted);
  font-size: 15px;
  margin: 0;
}

.dash-meta {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px 20px;
  display: inline-block;
}
.dash-meta__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0 0 4px;
}
.dash-meta__val {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--success);
  line-height: 1;
}
.dash-meta__of {
  font-size: 14px;
  color: var(--ink-faint);
  font-weight: 500;
  margin-left: 2px;
}
.dash-meta__pool {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 2px 0 8px;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-meta__val--zero { color: var(--danger); }

/* ── M8: Tus exámenes (accesos por pool) ─────────────────── */
.access {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.access-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 16px;
  transition: border-color 0.15s;
}
.access-card:hover { border-color: var(--brand-blue); }
.access-card--active { border-color: var(--success); }
.access-card--depleted { opacity: 0.65; border-style: dashed; }
.access-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.access-card__thumb {
  width: 64px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.access-card__thumb--ph { background: var(--surface-alt); }
.access-card__badge {
  background: var(--success-soft);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.access-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 10px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.access-card__sims {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}
.access-card__sims b {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}
.access-card__sims.is-zero b { color: var(--danger); }
.access-card__cta { margin-top: 12px; }
.access-card--ghost {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  min-height: 130px;
}
.access-card--ghost:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
.access-card__plus { font-size: 28px; line-height: 1; }

/* ── M8: Avisos inline ────────────────────────────────────── */
.notice {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}
.notice--warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.notice a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ── Empty state (compartido: dashboard, órdenes, marketplace) ── */
.empty { display:flex; flex-direction:column; align-items:center; text-align:center; padding:64px 24px 80px; }
.empty__mark { width:80px; height:80px; opacity:0.65; margin-bottom:24px; }
.empty__title { font-family:var(--font-display); font-size:22px; font-weight:600; color:var(--ink); letter-spacing:-0.02em; margin-bottom:8px; }
.empty__sub { font-size:14px; color:var(--ink-muted); max-width:42ch; margin-bottom:24px; }

@media (max-width: 768px) {
  .access { grid-template-columns: 1fr; }
}

.dash-credits {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-credits__bar {
  flex: 1;
  height: 6px;
  background: var(--surface-alt);
  border-radius: 3px;
  overflow: hidden;
}
.dash-credits__bar-fill {
  height: 100%;
  background: var(--brand-blue);
  border-radius: 3px;
}

.section {
  margin-bottom: 40px;
}
.section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.section__title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.section__count {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ── Coverage cards ───────────────────────────────────────── */
.coverage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.coverage__area {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px 20px 16px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.coverage__area:hover {
  border-color: var(--brand-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(20,61,94,0.12);
}

.coverage__tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.coverage__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-radius: 20px;
  padding: 2px 10px;
}
.coverage__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.coverage__pct-num {
  font-family: 'Sora', sans-serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}
.coverage__pct-num span {
  font-size: 20px;
  color: var(--ink-muted);
}

.coverage__bar {
  height: 4px;
  background: var(--surface-alt);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}
.coverage__bar-fill {
  height: 100%;
  background: var(--brand-blue);
  border-radius: 2px;
  transition: width 0.4s;
}
.coverage__bar-fill--low {
  background: var(--warn);
}

.coverage__stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
}
.coverage__cta {
  font-size: 12px;
  color: var(--brand-blue);
  font-weight: 600;
}

/* ── Dept cards ───────────────────────────────────────────── */
.depts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.dept {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dept__nodes {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 4px;
}
.dept__node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-blue);
  flex-shrink: 0;
}
.dept__node--faded {
  background: var(--brand-blue-soft);
  border: 1px solid var(--brand-blue);
  opacity: 0.5;
}
.dept__link {
  flex: 1;
  height: 2px;
  background: var(--brand-blue);
  margin: 0 2px;
}
.dept__link--faded {
  background: var(--brand-blue-soft);
  opacity: 0.5;
}

.dept__code {
  font-family: 'Sora', sans-serif;
  font-size: 52px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
}
.dept__code small {
  font-size: 20px;
  color: var(--brand-blue);
  font-weight: 700;
}

.dept__name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin: 0;
}
.dept__desc {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.dept__cta {
  margin-top: 4px;
}

/* ── History ──────────────────────────────────────────────── */
.history-wrap {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}

.history table {
  width: 100%;
  border-collapse: collapse;
}
.history thead {
  background: var(--surface-alt);
}
.history thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.history tbody tr {
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.1s;
}
.history tbody tr:last-child {
  border-bottom: none;
}
.history tbody tr:hover {
  background: var(--surface-alt);
}
.history tbody td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  vertical-align: middle;
}

.history__area {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-radius: 20px;
  padding: 2px 8px;
  display: inline-block;
}
.history__name {
  font-weight: 500;
  color: var(--ink);
}
.history__date {
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.history__score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ── Config ───────────────────────────────────────────────── */
.config-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.config-hero {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 40px 40px 32px;
  text-align: center;
  margin-bottom: 28px;
}
.config-hero__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.config-hero__title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.config-hero__sub {
  font-size: 15px;
  color: var(--ink-muted);
  margin: 0 0 20px;
}
.config-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 16px;
}
.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.field__title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.field__counter {
  font-size: 13px;
  color: var(--ink-muted);
}
.field__desc {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Sliders ──────────────────────────────────────────────── */
.slider-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.slider-row:last-child {
  border-bottom: none;
}
.slider-row__lbl {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.slider-row__val {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue);
  min-width: 48px;
  text-align: right;
  line-height: 1;
}

/* ── Dichotomy ────────────────────────────────────────────── */
.dichotomy {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  background: var(--surface-alt);
  border-radius: 8px;
  overflow: hidden;
  margin: 12px 0 20px;
}
.dichotomy__side {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: center;
}
.dichotomy__side b {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-blue);
  display: block;
  line-height: 1.1;
}
.dichotomy__vs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

/* ── Totals ───────────────────────────────────────────────── */
.totals {
  background: var(--success-soft);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}
.totals--invalid {
  background: var(--danger-soft);
}
.totals__lbl {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.totals__val {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--success);
}
.totals--invalid .totals__val {
  color: var(--danger);
}
.totals__status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--success);
  color: #fff;
}
.totals--invalid .totals__status {
  background: var(--danger);
}

/* ── Topics ───────────────────────────────────────────────── */
.topics-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.topics-group {
  padding: 0 0 4px;
}
.topics-group__head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: var(--surface-alt);
  padding: 7px 14px;
  position: sticky;
  top: 0;
}

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--rule-soft);
}
.topic-item:last-child {
  border-bottom: none;
}
.topic-item:hover {
  background: var(--surface-alt);
}

.topic-item__check {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--rule-strong);
  background: var(--surface);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}
.topic-item.is-checked .topic-item__check,
.topic-item input:checked ~ .topic-item__check {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.topic-item.is-checked .topic-item__check::after,
.topic-item input:checked ~ .topic-item__check::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translateY(-1px);
}

.topic-item__code {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-faint);
  line-height: 1;
  margin-top: 1px;
}
.topic-item__name {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
  flex: 1;
}

/* ── Callout ──────────────────────────────────────────────── */
.callout {
  background: var(--brand-blue-soft);
  border-left: 3px solid var(--brand-blue);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 16px 0;
}
.callout__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-blue);
  margin: 0 0 4px;
}
.callout__body {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

/* ── Actions ──────────────────────────────────────────────── */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 24px;
}

/* ── Exam ─────────────────────────────────────────────────── */
.exam-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.exam-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
}

.exam-head {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--rule);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.exam-head__area {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}
.exam-head__progress {
  font-size: 14px;
  color: var(--ink-muted);
}
.exam-head__progress b {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue);
}

.exam-progress {
  height: 3px;
  background: var(--surface-alt);
  overflow: hidden;
}
.exam-progress__fill {
  height: 100%;
  background: var(--brand-blue);
  transition: width 0.4s;
}

.exam-body {
  padding: 40px 48px;
}

/* ── Q elements ───────────────────────────────────────────── */
.q-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.q-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-alt);
  color: var(--ink-muted);
  border-radius: 20px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
}

.q-stem {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 28px;
}
.q-stem em {
  font-style: normal;
  background: var(--brand-blue-soft);
  border-radius: 3px;
  padding: 0 4px;
}

/* ── Options exam ─────────────────────────────────────────── */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.option:hover {
  border-color: var(--brand-blue);
  background: var(--surface-alt);
}
.option.is-selected {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
  box-shadow: 0 0 0 3px rgba(20,61,94,0.10);
}

.option__letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1.5px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.option.is-selected .option__letter {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.option__text {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Hidden radio inside option label */
.option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ── Exam footer ──────────────────────────────────────────── */
.exam-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--rule);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.exam-footer__score {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.exam-footer__score strong {
  color: var(--ink);
}

/* ── Results ──────────────────────────────────────────────── */
.results-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.results-banner {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 32px 36px;
  margin-bottom: 24px;
  align-items: center;
}
.results-banner__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.results-banner__title {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.results-banner__sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}
.results-banner__score {
  text-align: center;
}
.results-banner__num {
  font-family: 'Sora', sans-serif;
  font-size: 56px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.03em;
}
.results-banner__of {
  font-size: 22px;
  color: var(--ink-muted);
  font-weight: 500;
}
.results-banner__pct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
}
.results-banner__pct--fail {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ── Q-nav ────────────────────────────────────────────────── */
.q-nav {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.q-nav__item {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  background: var(--surface);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.q-nav__item:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.q-nav__item--correct {
  background: var(--success-soft);
  border-color: transparent;
  color: var(--success);
}
.q-nav__item--wrong {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}
.q-nav__item--current {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

/* ── Verdict ──────────────────────────────────────────────── */
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.verdict--correct {
  background: var(--success-soft);
  color: var(--success);
}
.verdict--wrong {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ── Result options ───────────────────────────────────────── */
.option--result {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.option--result:hover {
  border-color: var(--rule);
  background: var(--surface);
  box-shadow: none;
}

.option.is-correct {
  opacity: 1;
  border-color: var(--success);
  background: var(--success-soft);
  pointer-events: none;
}
.option.is-correct .option__letter {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.option.is-picked.is-wrong {
  opacity: 1;
  border-color: var(--danger);
  background: var(--danger-soft);
  pointer-events: none;
}
.option.is-picked.is-wrong .option__letter {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.option__badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}
.option__badge--correct {
  background: var(--success);
  color: #fff;
}
.option__badge--picked {
  background: var(--ink-faint);
  color: #fff;
}

/* ── Justification ────────────────────────────────────────── */
.justification {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brand-blue);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin-top: 20px;
}
.justification__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  margin-bottom: 8px;
}
.justification__body {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 8px;
}
.justification__ref {
  font-size: 12px;
  color: var(--ink-faint);
  font-style: italic;
}

/* ── Login ────────────────────────────────────────────────── */
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-shell__aside {
  background: var(--brand-ink);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
  overflow: hidden;
}
.login-shell__aside::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(42,111,163,0.45) 0%, transparent 70%);
  pointer-events: none;
}

.login-shell__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}
.login-shell__brand-text {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.login-shell__kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5AA1D1;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-shell__kicker::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: #5AA1D1;
  flex-shrink: 0;
}

.login-shell__headline {
  font-family: 'Sora', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.login-shell__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0 0 40px;
}

.login-shell__meta {
  margin-top: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

.login-shell__form {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px;
}
.login-shell__form-title {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}

.input-group {
  margin-bottom: 18px;
}
.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.input-group input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.input-group input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(20,61,94,0.12);
}

/* ── Modal ────────────────────────────────────────────────── */
.modal-editorial .modal-content {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.18);
}

.modal__head {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--rule);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal__head-content {
  flex: 1;
}
.modal__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.modal__title {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.modal__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
  color: var(--ink-muted);
}
.modal__close:hover {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}

.modal__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.modal__pct {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.modal__pct-label {
  font-size: 13px;
  color: var(--ink-muted);
  margin-left: 4px;
}
.modal__stats {
  font-size: 13px;
  color: var(--ink-muted);
  text-align: right;
}

.modal__body {
  padding: 16px 24px;
  max-height: 420px;
  overflow-y: auto;
}
.modal__foot {
  border-top: 1px solid var(--rule);
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Subarea accordion ────────────────────────────────────── */
.subarea {
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.subarea__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--surface);
  transition: background 0.1s;
  user-select: none;
}
.subarea__head:hover {
  background: var(--surface-alt);
}
.subarea__code {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.subarea__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}
.subarea__count {
  font-size: 12px;
  color: var(--ink-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.subarea__chevron {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.subarea__list {
  display: none;
  border-top: 1px solid var(--rule-soft);
}
.subarea.is-open .subarea__list {
  display: block;
}
.subarea.is-open .subarea__chevron {
  transform: rotate(180deg);
}

.subarea__topic {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px 8px 36px;
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.1s;
}
.subarea__topic:last-child {
  border-bottom: none;
}
.subarea__topic:hover {
  background: var(--surface-alt);
}

.subarea__topic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  background: var(--surface);
  flex-shrink: 0;
  margin-top: 5px;
}
.subarea__topic-dot.is-seen {
  background: var(--success);
  border-color: var(--success);
}
.subarea__topic-name {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.4;
  flex: 1;
}
.subarea__topic-code {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink-faint);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Loading nodes animation ──────────────────────────────── */
.loading-nodes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 24px;
}
.loading-nodes .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-blue);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.loading-nodes .dot:nth-child(1) { animation-delay: 0s; }
.loading-nodes .dot:nth-child(2) { animation-delay: 0.18s; }
.loading-nodes .dot:nth-child(3) { animation-delay: 0.36s; }
.loading-nodes .dot:nth-child(4) { animation-delay: 0.54s; }

@keyframes pulse-dot {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40%            { transform: scale(1.0); opacity: 1; }
}

/* ── Alert overrides ──────────────────────────────────────── */
.alert {
  border-radius: 8px;
  font-size: 14px;
  padding: 12px 16px;
}
.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}
.alert-error {
  color: var(--danger);
  background-color: var(--danger-soft);
  border-color: transparent;
}
.alert-warning {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}
.alert-info {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-color: transparent;
}
.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}

/* ── Exam masthead (full-width custom) ────────────────────── */
.exam-masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  height: 52px;
  display: flex;
  align-items: center;
}
.exam-masthead__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.exam-masthead__autosave {
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.exam-masthead__autosave-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .page {
    padding: 24px 16px 60px;
  }

  .coverage {
    grid-template-columns: 1fr;
  }

  .depts {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-shell__aside {
    display: none;
  }
  .login-shell__form {
    padding: 48px 28px;
  }

  .results-banner {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .results-banner__score {
    text-align: left;
  }

  .exam-body {
    padding: 24px 20px;
  }
  .exam-head {
    padding: 14px 20px;
  }
  .exam-footer {
    padding: 14px 20px;
    flex-wrap: wrap;
  }

  .config-hero {
    padding: 28px 20px;
  }
  .field {
    padding: 20px 18px;
  }
  .dichotomy {
    grid-template-columns: 1fr;
  }
  .dichotomy__vs {
    border: none;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 8px;
  }

  .masthead__nav {
    display: none;
  }
  .masthead__username {
    display: none;
  }
}


/* ============================================================
   LANDING PAGE — Public-facing components
   ============================================================ */

/* ── Public Nav (.pnav) ─────────────────────────────────── */
.pnav { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.pnav__inner {
  max-width: 1160px; margin: 0 auto; padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.pnav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pnav__mark { width: 28px; height: 28px; flex-shrink: 0; }
.pnav__logo {
  font-family: 'Sora', system-ui, sans-serif; font-size: 20px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.02em;
}
.pnav__links { display: flex; align-items: center; gap: 28px; }
.pnav__link { font-size: 13px; color: var(--ink-muted); font-weight: 500; text-decoration: none; }
.pnav__link:hover { color: var(--ink); }
.pnav__link.is-active { color: var(--brand-blue); }
.pnav__actions { display: flex; align-items: center; gap: 10px; }
.pnav__theme {
  font-size: 13px; background: transparent; border: 1px solid var(--rule);
  color: var(--ink-muted); padding: 6px 10px; border-radius: 6px; cursor: pointer;
}
.pnav__user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 1px solid var(--rule); border-radius: 24px; text-decoration: none; }
.pnav__avatar {
  width: 26px; height: 26px; background: var(--brand-blue); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; font-family: 'Sora', sans-serif;
}
[data-theme="dark"] .pnav__avatar { color: var(--brand-ink); }
.pnav__username { font-size: 13px; color: var(--ink); font-weight: 500; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--rule); background: var(--surface); }
.hero__inner {
  max-width: 1160px; margin: 0 auto; padding: 88px 32px 96px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand-blue); background: var(--brand-blue-soft);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 24px; font-weight: 500;
}
.hero__title { font-family: 'Sora', system-ui, sans-serif; font-weight: 800; font-size: 52px; letter-spacing: -0.035em; line-height: 1.02; color: var(--ink); }
.hero__title b { color: var(--brand-blue); font-weight: 800; }
.hero__tagline {
  font-family: 'Sora', system-ui, sans-serif; font-size: 20px; font-weight: 600; color: var(--brand-blue);
  letter-spacing: -0.01em; margin-top: 20px;
}
.hero__sub { font-size: 16px; color: var(--ink-muted); line-height: 1.6; max-width: 48ch; margin-top: 14px; text-wrap: pretty; }
.hero__cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero__note { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.04em; margin-top: 20px; }

.hero__visual {
  position: relative; aspect-ratio: 1 / 1; background: var(--brand-ink, #0F1116);
  border-radius: 20px; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero__visual::before {
  content: ''; position: absolute; top: -80px; right: -80px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(42,111,163,0.28), transparent 62%); pointer-events: none;
}
.hero__visual::after {
  content: ''; position: absolute; bottom: -120px; left: -100px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(42,111,163,0.14), transparent 60%); pointer-events: none;
}
.hero__mark { width: 200px; height: 200px; position: relative; z-index: 1; }
.hero__mark circle { animation: node-breathe 3.2s ease-in-out infinite; transform-origin: center; }
.hero__mark circle:nth-of-type(2) { animation-delay: 0.4s; }
.hero__mark circle:nth-of-type(3) { animation-delay: 1.2s; }
.hero__mark circle:nth-of-type(4) { animation-delay: 0.8s; }
@keyframes node-breathe { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero__mark circle { animation: none; }
}
.hero__visual-cap {
  position: absolute; bottom: 24px; left: 24px; right: 24px; z-index: 1;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.08em;
  color: rgba(236,238,242,0.5); text-transform: uppercase;
  display: flex; justify-content: space-between;
}

/* ── Section shell ───────────────────────────────────────── */
.section { max-width: 1160px; margin: 0 auto; padding: 80px 32px; }
.section__head { margin-bottom: 40px; }
.section__head--center { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.section__head--center .subhead { margin: 12px auto 0; }

/* ── How it works (steps) ────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px;
  padding: 32px 28px; display: flex; flex-direction: column; gap: 16px;
}
.step__num {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em;
}
.step__icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--brand-blue-soft);
  display: flex; align-items: center; justify-content: center;
}
.step__title { font-family: 'Sora', system-ui, sans-serif; font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.step__desc { font-size: 14px; color: var(--ink-muted); line-height: 1.55; }

/* ── Featured pools (cards) ──────────────────────────────── */
.pools-band { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pool-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: all 0.2s; text-decoration: none; color: inherit;
}
.pool-card:hover { border-color: var(--brand-blue); transform: translateY(-2px); color: inherit; }
.pool-card__cover {
  aspect-ratio: 16 / 9; background: var(--brand-ink, #0F1116); position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 18px 20px;
}
.pool-card__cover::before {
  content: ''; position: absolute; top: -60px; right: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(42,111,163,0.3), transparent 62%);
}
.pool-card__cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pool-card__cover-mark { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; opacity: 0.9; z-index: 1; }
.pool-card__cover-tag {
  position: relative; z-index: 1; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.08em;
  color: rgba(236,238,242,0.85); background: rgba(236,238,242,0.1); border: 1px solid rgba(236,238,242,0.18);
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
}
.pool-card__body { padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pool-card__title { font-family: 'Sora', system-ui, sans-serif; font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.25; }
.pool-card__tagline { font-size: 13px; color: var(--ink-muted); line-height: 1.5; flex: 1; }
.pool-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-top: 1px solid var(--rule);
}
.pool-card__price { font-family: 'Sora', system-ui, sans-serif; font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.pool-card__price small { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-muted); font-weight: 500; margin-left: 4px; }

/* ── Trust / stats ───────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--surface); }
.stat { padding: 40px 32px; border-right: 1px solid var(--rule); text-align: center; }
.stat:last-child { border-right: none; }
.stat__num { font-family: 'Sora', system-ui, sans-serif; font-size: 44px; font-weight: 700; color: var(--ink); letter-spacing: -0.04em; line-height: 1; }
.stat__num b { color: var(--brand-blue); font-weight: 700; }
.stat__lbl { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 12px; }

/* ── Closing CTA ─────────────────────────────────────────── */
.closer { background: var(--brand-ink, #0F1116); border-radius: 20px; padding: 64px 48px; text-align: center; position: relative; overflow: hidden; }
.closer::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px; background: radial-gradient(circle, rgba(42,111,163,0.2), transparent 62%); pointer-events: none;
}
.closer__title { font-family: 'Sora', system-ui, sans-serif; font-size: 36px; font-weight: 700; color: #fff; letter-spacing: -0.03em; position: relative; }
.closer__sub { font-size: 16px; color: #A8ADB7; margin: 14px auto 0; max-width: 46ch; position: relative; }
.closer__cta { margin-top: 28px; position: relative; display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.closer__cta .btn { background: #ECEEF2; border-color: #ECEEF2; color: var(--brand-ink, #0F1116); }
.closer__cta .btn:hover { background: #fff; border-color: #fff; color: var(--brand-ink, #0F1116); }
.closer__cta .btn--ghost { background: transparent; border-color: rgba(236,238,242,0.3); color: #ECEEF2; }
.closer__cta .btn--ghost:hover { border-color: #ECEEF2; color: #fff; background: transparent; }

/* ── Public footer (.pfoot) ──────────────────────────────── */
.pfoot { border-top: 1px solid var(--rule); background: var(--surface); }
.pfoot__inner {
  max-width: 1160px; margin: 0 auto; padding: 40px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.pfoot__brand { display: flex; align-items: center; gap: 8px; }
.pfoot__mark { width: 22px; height: 22px; }
.pfoot__logo { font-family: 'Sora', system-ui, sans-serif; font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.pfoot__links { display: flex; gap: 24px; }
.pfoot__link { font-size: 13px; color: var(--ink-muted); text-decoration: none; }
.pfoot__link:hover { color: var(--ink); }
.pfoot__meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.04em; display: flex; gap: 16px; align-items: center; }
.pfoot__solo { color: var(--brand-blue); font-weight: 500; }

/* ── Landing responsive ──────────────────────────────────── */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 24px 64px; }
  .hero__visual { max-width: 380px; }
  .hero__title { font-size: 40px; }
  .steps, .pools, .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: none; }
  .section { padding: 56px 24px; }
  .pnav__links { display: none; }
  .closer { padding: 48px 24px; }
  .closer__title { font-size: 28px; }
}
