/* ============================================================================
   Miles Dashboard — Singapore Airlines design language
   Cream canvas + SIA navy · champagne gold accents · Fraunces display / Inter body
   Batik kawung motif carried at sub-5% opacity. Soft shadows, no glassmorphism.
   ========================================================================== */

:root {
  /* ---------------------------------------------------------------------- *
   * NIGHT CABIN — the canvas is SIA navy, the batik and gold are the light. *
   * Same two hues as before (navy + champagne); their roles are inverted,   *
   * so gold now genuinely reads as metal rather than as beige-on-cream.     *
   * Variable NAMES keep their semantic role: --navy is "primary ink",       *
   * --paper is "card surface". Only their values moved.                     *
   * ---------------------------------------------------------------------- */

  /* --- canvas ------------------------------------------------------------ */
  --cream:      #0a1729;   /* page background (deep navy)    */
  --cream-2:    #0c1c31;   /* alternating band / inset       */
  --paper:      #122540;   /* card surface, one step up      */
  --paper-2:    #16294a;   /* raised surface / hover         */

  /* --- ink that sits ON gold or ON light fills (stays dark) ------------- */
  --ink:        #0a1729;
  --ink-2:      #16294a;

  /* --- primary ink on the dark canvas ----------------------------------- */
  --navy:       #f1e7d4;   /* warm cream — headings, primary */
  --navy-line:  rgba(226,209,175,0.15);
  --navy-soft:  rgba(226,209,175,0.055);

  /* --- champagne gold ---------------------------------------------------- */
  --gold:       #c9a96a;   /* champagne, surfaces + fills    */
  --gold-soft:  #d8bb7e;
  --gold-bright:#eed9a8;   /* highlight / tail fin           */
  --gold-ink:   #dcbc79;   /* gold that must stay legible    */

  --teal:       #4fa79a;   /* batik accent, sparing          */
  --rose:       #c98493;   /* batik accent, sparing          */

  /* --- type -------------------------------------------------------------- */
  --text:       #e7dfd0;
  --muted:      #a9b5cb;
  --muted-2:    #808ea8;
  --danger:     #e0a94e;   /* cap warnings (warm amber)      */
  --good:       #5cbf92;

  /* --- surfaces ---------------------------------------------------------- */
  --glass:      rgba(18,37,64,0.62);
  --glass-2:    rgba(18,37,64,0.90);
  --glass-line: rgba(226,209,175,0.12);
  --gold-glass: rgba(201,169,106,0.14);

  --radius:     20px;
  --radius-sm:  13px;
  --shadow:     0 16px 38px -20px rgba(0,0,0,0.62);
  --shadow-lg:  0 34px 74px -30px rgba(0,0,0,0.72);
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 1180px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* fixed backdrop layer — avoids background-attachment:fixed (janky on iOS/repaint bugs) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 640px at 80% -12%, rgba(201,169,106,0.16), transparent 64%),
    radial-gradient(900px 700px at 2% 4%, rgba(79,167,154,0.07), transparent 60%),
    linear-gradient(180deg, #0a1729 0%, #0d1e35 48%, #081422 100%);
}

/* Full-page batik wash. On the dark canvas the motif is gold and can carry far
   more presence than the sub-5% the cream version needed — it now reads as a
   woven texture in the weave of the page rather than a ghost. */
.motif-wash {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("assets/batik-motif-gold.svg");
  background-size: 168px;
  opacity: 0.15;
  /* No mask here: a mask on a fixed, full-viewport repeating background forces a
     full recomposite every scroll frame and stalls the renderer. The depth comes
     from the gradient scrim in body::before, which is a cheap paint. */
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 13px clamp(18px, 5vw, 46px);
  background: rgba(250,246,236,0.86);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid var(--navy-line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { display: block; }
.brand-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.18rem;
  letter-spacing: 0.2px; color: var(--navy);
}
.brand-thin { color: var(--gold-ink); font-weight: 400; margin-left: 3px; }

/* ------------------------------------------------- boarding-pass nav tabs */
.nav { display: flex; gap: 10px; margin-left: auto; align-items: flex-end; }
.nav a {
  --pass-lift: 0px;
  position: relative; display: flex; align-items: stretch; overflow: hidden;
  border-radius: 9px; background: var(--paper);
  border: 1px solid var(--navy-line);
  box-shadow: 0 2px 5px -3px rgba(22,41,74,0.34);
  transform: translateY(var(--pass-lift));
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease),
              border-color 0.24s var(--ease), background 0.24s var(--ease);
}
/* the perforation between stub and body */
.nav a::before {
  content: ""; position: absolute; top: 5px; bottom: 5px; left: 38px;
  border-left: 1px dashed rgba(22,41,74,0.22);
}
/* punched notches, filled with the header cream so they read as cut-outs */
.nav a::after {
  content: ""; position: absolute; left: 38px; top: -4px;
  width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 calc(100% + 30px) 0 0 var(--cream);
}
.pass-stub {
  display: grid; place-items: center; width: 38px; flex: none;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.6px;
  color: var(--gold-ink); background: rgba(185,150,83,0.10);
  transition: color 0.24s var(--ease), background 0.24s var(--ease);
}
.pass-body {
  display: grid; place-items: center; padding: 9px 15px 9px 13px;
  font-size: 0.83rem; font-weight: 500; color: var(--muted);
  letter-spacing: 0.1px; white-space: nowrap;
  transition: color 0.24s var(--ease);
}
/* hover — the feel of lifting premium card stock off a counter */
.nav a:hover {
  --pass-lift: -2px;
  border-color: rgba(185,150,83,0.45);
  box-shadow: 0 8px 16px -9px rgba(22,41,74,0.32);
}
.nav a:hover .pass-body { color: var(--navy); }

.nav a.is-active {
  --pass-lift: -4px;
  background: var(--gold); border-color: var(--gold);
  box-shadow: 0 12px 22px -12px rgba(22,41,74,0.62);
}
.nav a.is-active::before { border-left-color: rgba(255,255,255,0.26); }
.nav a.is-active .pass-stub { color: var(--ink); background: var(--gold-soft); }
.nav a.is-active .pass-body { color: var(--cream); font-weight: 600; }

.snapshot-badge {
  font-size: 0.72rem; letter-spacing: 0.4px; color: var(--gold-ink);
  border: 1px solid rgba(185,150,83,0.34); background: var(--gold-glass);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
@media (max-width: 860px) {
  .nav { gap: 7px; }
  .pass-body { padding: 9px 11px 9px 10px; font-size: 0.78rem; }
}
/* ------------------------------------------------- account / sign-in pill */
.account { display: inline-flex; align-items: center; }
.account-btn {
  font: inherit; font-size: 0.72rem; letter-spacing: 0.4px; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  color: var(--gold-ink); background: var(--gold-glass);
  border: 1px solid rgba(185,150,83,0.34);
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.account-btn:hover { color: var(--navy); background: rgba(185,150,83,0.2); border-color: rgba(185,150,83,0.5); }
/* Signed-in state reads as a solid champagne pill, not just another badge. */
.account[data-state="signed-in"] .account-btn {
  color: var(--ink); background: var(--gold); border-color: var(--gold);
}
.account[data-state="signed-in"] .account-btn:hover { background: var(--gold-soft); }

@media (max-width: 720px) {
  .nav { display: none; }
  .snapshot-badge { margin-left: auto; }
  .snapshot-badge + .account { margin-left: 8px; }
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding: clamp(52px, 8vw, 104px) clamp(18px, 5vw, 46px) 84px;
  display: flex; justify-content: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
/* batik motif as the hero treatment — geometric, quiet, never a graphic */
.hero-bg::before {
  content: ""; position: absolute; inset: -6% -4% 0;
  background: url("assets/batik-motif.svg") center / 300px repeat;
  opacity: 0.045;
  will-change: transform;
  animation: heroDrift 34s ease-in-out infinite alternate;
  -webkit-mask-image: radial-gradient(760px 460px at 50% 30%, #000 30%, transparent 78%);
  mask-image: radial-gradient(760px 460px at 50% 30%, #000 30%, transparent 78%);
}
/* warmth wash, painted above the motif but below the text */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(720px 340px at 50% 0%, rgba(185,150,83,0.14), transparent 68%),
    linear-gradient(180deg, transparent 60%, var(--cream) 100%);
}
@keyframes heroDrift { from { transform: scale(1) translateY(0); } to { transform: scale(1.05) translateY(-1.2%); } }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 900px; text-align: center; }

.eyebrow, .section-eyebrow {
  font-size: 0.74rem; letter-spacing: 3.4px; text-transform: uppercase;
  color: var(--gold-ink); font-weight: 600; margin: 0 0 18px;
}
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08;
  letter-spacing: -0.6px; margin: 0 auto 30px; color: var(--navy);
  max-width: 18ch;
}
.hero-title em { color: var(--gold-ink); font-weight: 500; }
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted);
  max-width: 56ch; margin: 0 auto 42px;
}

