/* ==========================================================================
   Regal Investments — design system
   Palette: institutional blue, white, near-black, and a grey ramp. Nothing
   else. Type is the system stack; no web fonts, so first paint is instant.
   ========================================================================== */

:root {
  --blue-700: #0b3c8c;
  --blue-600: #0f4fb5;
  --blue:     #1565d8;
  --blue-400: #4b8bea;
  --blue-200: #a8c8f5;
  --blue-50:  #eef4fd;

  --ink:      #0c0e12;
  --ink-800:  #14171d;
  --ink-700:  #1d212a;

  --grey-600: #4d5462;
  --grey-500: #6b7280;
  --grey-400: #9aa1ad;
  --grey-300: #c7ccd4;
  --grey-200: #e2e5ea;
  --grey-100: #f0f2f5;
  --grey-50:  #f7f8fa;
  --white:    #ffffff;

  --bg:        var(--white);
  --bg-alt:    var(--grey-50);
  --fg:        var(--ink);
  --fg-muted:  var(--grey-600);
  --line:      var(--grey-200);
  --accent:    var(--blue);

  --radius:    4px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(12,14,18,.06), 0 1px 3px rgba(12,14,18,.04);
  --shadow:    0 2px 8px rgba(12,14,18,.06), 0 8px 24px rgba(12,14,18,.06);
  --shadow-lg: 0 8px 40px rgba(12,14,18,.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gut: 24px;

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

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 640;
  letter-spacing: -.021em;
  line-height: 1.16;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 1.35rem + 2.6vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.3rem); letter-spacing: -.026em; }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
}
.skip-link:focus { left: 0; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.wrap--narrow { max-width: 760px; }
.wrap--mid    { max-width: 940px; }

.section     { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section--sm { padding: clamp(2.5rem, 4vw, 3.5rem) 0; }
.section--dark { background: var(--ink); color: var(--grey-200); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--alt  { background: var(--bg-alt); }
.section--line { border-top: 1px solid var(--line); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.flex { display: flex; gap: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.flex-wrap { flex-wrap: wrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.75rem; }

/* ── Typographic accents ────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: .715rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 1rem;
}
.section--dark .eyebrow { color: var(--blue-400); }

.lede { font-size: clamp(1.06rem, 1rem + .35vw, 1.22rem); color: var(--fg-muted); line-height: 1.62; }
.section--dark .lede { color: var(--grey-300); }
.muted { color: var(--fg-muted); }
.small { font-size: .875rem; }
.xsmall { font-size: .8rem; }
.mono { font-family: var(--mono); font-size: .85em; letter-spacing: -.01em; }

.rule {
  width: 44px; height: 3px; background: var(--blue); border-radius: 2px;
  margin: 0 0 1.5rem;
}
.rule--center { margin-left: auto; margin-right: auto; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: #fff;
  --btn-bd: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.5rem;
  font: inherit; font-size: .935rem; font-weight: 600; letter-spacing: -.005em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { --btn-bg: var(--blue-600); --btn-bd: var(--blue-600); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--grey-300); }
.btn--ghost:hover { --btn-bg: var(--grey-100); --btn-fg: var(--ink); --btn-bd: var(--grey-400); }
.btn--onDark  { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.34); }
.btn--onDark:hover { --btn-bg: rgba(255,255,255,.1); --btn-bd: rgba(255,255,255,.6); }
.btn--dark    { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn--dark:hover { --btn-bg: var(--ink-700); --btn-bd: var(--ink-700); }
.btn--lg  { padding: .95rem 1.9rem; font-size: 1rem; }
.btn--sm  { padding: .5rem 1rem; font-size: .84rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .92rem; color: var(--blue-600);
}
.link-arrow::after { content: "→"; transition: transform .2s var(--ease); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }
.brand:hover { text-decoration: none; }
.brand__mark {
  font-weight: 680; font-size: 1.02rem; letter-spacing: -.028em; color: var(--ink);
}
.brand__sub {
  font-size: .64rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--grey-500); font-weight: 600; padding-left: 10px; margin-left: 2px;
  border-left: 1px solid var(--line);
}

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  padding: .5rem .72rem; border-radius: var(--radius);
  font-size: .905rem; font-weight: 520; color: var(--grey-600);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--grey-100); text-decoration: none; }
.nav a.is-active { color: var(--blue-600); font-weight: 620; }
/* A .btn inside .nav must keep the button's own colours, which the rules above
   would otherwise win on specificity. */
.nav a.btn { color: var(--btn-fg); background: var(--btn-bg); }
.nav a.btn:hover { color: var(--btn-fg); background: var(--btn-bg); }
.nav__divider { width: 1px; height: 22px; background: var(--line); margin: 0 10px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .5rem .7rem; cursor: pointer; color: var(--ink);
  font: inherit; font-size: .85rem; font-weight: 600;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px; margin-left: 0;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .8rem .2rem; border-bottom: 1px solid var(--grey-100); border-radius: 0; font-size: 1rem; }
  .nav__divider { display: none; }
  .nav .btn { margin-top: 12px; }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--grey-400); padding: 4rem 0 2rem; font-size: .9rem; }
.site-footer h4 {
  color: #fff; font-size: .715rem; letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: 1.1rem; font-weight: 700;
}
.site-footer a { color: var(--grey-400); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .8rem; color: var(--grey-500);
}
.legal-note {
  font-size: .78rem; line-height: 1.6; color: var(--grey-500);
  border-left: 2px solid rgba(255,255,255,.14); padding-left: 1rem; margin-top: 1.5rem;
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card--link:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.card--flat { box-shadow: none; }
.card--pad-sm { padding: 1.25rem; }
.card__title { font-size: 1.1rem; font-weight: 640; margin-bottom: .45rem; color: var(--ink); }
.card__body  { color: var(--fg-muted); font-size: .935rem; margin: 0; }
.card__index {
  font-family: var(--mono); font-size: .74rem; color: var(--blue);
  letter-spacing: .08em; font-weight: 600; margin-bottom: .9rem; display: block;
}

.section--dark .card {
  background: var(--ink-800); border-color: rgba(255,255,255,.1);
}
.section--dark .card__title { color: #fff; }
.section--dark .card__body { color: var(--grey-400); }

/* ── Badges & chips ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .55rem; border-radius: 3px;
  font-size: .71rem; font-weight: 680; letter-spacing: .05em; text-transform: uppercase;
  background: var(--blue-50); color: var(--blue-700); border: 1px solid transparent;
}
.badge--grey    { background: var(--grey-100); color: var(--grey-600); }
.badge--outline { background: transparent; color: var(--grey-600); border-color: var(--grey-300); }
.badge--dark    { background: var(--ink); color: #fff; }
.badge--ok      { background: #e7f5ec; color: #17683a; }
.badge--warn    { background: #fdf3e3; color: #8a5a10; }
.badge--danger  { background: #fdeaea; color: #9a2020; }
.badge--live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: .3rem .7rem; border-radius: 999px; font-size: .8rem;
  background: var(--grey-100); color: var(--grey-600); border: 1px solid var(--line);
}

/* ── Forms ──────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.15rem; }
.field label, .label {
  display: block; font-size: .83rem; font-weight: 620; color: var(--ink-700);
  margin-bottom: .4rem; letter-spacing: -.005em;
}
.field .hint { font-size: .79rem; color: var(--grey-500); margin-top: .35rem; }

.input, .select, .textarea {
  width: 100%; padding: .72rem .85rem;
  font: inherit; font-size: .94rem; color: var(--ink);
  background: #fff; border: 1px solid var(--grey-300); border-radius: var(--radius);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  appearance: none;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--grey-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21,101,216,.14);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.4rem;
}

.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .9rem; line-height: 1.5; }
.check input { margin-top: .25rem; width: 16px; height: 16px; accent-color: var(--blue); flex-shrink: 0; }
.check label, .check span { font-weight: 450; color: var(--fg-muted); margin: 0; font-size: .9rem; }

.field-error { color: #c0392b; font-size: .82rem; margin-top: .35rem; font-weight: 520; }

fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
legend {
  padding: 0; margin-bottom: 1.1rem; font-size: .74rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--blue-600);
}

/* Bot trap: a real person never sees or fills this. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Alerts ─────────────────────────────────────────────────────────── */
.alert {
  padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.5rem;
  font-size: .92rem; border: 1px solid; display: flex; gap: .6rem; align-items: flex-start;
}
.alert--info    { background: var(--blue-50); border-color: var(--blue-200); color: var(--blue-700); }
.alert--success { background: #e9f7ee; border-color: #b8e3c6; color: #17683a; }
.alert--error   { background: #fdeceb; border-color: #f4c4bf; color: #a02a1c; }
.alert--warn    { background: #fdf6e7; border-color: #f0dcae; color: #7a5510; }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ── Gate (landing) ─────────────────────────────────────────────────── */
.gate {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--ink); color: #fff;
}
.gate__head { padding: 2.2rem var(--gut) 1rem; }
.gate__brand { display: flex; align-items: center; gap: 14px; }
.gate__brand img { height: 30px; }
.gate__panels { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
@media (max-width: 880px) { .gate__panels { grid-template-columns: 1fr; } }

.gate__panel {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
  min-height: 46vh; overflow: hidden; color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  text-decoration: none;
  transition: background .4s var(--ease);
}
.gate__panel:hover { text-decoration: none; color: #fff; }
.gate__panel::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.03);
  transition: transform .8s var(--ease), opacity .5s var(--ease);
  opacity: .34;
}
.gate__panel--private::before {
  background-image: url("/assets/img/bg2.webp"), url("/assets/img/bg2.jpg");
}
.gate__panel--public::before {
  /* No photograph here: a fine grid over a blue field, so the two panels read as
     a pair without the public side looking like a blurred logo. */
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  background-color: #0d1f3d;
  opacity: .9;
}
.gate__panel--public:hover::before { transform: scale(1); opacity: 1; }
.gate__panel::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(12,14,18,.55) 0%, rgba(12,14,18,.88) 62%, rgba(12,14,18,.96) 100%);
  transition: background .4s var(--ease);
}
.gate__panel--public::after {
  background: linear-gradient(180deg, rgba(11,60,140,.5) 0%, rgba(12,14,18,.9) 64%, rgba(12,14,18,.97) 100%);
}
.gate__panel:hover::before { transform: scale(1.09); opacity: .46; }
.gate__panel > * { position: relative; z-index: 2; }

.gate__label {
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blue-400); font-weight: 700; margin-bottom: 1.1rem;
}
.gate__panel h2 {
  font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.8rem); color: #fff; margin-bottom: .6rem;
  letter-spacing: -.03em;
}
.gate__panel p { color: var(--grey-300); max-width: 42ch; font-size: 1rem; margin-bottom: 1.6rem; }
.gate__points {
  list-style: none; padding: 0; margin: 0 0 1.8rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  font-size: .84rem; color: var(--grey-400);
}
.gate__points li { display: flex; align-items: center; gap: .45rem; }
.gate__points li::before { content: ""; width: 4px; height: 4px; background: var(--blue-400); border-radius: 50%; }
.gate__enter {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 620; font-size: .98rem; color: #fff;
  padding-bottom: .4rem; border-bottom: 1px solid rgba(255,255,255,.3);
  transition: gap .25s var(--ease), border-color .25s var(--ease);
}
.gate__panel:hover .gate__enter { gap: 1.1rem; border-color: var(--blue-400); }
.gate__foot {
  padding: 1.5rem var(--gut) 2rem; font-size: .78rem; color: var(--grey-500);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.08);
}
.gate__foot a { color: var(--grey-400); }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(21,101,216,.34), transparent 62%),
    radial-gradient(760px 420px at 6% 104%, rgba(21,101,216,.13), transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero__lede { font-size: clamp(1.05rem, .98rem + .5vw, 1.28rem); color: var(--grey-300); max-width: 60ch; margin-bottom: 2.2rem; }
.hero--split { display: grid; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: 36px; } }

.hero--compact { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.hero--light { background: var(--bg-alt); color: var(--ink); border-bottom: 1px solid var(--line); }
.hero--light::before { display: none; }
.hero--light h1 { color: var(--ink); }
.hero--light .hero__lede { color: var(--fg-muted); }

/* Ladder graphic used in the public hero */
.ladder { display: grid; gap: 1px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); overflow: hidden; }
.ladder__row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px;
  padding: .95rem 1.25rem; background: var(--ink-800);
  transition: background .2s var(--ease);
}
.ladder__row:hover { background: var(--ink-700); }
.ladder__n { font-family: var(--mono); font-size: .74rem; color: var(--blue-400); font-weight: 600; }
.ladder__t { font-size: .94rem; font-weight: 580; color: #fff; }
.ladder__m { font-size: .78rem; color: var(--grey-500); }

/* ── Stats ──────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; padding: 1.6rem 1.4rem; }
.section--dark .stat, .hero .stat { background: var(--ink-800); }
.stat__n {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); font-weight: 680;
  letter-spacing: -.035em; color: var(--ink); line-height: 1.1;
}
.section--dark .stat__n, .hero .stat__n { color: #fff; }
.stat__l { font-size: .8rem; color: var(--grey-500); margin-top: .35rem; }
.hero .stats, .section--dark .stats { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.12); }

/* ── Blueprint cards ────────────────────────────────────────────────── */
.track-head { margin: 3rem 0 1.75rem; }
.track-head:first-of-type { margin-top: 0; }
.track-head h2 { font-size: 1.35rem; margin: 0; }

.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
@media (max-width: 560px) { .bp-grid { grid-template-columns: 1fr; } }

.bp-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; color: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.bp-card:hover { border-color: var(--blue-200); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.bp-card__accent { height: 3px; background: var(--accent); }
.bp-card__body { padding: 1.6rem; flex: 1; display: flex; flex-direction: column; }
.bp-card__meta { display: flex; gap: .6rem; align-items: center; margin-bottom: .9rem; flex-wrap: wrap; }
.bp-card h3 { font-size: 1.2rem; margin-bottom: .45rem; letter-spacing: -.024em; }
.bp-card__sub { color: var(--fg-muted); font-size: .925rem; margin-bottom: 1.2rem; flex: 1; }
.bp-card__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 1.1rem; border-top: 1px solid var(--grey-100);
  font-size: .81rem; color: var(--grey-500);
}

/* ── Progress ───────────────────────────────────────────────────────── */
.progress {
  height: 5px; background: var(--grey-200); border-radius: 999px; overflow: hidden;
}
.progress__bar { height: 100%; background: var(--blue); border-radius: 999px; transition: width .5s var(--ease); }
.progress--thin { height: 3px; }
.section--dark .progress { background: rgba(255,255,255,.14); }

.progress-ring { display: grid; place-items: center; position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.progress-ring svg { transform: rotate(-90deg); width: 56px; height: 56px; }
.progress-ring__track { fill: none; stroke: var(--grey-200); stroke-width: 4; }
.progress-ring__bar   { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.progress-ring__pct {
  position: absolute; font-size: .72rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em;
}

/* ── Curriculum / study view ────────────────────────────────────────── */
.study {
  display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 0;
  min-height: calc(100vh - 68px);
  align-items: stretch;
}
@media (max-width: 1000px) { .study { grid-template-columns: 1fr; } }

.study__aside {
  border-right: 1px solid var(--line); background: var(--bg-alt);
  padding: 1.75rem 1.4rem 3rem;
  position: sticky; top: 68px; align-self: start;
  max-height: calc(100vh - 68px); overflow-y: auto;
}
@media (max-width: 1000px) {
  .study__aside { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
}
.study__main { padding: 2.5rem clamp(1.25rem, 3.5vw, 3.25rem) 5rem; min-width: 0; max-width: 820px; }

.curriculum { list-style: none; margin: 0; padding: 0; }
.curriculum__module { margin-bottom: 1.5rem; }
.curriculum__module > h4 {
  font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--grey-500); font-weight: 700; margin-bottom: .6rem;
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
}
.curriculum__list { list-style: none; margin: 0; padding: 0; }
.curriculum__item a {
  display: grid; grid-template-columns: 18px 1fr; gap: .65rem; align-items: start;
  padding: .52rem .6rem; border-radius: var(--radius);
  font-size: .885rem; color: var(--grey-600); line-height: 1.42;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.curriculum__item a:hover { background: #fff; color: var(--ink); text-decoration: none; }
.curriculum__item.is-current a { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.curriculum__item.is-locked a { color: var(--grey-400); }
.curriculum__tick {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--grey-300);
  display: grid; place-items: center; margin-top: 1px; flex-shrink: 0;
  font-size: 10px; color: transparent; line-height: 1;
}
.curriculum__item.is-done .curriculum__tick { background: var(--blue); border-color: var(--blue); color: #fff; }
.curriculum__item.is-done a { color: var(--grey-500); }

.lesson-body { font-size: 1.035rem; line-height: 1.72; color: var(--ink-700); }
.lesson-body h3 { margin: 2.4rem 0 .8rem; font-size: 1.32rem; letter-spacing: -.024em; }
.lesson-body h3:first-child { margin-top: 0; }
.lesson-body h4 { margin: 1.9rem 0 .6rem; font-size: 1.04rem; color: var(--blue-700); }
.lesson-body ul, .lesson-body ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.lesson-body li { margin-bottom: .5rem; }
.lesson-body blockquote {
  margin: 1.6rem 0; padding: 1rem 1.35rem;
  border-left: 3px solid var(--blue); background: var(--blue-50);
  color: var(--blue-700); font-size: .97rem; border-radius: 0 var(--radius) var(--radius) 0;
}
.lesson-body blockquote p:last-child { margin-bottom: 0; }
.lesson-body code {
  font-family: var(--mono); font-size: .875em;
  background: var(--grey-100); padding: .12em .38em; border-radius: 3px; color: var(--ink);
}
.lesson-body strong { font-weight: 640; color: var(--ink); }

.practice-box {
  margin-top: 2.5rem; padding: 1.6rem; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--bg-alt);
}
.practice-box h4 {
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: .9rem; font-weight: 700;
}

.lesson-nav {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
}

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .89rem; background: #fff; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--grey-100); }
.table th {
  font-size: .71rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--grey-500); font-weight: 700; background: var(--bg-alt); white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--grey-50); }

/* ── Pricing ────────────────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 20px; align-items: stretch; }
.price {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.9rem 1.6rem;
  position: relative;
}
.price--featured { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.price__flag {
  position: absolute; top: -1px; right: 1.4rem; transform: translateY(-50%);
  background: var(--blue); color: #fff; font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: .28rem .6rem; border-radius: 3px;
}
.price__name { font-size: 1.05rem; font-weight: 660; margin-bottom: .3rem; }
.price__tag { font-size: .85rem; color: var(--grey-500); margin-bottom: 1.4rem; min-height: 2.5em; }
.price__amount { font-size: 2.35rem; font-weight: 680; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.price__per { font-size: .85rem; color: var(--grey-500); margin-left: .25rem; font-weight: 450; letter-spacing: 0; }
.price__list { list-style: none; margin: 1.6rem 0; padding: 0; flex: 1; font-size: .885rem; }
.price__list li {
  display: grid; grid-template-columns: 16px 1fr; gap: .6rem;
  padding: .42rem 0; color: var(--fg-muted); line-height: 1.45;
}
.price__list li::before { content: "✓"; color: var(--blue); font-weight: 700; font-size: .82rem; }

.pay-choice { display: grid; gap: 10px; }
.pay-option {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.1rem; border: 1px solid var(--grey-300); border-radius: var(--radius);
  cursor: pointer; background: #fff;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.pay-option:hover { border-color: var(--blue-400); background: var(--blue-50); }
.pay-option input { accent-color: var(--blue); width: 17px; height: 17px; flex-shrink: 0; }
.pay-option__t { font-weight: 600; font-size: .94rem; }
.pay-option__d { font-size: .82rem; color: var(--grey-500); }
.pay-option:has(input:checked) { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 1px var(--blue); }

/* ── Feature list ───────────────────────────────────────────────────── */
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
  display: grid; grid-template-columns: 22px 1fr; gap: .8rem;
  padding: .55rem 0; font-size: .95rem; color: var(--fg-muted); line-height: 1.55;
}
.feature-list li::before {
  content: "→"; color: var(--blue); font-weight: 700; line-height: 1.55;
}
.section--dark .feature-list li { color: var(--grey-400); }

/* ── Steps ──────────────────────────────────────────────────────────── */
.steps { counter-reset: step; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.step { background: #fff; padding: 1.6rem 1.75rem; display: grid; grid-template-columns: 40px 1fr; gap: 1.25rem; align-items: start; }
.step__n {
  counter-increment: step;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-50); color: var(--blue-700);
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
  font-family: var(--mono);
}
.step__n::before { content: counter(step, decimal-leading-zero); }
.step h4 { margin-bottom: .3rem; }
.step p { font-size: .92rem; color: var(--fg-muted); margin: 0; }

/* ── Dashboard ──────────────────────────────────────────────────────── */
.dash-head { background: var(--ink); color: #fff; padding: 2.6rem 0 2.2rem; }
.dash-head h1 { color: #fff; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.15rem); margin-bottom: .3rem; }
.dash-head p { color: var(--grey-400); margin: 0; }
.dash-tabs {
  display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line);
  background: #fff; position: sticky; top: 68px; z-index: 40;
}
.dash-tabs a {
  padding: .95rem .2rem; margin-right: 1.5rem; white-space: nowrap;
  font-size: .9rem; font-weight: 560; color: var(--grey-500);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.dash-tabs a:hover { color: var(--ink); text-decoration: none; }
.dash-tabs a.is-active { color: var(--blue-600); border-bottom-color: var(--blue); font-weight: 640; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.35rem; }
.kpi__l { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--grey-500); font-weight: 700; }
.kpi__n { font-size: 1.75rem; font-weight: 680; letter-spacing: -.035em; margin-top: .35rem; line-height: 1; }

.empty {
  text-align: center; padding: 3.5rem 1.5rem; border: 1px dashed var(--grey-300);
  border-radius: var(--radius-lg); color: var(--grey-500); background: var(--bg-alt);
}

/* ── Auth pages ─────────────────────────────────────────────────────── */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } }
.auth-shell__aside {
  background: var(--ink); color: #fff; padding: clamp(2.5rem, 5vw, 4rem);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-shell__aside::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(760px 480px at 80% 10%, rgba(21,101,216,.35), transparent 60%);
}
.auth-shell__aside > * { position: relative; }
@media (max-width: 900px) { .auth-shell__aside { display: none; } }
.auth-shell__main {
  display: flex; align-items: center; justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) var(--gut);
}
.auth-card { width: 100%; max-width: 420px; }

/* ── Timeline ───────────────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1.6rem 2rem; }
.timeline li::before {
  content: ""; position: absolute; left: 3px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
  border: 2px solid var(--grey-300);
}
.timeline li.is-active::before { border-color: var(--blue); background: var(--blue); }
.timeline h4 { margin-bottom: .2rem; font-size: .98rem; }
.timeline p { font-size: .88rem; color: var(--fg-muted); margin: 0; }

/* ── Utility ────────────────────────────────────────────────────────── */
.divider-label {
  display: flex; align-items: center; gap: 1rem; margin: 1.75rem 0;
  font-size: .78rem; color: var(--grey-400); text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

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

@media print {
  .site-header, .site-footer, .dash-tabs, .btn, .study__aside { display: none !important; }
  body { background: #fff; }
}

/* ── Content + sticky aside ─────────────────────────────────────────── */
.split-aside { display: grid; grid-template-columns: 1.4fr .6fr; gap: 56px; align-items: start; }
.split-aside__side { position: sticky; top: 90px; }
@media (max-width: 900px) {
  .split-aside { grid-template-columns: 1fr; gap: 32px; }
  .split-aside__side { position: static; }
}
.hero__grid--wide { grid-template-columns: 1.25fr .75fr; }
@media (max-width: 900px) { .hero__grid--wide { grid-template-columns: 1fr; } }
.stats--2 { grid-template-columns: repeat(2, 1fr) !important; }
.stack-14 > * + * { margin-top: 14px; }
