/* Leave By — shared styles for every page shell. */
  :root {
    --bg: #14161a;
    --bg-2: #1a1d23;
    --panel: #1e222a;
    --panel-2: #23283180;
    --flap-bg: #0c0d10;
    --flap-hi: #17191e;
    --amber: #f2b441;
    --amber-dim: #a97d2b;
    --blue: #64abd6;
    --teal: #46b3a2;
    --ink: #eae8e2;
    --muted: #8b909b;
    --faint: #565c67;
    --go: #52b47a;
    --late: #e6605d;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
  }

  * { box-sizing: border-box; }

  html, body { margin: 0; padding: 0; }

  body {
    background:
      radial-gradient(1100px 600px at 50% -10%, #1d222b 0%, transparent 60%),
      var(--bg);
    color: var(--ink);
    font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    line-height: 1.45;
  }

  .wrap {
    max-width: 580px;
    margin: 0 auto;
    padding: 18px 20px 22px;
  }

  /* Single column by default; two columns (inputs | result) on wider screens
     so the whole tool fits in one screen without scrolling. */
  .grid { display: grid; grid-template-columns: 1fr; gap: 0; }
  .col { min-width: 0; }
  @media (min-width: 780px) {
    .wrap { max-width: 940px; padding: 22px 24px 20px; }
    /* `start`, deliberately: the left column has less content than the right,
       so making the two bottom edges meet means either pushing the ad down and
       opening a hole under the settings, or stretching the ad slot into a
       mostly-empty panel. Both were tried and both read worse than the ragged
       bottom edge they fix. Each column keeps its natural height. */
    .grid { grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
    .col > .card:last-child, .col > .board { margin-bottom: 0; }
  }

  /* ---------- Header ---------- */
  .eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
  }
  .eyebrow .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--go);
    box-shadow: 0 0 0 0 rgba(82, 180, 122, 0.55);
    animation: pulse 2.4s infinite;
  }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(82, 180, 122, 0.5); }
    70% { box-shadow: 0 0 0 7px rgba(82, 180, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(82, 180, 122, 0); }
  }
  h1 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 8px 0 3px;
  }
  h1 .accent { color: var(--amber); }
  .sub {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 14px;
  }

  /* ---------- Arrivals / departures switch ---------- */
  /* Renders as <button>s on the toggling home page and <a>s on the
     mode-locked pages; both are styled identically. */
  .modeswitch {
    display: inline-flex; gap: 4px; margin: 10px 0 12px; padding: 4px;
    background: var(--flap-bg);
    border: 1px solid var(--line-strong); border-radius: 999px;
  }
  .modeswitch:empty { display: none; }
  .modebtn {
    appearance: none; display: block;
    background: none; border: 0; border-radius: 999px;
    padding: 8px 16px; font-family: inherit; font-size: 13px; font-weight: 600;
    color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background 0.15s, color 0.15s;
  }
  .modebtn:hover { color: var(--ink); }
  .modebtn.active {
    background: rgba(242, 180, 65, 0.13);
    color: var(--amber);
    box-shadow: inset 0 0 0 1px var(--amber-dim);
    cursor: default;
  }
  @media (max-width: 380px) {
    .modebtn { padding: 8px 11px; font-size: 12.5px; }
  }

  /* ---------- Cards ---------- */
  .card {
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 15px 12px;
    margin-bottom: 11px;
  }
  .card-label {
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 600;
    margin-bottom: 9px;
  }

  /* ---------- Inputs ---------- */
  .flight-row { display: flex; gap: 10px; }
  input[type="text"] {
    flex: 1;
    min-width: 0;
    background: var(--flap-bg);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    border-radius: 11px;
    padding: 11px 14px;
    font-family: "Azeret Mono", monospace;
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  input[type="text"]::placeholder { color: var(--faint); letter-spacing: 0.08em; }
  input[type="text"]:focus {
    border-color: var(--amber-dim);
    box-shadow: 0 0 0 3px rgba(242, 180, 65, 0.12);
  }

  button {
    font-family: "Space Grotesk", sans-serif;
    cursor: pointer;
    border: none;
    border-radius: 11px;
    font-weight: 600;
    transition: transform 0.06s ease, background 0.15s, border-color 0.15s, color 0.15s;
  }
  button:active { transform: translateY(1px); }
  button:disabled { opacity: 0.5; cursor: default; }

  .btn-primary {
    background: var(--amber);
    color: #201803;
    padding: 0 20px;
    font-size: 15px;
    letter-spacing: 0.01em;
  }
  .btn-primary:hover:not(:disabled) { background: #ffc65a; }

  .btn-ghost {
    background: var(--flap-hi);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    padding: 11px 14px;
    font-size: 13.5px;
  }
  .btn-ghost:hover:not(:disabled) { border-color: var(--blue); color: #fff; }

  .loc-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .loc-row .btn-ghost { flex: 0 0 auto; }
  .loc-or { color: var(--faint); font-size: 12px; }
  .addr-wrap { display: flex; gap: 8px; flex: 1; min-width: 180px; }
  .addr-wrap input {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    padding: 10px 13px;
  }
  .loc-status {
    margin-top: 9px;
    font-size: 13px;
    color: var(--teal);
    display: none;
  }
  .loc-status.show { display: block; }
  .loc-status.err { color: var(--late); }

  /* ---------- Settings ---------- */
  details.settings summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 600;
  }
  details.settings summary::-webkit-details-marker { display: none; }
  details.settings summary .chev { transition: transform 0.2s; color: var(--muted); }
  details.settings[open] summary .chev { transform: rotate(180deg); }

  /* ---------- Quick presets ---------- */
  .preset-block { margin-bottom: 13px; }
  .preset-label {
    font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--faint); font-weight: 600; margin-bottom: 9px;
  }
  .presets { display: flex; gap: 7px; }
  .preset {
    flex: 1; min-width: 0;
    background: var(--flap-hi); color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 8px 6px; font-size: 12.5px; font-weight: 600;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
  }
  .preset:hover { border-color: var(--blue); color: var(--ink); }
  .preset.active { background: rgba(242,180,65,0.12); border-color: var(--amber-dim); color: var(--amber); }

  .slider { margin-top: 12px; }
  .slider:first-of-type { margin-top: 14px; }
  .slider .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
  .slider .name { font-size: 13.5px; color: var(--ink); }
  .slider .val {
    font-family: "Azeret Mono", monospace;
    font-size: 14px;
    color: var(--amber);
    font-weight: 600;
  }
  .slider .hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
  input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px; border-radius: 4px;
    background: var(--line-strong); outline: none;
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--amber); cursor: pointer;
    border: 3px solid var(--bg-2);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  }
  input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--amber); cursor: pointer; border: 3px solid var(--bg-2);
  }

  /* ---------- The board ---------- */
  .board { display: none; }
  .board.show { display: block; animation: rise 0.5s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  /* Empty state so the second column is present on load (wide screens only).
     Hidden on mobile's single column, and once a result replaces it. */
  .placeholder { display: none; }
  .placeholder .ph-body {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 12px; padding: 30px 12px 26px; color: var(--faint);
  }
  .placeholder .ph-mark { font-size: 30px; line-height: 1; color: var(--amber-dim); opacity: 0.65; }
  .placeholder p { margin: 0; font-size: 13px; line-height: 1.5; max-width: 32ch; }
  @media (min-width: 780px) { .placeholder { display: block; } }
  .placeholder.gone { display: none; }

  .board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 9px, not 13, so this label lines up with the first card label in the
       column opposite: that one is a card's 13px padding below the column top,
       while this one is centred against the taller status chip and so sits
       ~4px lower than its own box. */
    margin: 9px 2px 8px;
  }
  .board-head .lbl {
    font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
    color: var(--muted); font-weight: 600;
  }
  .status-chip {
    font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
    padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
    border: 1px solid var(--line-strong); color: var(--muted);
  }
  .status-chip.go { color: var(--go); border-color: rgba(82,180,122,0.4); background: rgba(82,180,122,0.08); }
  .status-chip.late { color: var(--late); border-color: rgba(230,96,93,0.4); background: rgba(230,96,93,0.08); }

  .leaveby {
    background: var(--flap-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 15px 16px 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .leaveby::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(120% 90% at 50% 0%, rgba(242,180,65,0.06), transparent 55%);
    pointer-events: none;
  }
  .leaveby .cap {
    font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--amber-dim); font-weight: 600; margin-bottom: 10px;
  }

  /* split-flap */
  .flaps { display: flex; justify-content: center; gap: 6px; }
  .flap {
    position: relative;
    width: 46px; height: 62px;
    background: linear-gradient(180deg, var(--flap-hi) 0%, var(--flap-hi) 49.5%, #0a0b0d 50.5%, #0a0b0d 100%);
    border-radius: 8px;
    font-family: "Azeret Mono", monospace;
    font-weight: 600;
    font-size: 42px;
    color: var(--amber);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 2px 6px rgba(0,0,0,0.4);
  }
  .flap.colon {
    width: 24px; background: transparent; box-shadow: none; color: var(--amber-dim);
  }
  .flap::after {
    content: ""; position: absolute; left: 4px; right: 4px; top: 50%;
    height: 1px; transform: translateY(-0.5px);
    background: rgba(0,0,0,0.55);
    box-shadow: 0 1px 0 rgba(255,255,255,0.04);
  }
  .flap.colon::after { display: none; }
  .flap .ch { display: inline-block; }
  .flap.flip .ch { animation: flip 0.42s ease; }
  @keyframes flip {
    0% { transform: rotateX(0deg); }
    45% { transform: rotateX(-88deg); opacity: 0.35; }
    55% { transform: rotateX(88deg); opacity: 0.35; }
    100% { transform: rotateX(0deg); opacity: 1; }
  }

  .countdown {
    margin-top: 10px;
    font-family: "Azeret Mono", monospace;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: 0.02em;
  }
  .countdown b { color: var(--ink); font-weight: 600; }
  .countdown.go b { color: var(--go); }
  .countdown.late b { color: var(--late); }

  /* wayfinding chip: terminal / gate / belt */
  .destchip {
    display: none; margin-top: 11px;
    font-family: "Azeret Mono", monospace;
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--blue);
  }
  .destchip.show { display: block; }
  .destchip .sep { color: var(--faint); margin: 0 7px; }

  /* board rows */
  .rows { margin-top: 12px; }
  .row {
    display: flex; align-items: baseline; gap: 10px;
    padding: 8px 2px;
    border-bottom: 1px dashed var(--line);
  }
  .row:last-child { border-bottom: none; }
  .row .k {
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); font-weight: 600; white-space: nowrap;
  }
  .row .lead { flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-3px); }
  .row .v {
    font-family: "Azeret Mono", monospace;
    font-size: 14.5px; color: var(--ink); text-align: right; font-weight: 500;
  }
  .row .v .sub2 { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
  /* For notes that read as a continuation of the value rather than a caption
     under it — the drive's distance and traffic source. */
  .row .v .sub2.inline { display: inline; margin-top: 0; }
  .row .v .blue { color: var(--blue); }
  .row .v .warn { color: var(--amber); }

  /* ---------- messages ---------- */
  .msg { font-size: 13.5px; padding: 12px 14px; border-radius: 11px; margin-top: 4px; display: none; }
  .msg.show { display: block; }
  .msg.error { background: rgba(230,96,93,0.1); border: 1px solid rgba(230,96,93,0.3); color: #f2a3a1; }
  .msg.info { background: rgba(100,171,214,0.08); border: 1px solid rgba(100,171,214,0.25); color: var(--blue); }

  .demo-banner {
    display: none;
    align-items: center; gap: 9px;
    font-size: 12.5px; color: var(--amber);
    background: rgba(242,180,65,0.07);
    border: 1px solid rgba(242,180,65,0.25);
    border-radius: 11px; padding: 8px 12px; margin-bottom: 11px;
  }
  .demo-banner.show { display: flex; }
  .demo-banner b { font-weight: 600; }

  .spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0,0,0,0.25); border-top-color: #201803; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ---------- Offers / affiliate ---------- */
  .offers { display: none; }
  .offers.show { display: block; }
  .offer-grid { display: flex; flex-direction: column; gap: 9px; margin-top: 2px; }
  @media (min-width: 460px) { .offer-grid { flex-direction: row; } .offer-grid .offer { flex: 1; } }
  .offer {
    display: flex; align-items: center; gap: 11px;
    text-decoration: none;
    background: var(--flap-hi);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 11px 13px;
    color: var(--ink);
    transition: border-color 0.15s, background 0.15s, transform 0.06s;
  }
  .offer:hover { border-color: var(--teal); background: #20242c; }
  .offer:active { transform: translateY(1px); }
  .offer .oi { font-size: 20px; line-height: 1; color: var(--amber); flex: 0 0 auto; }
  .offer .ot { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .offer .ot .oh { font-size: 13.5px; font-weight: 600; }
  .offer .ot .os { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .offer-disclosure { margin-top: 9px; font-size: 11px; color: var(--faint); }

  /* ---------- Ad zone ---------- */

  /* ---------- Live updates ---------- */
  .statusline { display: none; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 2px 10px; font-size: 11px; color: var(--muted); }
  .statusline.show { display: flex; }
  .statusline .seg { white-space: nowrap; }
  .statusline .seg.live { color: var(--go); font-weight: 600; }
  .statusline .seg.demo { color: var(--amber); font-weight: 600; }
  .statusline .seg.delay { color: var(--late); font-weight: 600; }
  .statusline .seg.warn { color: var(--amber); }
  .statusline .seg.muted { color: var(--faint); }
  .livebar { display: none; font-size: 13px; padding: 9px 12px; border-radius: 11px; margin-bottom: 10px; }
  .livebar.show { display: block; }
  .livebar.warn { background: rgba(242,180,65,0.1); border: 1px solid rgba(242,180,65,0.35); color: var(--amber); }
  .livebar.ease { background: rgba(82,180,122,0.09); border: 1px solid rgba(82,180,122,0.3); color: var(--go); }
  .livebar.info { background: rgba(100,171,214,0.08); border: 1px solid rgba(100,171,214,0.25); color: var(--blue); }
  .board-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
  .board-actions .btn-ghost { flex: 1 1 auto; min-width: 120px; text-align: center; }
  .btn-enroute.on { background: rgba(82,180,122,0.12); border-color: rgba(82,180,122,0.45); color: var(--go); }

  /* ---------- Saved places ---------- */
  .places { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
  .place-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--flap-hi); border: 1px solid var(--line-strong);
    border-radius: 999px; padding: 5px 6px 5px 11px; font-size: 12.5px; color: var(--ink);
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
  }
  .place-chip:hover { border-color: var(--blue); }
  .place-chip .px {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; color: var(--faint);
    font-size: 13px; line-height: 1;
  }
  .place-chip .px:hover { color: var(--late); }
  .place-save {
    display: none; margin-top: 9px; background: none; border: none; padding: 0;
    color: var(--muted); font-size: 12.5px; cursor: pointer; font-family: inherit;
  }
  .place-save.show { display: inline-block; }
  .place-save:hover { color: var(--amber); }

  /* ---------- Recent trips ---------- */
  .recents { display: none; margin-top: 11px; }
  .recents.show { display: block; }
  .recents-label {
    font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--faint); font-weight: 600; margin-bottom: 8px;
  }
  .recents-row { display: flex; flex-wrap: wrap; gap: 7px; }
  .recent-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--flap-hi); border: 1px solid var(--line-strong);
    border-radius: 999px; padding: 5px 6px 5px 11px; cursor: pointer;
    transition: border-color 0.15s;
  }
  .recent-chip:hover { border-color: var(--amber-dim); }
  .recent-chip .rc-main { font-family: "Azeret Mono", monospace; font-size: 12.5px; font-weight: 600; color: var(--ink); letter-spacing: 0.04em; }
  .recent-chip .rc-sub { font-size: 11px; color: var(--muted); }
  .recent-chip .rx {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; color: var(--faint); font-size: 13px; line-height: 1;
  }
  .recent-chip .rx:hover { color: var(--late); }

  /* ---------- En-route ---------- */
  .er-eta { margin-top: 2px; }

  footer {
    margin-top: 16px; text-align: center;
    font-size: 11.5px; color: var(--faint); line-height: 1.6;
  }
  footer a { color: var(--muted); }
  .footnav {
    margin-bottom: 10px; font-size: 12px; color: var(--faint);
  }
  .footnav a { color: var(--blue); text-decoration: none; }
  .footnav a:hover { text-decoration: underline; }
  .install-btn {
    display: none; margin: 0 auto 12px; padding: 8px 16px;
    background: var(--flap-hi); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .install-btn.show { display: block; }
  .install-btn:hover { border-color: var(--amber); color: #fff; }

  /* ---------- Display ad slot ---------- */
  /* Sits under the timing settings in the left column. The widget script
     fills the slot; until an ad loads the container is empty, so nothing
     below shifts. The unit is a fixed-width card, so centre it. */
  .ad-slot {
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px 14px 14px;
    margin-bottom: 11px;
    text-align: center;
  }
  .ad-label {
    font-size: 9.5px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 600;
    text-align: center;
    margin-bottom: 9px;
  }

  /* ---------- SEO content ---------- */
  .seo { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
  .seo h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 22px 0 8px; }
  .seo h2:first-child { margin-top: 0; }
  .seo p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
  .seo strong { color: var(--ink); font-weight: 600; }
  .seo ul { margin: 0 0 10px; padding-left: 20px; }
  .seo li { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin-bottom: 6px; }
  .faq { margin-top: 4px; }
  .faq details { border-bottom: 1px solid var(--line); }
  .faq summary {
    list-style: none; cursor: pointer; padding: 11px 2px;
    font-size: 13.5px; font-weight: 500; color: var(--ink);
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: "+"; color: var(--faint); font-size: 16px; }
  .faq details[open] summary::after { content: "–"; }
  .faq details p { padding: 0 2px 12px; margin: 0; }

  @media (max-width: 420px) {
    h1 { font-size: 23px; }
    .flap { width: 40px; height: 54px; font-size: 36px; }
    .flap.colon { width: 16px; }
    .flight-row { flex-direction: column; }
    .btn-primary { padding: 11px; }
  }

  /* ---------- Feedback ---------- */
  .feedback-btn {
    display: inline-block; margin: 0 auto 12px; padding: 8px 16px;
    background: var(--flap-hi); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  }
  .feedback-btn:hover { border-color: var(--amber); color: #fff; }

  .fb-overlay {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    padding: 20px; background: rgba(6, 7, 9, 0.66);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  }
  .fb-overlay.show { display: flex; }
  .fb-modal {
    width: 100%; max-width: 420px; max-height: calc(100vh - 40px); overflow-y: auto;
    background: linear-gradient(180deg, var(--panel), var(--bg-2));
    border: 1px solid var(--line-strong); border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
  .fb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
  .fb-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
  .fb-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 14px; }
  .fb-close {
    background: none; border: none; color: var(--muted); font-size: 20px;
    line-height: 1; padding: 2px 4px; cursor: pointer;
  }
  .fb-close:hover { color: var(--ink); }
  .fb-field { margin-bottom: 11px; }
  .fb-field label {
    display: block; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--faint); font-weight: 600; margin-bottom: 6px;
  }
  .fb-types { display: flex; flex-wrap: wrap; gap: 7px; }
  .fb-type {
    background: var(--flap-hi); color: var(--muted);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: 7px 13px; font-size: 12.5px; font-weight: 600;
  }
  .fb-type.active { background: var(--amber); color: #201803; border-color: var(--amber); }
  .fb-modal textarea,
  .fb-modal input[type="email"] {
    width: 100%; background: var(--flap-bg); border: 1px solid var(--line-strong);
    color: var(--ink); border-radius: 11px; padding: 10px 13px;
    font-family: "Space Grotesk", sans-serif; font-size: 14px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .fb-modal textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
  .fb-modal textarea:focus,
  .fb-modal input[type="email"]:focus {
    border-color: var(--amber-dim); box-shadow: 0 0 0 3px rgba(242, 180, 65, 0.12);
  }
  .fb-hint { font-size: 11px; color: var(--faint); margin-top: 5px; }
  /* Honeypot — hidden from real users, offered to bots. */
  .fb-hp {
    position: absolute; left: -9999px; width: 1px; height: 1px;
    overflow: hidden; opacity: 0;
  }
  .fb-submit {
    width: 100%; background: var(--amber); color: #201803;
    padding: 11px; font-size: 15px; border-radius: 11px; margin-top: 4px;
  }
  .fb-submit:hover:not(:disabled) { background: #ffc65a; }
  .fb-status { font-size: 12.5px; margin-top: 10px; min-height: 16px; text-align: center; }
  .fb-status.ok { color: var(--go); }
  .fb-status.err { color: var(--late); }
  .fb-privacy { font-size: 11px; color: var(--faint); margin-top: 12px; text-align: center; line-height: 1.5; }

  @media (prefers-reduced-motion: reduce) {
    .flap.flip .ch { animation: none; }
    .eyebrow .dot { animation: none; }
    .board.show { animation: none; }
  }