/* console */
.console {
  background: var(--paper);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-lg);
  max-width: 760px; margin: 0 auto;
  position: relative; overflow: hidden;
}
.console::before { /* champagne hairline along the top edge */
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.85;
}
.console-row { display: flex; gap: 10px; }
.query-input, .amount-input {
  font-family: var(--sans); font-size: 1rem; color: var(--text);
  background: #f8f3e7; border: 1px solid var(--navy-line);
  border-radius: var(--radius-sm); padding: 15px 16px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.query-input { flex: 1; min-width: 0; }
.query-input::placeholder { color: var(--muted-2); }
.query-input:focus, .amount-input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glass); background: #fffdf6;
}
.amount-wrap { position: relative; width: 118px; flex: none; }
.amount-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 0.95rem; pointer-events: none;
}
.amount-input { width: 100%; padding-left: 38px; }
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.rank-btn {
  position: relative; flex: none; overflow: hidden; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--cream);
  padding: 0 26px; border: none; border-radius: var(--radius-sm);
  background: var(--gold);
  box-shadow: 0 10px 22px -12px rgba(22,41,74,0.75);
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
}
.rank-btn:hover { transform: translateY(-1px); background: #1d3560; box-shadow: 0 15px 28px -13px rgba(22,41,74,0.8); }
.rank-btn:active { transform: translateY(0); }
.btn-glow {
  position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(224,196,137,0.45), transparent);
  transform: skewX(-18deg);
}
.rank-btn:hover .btn-glow { animation: sweep 0.75s var(--ease); }
@keyframes sweep { to { left: 130%; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.chip {
  font-size: 0.82rem; color: var(--muted); cursor: pointer;
  background: var(--cream); border: 1px solid var(--navy-line);
  border-radius: 999px; padding: 6px 13px;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease), transform 0.22s var(--ease);
}
.chip:hover { color: var(--navy); border-color: var(--gold); background: var(--gold-glass); transform: translateY(-1px); }

.detected {
  min-height: 1.1em; margin: 14px 2px 0; font-size: 0.82rem;
  color: var(--muted-2); letter-spacing: 0.2px;
}
.detected b { color: var(--gold-ink); font-weight: 600; }

@media (max-width: 560px) {
  .console-row { flex-wrap: wrap; }
  .query-input { flex: 1 1 100%; }
  .amount-wrap { flex: 1 1 auto; width: auto; }
  .rank-btn { flex: 1 1 auto; padding: 15px 20px; }
}

/* ---------------------------------------------------------------- results */
.results { max-width: 760px; margin: 28px auto 0; display: grid; gap: 14px; }
.result-card {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 18px; align-items: start;
  text-align: left; padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--navy-line); border-radius: var(--radius);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  animation: rise 0.55s var(--ease) both;
}
.result-card.rank-1 { border-color: rgba(185,150,83,0.5); background: linear-gradient(180deg, rgba(185,150,83,0.09), var(--paper) 60%); }
.result-card.rank-1::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(185,150,83,0.28);
}
.result-card:nth-child(2) { animation-delay: 0.07s; }
.result-card:nth-child(3) { animation-delay: 0.14s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rank-medal {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 8px 18px -9px rgba(185,150,83,0.8);
}
.rank-2 .rank-medal, .rank-3 .rank-medal {
  color: var(--muted); background: var(--cream-2); border: 1px solid var(--navy-line); box-shadow: none;
}
.result-main .rc-name { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; color: var(--navy); margin: 2px 0 3px; }
.rc-issuer { font-size: 0.78rem; color: var(--muted-2); letter-spacing: 0.3px; text-transform: uppercase; }
.rc-why { font-size: 0.9rem; color: var(--muted); margin: 9px 0 0; }
.rc-why .rc-cond { color: var(--gold-ink); }
.rc-warn {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 11px; padding: 9px 12px;
  font-size: 0.84rem; color: var(--danger);
  background: rgba(169,118,31,0.08); border: 1px solid rgba(169,118,31,0.24); border-radius: 11px;
}
.rc-warn svg { flex: none; margin-top: 2px; }
.result-figure { text-align: right; white-space: nowrap; }
.rc-miles { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--gold-ink); line-height: 1; }
.rc-miles small { font-family: var(--sans); font-size: 0.7rem; color: var(--muted-2); font-weight: 500; display: block; letter-spacing: 1px; margin-top: 4px; text-transform: uppercase; }
.rc-rate { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.rc-rate b { color: var(--navy); }
.rc-value { font-size: 0.8rem; color: var(--muted-2); margin-top: 2px; }

@media (max-width: 560px) {
  .result-card { grid-template-columns: 40px 1fr; }
  .result-figure { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 14px; }
  .rc-rate, .rc-value { margin-top: 0; }
}

.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); }
.scroll-cue span {
  display: block; width: 22px; height: 34px; border: 1.5px solid var(--navy-line); border-radius: 12px; position: relative;
}
.scroll-cue span::after {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 6px; border-radius: 2px; background: var(--gold);
  animation: cue 1.7s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 11px); } }

/* --------------------------------------------------------------- sections */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(72px, 10vw, 124px) clamp(18px, 5vw, 46px); }
.section-alt { position: relative; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -0.5px; color: var(--navy); margin: 8px 0 14px; line-height: 1.1; }
.section-lede { color: var(--muted); font-size: 1.03rem; max-width: 60ch; margin: 0; }

/* batik section divider — a hairline with a single motif at centre */
.section + .section > .section-head::before {
  content: ""; display: block; width: 100%; height: 26px; margin: 0 0 34px;
  background:
    url("assets/batik-motif.svg") center / 26px repeat-x,
    linear-gradient(90deg, transparent, var(--navy-line) 20%, var(--navy-line) 80%, transparent) center / 100% 1px no-repeat;
  opacity: 0.34;
}

/* wallet card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 20px; }
.wallet-card {
  position: relative; overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--navy-line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.wallet-card:hover { transform: translateY(-4px); border-color: rgba(185,150,83,0.42); box-shadow: var(--shadow-lg); }
.wallet-card::before { /* issuer colour bloom, kept faint on cream */
  content: ""; position: absolute; top: -40px; right: -40px; width: 150px; height: 150px; border-radius: 50%;
  background: var(--issuer, var(--gold-glass)); opacity: 0.16; filter: blur(26px);
}
.wc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: relative; }
.wc-name { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.wc-issuer { font-size: 0.74rem; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted-2); margin-top: 3px; }
.wc-net { font-size: 0.66rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-ink); border: 1px solid rgba(185,150,83,0.3); background: var(--gold-glass); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.wc-ref-tag { color: var(--teal); border-color: rgba(47,125,114,0.3); background: rgba(47,125,114,0.08); }
.wc-stats { display: flex; gap: 20px; margin: 16px 0 4px; }
.wc-stat .k { font-size: 0.7rem; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted-2); }
.wc-stat .v { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; color: var(--gold-ink); }
.wc-stat .v small { font-family: var(--sans); font-size: 0.68rem; color: var(--muted); font-weight: 500; }
.wc-bonus { font-size: 0.86rem; color: var(--muted); margin-top: 8px; min-height: 1.2em; }
.wc-bonus b { color: var(--navy); font-weight: 600; }

