  :root {
    --ink: #0f172a;
    --ink-2: #1e293b;
    --ink-3: #334155;
    --paper: #f8fafc;
    --mist: #e2e8f0;
    --slate: #64748b;
    --gold: #f2c94c;
    --gold-deep: #c9a227;
    --sky: #0c4a6e;
    --teal: #7fd8c4;
    --max: 1080px;
  }

  * {
    box-sizing: border-box
  }

  html {
    scroll-behavior: smooth
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto
    }
  }

  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink-2);
    background: var(--paper);
    line-height: 1.65
  }

  a {
    color: var(--sky)
  }

  .wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px
  }

  .eyebrow {
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 700
  }

  h1,
  h2,
  h3 {
    line-height: 1.2;
    color: var(--ink)
  }

  h2 {
    font-size: 1.75rem;
    margin: 0 0 .4em
  }

  .kicker {
    color: var(--slate);
    max-width: 46em
  }

  section {
    padding: 72px 0
  }

  .btn {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent
  }

  .btn-gold {
    background: var(--gold);
    color: var(--ink)
  }

  .btn-gold:hover {
    background: #f6d565
  }

  .btn-ghost {
    border-color: rgba(255, 255, 255, .35);
    color: #fff
  }

  .btn-ghost:hover {
    border-color: #fff
  }

  .btn-dark {
    border-color: var(--ink);
    color: var(--ink)
  }

  .btn-dark:hover {
    background: var(--ink);
    color: #fff
  }

  /* i18n: hide the inactive language, never touch the active one's display */
  [data-lang="es"] .lang-en {
    display: none !important
  }

  [data-lang="en"] .lang-es {
    display: none !important
  }

  /* language switch — fixed so it stays reachable down the whole page */
  .lang-switch {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 60;
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .28)
  }

  .lang-switch button {
    border: none;
    background: rgba(15, 23, 42, .88);
    color: #cbd5e1;
    font: inherit;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .6px;
    padding: 7px 13px;
    cursor: pointer;
    transition: background .2s, color .2s
  }

  .lang-switch button+button {
    border-left: 1px solid rgba(255, 255, 255, .22)
  }

  .lang-switch button:hover {
    color: #fff
  }

  .lang-switch button[aria-pressed="true"] {
    background: var(--gold);
    color: var(--ink)
  }

  @media (max-width:520px) {
    .lang-switch {
      top: 8px;
      right: 8px
    }

    .lang-switch button {
      padding: 6px 10px;
      font-size: .7rem
    }
  }

  /* HERO */
  .hero {
    background: linear-gradient(135deg, #0b1526 0%, #0f172a 55%, #123a52 100%);
    color: #e2e8f0;
    padding: 84px 0 64px
  }

  .hero .eyebrow {
    color: var(--gold)
  }

  .hero h1 {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.15rem);
    margin: .35em 0 .4em;
    max-width: 18em
  }

  .hero p.lead {
    font-size: 1.15rem;
    max-width: 38em;
    color: #cbd5e1;
    margin: 0 0 28px
  }

  .cta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 44px
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    overflow: hidden
  }

  .stat {
    background: rgba(15, 23, 42, .72);
    padding: 18px 20px
  }

  .stat b {
    display: block;
    font-size: 1.6rem;
    color: var(--gold)
  }

  .stat span {
    font-size: .85rem;
    color: #94a3b8
  }

  /* CASE FRAME */
  .case-note {
    background: #fffbe9;
    border-left: 5px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 20px 26px;
    margin-top: -34px;
    position: relative;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .08)
  }

  .case-note p {
    margin: 0;
    color: #5b4a12
  }

  /* NARRATIVE */
  .narrative p {
    max-width: 46em;
    font-size: 1.05rem
  }

  .pull {
    border-left: 4px solid var(--gold);
    padding: 6px 0 6px 22px;
    margin: 28px 0;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--ink);
    max-width: 34em
  }

  /* EXHIBITS */
  .exhibits {
    background: var(--ink);
    color: #cbd5e1
  }

  .exhibits h2,
  .exhibits h3 {
    color: #fff
  }

  .exhibits .kicker {
    color: #94a3b8
  }

  .ex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
    margin-top: 36px
  }

  .ex {
    background: #16233b;
    border: 1px solid #24344f;
    border-radius: 14px;
    padding: 26px
  }

  .ex .tag {
    color: var(--gold);
    font-weight: 800;
    letter-spacing: .1em;
    font-size: .75rem;
    text-transform: uppercase
  }

  .ex h3 {
    margin: .5em 0 .5em;
    font-size: 1.12rem
  }

  .ex p,
  .ex li {
    font-size: .95rem
  }

  .ex ul {
    padding-left: 18px;
    margin: .4em 0
  }

  .ex .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold)
  }

  .refs {
    font-size: .85rem;
    color: #7d8fa9;
    margin-top: 30px;
    max-width: 70em
  }

  .refs em {
    color: #a9b8cd
  }

  /* MANIFESTO */
  .manifesto ol {
    counter-reset: thesis;
    list-style: none;
    padding: 0;
    margin: 40px 0 0;
    display: grid;
    gap: 18px
  }

  .manifesto li {
    counter-increment: thesis;
    background: #fff;
    border: 1px solid var(--mist);
    border-radius: 14px;
    padding: 22px 26px 22px 74px;
    position: relative;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04)
  }

  .manifesto li::before {
    content: counter(thesis, decimal-leading-zero);
    position: absolute;
    left: 24px;
    top: 20px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--gold-deep)
  }

  .manifesto li b {
    color: var(--ink);
    display: block;
    margin-bottom: 4px
  }

  /* both languages live inside one <li> so the counters stay 01–06 either way */
  .manifesto li>.lang-en,
  .manifesto li>.lang-es {
    display: block
  }

  /* CATALOG */
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 34px
  }

  .chip {
    background: #fff;
    border: 1px solid var(--mist);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: .9rem;
    color: var(--ink-3)
  }

  .chip b {
    color: var(--ink)
  }

  .cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 22px
  }

  .card {
    background: #fff;
    border: 1px solid var(--mist);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink-2);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease
  }

  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12)
  }

  @media (prefers-reduced-motion: reduce) {
    .card {
      transition: none
    }

    .card:hover {
      transform: none
    }
  }

  .card img {
    width: 100%;
    aspect-ratio: 1/1;
    display: block;
    background: #0f172a
  }

  .card .body {
    padding: 14px 16px 16px
  }

  .card .body b {
    display: block;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 6px
  }

  .card .meta {
    font-size: .8rem;
    color: var(--slate)
  }

  .card .langs {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border: 1px solid var(--mist);
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .4px;
    color: var(--slate)
  }

  .browse-all {
    margin-top: 30px
  }

  /* QA */
  .qa {
    background: #eef4f8
  }

  .qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 34px
  }

  .qa-card {
    background: #fff;
    border: 1px solid var(--mist);
    border-radius: 14px;
    padding: 24px
  }

  .qa-card h3 {
    font-size: 1.05rem;
    margin: 0 0 .5em
  }

  .qa-card p {
    font-size: .95rem;
    margin: .3em 0
  }

  code,
  pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .85em
  }

  pre {
    background: var(--ink);
    color: #d7e3f4;
    padding: 14px 16px;
    border-radius: 10px;
    overflow-x: auto
  }

  /* CLASSROOM STEPS */
  .steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 34px
  }

  .step {
    border: 1px solid var(--mist);
    border-radius: 14px;
    padding: 24px;
    background: #fff
  }

  .step .n {
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    font-weight: 800;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px
  }

  .step h3 {
    font-size: 1.05rem;
    margin: 0 0 .4em
  }

  .step p {
    font-size: .95rem;
    margin: 0
  }

  /* DISCUSSION */
  .discussion {
    background: linear-gradient(135deg, #0b1526, #123a52);
    color: #cbd5e1
  }

  .discussion h2 {
    color: #fff
  }

  .discussion ol {
    max-width: 50em;
    padding-left: 22px;
    display: grid;
    gap: 14px;
    margin-top: 26px
  }

  .discussion li {
    padding-left: 6px
  }

  .discussion .license-line {
    margin-top: 34px;
    font-size: .95rem;
    color: #94a3b8
  }

  /* FOOTER */
  footer {
    background: var(--ink);
    color: #94a3b8;
    padding: 40px 0;
    font-size: .9rem
  }

  footer a {
    color: #cbd5e1
  }

  .foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px
  }