  :root {
    --bg: #0c1015;
    --surface: #10151c;
    --surface-2: #171e27;
    --line: #202932;
    --accent: #4fa8ff;
    --accent-dim: #2f7fd1;
    --accent-ink: #06131f;
    --ok: #4fb286;
    --warn: #c99a3f;
    --danger: #d1685a;
    --text: #eef1f5;
    --text-dim: #8b97a5;
    --text-faint: #566270;
    --radius-sw: 999px;
    --radius-sm: 3px;
    --mono: "Cascadia Code", "Cascadia Mono", Consolas, "SF Mono", Menlo, "Liberation Mono", monospace;
    --body-font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --display-font: "Archivo Narrow", "Arial Narrow", "Helvetica Neue Condensed", Arial, sans-serif;
  }

  :root[data-theme="light"] {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #eef1f4;
    --line: #e1e5ea;
    --accent: #1f7dc9;
    --accent-dim: #175f9c;
    --accent-ink: #ffffff;
    --ok: #1f8a5f;
    --warn: #9c7a12;
    --danger: #c33f2e;
    --text: #131a22;
    --text-dim: #566573;
    --text-faint: #8a97a4;
  }

  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #f7f8fa;
      --surface: #ffffff;
      --surface-2: #eef1f4;
      --line: #e1e5ea;
      --accent: #1f7dc9;
      --accent-dim: #175f9c;
      --accent-ink: #ffffff;
      --ok: #1f8a5f;
      --warn: #9c7a12;
      --danger: #c33f2e;
      --text: #131a22;
      --text-dim: #566573;
      --text-faint: #8a97a4;
    }
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body-font);
    height: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ---------- Top bar ---------- */

  .topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 0 24px;
    height: 54px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .topbar .wordmark { flex: 0 0 auto; }
  .topbar .wordmark .name { font-size: 1.08rem; }

  .topbar nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
  }

  .topbar .navlink {
    position: relative;
    padding: 8px 12px;
    font-size: 0.86rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--radius-sm);
  }
  .topbar .navlink:hover, .topbar .navlink.active { color: var(--text); background: var(--surface-2); }

  .topbar .has-drop { display: flex; align-items: center; }
  .topbar .has-drop:hover .dropdown, .topbar .has-drop:focus-within .dropdown { display: grid; }

  .topbar .dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    grid-template-columns: 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 6px;
    box-shadow: 0 12px 28px -8px rgba(0,0,0,0.4);
  }
  :root[data-theme="light"] .topbar .dropdown { box-shadow: 0 12px 28px -12px rgba(20,30,40,0.25); }

  .topbar .dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.83rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
  }
  .topbar .dropdown a:hover { background: var(--surface-2); }
  .topbar .dropdown a .code { font-family: var(--mono); font-size: 0.66rem; color: var(--text-faint); margin-left: auto; }

  .shell {
    flex: 1;
    display: flex;
    min-height: 0;
  }

  a { color: inherit; }

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

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

  h1, h2, h3 {
    font-family: var(--display-font);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-wrap: balance;
    margin: 0;
  }

  .eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
  }

  .home-hero .eyebrow, .m-hero .eyebrow { color: var(--accent); }

  .tabular { font-variant-numeric: tabular-nums; font-family: var(--mono); }

  /* ---------- Panel (sidebar) ---------- */

  .panel {
    flex: 0 0 264px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 54px;
    height: calc(100vh - 54px);
    overflow-y: auto;
  }

  .panel-head {
    padding: 22px 20px 16px;
    border-bottom: 1px solid var(--line);
  }

  .wordmark {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .wordmark .mark {
    width: 11px;
    height: 11px;
    background: var(--accent);
    display: inline-block;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  }

  .wordmark .name {
    font-family: var(--display-font);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
  }

  .wordmark .name b { color: var(--accent); }

  .panel-head p {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
  }

  .breaker-list {
    list-style: none;
    margin: 0;
    padding: 10px 10px 20px;
    flex: 1;
  }

  .breaker-list .home-link {
    display: block;
    padding: 9px 10px;
    margin-bottom: 6px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
  }
  .breaker-list .home-link:hover { color: var(--text); border-color: var(--line); }
  .breaker-list .home-link.active { color: var(--accent); border-color: var(--line); background: var(--surface-2); }

  .breaker {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin-bottom: 2px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: var(--body-font);
    font-size: 0.83rem;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
  }

  .breaker:hover { background: var(--surface-2); color: var(--text); }

  .breaker.active {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--text);
  }

  .breaker.active .sw { background: var(--accent); border-color: var(--accent); }
  .breaker.active .sw::after { transform: translateX(14px); background: var(--accent-ink); }

  .sw {
    flex: 0 0 auto;
    width: 30px;
    height: 16px;
    border-radius: var(--radius-sw);
    background: var(--surface-2);
    border: 1px solid var(--line);
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .sw::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-faint);
    transition: transform 0.15s ease, background 0.15s ease;
  }

  .breaker .code { font-family: var(--mono); font-size: 0.68rem; color: var(--text-faint); }
  .breaker .label { flex: 1; }

  .panel-foot {
    padding: 14px 20px 20px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--text-faint);
    line-height: 1.6;
  }

  /* ---------- Main / screens ---------- */

  main {
    flex: 1;
    min-width: 0;
  }

  .screen { display: none; }
  .screen.active { display: block; }

  .wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 72px 32px 108px;
  }

  /* Home */

  .home-hero {
    padding: 88px 32px 56px;
    max-width: 920px;
    margin: 0 auto;
  }

  .home-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.04;
    margin-top: 14px;
  }

  .home-hero h1 .accent { color: var(--accent); }

  .home-hero p.lede {
    max-width: 62ch;
    font-size: 1.08rem;
    line-height: 1.65;
    color: var(--text-dim);
    margin: 20px 0 0;
  }

  .board {
    max-width: 920px;
    margin: 44px auto 0;
    padding: 0 32px 88px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  @media (max-width: 760px) { .board { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 520px) { .board { grid-template-columns: 1fr; } }

  .card {
    background: var(--surface);
    padding: 26px 22px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.15s ease;
  }
  .card:hover { background: var(--surface-2); }
  .card:hover h3 { color: var(--accent); }

  .card-top { display: flex; align-items: center; }
  .card .code { font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); letter-spacing: 0.06em; }
  .card h3 { font-size: 1.05rem; transition: color 0.15s ease; }
  .card p { margin: 0; font-size: 0.83rem; color: var(--text-dim); line-height: 1.5; }
  .card .price-tag { font-family: var(--mono); font-size: 0.76rem; color: var(--text-faint); margin-top: auto; padding-top: 8px; }

  .principle-row {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 32px 88px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  @media (max-width: 700px) { .principle-row { grid-template-columns: 1fr; gap: 28px; } }
  .principle-row .eyebrow { display: block; margin-bottom: 10px; }
  .principle-row p { margin: 0; font-size: 0.9rem; color: var(--text-dim); line-height: 1.65; }

  /* Module screen */

  .m-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
  }

  .m-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-top: 10px; line-height: 1.06; }
  .m-hero .pitch { max-width: 56ch; font-size: 1.02rem; color: var(--text-dim); line-height: 1.6; margin: 16px 0 0; }

  .toggle-live {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
  }

  .toggle-live .sw-big {
    width: 56px;
    height: 30px;
    border-radius: var(--radius-sw);
    background: var(--accent);
    border: 1px solid var(--accent);
    position: relative;
  }
  .toggle-live .sw-big::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 27px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-ink);
  }
  .toggle-live .status { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ok); }

  .section-block { margin-top: 72px; }
  .section-block h2 { font-size: 1.4rem; margin-bottom: 22px; }

  .feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
  .feature-list li { background: var(--surface); padding: 20px 22px; font-size: 0.94rem; line-height: 1.55; color: var(--text); display: flex; gap: 16px; }
  .feature-list li .fx-code { font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); flex: 0 0 auto; padding-top: 0.2em; width: 8.5em; letter-spacing: 0.04em; }

  .gauge {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
  @media (max-width: 640px) { .gauge { grid-template-columns: 1fr; } }

  .tier {
    background: var(--surface);
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .tier.rec { background: var(--surface-2); }

  .tier .tier-name { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
  .tier.rec .tier-name { color: var(--accent); }
  .tier .tier-for { font-size: 0.82rem; color: var(--text-dim); }

  .tier .price { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
  .tier .price .amt { font-family: var(--mono); font-size: 1.7rem; font-weight: 600; }
  .tier .price .per { font-size: 0.78rem; color: var(--text-faint); }
  .tier .annual { font-family: var(--mono); font-size: 0.74rem; color: var(--ok); }

  .tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .tier li { font-size: 0.83rem; color: var(--text-dim); padding-left: 14px; position: relative; }
  .tier li::before { content: "—"; position: absolute; left: 0; color: var(--text-faint); }

  .cta-strip {
    margin-top: 64px;
    padding: 28px 26px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
  }
  .cta-strip p { margin: 0; font-size: 0.86rem; color: var(--text-dim); line-height: 1.6; max-width: 54ch; }
  .cta-strip strong { color: var(--text); }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
  }
  .btn:hover { background: var(--accent-dim); }

  .home-hero .btn { margin-top: 28px; }

  /* Blog */

  .post-grid {
    display: grid;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .post-card {
    background: var(--surface);
    padding: 26px 24px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: background 0.15s ease;
  }
  .post-card:hover { background: var(--surface-2); }
  .post-card:hover h3 { color: var(--accent); }
  .post-card .meta { font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); letter-spacing: 0.04em; }
  .post-card h3 { font-size: 1.15rem; line-height: 1.35; transition: color 0.15s ease; }
  .post-card p { margin: 0; font-size: 0.88rem; color: var(--text-dim); line-height: 1.55; }

  .article-meta {
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--text-faint);
    letter-spacing: 0.04em;
    margin-top: 10px;
  }

  .prose { max-width: 66ch; margin-top: 32px; }
  .prose p { font-size: 1rem; line-height: 1.75; color: var(--text); margin: 0 0 20px; }
  .prose h2 { font-size: 1.3rem; margin: 40px 0 16px; }
  .prose ul { margin: 0 0 20px; padding-left: 22px; }
  .prose li { font-size: 1rem; line-height: 1.7; color: var(--text); margin-bottom: 8px; }
  .prose strong { color: var(--text); }
  .prose a { color: var(--accent); }

  .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 0.76rem;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 24px;
  }
  .back-link:hover { color: var(--accent); }

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

  @media (max-width: 720px) {
    body { flex-direction: column; }
    .panel { position: relative; height: auto; flex: none; width: 100%; }
    .wrap, .home-hero, .board, .principle-row { padding-left: 20px; padding-right: 20px; }
  }