.cap { margin-top: 15px; }
.cap-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.cap-row .cap-label { color: var(--muted-2); text-transform: capitalize; }
.cap-row .cap-val { color: var(--text); }
.cap-track { height: 7px; border-radius: 999px; background: rgba(22,41,74,0.08); overflow: hidden; }
.cap-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); transition: width 0.5s var(--ease); }
.cap-fill.warn { background: linear-gradient(90deg, #c08a2c, var(--danger)); }
.cap-fill.full { background: linear-gradient(90deg, #b0503f, #c07a35); }
.cap-edit { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.cap-edit label { font-size: 0.74rem; color: var(--muted-2); }
.cap-edit input {
  width: 92px; font-family: var(--sans); font-size: 0.82rem; color: var(--text);
  background: rgba(10,23,41,0.45); border: 1px solid var(--navy-line); border-radius: 9px; padding: 6px 9px;
}
.cap-edit input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glass); }
.wc-uncapped { font-size: 0.8rem; color: var(--good); margin-top: 15px; letter-spacing: 0.2px; }
.wc-flag { display: inline-block; margin-top: 12px; font-size: 0.74rem; color: var(--danger); }

/* redemptions */
.section-alt { background: linear-gradient(180deg, rgba(22,41,74,0.035), transparent 70%); }
.redeem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.redeem-card {
  background: var(--paper); border: 1px solid var(--navy-line); border-radius: var(--radius-sm);
  padding: 18px 20px; box-shadow: 0 8px 20px -18px rgba(22,41,74,0.4);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.redeem-card:hover { transform: translateY(-3px); border-color: rgba(185,150,83,0.38); box-shadow: var(--shadow); }
.rd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rd-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.rd-cpm { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-ink); font-weight: 600; white-space: nowrap; }
.rd-cpm small { font-family: var(--sans); font-size: 0.64rem; color: var(--muted-2); letter-spacing: 0.5px; }
.rd-cur { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold-ink); margin-top: 2px; }
.rd-meta { margin-top: 13px; display: grid; gap: 7px; }
.rd-meta div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.82rem; }
.rd-meta .k { color: var(--muted-2); }
.rd-meta .v { color: var(--text); text-align: right; }
.rd-expiry-never { color: var(--good); }
.rd-expiry-short { color: var(--danger); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--navy-line); background: var(--cream-2); margin-top: 40px; padding: clamp(48px, 6vw, 74px) clamp(18px, 5vw, 46px) 40px; }
.footer-cols { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; }
.footer-brand { margin-bottom: 12px; }
.site-footer h4 { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 12px; font-weight: 600; }
.footer-note { font-size: 0.86rem; color: var(--muted); margin: 0 0 8px; max-width: 42ch; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-list li { font-size: 0.84rem; color: var(--muted); padding-left: 16px; position: relative; }
.footer-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.footer-list b { color: var(--navy); }
.footer-fine { max-width: var(--maxw); margin: 34px auto 0; padding-top: 22px; border-top: 1px solid var(--navy-line); font-size: 0.78rem; color: var(--muted-2); }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr; gap: 30px; } }

/* scroll-reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.card-grid > *, .redeem-grid > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.card-grid.in > *, .redeem-grid.in > * { opacity: 1; transform: none; }
.card-grid.in > *:nth-child(n) { transition-delay: calc(var(--i, 0) * 55ms); }

/* The wallet is core content, not decorative reveal content. Some mobile browsers
   defer IntersectionObserver callbacks after anchor navigation, which otherwise
   leaves its tiles transparent. Keep this section visible immediately. */
#wallet .section-head.reveal,
#walletGrid > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .card-grid > *, .redeem-grid > * { opacity: 1; transform: none; }
}

/* ============================================================================
   V2 additions — wallet mode, health check, onboarding, quirks, mobile nav
   ========================================================================== */

/* safe-area + room for the mobile tab bar */
:root { --tabbar-h: calc(60px + env(safe-area-inset-bottom, 0px)); }

/* shared ghost button */
.ghost-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--sans); font-size: 0.84rem; font-weight: 500; color: var(--muted);
  background: var(--paper); border: 1px solid var(--navy-line);
  border-radius: 999px; padding: 8px 15px;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease), transform 0.15s var(--ease);
}
.ghost-btn:hover { color: var(--navy); border-color: var(--gold); background: var(--gold-glass); transform: translateY(-1px); }
.ghost-btn svg { flex: none; }

/* ------------------------------------------------------------- mode toggle */
.mode-toggle {
  position: relative; display: inline-flex; align-self: center; margin: 0 auto 14px;
  padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--cream-2); border: 1px solid var(--navy-line);
}
.mode-btn {
  position: relative; z-index: 1; cursor: pointer; border: none; background: none;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color 0.25s var(--ease);
}
.mode-btn:hover { color: var(--navy); }
.mode-btn.is-active { color: var(--cream); }
.mode-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(47,125,91,0.16); }
.mode-btn.is-active .mode-dot { background: var(--gold-bright); box-shadow: none; }
.mode-count { font-weight: 700; opacity: 0.8; }
.mode-slider {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: var(--gold);
  box-shadow: 0 6px 14px -8px rgba(22,41,74,0.7);
  transition: transform 0.32s var(--ease);
}
.mode-toggle[data-mode="all"] .mode-slider { transform: translateX(100%); }
.mode-toggle[data-mode="wallet"] .mode-slider { transform: translateX(0); }

/* ------------------------------------------------------- result card (v2) */
.result-card { grid-template-columns: 48px 1fr; align-items: start; }
.result-body { min-width: 0; }
.rc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.rc-name { font-family: var(--serif); font-size: 1.24rem; font-weight: 600; color: var(--navy); margin: 1px 0 0; line-height: 1.15; }
.rc-figure { grid-column: 2; text-align: right; white-space: nowrap; }
.rc-rate { display: flex; align-items: baseline; gap: 4px; justify-content: flex-end; }
.rc-rate b { font-family: var(--serif); font-size: 2.05rem; font-weight: 600; color: var(--gold-ink); line-height: 0.95; }
.rc-rate small { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; color: var(--muted-2); letter-spacing: 1px; text-transform: uppercase; }
.rc-miles { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.rc-miles span { color: var(--muted-2); }
.rc-why { font-size: 0.9rem; color: var(--muted); margin: 10px 0 0; }
.rc-why .rc-cond { color: var(--gold-ink); }
.rc-strategy { margin-top: 11px; padding: 9px 11px; font-size: 0.83rem; line-height: 1.45; color: var(--muted); background: rgba(185,150,83,0.08); border: 1px solid rgba(185,150,83,0.24); border-radius: 10px; }
.rc-strategy b { color: var(--gold-ink); }
.rc-strategy-meta { display: block; margin-top: 4px; font-size: 0.73rem; color: var(--gold-ink); }
.decision-tree { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; padding: 11px 13px; font-size: 0.78rem; color: var(--muted); background: var(--cream); border: 1px solid var(--navy-line); border-radius: 11px; }
.decision-tree span { padding-right: 10px; border-right: 1px solid var(--navy-line); }
.decision-tree span:last-of-type { border-right: 0; }
.decision-tree b { width: 100%; color: var(--gold-ink); font-weight: 500; }

.rc-cap { margin-top: 12px; }
.rc-cap-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.76rem; color: var(--muted-2); margin-bottom: 6px; }
.rc-cap-row span:first-child { color: var(--muted); }
.rc-cap-uncapped { font-size: 0.8rem; color: var(--good); }

.rc-excl { margin-top: 12px; }
.rc-excl summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 500; color: var(--muted-2);
  padding: 5px 0; transition: color 0.2s var(--ease);
}
.rc-excl summary::-webkit-details-marker { display: none; }
.rc-excl summary:hover { color: var(--gold-ink); }
.rc-excl summary svg { transition: transform 0.25s var(--ease); }
.rc-excl[open] summary svg { transform: rotate(180deg); }
.rc-excl p { font-size: 0.82rem; color: var(--muted); margin: 4px 0 0; padding: 10px 12px; background: var(--cream); border: 1px solid var(--navy-line); border-radius: 10px; animation: exclOpen 0.28s var(--ease); }
@keyframes exclOpen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.rc-foot { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.rc-badge { font-size: 0.66rem; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--navy-line); background: var(--cream); padding: 3px 9px; border-radius: 6px; }
.rc-badge-net { color: var(--gold-ink); border-color: rgba(185,150,83,0.3); background: var(--gold-glass); }
.rc-badge-warn { color: var(--danger); border-color: rgba(169,118,31,0.26); background: rgba(169,118,31,0.08); }

