/* ============================================================
   TAIL LEDGER — SHARED SITE STYLES (assets/site.css)
   Structure and layout for all four pages, in one file.
   Edit here once; every page picks it up.
   This file holds NO colors and NO featured data: every color,
   radius, and shadow below is a CSS variable whose value is set
   by assets/theme.js — the one file that carries the active
   look (palette + featured aircraft). Rotating the look still
   means replacing assets/theme.js only.
   ============================================================ */

      /* Layout and component styles only — no colors, no featured data.
         Every color, radius, and shadow is a CSS variable set by
         assets/theme.js. */

      * { box-sizing: border-box; }
      html { scroll-behavior: smooth; }
      @media (prefers-reduced-motion: reduce) {
        html { scroll-behavior: auto; }
        * { transition: none !important; animation: none !important; }
      }
      body {
        margin: 0;
        background: var(--paper);
        color: var(--ink);
        font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
        font-size: 17px;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
      }
      img { max-width: 100%; display: block; }
      a { color: var(--red); }
      .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
      .wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

      /* ---------- top bar ---------- */
      .topbar {
        position: sticky; top: 0; z-index: 50;
        background: color-mix(in srgb, var(--paper) 92%, transparent);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--line);
      }
      .topbar-in { display: flex; align-items: center; gap: 26px; min-height: 62px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
      .wordmark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
      .wordmark .name { font-weight: 900; letter-spacing: .04em; font-size: 19px; text-transform: uppercase; }
      .wordmark .name em { font-style: normal; color: var(--red); }
      .wordmark .reg { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: .08em; }
      nav.main { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
      nav.main a {
        color: var(--ink-soft); text-decoration: none; font-size: 14.5px; font-weight: 600;
        padding: 7px 11px; border-radius: 8px;
      }
      nav.main a:hover { color: var(--ink); background: var(--chip); }
      nav.main a.join { background: var(--red); color: var(--on-accent); margin-left: 10px; }
      nav.main a.join:hover { background: var(--red-dark); color: var(--on-accent); }

      /* ---------- hero ---------- */
      .hero { padding: 58px 0 0; }
      .hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 44px; align-items: center; }
      .hero-eyebrow {
        font-family: "IBM Plex Mono", monospace; font-size: 12.5px; letter-spacing: .14em;
        text-transform: uppercase; color: var(--red); font-weight: 600; margin: 0 0 18px;
        display: flex; align-items: center; gap: 10px;
      }
      .hero-eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--red); display: inline-block; }
      h1 {
        font-size: clamp(38px, 5.4vw, 62px); line-height: 1.04; font-weight: 900;
        letter-spacing: -0.015em; margin: 0 0 20px;
      }
      h1 .book { color: var(--red); }
      .hero-sub { font-size: 19px; color: var(--ink-soft); margin: 0 0 28px; max-width: 34em; }
      .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
      .btn {
        display: inline-flex; align-items: center; gap: 9px;
        font-weight: 700; font-size: 16px; text-decoration: none;
        padding: 13px 22px; border-radius: 10px; border: 1.5px solid transparent;
        transition: transform .15s ease, background .15s ease;
      }
      .btn:active { transform: translateY(1px); }
      .btn-red { background: var(--red); color: var(--on-accent); }
      .btn-red:hover { background: var(--red-dark); }
      .btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
      .btn-ghost:hover { background: var(--chip); }
      .hero-note { margin: 16px 0 0; font-size: 14px; color: var(--ink-faint); }
      .hero-photo { position: relative; }
      .hero-photo figure { margin: 0; }
      .hero-photo img {
        border-radius: var(--radius); box-shadow: var(--card-shadow);
        aspect-ratio: 3 / 2; object-fit: cover; width: 100%;
      }
      .hero-photo figcaption {
        font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-faint);
        margin-top: 10px; letter-spacing: .02em;
      }
      .hero-photo figcaption b { color: var(--ink-soft); font-weight: 600; }

      /* ---------- stats band ---------- */
      .stats { margin-top: 56px; background: var(--navy); color: var(--navy-text); }
      .stats-in {
        display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
      }
      .stat { padding: 26px 24px 22px; border-left: 1px solid var(--navy-line); }
      .stat:first-child { border-left: none; }
      .stat .num { font-size: 34px; font-weight: 900; letter-spacing: -0.01em; line-height: 1; }
      .stat .num span { color: var(--red); }
      .stat .lab { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--navy-faint); margin-top: 8px; }
      .stats-note { padding: 0 24px 20px; font-size: 13px; color: var(--navy-faint); }

      /* ---------- sections ---------- */
      section.block { padding: 64px 0 8px; }
      .sec-head { max-width: 720px; margin-bottom: 30px; }
      .sec-tag {
        font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600;
        letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 0 0 12px;
      }
      h2 { font-size: clamp(27px, 3.4vw, 38px); font-weight: 900; letter-spacing: -0.012em; line-height: 1.15; margin: 0 0 12px; }
      .sec-head p { color: var(--ink-soft); margin: 0; font-size: 17.5px; }

      /* distinctions tabs */
      .tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }
      .tab {
        font-family: "IBM Plex Mono", monospace; font-size: 13.5px; font-weight: 600; letter-spacing: .05em;
        padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line-strong);
        background: transparent; color: var(--ink-soft); cursor: pointer;
      }
      .tab:hover { border-color: var(--ink-faint); color: var(--ink); }
      .tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--navy-text); }
      .tab-panel {
        border: 1px solid var(--line); border-top: 3px solid var(--red);
        background: var(--paper-2); border-radius: 0 0 var(--radius) var(--radius);
        padding: 24px 28px; margin-top: 18px; box-shadow: var(--card-shadow);
      }
      .tab-panel h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
      .tab-panel p { margin: 0 0 12px; color: var(--ink-soft); max-width: 62em; }
      .tab-panel .examples { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--ink-faint); margin: 0; }
      .tab-panel .examples b { color: var(--red); font-weight: 600; }

      /* families */
      .fam-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
      .fam-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
      .fam-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
      .fam-card .body { padding: 18px 22px 20px; }
      .fam-card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
      .fam-card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
      .fam-list { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); overflow: hidden; }
      .fam-row { display: grid; grid-template-columns: 210px 1fr; gap: 18px; padding: 13px 22px; border-top: 1px solid var(--line); align-items: baseline; }
      .fam-row:first-child { border-top: none; }
      .fam-row .fname { font-weight: 800; font-size: 15.5px; }
      .fam-row .fdesc { color: var(--ink-soft); font-size: 15px; }
      .fam-row .fdesc .mono { font-size: 13px; color: var(--ink-faint); }

      /* record anatomy */
      .anatomy { display: grid; grid-template-columns: .92fr 1.08fr; gap: 40px; align-items: start; }
      .record-card {
        background: var(--navy); color: var(--navy-text); border-radius: var(--radius);
        padding: 26px 28px 22px; box-shadow: var(--card-shadow); position: relative; overflow: hidden;
      }
      .record-card::after {
        content: "MEMBERS ONLY"; position: absolute; top: 22px; right: -38px; transform: rotate(38deg);
        font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; letter-spacing: .18em;
        background: var(--red); color: var(--on-accent); padding: 5px 46px;
      }
      .record-card .rc-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--navy-line-strong); padding-bottom: 14px; margin-bottom: 8px; padding-right: 60px; }
      .record-card .rc-title { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-faint); }
      .rc-row { display: grid; grid-template-columns: 148px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--navy-line); align-items: center; }
      .rc-row:last-of-type { border-bottom: none; }
      .rc-row .k { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-faint); }
      .record-card.featured::after { content: "FEATURED EXAMPLE"; background: var(--gold); color: var(--gold-ink); }
      .rc-row .v { font-size: 15.5px; font-weight: 600; line-height: 1.45; }
      .rc-row .v .sub { display: block; font-weight: 400; font-size: 13.5px; color: var(--navy-faint); margin-top: 2px; }
      .rc-row .v a { color: var(--navy-text); text-decoration: underline; text-underline-offset: 3px; }
      .rc-row .v a:hover { color: var(--gold); }
      .photo-credit { font-size: 12px; color: var(--ink-faint); margin: 6px 2px 0; }
      .photo-credit:empty { display: none; }
      .photo-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
      .example-note { font-size: 13.5px; color: var(--ink-faint); margin: 14px 2px 0; max-width: 34em; }
      .record-card .rc-foot { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13.5px; color: var(--navy-faint); }
      .field-list { list-style: none; margin: 0; padding: 0; }
      .field-list li { padding: 11px 0; border-top: 1px solid var(--line); }
      .field-list li:first-child { border-top: none; padding-top: 2px; }
      .field-list b { display: block; font-size: 16.5px; }
      .field-list span { color: var(--ink-soft); font-size: 15.5px; }

      /* pipeline */
      .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
      .step { border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--radius); padding: 20px 22px 18px; }
      .step .n { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--red); text-transform: uppercase; }
      .step h3 { margin: 8px 0 6px; font-size: 18.5px; font-weight: 800; }
      .step p { margin: 0; color: var(--ink-soft); font-size: 15px; }

      /* membership */
      .member-band { background: var(--navy); color: var(--navy-text); border-radius: 20px; padding: 42px 48px; margin-top: 26px; }
      .member-band h2 { color: var(--navy-text); }
      .member-band .lede { color: var(--navy-faint); font-size: 17.5px; margin: 0; max-width: 46em; }
      .member-band .fine { font-size: 13.5px; color: var(--navy-faint); margin: 22px 0 0; max-width: 62em; }
      .tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; align-items: stretch; }
      .tier {
        background: var(--tier-bg); border: 1px solid var(--navy-line-strong);
        border-radius: var(--radius); padding: 26px 26px 24px; display: flex; flex-direction: column;
      }
      .tier.featured { background: var(--paper-2); color: var(--ink); border-color: var(--paper-2); box-shadow: var(--card-shadow); }
      .tier .lvl { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 4px; }
      .tier.featured .lvl { color: var(--red); }
      .tier h3 { margin: 0 0 2px; font-size: 21px; font-weight: 800; }
      .tier .price { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 4px; }
      .tier .price .amt { font-size: 44px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
      .tier .price .per { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--navy-faint); }
      .tier.featured .price .per { color: var(--ink-faint); }
      .tier .blurb { font-size: 15px; color: var(--navy-faint); margin: 0 0 16px; }
      .tier.featured .blurb { color: var(--ink-soft); }
      .tier ul { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
      .tier ul li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--navy-line); font-size: 15px; align-items: flex-start; }
      .tier.featured ul li { border-top-color: var(--line); }
      .tier ul li:first-child { border-top: none; }
      .tier ul svg { flex: none; margin-top: 4px; color: var(--check); }
      .tier.featured ul svg { color: var(--check-featured); }
      .tier .btn { justify-content: center; width: 100%; }
      .btn-light { background: var(--navy-text); color: var(--navy); }
      .btn-light:hover { background: var(--btn-light-hover); }
      .btn-outline-light { border-color: var(--navy-line-bold); color: var(--navy-text); background: transparent; }
      .btn-outline-light:hover { background: var(--tier-bg-hover); }
      .btn-redband { background: var(--red); color: var(--on-accent); }
      .btn-redband:hover { background: var(--red-dark); }
      .tier .tag {
        align-self: flex-start; font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600;
        letter-spacing: .12em; text-transform: uppercase; background: var(--gold); color: var(--gold-ink);
        padding: 4px 9px; border-radius: 5px; margin-bottom: 14px;
      }

      /* roadmap */
      .road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
      .road-card { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; background: transparent; }
      .road-card .n { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
      .road-card h3 { margin: 8px 0 6px; font-size: 18.5px; font-weight: 800; }
      .road-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

      /* about */
      .about-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }
      .about-grid img { border-radius: var(--radius); box-shadow: var(--card-shadow); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
      .about-grid figcaption { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-faint); margin-top: 10px; }
      .about-grid figure { margin: 0; }
      .about-copy p { color: var(--ink-soft); margin: 0 0 14px; font-size: 17px; }
      /* ---------- legal page prose ---------- */
      .prose { max-width: 76ch; }
      .prose p { color: var(--ink-soft); margin: 0 0 14px; font-size: 16.5px; line-height: 1.65; }
      .prose p b, .prose li b { color: var(--ink); }
      .prose h3 { margin: 22px 0 6px; font-size: 18.5px; font-weight: 800; color: var(--ink); }
      .prose ul { color: var(--ink-soft); margin: 0 0 14px; padding-left: 22px; font-size: 16.5px; line-height: 1.65; }
      .prose li { margin-bottom: 6px; }
      .short-box { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
      .short-box p { color: var(--ink-soft); margin: 0 0 10px; font-size: 16.5px; line-height: 1.65; }
      .short-box p:last-child { margin-bottom: 0; }
      .short-box b { color: var(--ink); }
      .about-copy p b { color: var(--ink); }

      /* faq */
      .faq { max-width: 820px; }
      details.faq-item { border: 1px solid var(--line); background: var(--paper-2); border-radius: 12px; margin-bottom: 12px; }
      details.faq-item summary {
        cursor: pointer; font-weight: 700; font-size: 16.5px; padding: 16px 22px; list-style: none;
        display: flex; justify-content: space-between; align-items: center; gap: 16px;
      }
      details.faq-item summary::-webkit-details-marker { display: none; }
      details.faq-item summary .plus { font-family: "IBM Plex Mono", monospace; color: var(--red); font-size: 20px; font-weight: 600; flex: none; }
      details.faq-item[open ] summary .plus { transform: rotate(45deg); }
      details.faq-item .a { padding: 0 22px 18px; color: var(--ink-soft); font-size: 15.5px; }
      details.faq-item .a p { margin: 0; }

      /* footer */
      footer { margin-top: 80px; background: var(--navy); color: var(--navy-faint); }
      .foot-in { padding: 38px 0 32px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 34px; }
      .foot-in .fname { color: var(--navy-text); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; font-size: 17px; }
      .foot-in p { font-size: 14px; margin: 10px 0 0; max-width: 44em; }
      .foot-links { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
      .foot-links a { color: var(--navy-text); text-decoration: none; font-weight: 600; }
      .foot-links a:hover { text-decoration: underline; }
      .foot-base { border-top: 1px solid var(--navy-line); padding: 18px 0 26px; font-size: 12.5px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
      .foot-base a { color: var(--navy-faint); }

      @media (max-width: 960px) {
        .hero-grid, .anatomy, .about-grid, .member-band, .foot-in { grid-template-columns: 1fr; }
        .stats-in { grid-template-columns: repeat(2, 1fr); }
        .stat:nth-child(3) { border-left: none; }
        .stat { border-top: 1px solid var(--navy-line); }
        .stat:nth-child(-n+2) { border-top: none; }
        .fam-grid, .steps, .road { grid-template-columns: 1fr 1fr; }
        .tiers { grid-template-columns: 1fr; max-width: 560px; }
        .member-band { padding: 32px 26px; }
        .hero { padding-top: 38px; }
      }
      @media (max-width: 600px) {
        body { font-size: 16px; }
        .fam-grid, .steps, .road { grid-template-columns: 1fr; }
        .fam-row { grid-template-columns: 1fr; gap: 3px; }
        .rc-row { grid-template-columns: 108px 1fr; }
        .wordmark .reg { display: none; }
        .wordmark .name { font-size: 17px; }
        nav.main { margin-left: 0; gap: 2px; }
        nav.main a { font-size: 13.5px; padding: 6px 8px; }
        .tab-panel { padding: 22px 20px; }
        .topbar-in { gap: 10px 14px; }
        .livery-switch, .mode-toggle { font-size: 12.5px; }
        h1 { font-size: 33px; }
        .hero { padding-top: 26px; }
      }

      /* ---------- keyboard focus (visible on every control) ---------- */
      :focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

      /* ---------- site livery switcher (site feature — assets/theme.js
         carries the catalogue; the button cycles it instantly) --- */
      .livery-switch {
        display: inline-flex; align-items: center; gap: 7px; flex: none;
        background: transparent; border: 1.5px solid var(--line-strong);
        color: var(--ink-soft); border-radius: 999px; padding: 6px 12px;
        font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
      }
      .livery-switch:hover { background: var(--chip); color: var(--ink); }
      .livery-switch .ls-lab {
        font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 500;
        letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint);
      }
      .livery-switch svg { flex: none; }

      /* ---------- light/dark toggle (site feature — assets/theme.js
         wires the switch and remembers the visitor's choice) ---------- */
      .mode-toggle {
        display: inline-flex; align-items: center; gap: 8px; flex: none;
        background: transparent; border: 1.5px solid var(--line-strong);
        color: var(--ink-soft); border-radius: 999px; padding: 6px 12px 6px 7px;
        font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
      }
      .mode-toggle:hover { background: var(--chip); color: var(--ink); }
      .mt-track {
        width: 38px; height: 20px; border-radius: 999px; position: relative; flex: none;
        background: var(--chip); border: 1px solid var(--line-strong);
      }
      .mt-knob {
        position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
        border-radius: 50%; background: var(--ink-soft);
        transition: transform .18s ease, background .18s ease;
      }
      html[data-mode="dark"] .mt-knob { transform: translateX(18px); background: var(--gold); }
      nav.main a[aria-current="page"]:not(.join) { color: var(--ink); background: var(--chip); }
      nav.main a.join[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--on-accent); }
    