@media (max-width: 560px) {
  .result-card { grid-template-columns: 38px 1fr; padding: 18px; gap: 14px; }
  .rc-rate b { font-size: 1.8rem; }
  .rc-head { gap: 10px; }
  .rc-name { font-size: 1.1rem; }
  .rc-miles { font-size: 0.72rem; }
  .decision-tree span { border-right: 0; padding-right: 0; }
}

/* ------------------------------------------------------------- empty state */
.empty-state {
  text-align: center; padding: 44px 24px;
  background: rgba(10,23,41,0.40);
  border: 1px dashed var(--navy-line); border-radius: var(--radius);
  animation: rise 0.5s var(--ease) both;
}
.empty-ico { width: 46px; height: 46px; margin: 0 auto 14px; color: var(--gold); opacity: 0.9; }
.empty-ico svg { width: 100%; height: 100%; }
.empty-title { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); margin: 0 0 6px; }
.empty-sub { font-size: 0.9rem; color: var(--muted); margin: 0 auto 18px; max-width: 34ch; }
.empty-state .rank-btn { padding: 12px 22px; }

/* ------------------------------------------------------------- skeletons */
.result-card.skeleton { pointer-events: none; animation: rise 0.4s var(--ease) both; }
.sk-block, .sk-line { background: linear-gradient(90deg, rgba(22,41,74,0.05) 25%, rgba(22,41,74,0.10) 37%, rgba(22,41,74,0.05) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
.sk-block { width: 46px; height: 46px; border-radius: 50%; }
.sk-line { height: 13px; margin-bottom: 11px; }
.sk-line-lg { height: 20px; width: 62%; }
.sk-line-sm { width: 40%; }
.result-card.skeleton .sk-line:last-child { width: 85%; margin-bottom: 0; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------------------- wallet extras */
.wallet-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.wallet-owned-note { font-size: 0.82rem; color: var(--muted-2); }
.wallet-card.is-owned { border-color: rgba(185,150,83,0.45); }
.wallet-card.is-owned::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none; box-shadow: inset 0 0 0 1px rgba(185,150,83,0.24); }
.wc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.wc-own { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.3px; color: var(--muted-2); border: 1px solid var(--navy-line); border-radius: 999px; padding: 3px 10px; }
.wc-own.is-owned { color: var(--good); border-color: rgba(47,125,91,0.32); background: rgba(47,125,91,0.08); }
.wc-flag { margin-top: 0; }

/* ------------------------------------------------------------- health check */
.health-summary { margin-bottom: 26px; }
.health-line { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; background: var(--paper); border: 1px solid var(--navy-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.health-line-ico { font-size: 1.1rem; line-height: 1.4; }
.health-line p { margin: 0; font-size: 1rem; color: var(--text); }
.health-line b { color: var(--gold-ink); font-weight: 600; }
.plan-shell { background: var(--paper); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); }
.plan-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-inputs label { display: grid; gap: 7px; font-size: 0.76rem; font-weight: 600; color: var(--muted); }
.plan-money { display: flex; align-items: center; background: var(--cream); border: 1px solid var(--navy-line); border-radius: 10px; padding: 0 10px; transition: border-color .2s var(--ease); }
.plan-money:focus-within { border-color: var(--gold); }
.plan-money i { font-style: normal; color: var(--muted-2); font-size: .8rem; }
.plan-money input { min-width: 0; width: 100%; padding: 10px 6px; border: 0; outline: 0; color: var(--navy); background: transparent; font: 600 .9rem var(--sans); }
.plan-hint { margin: 14px 0 0; font-size: .78rem; color: var(--muted-2); }
.plan-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.plan-stat { padding: 14px; background: var(--cream); border: 1px solid var(--navy-line); border-radius: 11px; }
.plan-stat span { display: block; font-size: .69rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted-2); }
.plan-stat b { display: block; margin-top: 5px; color: var(--gold-ink); font: 600 1.35rem var(--serif); }
.plan-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.plan-role { border: 1px solid var(--navy-line); border-radius: 11px; padding: 14px; }
.plan-role h3 { margin: 0; color: var(--gold-ink); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; }
.plan-role p { margin: 8px 0 0; color: var(--text); font-size: .88rem; line-height: 1.45; }
.plan-role small { display: block; margin-top: 5px; color: var(--muted-2); font-size: .76rem; }
.plan-coverage { display: grid; gap: 8px; margin-top: 18px; }
.plan-coverage-row { display: grid; grid-template-columns: minmax(100px, .8fr) 1.2fr 1.2fr; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--navy-line); font-size: .82rem; }
.plan-coverage-row b { color: var(--navy); }
.plan-coverage-row span { color: var(--muted); }
.plan-source { margin-top: 16px; color: var(--muted-2); font-size: .74rem; }
.wc-source { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 12px; font-size: .72rem; color: var(--muted-2); }
.wc-source a { color: var(--gold-ink); text-decoration: none; border-bottom: 1px solid rgba(185,150,83,.35); }
.statement-shell { background: var(--paper); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); box-shadow: var(--shadow); }
.statement-controls { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr) minmax(165px, .65fr); align-items: end; gap: 14px; }
.statement-field { display: grid; min-width: 0; gap: 7px; color: var(--muted); font-size: .76rem; font-weight: 600; }
.statement-label { display: block; min-height: 15px; }
.statement-controls select, .statement-file-trigger, .statement-controls .rank-btn { box-sizing: border-box; min-height: 52px; height: 52px; border-radius: 10px; }
.statement-controls select { width: 100%; color: var(--navy); background: var(--cream); border: 1px solid var(--navy-line); padding: 9px 11px; font: 500 .84rem var(--sans); }
.statement-file { position: relative; cursor: pointer; }
.statement-file input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.statement-file-trigger { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; color: var(--navy); background: var(--cream); border: 1px solid var(--navy-line); transition: border-color .2s var(--ease), background .2s var(--ease); }
.statement-file:hover .statement-file-trigger, .statement-file:focus-within .statement-file-trigger { border-color: var(--gold); background: #fffaf0; }
.statement-file-trigger b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 .84rem var(--sans); }
.statement-file-trigger small { flex: 0 0 auto; color: var(--muted-2); font-size: .68rem; font-weight: 500; white-space: nowrap; }
.statement-controls .rank-btn { align-self: end; min-width: 165px; padding: 0 18px; white-space: nowrap; }
.statement-password { display: flex; align-items: center; gap: 10px; margin-top: 13px; color: var(--muted-2); font-size: .73rem; }
.statement-password i { font-style: normal; color: var(--muted-2); }
.statement-password input { width: min(250px, 100%); min-height: 34px; box-sizing: border-box; border: 1px solid var(--navy-line); border-radius: 8px; background: var(--cream); color: var(--navy); padding: 7px 10px; font: 500 .78rem var(--sans); }
.statement-note, .statement-status { margin: 14px 0 0; color: var(--muted-2); font-size: .78rem; line-height: 1.45; }
.statement-status.is-error { color: var(--danger); }
.statement-results { display: grid; gap: 14px; margin-top: 18px; }
.statement-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.statement-stat { padding: 14px; border-radius: 11px; border: 1px solid var(--navy-line); background: var(--cream); }
.statement-stat span { display: block; color: var(--muted-2); font-size: .68rem; letter-spacing: .7px; text-transform: uppercase; }
.statement-stat b { display: block; margin-top: 5px; color: var(--gold-ink); font: 600 1.35rem var(--serif); }
.statement-card { padding: 16px; border: 1px solid var(--navy-line); border-radius: 11px; }
.statement-card h3 { margin: 0; color: var(--navy); font: 600 1rem var(--serif); }
.statement-card p { margin: 7px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.statement-list { list-style: none; padding: 0; margin: 11px 0 0; display: grid; gap: 8px; }
.statement-list li { padding-top: 8px; border-top: 1px solid var(--navy-line); color: var(--muted); font-size: .8rem; line-height: 1.4; }
.statement-list b { color: var(--text); }
@media (max-width: 720px) { .statement-controls { grid-template-columns: 1fr; gap: 12px; } .statement-controls .rank-btn { width: 100%; min-width: 0; } .statement-password { display: grid; gap: 6px; } .statement-password input { width: 100%; } .statement-overview { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .plan-inputs, .plan-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plan-coverage-row { grid-template-columns: 1fr; gap: 3px; } }
@media (max-width: 420px) { .plan-summary, .plan-inputs, .plan-roles { grid-template-columns: 1fr; } }
.info-shell { max-width: var(--maxw); margin: 0 auto; }
.info-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--navy-line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.info-step { position: relative; min-height: 190px; padding: 22px; border-right: 1px solid var(--navy-line); }
.info-step:last-child { border-right: 0; }
.info-step span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: var(--gold-ink); background: var(--gold-glass); border: 1px solid rgba(201,169,106,.3); font-size: .68rem; font-weight: 700; letter-spacing: .6px; }
.info-step:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 28px; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; color: var(--gold-ink); background: var(--paper); font-size: .75rem; }
.info-step h3 { margin: 15px 0 7px; color: var(--navy); font: 600 1.05rem var(--serif); }
.info-step p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.info-callout { margin: 14px 0 22px; padding: 15px 18px; color: var(--muted); background: rgba(201,169,106,.08); border: 1px solid rgba(201,169,106,.25); border-radius: 12px; font-size: .85rem; line-height: 1.5; }
.info-callout b { color: var(--gold-ink); }
.info-faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info-faq { overflow: hidden; border: 1px solid var(--navy-line); border-radius: 12px; background: var(--paper); }
.info-faq summary { position: relative; padding: 15px 44px 15px 16px; cursor: pointer; color: var(--navy); font: 600 .92rem var(--sans); line-height: 1.35; list-style: none; }
.info-faq summary::-webkit-details-marker { display: none; }
.info-faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--gold-ink); font: 400 1.3rem var(--serif); }
.info-faq[open] summary { border-bottom: 1px solid var(--navy-line); background: rgba(201,169,106,.06); }
.info-faq[open] summary::after { content: "−"; }
.info-faq p { margin: 0; padding: 14px 16px 16px; color: var(--muted); font-size: .83rem; line-height: 1.5; }
@media (max-width: 900px) { .info-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .info-step:nth-child(2) { border-right: 0; } .info-step:nth-child(-n+2) { border-bottom: 1px solid var(--navy-line); } .info-step:nth-child(2)::after { display: none; } .info-step:nth-child(3)::after { display: block; } }
@media (max-width: 620px) { .info-flow, .info-faq-grid { grid-template-columns: 1fr; } .info-step { min-height: auto; border-right: 0; border-bottom: 1px solid var(--navy-line); } .info-step:last-child { border-bottom: 0; } .info-step:not(:last-child)::after { content: "↓"; right: auto; left: 25px; top: auto; bottom: -10px; } }
.health-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; background: rgba(10,23,41,0.40); border: 1px dashed var(--navy-line); border-radius: var(--radius); }
.health-empty p { margin: 0; color: var(--muted); max-width: 46ch; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.health-card {
  position: relative; overflow: hidden; padding: 18px 18px 20px;
  background: var(--paper);
  border: 1px solid var(--navy-line); border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px -18px rgba(22,41,74,0.4);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.health-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.health-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.health-card.level-green::before { background: linear-gradient(180deg, #4a9c76, #2f7d5b); }
.health-card.level-amber::before { background: linear-gradient(180deg, #c9a13a, #a9761f); }
.health-card.level-red::before { background: linear-gradient(180deg, #c26b58, #b0503f); }
.hc-top { display: flex; align-items: center; gap: 8px; }
.hc-dot { font-size: 0.7rem; }
.hc-verdict { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.level-green .hc-verdict { color: var(--good); }
.level-amber .hc-verdict { color: var(--danger); }
.level-red .hc-verdict { color: #b0503f; }
.hc-cat { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; color: var(--navy); margin: 8px 0 6px; }
.hc-note { font-size: 0.84rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* ------------------------------------------------------------- overlays / sheets */
.overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(12px, 4vw, 40px); }
.overlay[hidden] { display: none; }
.overlay-scrim { position: absolute; inset: 0; background: rgba(22,41,74,0.34); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.26s var(--ease); }
.overlay.open .overlay-scrim { opacity: 1; }
.sheet {
  position: relative; width: 100%; max-width: 640px; max-height: min(88vh, 900px); overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--navy-line); border-radius: var(--radius);
  box-shadow: 0 50px 100px -40px rgba(22,41,74,0.55); padding: clamp(22px, 4vw, 34px);
  transform: translateY(16px) scale(0.98); opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  -webkit-overflow-scrolling: touch;
}
.overlay.open .sheet { transform: none; opacity: 1; }
.sheet-head { margin-bottom: 20px; }
.sheet-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 4vw, 2rem); color: var(--navy); margin: 6px 0 10px; letter-spacing: -0.3px; }
.sheet-lede { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 52ch; }
.sheet-x { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; cursor: pointer; color: var(--muted); background: var(--cream); border: 1px solid var(--navy-line); border-radius: 50%; transition: color 0.2s, background 0.2s; }
.sheet-x:hover { color: var(--navy); background: var(--gold-glass); }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

/* pick grid (onboarding) */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pick-card {
  position: relative; cursor: pointer; text-align: left; overflow: hidden;
  display: flex; flex-direction: column; gap: 3px;
  padding: 15px 15px 16px; min-height: 104px;
  background: var(--cream);
  border: 1.5px solid var(--navy-line); border-radius: var(--radius-sm);
  transition: transform 0.18s var(--ease), border-color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.pick-card::before { content: ""; position: absolute; top: -30px; right: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--issuer, var(--gold-glass)); opacity: 0.16; filter: blur(20px); transition: opacity 0.25s var(--ease); }
.pick-card:hover { transform: translateY(-2px); border-color: rgba(185,150,83,0.42); }
.pick-card.is-picked { border-color: var(--gold); background: linear-gradient(160deg, var(--gold-glass), var(--paper)); box-shadow: 0 10px 26px -16px rgba(185,150,83,0.8); }
.pick-card.is-picked::before { opacity: 0.3; }
.pick-check {
  position: absolute; top: 11px; right: 11px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; color: var(--cream);
  background: var(--gold);
  transform: scale(0); transition: transform 0.24s cubic-bezier(0.34,1.56,0.64,1);
}
.pick-card.is-picked .pick-check { transform: scale(1); }
.pick-issuer { font-size: 0.68rem; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted-2); }
.pick-name { font-family: var(--serif); font-size: 1rem; font-weight: 600; color: var(--navy); line-height: 1.2; margin-top: 2px; }
.pick-bonus { font-size: 0.78rem; color: var(--gold-ink); margin-top: auto; padding-top: 8px; }
.pick-card.pop { animation: pickPop 0.32s var(--ease); }
@keyframes pickPop { 0% { transform: translateY(-2px) scale(1); } 40% { transform: translateY(-2px) scale(1.035); } 100% { transform: translateY(-2px) scale(1); } }
.onboard-save-count { font-weight: 700; }

/* quirk form */
.quirk-form { display: grid; gap: 16px; }
.field-check { display: flex; align-items: flex-start; gap: 9px; font-size: 0.82rem; line-height: 1.45; color: var(--muted); cursor: pointer; }
.field-check input { margin-top: 3px; accent-color: var(--gold); }
.field { display: grid; gap: 7px; }
.field-label { font-size: 0.8rem; font-weight: 600; color: var(--gold-ink); letter-spacing: 0.2px; }
.quirk-form .query-input { width: 100%; font-family: var(--sans); line-height: 1.5; resize: vertical; }
.quirk-form textarea.query-input { min-height: 84px; }
.quirk-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.quirk-hint { font-size: 0.8rem; color: var(--muted-2); }
.footer-quirk-btn { margin-top: 16px; }
.quirk-thanks { text-align: center; padding: 14px 0 6px; animation: rise 0.4s var(--ease) both; }
.quirk-thanks-ico { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; color: var(--good); background: rgba(47,125,91,0.10); border: 1px solid rgba(47,125,91,0.28); }
.quirk-thanks-title { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); margin: 0 0 8px; }
.quirk-thanks-sub { font-size: 0.9rem; color: var(--muted); margin: 0 auto 20px; max-width: 40ch; }

/* ------------------------------------------------------------- mobile tab bar */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(250,246,236,0.90); backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-top: 1px solid var(--navy-line);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px; min-height: 48px; border-radius: 12px;
    font-size: 0.66rem; font-weight: 600; letter-spacing: 0.2px; color: var(--muted-2);
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
  }
  .tab svg { width: 22px; height: 22px; }
  .tab.is-active { color: var(--gold-ink); background: var(--gold-glass); }
  body { padding-bottom: var(--tabbar-h); }
  .site-footer { margin-bottom: 0; }
}

/* keyboard focus visibility everywhere */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.query-input:focus-visible, .amount-input:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .mode-slider, .pick-check, .rc-excl summary svg, .sheet, .overlay-scrim { transition: none !important; }
  .sk-block, .sk-line { animation: none !important; }
  .pick-card.pop { animation: none !important; }
}

/* ============================================================================
   Destination + runway  (PR #2)
   A compact band: the emotional hook sits above the ranker console without
   displacing it. Restrained — one gold line, one aircraft, no chrome.
   ========================================================================== */

.journey {
  position: relative;
  margin: 0 auto 34px;
  padding: 26px 28px 22px;
  background: var(--paper);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
}
/* batik motif carried on the card edge, well under 5% */
.journey::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background-image: url("assets/batik-motif.svg");
  background-size: 190px;
  opacity: 0.035;
  pointer-events: none;
  mask-image: linear-gradient(105deg, #000 0%, transparent 46%);
}
.journey > * { position: relative; }

/* --- controls ----------------------------------------------------------- */
.journey-controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px;
  margin-bottom: 24px;
}
.journey-field { display: flex; flex-direction: column; gap: 7px; flex: 1 1 260px; min-width: 0; }
.journey-field-balance { flex: 0 1 190px; }
.journey .field-label {
  font-size: 0.7rem; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600;
}
.select-wrap { position: relative; display: block; }
.select-chev {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  color: var(--gold-ink); pointer-events: none;
}
.dest-select, .balance-input {
  width: 100%; font-family: var(--sans); font-size: 0.95rem; color: var(--text);
  background: var(--cream); border: 1px solid var(--navy-line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.dest-select { appearance: none; padding-right: 38px; cursor: pointer; }
.dest-select:focus-visible, .balance-input:focus-visible {
  outline: none; border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px var(--gold-glass);
}
.balance-hint { font-size: 0.76rem; color: var(--muted-2); padding-bottom: 13px; }

/* --- runway ------------------------------------------------------------- */
.runway-wrap { margin-bottom: 22px; }
.runway { position: relative; padding: 22px 0 8px; }
.runway-label {
  position: absolute; top: 0; font-size: 0.72rem; letter-spacing: 2.4px;
  font-weight: 600; color: var(--muted-2);
}
.runway-label-from { left: 0; }
.runway-label-to   { right: 0; color: var(--gold-ink); transition: opacity 420ms var(--ease); }
/* the aircraft occupies this corner once it lifts — yield the label */
.journey.is-ready .runway-label-to { opacity: 0; }

.runway-strip {
  position: relative; height: 10px; border-radius: 5px;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  overflow: hidden;
}
/* centreline dashes — the only "runway" signal needed */
.runway-centerline {
  position: absolute; left: 0; right: 0; top: 50%; height: 1.5px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(
    to right,
    rgba(22,41,74,0.30) 0 14px,
    transparent 14px 30px
  );
}
.runway-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 5px 0 0 5px;
  transition: width 620ms var(--ease);
}

.plane {
  position: absolute; left: 0; bottom: 2px;
  width: 26px; height: 26px; margin-left: -13px;
  color: var(--navy);
  transform: rotate(45deg);
  transform-origin: 50% 50%;
  transition: left 620ms var(--ease), transform 420ms var(--ease), color 420ms var(--ease);
}
.plane svg { width: 100%; height: 100%; display: block; }

.runway-progress {
  margin: 12px 0 0; font-size: 0.92rem; color: var(--muted);
}
.runway-progress strong { color: var(--navy); font-weight: 600; }

/* takeoff: at 100% the aircraft lifts and the strip goes gold */
.journey.is-ready .plane {
  transform: rotate(30deg) translate(6px, -16px);
  color: var(--gold-ink);
}
.journey.is-ready .runway-progress strong { color: var(--gold-ink); }

/* --- the five stats ----------------------------------------------------- */
.journey-stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 1px; margin: 0;
  background: var(--navy-line);
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.journey-stats .stat { background: var(--paper); padding: 13px 15px; min-width: 0; }
.journey-stats dt {
  font-size: 0.67rem; letter-spacing: 1.9px; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; margin-bottom: 5px;
}
.journey-stats dd {
  margin: 0; font-family: var(--serif); font-size: 1.02rem;
  color: var(--navy); line-height: 1.25;
}
.journey-note {
  grid-column: 1 / -1; background: var(--paper); margin: 0;
  padding: 10px 15px; font-size: 0.78rem; color: var(--muted-2);
  border-top: 1px solid var(--navy-line);
}

/* hairline between the goal band and the ranker console */
.hero-rule {
  height: 1px; max-width: 260px; margin: 0 auto 26px;
  background: linear-gradient(90deg, transparent, var(--navy-line), transparent);
}

@media (max-width: 860px) {
  .journey-stats { grid-template-columns: repeat(2, 1fr); }
  .journey-stats .stat-wide { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .journey { padding: 20px 18px 18px; }
  .journey-field-balance { flex: 1 1 100%; }
  .balance-hint { display: none; }
  .journey-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .runway-fill, .plane { transition: none; }
}

/* ============================================================================
   Micro-interactions  (PR #3)
   A single aircraft drifts across the header every minute or two. Slow, quiet,
   never in front of anything the user is reading.
   ========================================================================== */

.flyover {
  position: absolute; left: 0; top: 50%;
  width: 15px; height: 15px;
  margin-top: -26px;
  color: var(--gold-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-60px) rotate(90deg);
  z-index: 0;
}
.flyover svg { width: 100%; height: 100%; display: block; }

/* the header clips the flight path so it enters and exits cleanly */
.site-header { overflow: hidden; }
/* keep the interactive furniture above the flight path */
.brand, .nav, .snapshot-badge { position: relative; z-index: 1; }

.flyover.is-flying {
  animation: flyover 13s linear 1;
}
@keyframes flyover {
  0%   { opacity: 0;    transform: translateX(-60px) rotate(90deg); }
  12%  { opacity: 0.55; }
  88%  { opacity: 0.55; }
  100% { opacity: 0;    transform: translateX(calc(100vw + 60px)) rotate(90deg); }
}

/* a faint contrail, drawn behind the aircraft */
.flyover::after {
  content: ""; position: absolute; right: 100%; top: 50%;
  width: 46px; height: 1px; margin-right: 3px;
  background: linear-gradient(270deg, currentColor, transparent);
  opacity: 0.4;
}

/* --- reveal polish ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .flyover { display: none; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .hero-bg::before { animation: none; }
}

/* ============================================================================
   NIGHT CABIN — refinements
   Overrides that finish the inversion: surfaces that were hard-coded light,
   the batik switched to its gold cut, tightened section rhythm, and the
   airliner. Appended so it wins on source order at equal specificity.
   ========================================================================== */

/* --- header ------------------------------------------------------------- */
.site-header {
  background: rgba(10,23,41,0.82);
  border-bottom: 1px solid rgba(226,209,175,0.13);
}
/* ---------------------------------------------------------------- page views */
html[data-view="pilot"] #health,
html[data-view="pilot"] #plan,
html[data-view="pilot"] #statements,
html[data-view="pilot"] #redemptions,
html[data-view="pilot"] #info { display: none; }
html[data-view="plan"] #recommend,
html[data-view="plan"] #wallet,
html[data-view="plan"] #info { display: none; }
html[data-view="info"] #recommend,
html[data-view="info"] #wallet,
html[data-view="info"] #health,
html[data-view="info"] #plan,
html[data-view="info"] #statements,
html[data-view="info"] #redemptions { display: none; }
html[data-view="pilot"] .nav a[data-view-link="pilot"],
html[data-view="plan"] .nav a[data-view-link="plan"],
html[data-view="info"] .nav a[data-view-link="info"] {
  color: var(--ink); background: var(--gold); border-color: var(--gold); box-shadow: 0 12px 24px -10px rgba(201,169,106,0.42);
}
html[data-view="pilot"] .nav a[data-view-link="pilot"]::before,
html[data-view="plan"] .nav a[data-view-link="plan"]::before,
html[data-view="info"] .nav a[data-view-link="info"]::before { border-left-color: rgba(10,23,41,0.34); }
html[data-view="pilot"] .nav a[data-view-link="pilot"] .pass-stub,
html[data-view="plan"] .nav a[data-view-link="plan"] .pass-stub,
html[data-view="info"] .nav a[data-view-link="info"] .pass-stub { color: var(--ink); background: rgba(10,23,41,0.13); }
html[data-view="pilot"] .nav a[data-view-link="pilot"] .pass-body,
html[data-view="plan"] .nav a[data-view-link="plan"] .pass-body,
html[data-view="info"] .nav a[data-view-link="info"] .pass-body { color: var(--ink); font-weight: 600; }
/* perforation + notches read against the dark header */
.nav a::before { border-left-color: rgba(226,209,175,0.24); }
.nav a { box-shadow: 0 2px 6px -3px rgba(0,0,0,0.6); }
.nav a:hover {
  border-color: rgba(216,187,126,0.5);
  box-shadow: 0 10px 20px -10px rgba(0,0,0,0.7);
}
.pass-stub { background: rgba(201,169,106,0.14); }
/* active pass is gold — its dashes and stub must go dark */
.nav a.is-active { box-shadow: 0 12px 24px -10px rgba(201,169,106,0.42); }
.nav a.is-active::before { border-left-color: rgba(10,23,41,0.34); }
.nav a.is-active .pass-stub { color: var(--ink); background: rgba(10,23,41,0.13); }
.nav a.is-active .pass-body { color: var(--ink); }

.snapshot-badge { border-color: rgba(201,169,106,0.30); }

/* --- hero: batik in its gold cut, brighter than the cream build ---------- */
.hero-bg::before {
  background: url("assets/batik-motif-gold.svg") center / 300px repeat;
  opacity: 0.20;
}
.hero-bg::after {
  background:
    radial-gradient(760px 380px at 50% 0%, rgba(201,169,106,0.13), transparent 70%),
    linear-gradient(180deg, transparent 58%, var(--cream) 100%);
}

/* --- section rhythm: the hero already breathes, the bands need not ------- */
.hero { padding: clamp(38px, 5vw, 64px) clamp(18px, 5vw, 46px) clamp(40px, 5vw, 60px); }
.section {
  padding-top: clamp(30px, 3.4vw, 46px);
  padding-bottom: clamp(50px, 6vw, 78px);
}
.section-head { margin-bottom: 30px; }
.section-alt { background: linear-gradient(180deg, rgba(226,209,175,0.035), transparent 72%); }

/* divider carries the motif in gold, tighter above the heading */
.section + .section > .section-head::before {
  height: 22px; margin: 0 0 22px;
  background:
    url("assets/batik-motif-gold.svg") center / 22px repeat-x,
    linear-gradient(90deg, transparent, var(--navy-line) 20%, var(--navy-line) 80%, transparent) center / 100% 1px no-repeat;
  opacity: 0.5;
}

/* --- the journey band, now secondary to the ranker ---------------------- */
.journey {
  margin: 46px auto 0;
  max-width: 940px;
  background: linear-gradient(180deg, rgba(22,41,74,0.72), rgba(18,37,64,0.72));
  border-color: rgba(226,209,175,0.16);
}
.journey::before {
  background-image: url("assets/batik-motif-gold.svg");
  opacity: 0.14;
}
.journey-head { margin-bottom: 20px; }
.journey-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.2;
  letter-spacing: -0.2px; color: var(--navy); margin: 0 0 4px;
}
.journey-title em { color: var(--gold-ink); font-weight: 500; }
.journey-lede { margin: 0; font-size: 0.84rem; color: var(--muted-2); }

.dest-select, .balance-input { background: rgba(10,23,41,0.55); color: var(--text); }
.dest-select option { background: #122540; color: #e7dfd0; }
.journey-stats { background: var(--navy-line); border-color: var(--navy-line); }
.journey-stats .stat { background: rgba(10,23,41,0.42); }
.journey-note { background: rgba(10,23,41,0.42); border-top-color: var(--navy-line); }

/* runway: the strip is tarmac, the fill is the approach lighting */
.runway-strip { background: rgba(10,23,41,0.62); border-color: rgba(226,209,175,0.14); }
.runway-centerline {
  background: repeating-linear-gradient(
    to right, rgba(226,209,175,0.34) 0 14px, transparent 14px 30px);
}
.runway-fill {
  background: linear-gradient(90deg, rgba(201,169,106,0.55), var(--gold-bright));
  box-shadow: 0 0 18px -2px rgba(201,169,106,0.5);
}

/* --- the aircraft ------------------------------------------------------- */
/* runway: side-view widebody, nose leading, sitting on the strip */
.plane {
  width: 56px; height: 18px; margin-left: -34px; bottom: 4px;
  color: #dfe7f2;
  transform: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
}
.journey.is-ready .plane {
  transform: translate(12px, -20px) rotate(-11deg);
  color: #f3f7fc;
}

/* header flyover: bigger and more present, per the brief */
.flyover {
  width: 62px; height: 20px;
  margin-top: -22px;
  color: #d7e0ee;
  transform: translateX(-90px);
  filter: drop-shadow(0 3px 7px rgba(0,0,0,0.55));
}
.flyover::after {
  width: 74px; margin-right: 5px;
  background: linear-gradient(270deg, rgba(226,209,175,0.75), transparent);
  opacity: 0.55;
}
@keyframes flyover {
  0%   { opacity: 0;   transform: translateX(-90px); }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.9; }
  100% { opacity: 0;   transform: translateX(calc(100vw + 90px)); }
}

/* --- surfaces that assumed a light canvas ------------------------------- */
.tabbar { background: rgba(10,23,41,0.94); border-top-color: var(--navy-line); }
.overlay-scrim { background: rgba(4,10,20,0.72); }

@media (max-width: 720px) {
  .tabbar { grid-template-columns: repeat(3, 1fr); }
  html[data-view="pilot"] .tab[data-view-link="pilot"],
  html[data-view="plan"] .tab[data-view-link="plan"],
  html[data-view="info"] .tab[data-view-link="info"] { color: var(--gold-ink); background: var(--gold-glass); }
  .journey { margin-top: 34px; }
}

/* --- inputs and inset surfaces that were hard-coded to the cream canvas --- */
.query-input, .amount-input {
  background: rgba(10,23,41,0.55);
  border-color: rgba(226,209,175,0.16);
  color: var(--text);
}
.query-input:focus, .amount-input:focus { background: rgba(10,23,41,0.75); }
.query-input::placeholder, .amount-input::placeholder { color: var(--muted-2); }
.amount-prefix { color: var(--muted-2); }

.chip { background: rgba(10,23,41,0.42); border-color: var(--navy-line); }
.chip:hover { color: var(--ink); }
.mode-toggle { background: rgba(10,23,41,0.5); }
.mode-btn.is-active { color: var(--ink); }
.mode-btn.is-active .mode-dot { background: var(--ink); }

.health-empty { background: rgba(10,23,41,0.4); }

/* headline: let the authored line breaks stand rather than re-wrapping them */
.hero-title { max-width: 26ch; font-size: clamp(2rem, 4.2vw, 3rem); }
.hero-sub { margin-bottom: 34px; }

/* Section break: was ~178px of dead air between a grid and the next eyebrow.
   The divider already signals the change of topic, so the padding either side
   of it does not need to repeat the message. */
.section {
  padding-top: clamp(12px, 1.4vw, 20px);
  padding-bottom: clamp(32px, 3.4vw, 46px);
}
.section + .section > .section-head::before {
  height: 16px; margin: 0 0 14px;
  background:
    url("assets/batik-motif-gold.svg") center / 18px repeat-x,
    linear-gradient(90deg, transparent, var(--navy-line) 20%, var(--navy-line) 80%, transparent) center / 100% 1px no-repeat;
}
.section-head { margin-bottom: 26px; }

/* The aircraft was reading as a sliver against the gold fill. Bigger, lifted
   clear of the strip, and darkened underneath so the silhouette separates. */
.runway { padding-top: 30px; }
.plane {
  width: 78px; height: 24px; margin-left: -47px; bottom: 9px;
  color: #eaf1fa;
  filter: drop-shadow(0 4px 5px rgba(4,10,20,0.85));
}
.journey.is-ready .plane { transform: translate(14px, -24px) rotate(-12deg); }

/* ---------------------------------------------------------------------------
   Flyover, relocated to the hero sky.
   In the 69px header the aircraft spent most of its crossing hidden behind the
   boarding-pass tabs, so "bigger" bought nothing. The hero has actual sky: it
   can now be ~2x the size, fully visible for the whole crossing, and still sit
   behind the content that matters.
   ------------------------------------------------------------------------- */
.site-header { overflow: visible; }   /* no longer the flight path */
.hero { overflow: hidden; }

.flyover {
  position: absolute; z-index: 0;
  left: 0; top: clamp(58px, 9vw, 104px);
  width: 118px; height: 38px;
  margin-top: 0;
  color: #c4d2e6;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-150px);
  filter: drop-shadow(0 6px 14px rgba(4,10,20,0.7));
}
.hero-inner { z-index: 1; }           /* content always wins over the aircraft */

.flyover::after {
  right: 100%; top: 46%;
  width: 150px; height: 1.5px; margin-right: 6px;
  background: linear-gradient(270deg, rgba(226,209,175,0.7), transparent);
  opacity: 0.5;
}

.flyover.is-flying { animation: flyover 19s linear 1; }
@keyframes flyover {
  0%   { opacity: 0;    transform: translateX(-150px) translateY(0); }
  12%  { opacity: 0.55; }
  88%  { opacity: 0.55; }
  100% { opacity: 0;    transform: translateX(calc(100vw + 150px)) translateY(-14px); }
}

@media (max-width: 720px) {
  .flyover { width: 84px; height: 27px; }
}
@media (prefers-reduced-motion: reduce) { .flyover { display: none; } }

/* classifier miss — amber, not alarm red: the ranking is still shown, just unqualified */
.det-miss { color: var(--danger); font-weight: 600; }
.detected i { font-style: normal; color: var(--gold-ink); }

/* --- non-earning categories (insurance, utilities, …) -------------------- */
/* The answer is "nothing earns here", so these must not look like a podium. */
.zero-banner {
  margin: 0 0 18px; padding: 16px 18px;
  background: rgba(224,169,78,0.10);
  border: 1px solid rgba(224,169,78,0.34);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.92rem; line-height: 1.6; text-align: left;
}
.zero-banner b { color: var(--danger); }

.result-card.is-zero .rank-medal {
  background: transparent; color: var(--muted-2);
  border: 1px dashed var(--navy-line); box-shadow: none;
}
.result-card.is-zero .rc-rate b { color: var(--muted-2); }
.result-card.is-zero .rc-miles { color: var(--muted-2); }

/* ============================================================================
   Qualifying conditions + a leaner wallet
   One chip per card, never a paragraph: the thing you must do to hold the rate.
   ========================================================================== */

.cond-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 10px 8px 0 0; padding: 5px 11px;
  font-size: 0.75rem; font-weight: 500; line-height: 1.4;
  border-radius: 999px; border: 1px solid transparent;
}
.cond-chip.is-met     { color: var(--good);   background: rgba(92,191,146,0.12); border-color: rgba(92,191,146,0.34); }
.cond-chip.is-unmet   { color: var(--danger); background: rgba(224,169,78,0.12); border-color: rgba(224,169,78,0.38); }
/* an upgrade you could unlock — informational, deliberately the quietest of the three */
.cond-chip.is-locked  { color: var(--muted);  background: var(--navy-soft);      border-color: var(--navy-line); }

.rc-why + .cond-chip { margin-top: 12px; }

/* --- wallet, condensed -------------------------------------------------- */
.wallet-card { padding: 18px 20px; }
.wc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.wc-idline { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-name { font-family: var(--serif); font-size: 1.02rem; color: var(--navy); line-height: 1.25; }
.wc-issuer { font-size: 0.7rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted-2); }
.wc-own {
  flex: none; font-size: 0.68rem; letter-spacing: 0.6px; text-transform: uppercase;
  font-weight: 600; color: var(--good);
  background: rgba(92,191,146,0.12); border: 1px solid rgba(92,191,146,0.3);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.wc-bonus { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.wc-chips { display: flex; flex-wrap: wrap; }
.wc-foot { margin-top: 10px; }
.wc-flag { font-size: 0.72rem; color: var(--danger); }

/* the grid can breathe now that each card is shorter */
.card-grid { grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 16px; }

/* --- redemption card: one plain line, not a fee table -------------------- */
.rd-bestfor {
  margin: 14px 0 0; font-size: 0.92rem; line-height: 1.6; color: var(--text);
}
.rd-expiry {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--navy-line);
  font-size: 0.76rem; letter-spacing: 0.3px; color: var(--muted-2);
}
.rd-expiry.rd-expiry-never { color: var(--good); }
.rd-expiry.rd-expiry-short { color: var(--danger); }

/* aspirational cards read as a shortlist, not part of the wallet */
.wallet-card:not(.is-owned) { border-style: dashed; }
.wc-aspire {
  flex: none; font-size: 0.68rem; letter-spacing: 0.6px; text-transform: uppercase;
  font-weight: 600; color: var(--gold-ink);
  background: var(--gold-glass); border: 1px solid rgba(201,169,106,0.3);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* ============================================================================
   Nav tabs: the three-letter stub codes said nothing, so they are gone. The
   torn-stub silhouette stays — it is what makes the tab read as a boarding pass
   — but it is now a slim blank tear-off rather than a label.
   ========================================================================== */
.pass-stub { width: 13px; }
.nav a::before { left: 13px; }
.nav a::after  { left: 13px; }
.pass-body { padding: 9px 15px 9px 12px; }
@media (max-width: 860px) { .pass-body { padding: 9px 12px 9px 10px; } }

/* One line per card: the plain-English answer to "what is this card for".
   The issuer line and the rate line were removed — this single summary is the
   whole story, which keeps the cards short. */
.wc-top { align-items: center; margin-bottom: 0; }
.wc-bestfor {
  margin: 10px 0 0; font-size: 0.9rem; line-height: 1.55; color: var(--text);
}


/* ============================================================================
   Wallet card art — square tile (wallet section only)
   Every wallet card leads with a 1:1 art tile. A designed placeholder (issuer-
   tinted, batik-washed, card glyph) shows until an image URL is added; the image
   then covers it. object-fit: cover keeps any aspect ratio looking deliberate.
   ========================================================================== */
.wallet-card.has-media { padding-top: 0; overflow: hidden; }

.wc-media {
  position: relative;
  margin: 0 -20px 16px;              /* bleed to card edges */
  aspect-ratio: 1 / 1;
  background: var(--paper-2);
  overflow: hidden;
}

/* the image, layered above the placeholder */
.wc-media-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
/* fade the image foot into the card so the tile and body read as one surface */
.wc-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to bottom, transparent 68%, var(--paper) 100%);
}

/* the placeholder — visible until an image loads over it */
.wc-media-ph {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  background:
    url("assets/batik-motif-gold.svg") center / 120px,
    radial-gradient(120% 90% at 50% 12%, color-mix(in srgb, var(--issuer) 26%, transparent), transparent 70%),
    linear-gradient(160deg, var(--paper-2), var(--ink));
}
.wc-media-ph::before {          /* dim the batik so the glyph reads */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(10,23,41,0.55), rgba(10,23,41,0.72));
}
.wc-media-glyph {
  position: relative; width: 40px; height: 40px;
  color: var(--gold-soft); opacity: 0.9;
}
.wc-media-label {
  position: relative;
  font-size: 0.66rem; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600;
}

/* keep the text body inset now that the tile is full-bleed */
.wallet-card.has-media .wc-top,
.wallet-card.has-media .wc-bestfor,
.wallet-card.has-media .wc-chips,
.wallet-card.has-media .wc-foot,
.wallet-card.has-media .cap { padding-left: 20px; padding-right: 20px; }
.wallet-card.has-media { padding-bottom: 18px; }
