/* 718 Member Account — design system.
 *
 * A deliberate departure from /app (the DigitWallet member app), which is dark, dense, and
 * built out of nested iframes. The lessons applied here:
 *
 *   1. Light chrome, brand on the card. Amex and Barclaycard keep the interface calm and let
 *      the card carry the identity. Obsidian and gold stay on the card face; everything
 *      around it is warm off-white so balances and buttons read instantly.
 *   2. No iframes anywhere. The old shell embedded pages inside pages, which buried the card
 *      reveal and produced a 62,000px runaway frame. Pages here are just pages.
 *   3. State is always on screen. Money products fail when the member cannot tell what is
 *      happening, so every card, balance and action carries an explicit status.
 *   4. Plain language. No crypto or payments jargon on member-facing surfaces.
 *
 * Mobile web app first: single column, thumb-reachable actions, 44px minimum targets.
 */

/* Ogg (Sharp Type), TCC's heading face. Licensed to TCC for web use (confirmed by TCC, Oct 2026). */
@font-face { font-family: 'Ogg'; src: url('/assets/fonts/ogg/OggRegular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Ogg'; src: url('/assets/fonts/ogg/OggRegularItalic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Ogg'; src: url('/assets/fonts/ogg/OggMedium.woff2') format('woff2'); font-weight: 500 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Ogg'; src: url('/assets/fonts/ogg/OggMediumItalic.woff2') format('woff2'); font-weight: 500 700; font-style: italic; font-display: swap; }

:root {
  /* TCC's palette (brand guide, 4 Oct 2026): primary #101820 (Pantone Black 6 C), secondary
     gold #EDD899 (Pantone 7402 C), #FCFCFC and #FFFFFF. Neutrals lean to the primary's cool
     blue-black rather than to a warm ivory. */
  /* Linen (Nov 2026 redesign): a warm beige ground, raised paper plates, ink text, gold accents. */
  --bg:            #F3EEE3;
  --surface:       #FBF8F2;
  --surface-sunk:  #ECE5D7;
  --line:          rgba(16,24,32,.09);
  --line-strong:   rgba(16,24,32,.17);

  /* Ink: the brand primary. Muted text keeps 4.9:1 on the page background. */
  --ink:           #101820;
  --ink-2:         #3E454C;
  --muted:         #5C6064;

  /* Brand gold, used sparingly. #EDD899 is a fill or an accent on the dark primary; it is far
     too light for text or rings on white (1.4:1), so those use --gold-deep (5.4:1). */
  --gold:          #D6B676;
  --gold-deep:     #7A5C1E;
  --gold-tint:     rgba(176,138,69,.14);

  /* Obsidian, reserved for the card face and the top bar mark. */
  --obsidian:      #101820;
  --obsidian-2:    #1B2530;

  /* Status. Financial UI needs these to be unmistakable, not decorative. */
  --ok:            #2F6B40;
  --ok-tint:       rgba(47,107,64,.09);
  --warn:          #865A00;
  --warn-tint:     rgba(176,138,69,.12);
  --stop:          #9B2C2C;
  --stop-tint:     rgba(155,44,44,.07);

  /* Ogg for headings (self-hosted; TCC holds the licence), Inter for everything else. */
  /* Sora throughout (Nov 2026 redesign): light for headings and money, regular for text. */
  --serif: 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --sans:  'Sora', 'Helvetica Neue', Arial, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion. This system had none, so every duration here was a literal and every curve was a
     browser default. The names match assets/718.css (--dur-*, --ease-*) rather than inventing
     a third vocabulary: the marketing site and the member app are one product, and a member
     crossing from one to the other should not feel the timing change under them.
     ease-out on everything that enters or responds - it starts fast, which is the half of the
     curve the member is actually watching. */
  --ease:      cubic-bezier(.22,.61,.36,1);
  --ease-out:  cubic-bezier(.16,1,.3,1);
  --dur-fast:  150ms;
  --dur-base:  300ms;
  --dur-slow:  500ms;

  --radius:    22px;
  --radius-sm: 14px;
  --shadow:    0 1px 2px rgba(16,24,32,.04), 0 14px 34px rgba(16,24,32,.07);
  --shadow-lift: 0 2px 6px rgba(16,24,32,.06), 0 16px 40px rgba(16,24,32,.10);

  --wrap: 560px; /* one comfortable column; the app is mobile-first even on desktop */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Room for the fixed action bar on small screens, plus the iOS home indicator. */
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* Numbers are tabular everywhere. Money that shifts position as it changes looks unstable. */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

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

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247,244,237,.88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: var(--wrap); margin: 0 auto; padding: 0 20px;
}
/* The header carried the brand as TYPE: a bold 718 in the body face, which is a different
   shape from the logo and was the only place in the estate where 718 was written rather than
   drawn. It is the real mark now. 718-mark.svg is the bare numerals in the gold gradient, which
   is the same treatment the public logo already uses on this ivory ground, so nothing about the
   colour is new. The page label beside it stays: it is what tells a member which screen they
   are on, and the logo cannot say that. */
.mark { display: inline-flex; align-items: center; gap: 8px; }
.mark img { height: 26px; width: auto; display: block; flex: none; }
.mark span {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
}
/* Partner lockup. A member introduced by a partner with a brand row sees "718 × Paystone"
   here, drawn by applyPartnerBrand() in app.js after the page has rendered. The partner name
   is set in the body face, not the mono label face, so it reads as a name and the page label
   after it still reads as a label. The mark stays 718's: the partner sits beside it, never
   instead of it. */
.mark .x { color: var(--muted); font-size: 13px; line-height: 1; margin: 0 -2px; }
.mark .partner {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.mark .partner img { height: 15px; width: 15px; }
.mark .partner b { font-weight: 600; }
.card-partner {
  margin: 6px 0 0; font-size: 11.5px; color: var(--muted); text-align: center;
  font-family: var(--mono); letter-spacing: .06em;
}
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font-size: 14px; font-family: var(--sans); border-radius: var(--radius-sm);
}
@media(hover:hover) and (pointer:fine){
  .iconbtn:hover { background: var(--surface-sunk); }
}
.iconbtn:active { transform: scale(.94); }

/* ---------- section heading ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
h1 { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: .01em; }

/* ---------- notice: the state banner ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 18px;
  border: 1px solid transparent; font-size: 14px; line-height: 1.45;
}
.notice-warn { background: var(--warn-tint); border-color: #EBD9AE; color: #6B4C00; }
.notice-ok   { background: var(--ok-tint);   border-color: #C7E3D3; color: #14512F; }
.notice-stop { background: var(--stop-tint); border-color: #EDC9C9; color: #7E2020; }
.notice b { font-weight: 600; }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-top: 7px; flex: none; }

/* ---------- the card face ---------- */
.card {
  position: relative; aspect-ratio: 1.586 / 1; width: 100%;
  border-radius: 16px; padding: 22px;
  background:
    radial-gradient(120% 140% at 82% 6%, #2A2830 0%, transparent 56%),
    linear-gradient(158deg, #1B2530 0%, #101820 62%);
  color: #EFE9DC; box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
/* A single hairline of gold, not a gradient wash. Restraint reads as premium. */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: 16px;
  border: 1px solid rgba(237,216,153,.22); pointer-events: none;
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-mark { font-weight: 600; font-size: 19px; letter-spacing: .05em; }
.card-mark span {
  display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .24em;
  text-transform: uppercase; color: rgba(239,233,220,.5); margin-top: 3px;
}
.card-scheme { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(239,233,220,.62); }
.card-pan {
  font-family: var(--mono); font-size: clamp(15px, 4.4vw, 19px); letter-spacing: .14em;
  color: #F3EEE3; white-space: nowrap;
}
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.card-label {
  font-family: var(--mono); font-size: 8px; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(239,233,220,.45); margin-bottom: 3px;
}
.card-val { font-size: 13px; letter-spacing: .04em; color: #E8E1D2; }
/* Frozen cards are visibly, unmistakably frozen. */
/* Freezing is a deliberate, rare state change, so it is allowed to be seen happening. */
.card { transition: filter var(--dur-base) var(--ease); }
.card.is-frozen { filter: grayscale(.85) brightness(.82); }

/* ---------- balance ---------- */
.balance { text-align: center; padding: 26px 0 20px; }
.balance-amt {
  font-family: var(--sans); font-weight: 600; letter-spacing: -.02em;
  font-size: clamp(38px, 11vw, 52px); line-height: 1;
}
.balance-amt .cur { font-size: .5em; font-weight: 500; color: var(--muted); vertical-align: .42em; margin-right: 3px; }
.balance-label { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- actions ---------- */
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 26px; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 6px; min-height: 76px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--sans); font-size: 11.5px; color: var(--ink-2); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease);
}
@media(hover:hover) and (pointer:fine){
  .action:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
}
/* scale rather than translateY: the marketing site presses with scale(.97) and this is the
   same product. A 1px nudge is also barely perceptible on a phone, which is where this app
   is actually used - the four actions here are the primary controls on the account screen. */
.action:active { transform: scale(.97); }
.action:disabled { opacity: .45; cursor: not-allowed; }
.action svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 1.6; fill: none; }
.action.primary { background: var(--gold-tint); border-color: #E5D5AE; }
.action.primary svg { stroke: var(--gold-deep); }

/* ---------- panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
}
.panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.panel-bd { padding: 6px 18px 12px; }
.link { font-size: 13px; color: var(--gold-deep); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* rows */
.row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-ic {
  width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-sunk);
  display: grid; place-items: center; color: var(--ink-2);
}
.row-ic svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.7; fill: none; }
.row-main { flex: 1; min-width: 0; }
.row-t { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row-amt { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.row-amt.in { color: var(--ok); }
/* The right-hand column of an activity row: the amount, and under it what became of it.
   A declined amount is struck as well as labelled — the pill can be missed, the strike cannot. */
.row-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.row-amt-void { text-decoration: line-through; opacity: .55; }
.row-pill { font-size: 10.5px; padding: 2px 8px 2px 7px; }

/* status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .02em;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok   { background: var(--ok-tint);   color: var(--ok); }
.pill-warn { background: var(--warn-tint); color: var(--warn); }
.pill-stop { background: var(--stop-tint); color: var(--stop); }
.pill-idle { background: var(--surface-sunk); color: var(--muted); }

/* ---------- switch: a setting that is on or off ----------
 * On is obsidian, not gold: gold is for the one primary action and the focus ring. The
 * label is the whole row, so the target is the text a thumb lands on, not a 44px pill. */
.switch { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.switch:last-child { border-bottom: 0; }
.switch-main { flex: 1; min-width: 0; }
.switch-t { font-size: 14.5px; font-weight: 500; }
.switch-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background var(--dur-fast) var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform var(--dur-fast) var(--ease-out); }
.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .45; }

/* ---------- explainer: the house rule, made a component ---------- */
.explain {
  display: flex; gap: 10px; padding: 13px 15px; margin-top: 2px;
  background: var(--surface-sunk); border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.explain svg { width: 15px; height: 15px; flex: none; margin-top: 2px; stroke: var(--muted); stroke-width: 1.7; fill: none; }

/* ---------- bottom bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(140%) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { display: flex; max-width: var(--wrap); margin: 0 auto; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 0 10px; min-height: 56px; text-decoration: none;
  color: var(--muted); font-size: 10.5px; letter-spacing: .01em;
}
.tab svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.6; fill: none; }
/* Navigation is tapped dozens of times a day: press confirmation only, no other motion. */
.tab { transition: transform 100ms var(--ease-out); }
.tab:active { transform: scale(.94); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg { stroke: var(--gold-deep); }

/* ---------- focus: visible, on brand, never removed ---------- */
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; border-radius: 4px; }

@media (min-width: 600px) {
  body { padding-bottom: 40px; }
  /* Cap the card on wide screens. Stretched to a full column it stops reading as a card
     and starts reading as a banner, which is the opposite of the intent. */
  .card { max-width: 400px; margin: 0 auto; }
  .tabbar { position: static; background: none; border-top: 0; backdrop-filter: none; margin-top: 8px; }
  .tabbar-in { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
}

/* ---------- sheet: the card details reveal ----------
 * Used for one thing only, and built for it: showing a clear PAN and CVV for as long as it
 * takes to type them somewhere, then taking them away again. Slides up on mobile, centres on
 * desktop. The countdown is part of the design, not decoration: the member should be able to
 * see that this is about to disappear.
 */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: grid; align-items: end; justify-items: center;
  background: rgba(11,11,13,.42); backdrop-filter: blur(3px);
  padding: 0; opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet-in {
  width: 100%; max-width: var(--wrap);
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(11,11,13,.18);
  /* Exit is faster than entry: closing is the member's intent and must not be made to wait. */
  transform: translateY(14px); transition: transform var(--dur-fast) var(--ease-out);
}
.sheet.open .sheet-in { transform: translateY(0); transition-duration: 220ms; }
.sheet-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-hd h2 { font-size: 17px; font-weight: 600; }
.sheet-x {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-sunk);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.sheet-x svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.sheet-note { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

/* Small print. Same 12.5px muted step the rest of the app uses for secondary text, given its
   own name because disclosure copy is a recurring need here - who issues the card, what the
   fees are, what the terms say - and it should not have to borrow a class named for a sheet. */
.fine { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* one revealed field */
.dt { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dt:last-of-type { border-bottom: 0; }
.dt-main { flex: 1; min-width: 0; }
.dt-l { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dt-v {
  font-size: 17px; font-weight: 500; margin-top: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  overflow-wrap: anywhere;
}
/* The billing address is the one .dt-v value that is prose rather than digits. Tabular figures
   and the tracking that makes a card number readable put a visible gap in front of every comma
   in an address, so it reads as "8 The Green , Ste R , Dover". Same size and weight, normal
   spacing. */
.dt-v.is-text { font-variant-numeric: normal; letter-spacing: normal; }
.copy {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 9px; padding: 7px 11px; font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--ink); cursor: pointer; min-height: 44px; min-width: 44px;
}
@media(hover:hover) and (pointer:fine){
  .copy:hover { background: var(--surface-sunk); }
}
/* Press feedback on the copy button, which had none. Its only confirmation was the label
   changing to "Copied" once the clipboard write resolved - so on a slow tap the member had
   no signal the control had heard them at all. */
.copy { transition: background var(--dur-fast) var(--ease),
                    border-color var(--dur-fast) var(--ease),
                    color var(--dur-fast) var(--ease),
                    transform var(--dur-fast) var(--ease-out); }
.copy:active { transform: scale(.96); }
.copy.done { color: var(--ok); border-color: var(--ok); }

@media (min-width: 560px) {
  .sheet { align-items: center; padding: 20px; }
  .sheet-in { border-radius: var(--radius); }
}


/* ---------- reduced motion ----------------------------------------------------
 * This system had no reduced-motion handling at all, on the surface a member uses
 * repeatedly rather than once. Same rule as the marketing site: nothing translates,
 * scales or loops; colour, opacity and border feedback stay, because those are how a
 * control says it is live and the preference is not asking us to remove that.
 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-property: opacity, color, background-color, border-color, fill, stroke !important;
  }
  .action:active, .copy:active, .iconbtn:active, .tab:active { transform: none !important; }
}

/* ---------- the Bluebanc face ---------------------------------------------------------
 * Mirrors the card as Apple Wallet renders it (7 Sep 2026): navy, "corporate" top-left, the
 * Bluebanc wordmark top-right, a chip, the last four, and the Mastercard mark. The member
 * should recognise the card in their wallet from the card on this page, not wonder whether
 * the black 718 face and the navy Bluebanc one are two different things. */
.card-bluebanc {
  color: #EEF1FF;
  background:
    radial-gradient(90% 120% at 12% 8%, rgba(70,90,200,.28) 0%, transparent 55%),
    radial-gradient(60% 70% at 88% 92%, rgba(40,60,170,.35) 0%, transparent 60%),
    repeating-radial-gradient(circle at 14% 110%, rgba(255,255,255,.035) 0 1px, transparent 1px 11px),
    linear-gradient(160deg, #1B2B7A 0%, #0E1A5C 45%, #060F3E 100%);
  justify-content: flex-start;
}
.card-bluebanc::after { display: none; }
.card-tier { font-size: 14px; font-weight: 500; letter-spacing: .01em; color: rgba(238,241,255,.86); }
.card-issuer {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 14px; letter-spacing: .22em; color: #F2F4FF;
}
.card-issuer-mark { width: 20px; height: 20px; color: #F2F4FF; }
.card-chip { width: 50px; height: 38px; margin: 7% 0 auto 4px; }
.card-bluebanc .card-foot { align-items: flex-end; }
.card-bluebanc .card-pan {
  font-family: var(--sans); font-weight: 500; font-size: clamp(16px, 4.6vw, 20px);
  letter-spacing: .12em; color: #F2F4FF;
}
.card-meta {
  display: flex; gap: 14px; margin-top: 4px;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(238,241,255,.6);
}
.card-meta span:empty { display: none; }
/* The Mastercard mark: two overlapping discs. Drawn, not an image, so it needs no asset. */
.card-mc { position: relative; width: 58px; height: 36px; flex: 0 0 auto; }
.card-mc i { position: absolute; top: 0; width: 36px; height: 36px; border-radius: 50%; }
.card-mc i:first-child { left: 0; background: #EB001B; z-index: 2; }
.card-mc i:last-child { right: 0; background: #F79E1B; z-index: 1; }
/* The lens where the two discs meet, Mastercard's orange-red. */
.card-mc::after {
  content: ""; position: absolute; top: 0; left: 11px; width: 36px; height: 36px; border-radius: 50%;
  background: #FF5F00; z-index: 3;
  clip-path: circle(18px at 25px 18px);
  -webkit-mask: radial-gradient(circle 18px at 18px 18px, #000 99%, transparent 100%);
  mask: radial-gradient(circle 18px at 18px 18px, #000 99%, transparent 100%);
}
.card-issued { text-align: center; font-size: 12.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.5; }
.card-issued b { font-weight: 600; color: var(--ink, inherit); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- spending summary (home) ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-sunk); }
.seg button {
  border: 0; background: transparent; font-family: var(--sans); font-size: 12.5px; color: var(--ink-2);
  padding: 5px 11px; border-radius: 999px; cursor: pointer; min-height: 28px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: #F3EEE3; }
.spend-hero { display: flex; align-items: baseline; gap: 10px; padding: 8px 0 2px; }
/* The one hero figure on the screen: the card's balance is a figure too, but it is the
   card's, not this panel's. Proportional digits at this size. */
.spend-total { font-size: 28px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.spend-sub { font-size: 12.5px; color: var(--muted); }
.spend-chart { position: relative; margin-top: 26px; }
.spend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.spend-grid { stroke: var(--line); stroke-width: 1; }
.spend-tick, .spend-x { font-family: var(--mono); font-size: 9.5px; fill: var(--muted); }
/* The mark carries the brand accent; hover and focus lift it one step. */
.spend-fill { fill: var(--gold-deep); transition: fill 100ms var(--ease); }
.spend-bar:hover .spend-fill, .spend-bar:focus .spend-fill { fill: var(--gold); }
.spend-bar { outline: none; cursor: default; }
.spend-bar.is-empty .spend-fill { fill: var(--line-strong); }
.spend-tip {
  position: absolute; top: -4px; transform: translate(-50%, -100%);
  background: var(--ink); color: #F3EEE3; font-size: 12px; padding: 5px 9px; border-radius: 8px;
  white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-lift);
}
.spend-tip b { font-weight: 600; }
.spend-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 8px; }
.spend-empty { font-size: 13.5px; color: var(--muted); padding: 12px 0 4px; }


/* ===== CHARGES ==============================================================
   Shown before a card exists, and to existing holders once. Deliberately plain:
   this is the one screen where a member should feel they are reading a price
   list rather than being sold to, so there is no gold fill, no seal and no
   flourish. The only emphasis is on the numbers.
   ========================================================================== */
.charges{
  width:min(520px,calc(100vw - 32px));max-height:86vh;overflow:auto;
  border:0;border-radius:var(--r-lg,14px);padding:26px 24px 22px;
  background:var(--surface,#fff);color:var(--ink,#181510);
  box-shadow:0 30px 90px rgba(0,0,0,.28);
}
.charges::backdrop{background:rgba(11,11,13,.55)}
.charges h2{font-family:var(--serif);font-weight:500;font-size:24px;margin:0 0 8px;letter-spacing:-.01em}
.charges-sub{font-size:14px;line-height:1.6;color:var(--ink-mute,#6E6656);margin:0 0 18px}
.charges-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line-l,#DCD3C1)}
.charge{display:flex;align-items:baseline;justify-content:space-between;gap:18px;
  padding:12px 0;border-bottom:1px solid var(--line-l,#DCD3C1)}
.charge-l b{display:block;font-size:14.5px;font-weight:500;color:var(--ink,#181510)}
.charge-l i{display:block;font-style:normal;font-size:12.5px;line-height:1.5;color:var(--ink-mute,#6E6656);margin-top:2px}
.charge-v{font-family:var(--mono);font-size:14px;white-space:nowrap;text-align:right;
  font-variant-numeric:tabular-nums;color:var(--ink,#181510)}
.charge.is-free .charge-v{color:var(--ink-mute,#6E6656)}
.charges-note{font-size:12.5px;line-height:1.6;color:var(--ink-mute,#6E6656);margin:16px 0 0}
.charges-act{margin-top:20px;display:flex;flex-direction:column;gap:10px}
.charges-act .cta{width:100%}
.charges-later{background:none;border:0;padding:4px;cursor:pointer;
  font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--ink-mute,#6E6656)}
.charges-later[hidden]{display:none}
.charges-fine{font-size:13px;line-height:1.55;color:#9B2C2C;margin:2px 0 0;min-height:0}
@media(max-width:420px){
  .charges{padding:22px 18px 18px}
  .charge{gap:12px}
}


/* =============================================================================================
 * NOVEMBER 2026 REDESIGN: linen, ink and gold.
 *
 * Linen is the base look; Onyx (black and gold) and Emerald re-point the variables below in
 * /shared/theme.css. Rules here are written against those variables only, so one rule serves
 * all three. Principles: one gold primary per screen, plates instead of boxed cards with heavy
 * borders, status as a dot and a word, short copy, the card as a metal object.
 * Phones: a floating glass menu at the bottom. Desktop (900px and up): the same menu as a top bar.
 * ============================================================================================= */
:root {
  --plate-bg: var(--surface);
  --plate-border: 1px solid rgba(16,24,32,.06);
  --plate-shadow: var(--shadow);
  --track: rgba(16,24,32,.06);
  --orn: rgba(138,106,34,.15);
  --page-glow: radial-gradient(90% 50% at 100% 0%, rgba(255,250,238,.7), transparent 70%);
  --topbar-bg: rgba(243,238,227,.82);
  --pri-bg: linear-gradient(145deg, #F4E3BC, #D6B676 55%, #B48E4A);
  --pri-fg: #1E170C;
  --pri-shadow: 0 14px 30px rgba(176,138,69,.30), inset 0 1px 0 rgba(255,255,255,.5);
  --tile-bg: rgba(176,138,69,.14);
  --tile-fg: #7A5C1E;
  --glass-bg: rgba(251,248,242,.74);
  --glass-border: rgba(138,106,34,.18);
  --glass-shadow: 0 18px 40px rgba(138,106,34,.16), inset 0 1px 0 rgba(255,255,255,.8);
  --nav-on: #7A5C1E;
  --nav-off: #66625A;
  --nav-pill: rgba(176,138,69,.16);
  --grain-opacity: 0;
  /* The card: pearl and gold on linen. */
  --card-base: linear-gradient(155deg, #FFFBF1 0%, #F1E6CC 45%, #DCC79C 100%);
  --card-fg: #2A2318;
  --card-sheen: rgba(255,255,255,.55);
  --card-eng: rgba(138,106,34,.16);
  --card-eng2: rgba(138,106,34,.08);
  --card-brush: rgba(138,106,34,.035);
  --card-rim: rgba(138,106,34,.40);
  --card-rim2: rgba(138,106,34,.20);
  --card-inner: rgba(255,251,241,.9);
  --card-shadow: 0 24px 50px rgba(138,106,34,.22), 0 4px 12px rgba(16,24,32,.06);
  --card-num: linear-gradient(180deg, #7A5C1E 0%, #4A3510 100%);
  --card-name: #5A4A2A;
  --card-emboss: 0 1px 0 rgba(255,255,255,.7);
  --card-logo: url("/assets/tcc-mark.svg");
}

/* The ground (glow and colour) is painted on html, fixed to the window, so it fills the whole
   screen however short the page is. body stays transparent and at least a screen tall. */
html { background: var(--bg); min-height: 100%; }
/* The glow on its own layer, pinned to the window. A fixed layer stays put on every phone;
   background-attachment: fixed does not on iPhones, where it scrolled off and left a band. */
html::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -2;
  background: var(--page-glow);
}
body { background: transparent; min-height: 100vh; color: var(--ink); }

/* Engraved line-work, like a banknote: rings top right, wide arcs bottom left, under everything. */
body::before, body::after {
  content: ""; position: fixed; pointer-events: none; z-index: -1;
}
body::before {
  top: 0; right: 0; width: min(100vw, 900px); height: 620px;
  background: repeating-radial-gradient(circle at 106% -6%, var(--orn) 0 1px, transparent 1px 12px),
              repeating-radial-gradient(circle at 72% 12%, var(--orn) 0 1px, transparent 1px 14px);
  -webkit-mask-image: radial-gradient(70% 62% at 100% 0%, #000 0%, rgba(0,0,0,.5) 40%, transparent 75%);
          mask-image: radial-gradient(70% 62% at 100% 0%, #000 0%, rgba(0,0,0,.5) 40%, transparent 75%);
}
body::after {
  left: 0; bottom: 0; width: min(100vw, 820px); height: 560px;
  background: repeating-radial-gradient(circle at -10% 108%, var(--orn) 0 1px, transparent 1px 26px);
  -webkit-mask-image: radial-gradient(80% 70% at 0% 100%, #000 0%, transparent 70%);
          mask-image: radial-gradient(80% 70% at 0% 100%, #000 0%, transparent 70%);
}
/* Film grain: off in Linen, on in the dark themes (--grain-opacity). */
html::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: url("/assets/app/grain.png") repeat; background-size: 160px 160px;
  opacity: var(--grain-opacity); mix-blend-mode: screen;
}

/* ---- type ---- */
h1 { font-family: var(--serif); font-weight: 300; font-size: 36px; line-height: 1.08; letter-spacing: -.03em; }
h2 { font-weight: 500; }
.eyebrow { font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.mark span { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.link { color: var(--gold-deep); }

/* ---- top bar ---- */
.topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--line); backdrop-filter: saturate(140%) blur(16px); -webkit-backdrop-filter: saturate(140%) blur(16px); }
.topbar-in { height: 64px; }
.iconbtn { color: var(--ink-2); border-radius: 999px; padding: 0 16px; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .iconbtn:hover { background: var(--track); color: var(--ink); }
  /* Menu items you are not on lighten a little under the pointer. */
  .tab:not([aria-current="page"]):hover { color: var(--ink); background: var(--track); }
}
.tab { transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }

/* ---- plates ---- */
.panel { background: var(--plate-bg); border: var(--plate-border); box-shadow: var(--plate-shadow); border-radius: var(--radius); }
.panel-hd { border-bottom: 1px solid var(--line); }
.panel-hd h2 { font-size: 15px; }
.row, .switch, .dt { border-bottom-color: var(--line); }
.row-ic { background: var(--tile-bg); color: var(--tile-fg); border-radius: 12px; }
.row-amt.in { color: var(--ok); }
.explain { background: transparent; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-2); }

/* ---- notices: a soft tint and a coloured dot ---- */
.notice { border-radius: 18px; }
.notice-warn { background: var(--warn-tint); border-color: rgba(176,138,69,.30); color: var(--ink); }
.notice-ok   { background: var(--ok-tint);   border-color: rgba(47,107,64,.22);  color: var(--ink); }
.notice-stop { background: var(--stop-tint); border-color: rgba(155,44,44,.25);  color: var(--ink); }
.notice-warn .notice-dot { color: #B08A45; }
.notice-ok .notice-dot   { color: var(--ok); }
.notice-stop .notice-dot { color: var(--stop); }

/* ---- status: a dot and a word, never a coloured pill ---- */
.pill { background: transparent !important; padding: 0; font-weight: 500; letter-spacing: 0; color: var(--ink) !important; }
.pill::before { background: var(--muted); }
.pill-ok::before   { background: var(--ok); }
.pill-warn::before { background: #B08A45; }
.pill-stop::before { background: var(--stop); }
.pill-stop { color: var(--stop) !important; }

/* ---- buttons: the gold pill is the one primary action on a screen ---- */
body .cta, body .ask-yes {
  background: var(--pri-bg); color: var(--pri-fg); border: 0; border-radius: 999px;
  min-height: 56px; font-weight: 500; box-shadow: var(--pri-shadow);
}
body .cta-2 { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: none; }
body .ask-no, body .copy, body .btn { border-radius: 999px; }
.btn-row { flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 calc(50% - 10px); white-space: nowrap; min-height: 50px; }
body .copy { background: var(--plate-bg); }
body .input { background: var(--plate-bg); border: 1px solid var(--line-strong); border-radius: 16px; color: var(--ink); }
body .input::placeholder { color: var(--muted); }
body .sk { background: linear-gradient(90deg, var(--surface-sunk) 25%, var(--surface) 50%, var(--surface-sunk) 75%); background-size: 200% 100%; }

/* ---- the card: a metal object ---- */
.card-bluebanc {
  color: var(--card-fg); border-radius: 18px;
  background:
    linear-gradient(115deg, transparent 28%, var(--card-sheen) 42%, transparent 60%),
    repeating-radial-gradient(circle at 104% 112%, var(--card-eng) 0 1px, transparent 1px 5px),
    repeating-radial-gradient(circle at 128% 88%, var(--card-eng2) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, var(--card-brush) 0 1px, transparent 1px 3px),
    var(--card-base);
  border: 1px solid var(--card-rim);
  box-shadow: inset 0 0 0 4px var(--card-inner), inset 0 0 0 5px var(--card-rim2), var(--card-shadow);
}
.card-bluebanc .card-top { min-height: 22px; background: var(--card-logo) right top / auto 18px no-repeat; }
.card-bluebanc .card-pan {
  background: var(--card-num); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.card-bluebanc .card-meta { color: var(--card-name); text-shadow: var(--card-emboss); }
.card-chip stop:nth-child(1) { stop-color: #F6E7C4; }
.card-chip stop:nth-child(2) { stop-color: #D2B073; }
.card-chip stop:nth-child(3) { stop-color: #9C7A40; }
.card-chip rect { stroke: #8F7236; }
.card-chip path { stroke: rgba(80,58,20,.55); }
body .ghost { background: var(--plate-bg); border-color: var(--line-strong); }
.card-issued { color: var(--muted); }

/* ---- balance ---- */
.balance-amt { font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 14vw, 68px); letter-spacing: -.045em; }
.balance-amt .cur { color: var(--gold-deep); font-weight: 300; }

/* ---- home actions: one gold pill, then round controls ---- */
.actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; margin: 6px 0 30px; }
.action, .action:hover {
  background: none; border: 0; box-shadow: none; min-height: 0; padding: 0;
  font-size: 12.5px; color: var(--ink); gap: 8px; text-decoration: none;
}
.action svg {
  width: 58px; height: 58px; padding: 18px; box-sizing: border-box; border-radius: 50%;
  background: var(--plate-bg); border: var(--plate-border); box-shadow: var(--plate-shadow); stroke: var(--ink);
}
.action.primary, .action.primary:hover {
  grid-column: 1 / -1; order: -1; flex-direction: row; justify-content: center; gap: 8px;
  min-height: 56px; border-radius: 999px; background: var(--pri-bg); color: var(--pri-fg);
  box-shadow: var(--pri-shadow); font-size: 16px; font-weight: 500;
}
.action.primary svg { width: 20px; height: 20px; padding: 0; background: none; border: 0; box-shadow: none; stroke: currentColor; }

/* ---- small controls ---- */
.seg { background: var(--track); border: 0; padding: 4px; }
.seg button { color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--plate-bg); color: var(--ink); box-shadow: 0 2px 8px rgba(16,24,32,.08); }
.switch input:checked + .switch-track { background: var(--pri-bg); }
.sheet-in { background: var(--plate-bg); border-radius: 28px 28px 0 0; }
.sheet-x { background: var(--track); }

/* ---- the menu: floating glass on phones ---- */
body { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.tabbar {
  left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom));
  padding: 6px; border-radius: 28px; border: 1px solid var(--glass-border);
  background: var(--glass-bg); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.tabbar-in { gap: 2px; }
.tab { border-radius: 20px; color: var(--nav-off); min-height: 52px; padding: 7px 0 6px; font-size: 10.5px; }
.tab[aria-current="page"] { background: var(--nav-pill); color: var(--nav-on); font-weight: 500; }
.tab[aria-current="page"] svg { stroke: currentColor; }

@media (min-width: 600px) and (max-width: 899px) {
  body { padding-bottom: 120px; }
  .tabbar {
    position: fixed; left: 50%; right: auto; width: min(520px, calc(100vw - 28px)); transform: translateX(-50%);
    margin: 0; background: var(--glass-bg); border: 1px solid var(--glass-border);
    backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  }
  .tabbar-in { border: 0; background: none; border-radius: 0; }
}

/* ---- desktop: the menu becomes a top bar, the page widens ---- */
@media (min-width: 900px) {
  :root { --wrap: 880px; }
  body { padding-bottom: 56px; }
  h1 { font-size: 46px; }
  .topbar-in { max-width: 1080px; }
  /* The top bar and the menu are one fixed strip: both pinned to the top, both exactly 64px, so
     they can never drift apart while the page scrolls under them. */
  .topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 35; }
  .topbar-in { height: 64px; min-height: 64px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
  body:has(> .topbar) { padding-top: 64px; }
  .mark span { display: none; }
  .tabbar {
    position: fixed; top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%);
    z-index: 40; width: auto; height: 64px; padding: 0; margin: 0; border: 0; border-radius: 0;
    background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tabbar-in { height: 64px; gap: 30px; border: 0; background: none; border-radius: 0; align-items: stretch; max-width: none; }
  .tab {
    flex: none; flex-direction: row; align-items: center; min-height: 0; padding: 0; gap: 0;
    font-size: 14.5px; color: var(--muted); border-radius: 0; border-bottom: 2px solid transparent; background: none !important;
  }
  .tab svg { display: none; }
  .tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold-deep); }
  @media (hover: hover) and (pointer: fine) {
    .tab:not([aria-current="page"]):hover { color: var(--ink); background: none !important; border-bottom-color: var(--line-strong); }
  }

  /* Home: the card on the left, balance and actions on the right, panels side by side. */
  /* Desktop home. The right column is exactly as tall as the card: the balance lines up with
     the card's top edge and the actions with its bottom edge. Recent and Spending sit side by
     side at the same height. */
  #live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 56px; align-items: start; }
  #live > * { grid-column: 1 / -1; }
  #live > .card { grid-column: 1; grid-row: 1 / span 2; max-width: none; margin: 0; }
  #live > .card-issued { display: none; }
  #live > .card-partner { grid-column: 1; grid-row: 4; }
  #live > .balance { grid-column: 2; grid-row: 1; text-align: left; padding: 4px 0 0; }
  #live > .actions {
    grid-column: 2; grid-row: 2; align-self: end; margin: 0;
    grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr)); gap: 6px; align-items: start;
  }
  #live > .actions .action.primary { grid-column: auto; min-height: 58px; padding: 0 16px; font-size: 15px; white-space: nowrap; }
  #live > section.panel:nth-of-type(1) { grid-column: 1; grid-row: 5; margin-top: 36px; align-self: stretch; }
  #live > section.panel:nth-of-type(2) { grid-column: 2; grid-row: 5; margin-top: 36px; align-self: stretch; }
}

/* Show/hide eye in password boxes (/shared/password-eye.js). */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { width: 100%; padding-right: 54px !important; box-sizing: border-box; }
.pw-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.pw-eye:hover { color: var(--ink); background: var(--track); }
.pw-eye[aria-pressed="true"] { color: var(--gold-deep); }
.pw-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Staging: a fixed tag on every page (/shared/env.js), so test and live are never confused. */
#env-tag {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 100;
  padding: 5px 12px; border-radius: 999px; font: 600 12px/1.3 var(--sans);
  background: #B4532A; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.18); pointer-events: none;
}

/* A page that has finished loading appears in one gentle step. */
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-in { animation: view-in 420ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .view-in { animation: none; } }

/* A page holding its content until its first data is in (revealPage in app.js). The content is
   hidden, not removed, so nothing moves when it appears. Released by CSS alone after 4 seconds,
   so a failed read can never leave a page hidden. */
main.is-holding { position: relative; min-height: 60vh; }
main.is-holding > * { visibility: hidden; animation: hold-release 0s linear 4s forwards; }
main.is-holding::before, main.is-holding::after {
  content: ""; position: absolute; left: 20px; right: 20px; pointer-events: none;
  background: linear-gradient(90deg, var(--surface-sunk) 25%, var(--surface) 50%, var(--surface-sunk) 75%);
  background-size: 200% 100%;
  animation: hold-shimmer 1.3s linear infinite, hold-hide 0s linear 4s forwards;
}
main.is-holding::before { top: 22px; height: 42px; width: 46%; border-radius: 12px; }
main.is-holding::after { top: 88px; height: 340px; border-radius: var(--radius); }
@keyframes hold-shimmer { to { background-position: -200% 0; } }
@keyframes hold-release { to { visibility: visible; } }
@keyframes hold-hide { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  main.is-holding::before, main.is-holding::after { animation: hold-hide 0s linear 4s forwards; }
}

/* The primary button where a page uses .btn .btn-primary (Add to home screen, Open your card). */
body .btn.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px; background: var(--pri-bg); color: var(--pri-fg); box-shadow: var(--pri-shadow);
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
body .btn.btn-primary:disabled { opacity: .55; cursor: default; }

/* The small back link at the top of a sub-page (shared/back-link.js). */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px -2px; padding: 4px 2px;
  color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; letter-spacing: .01em;
}
.back-link::before {
  content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-right: 1px;
}
.back-link:hover { color: var(--ink); }
.back-link:focus-visible { outline: 2px solid var(--gold, currentColor); outline-offset: 2px; border-radius: 6px; }

/* The quiet button (18 Nov 2026). Pages that set their own .btn keep it; this gives the ones that
   don't (Charges: "Ask about a charge") a proper button instead of a bare browser link. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500;
  text-decoration: none; cursor: pointer; box-sizing: border-box;
}
.btn:visited { color: var(--ink); }
.btn:hover { border-color: var(--ink-2); }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
@media (min-width: 700px) { .btn-row > .btn:only-child { flex: 0 0 auto; min-width: 220px; } }
/* Phones: one button per line, full width, so long labels never squeeze or spill. */
@media (max-width: 560px) {
  .btn-row .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
}

/* Links inside text (18 Nov 2026): never the browser's blue or visited purple. */
main a:not([class]), main a:not([class]):visited {
  color: var(--gold-deep, var(--ink)); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}
main a:not([class]):hover { text-decoration-color: currentColor; }

/* A list of links in a panel (Account: Charges, Install, Contact us). */
.link-list { padding: 0; overflow: hidden; margin-top: 18px; }
.link-list > a {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; color: var(--ink); text-decoration: none;
  transition: background var(--dur-fast, .15s) ease;
}
.link-list > a + a, .link-list > script + a { border-top: 1px solid var(--line); }
.link-list > a::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border-right: 1.5px solid var(--muted); border-top: 1.5px solid var(--muted); transform: rotate(45deg);
}
.link-list > a:hover { background: var(--track); }
.link-list > a:hover::after { border-color: var(--ink); }
.link-list > a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.ll-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ll-t { font-size: 15px; font-weight: 500; }
.ll-s { font-size: 13px; color: var(--muted); }

/* Sign out, once, quietly: it is not something to press by accident. */
.signout-quiet {
  display: block; margin: 22px auto 0; min-height: 44px; padding: 0 22px; border: 0; background: none;
  color: var(--stop); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 999px;
}
.signout-quiet:hover { background: var(--track); }

/* Copy (18 Nov 2026): a small icon-and-word pill that turns into a tick and "Copied". */
body button.copy {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 0; min-height: 36px; height: 36px; padding: 0 14px 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
  color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap; position: relative;
}
body button.copy::after { content: ""; position: absolute; inset: -5px; } /* 46px to tap, 36px to see */
body button.copy::before {
  content: ""; width: 14px; height: 14px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2.5'/%3E%3Cpath d='M15 9V6.5A2.5 2.5 0 0 0 12.5 4h-6A2.5 2.5 0 0 0 4 6.5v6A2.5 2.5 0 0 0 6.5 15H9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2.5'/%3E%3Cpath d='M15 9V6.5A2.5 2.5 0 0 0 12.5 4h-6A2.5 2.5 0 0 0 4 6.5v6A2.5 2.5 0 0 0 6.5 15H9'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (hover: hover) and (pointer: fine) {
  body button.copy:hover { color: var(--ink); border-color: var(--ink-2); background: var(--track); }
}
body button.copy.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: var(--ok-tint); }
body button.copy.done::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  animation: copy-tick .28s cubic-bezier(.2,.9,.3,1.3);
}
@keyframes copy-tick { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* The "Copied" note: bottom centre on a computer, above the floating menu on a phone. */
#copy-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translate(-50%, 12px);
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: 13.5px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.28);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; white-space: nowrap;
}
#copy-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 899px) { #copy-toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 104px); } }
@media (prefers-reduced-motion: reduce) {
  #copy-toast { transition: none; } body button.copy.done::before { animation: none; }
}

/* "Good to know": short points with a small gold dot, inside one panel. */
.gtk { list-style: none; margin: 0; padding: 6px 20px 10px; }
.gtk li {
  position: relative; padding: 12px 0 12px 22px; font-size: 14px; line-height: 1.55; color: var(--ink-2);
}
.gtk li + li { border-top: 1px solid var(--line); }
.gtk li::before {
  content: ""; position: absolute; left: 2px; top: 20px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent);
}
.gtk b { color: var(--ink); font-weight: 500; }
.gtk i { font-style: normal; color: var(--ink); }
.gtk a { color: var(--gold-deep); }
.good-to-know { overflow: hidden; }
main .link-list > a, main .link-list > a:visited { color: var(--ink); text-decoration: none; }

/* Copy as an icon right after the value (18 Nov 2026, replaces the pill above). The word stays in
   the button for screen readers and for the JS, but only "Copied" is ever shown, beside a tick. */
.detail:has(> .copy), .dt:has(> .copy), .fact:has(> .copy) { justify-content: flex-start; }
.detail:has(> .copy) > .detail-main, .dt:has(> .copy) > .dt-main, .fact:has(> .copy) > .fact-main { flex: 0 1 auto; min-width: 0; }
body button.copy {
  align-self: flex-end; width: auto; min-width: 30px; height: 30px; min-height: 30px; padding: 0 7px;
  margin: 0 0 -6px -4px; border: 0; background: transparent; color: var(--muted);
  font-size: 0; gap: 0; border-radius: 8px;
}
body button.copy::before { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) {
  body button.copy:hover { color: var(--ink); background: var(--track); border: 0; }
}
body button.copy.done { font-size: 12.5px; gap: 5px; color: var(--ok); background: transparent; border: 0; }
body button.copy:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* A caution (amber), not an error: "send only USDT on Tron". */
.notice-alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 14px;
  background: rgba(232, 150, 58, .10); border: 1px solid rgba(232, 150, 58, .38); color: var(--ink);
  font-size: 14px; line-height: 1.55;
}
.notice-alert .alert-ico {
  flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: #E8963A;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
html:not(.theme-dark) .notice-alert { background: rgba(196, 110, 20, .08); border-color: rgba(196, 110, 20, .35); }
html:not(.theme-dark) .notice-alert .alert-ico { stroke: #B4620E; }

/* A figure still on its way: a soft shimmer the size of the number, so nothing moves when it lands. */
.is-loading {
  display: inline-block; min-width: 3.2em; color: transparent !important; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-sunk) 25%, var(--track) 50%, var(--surface-sunk) 75%);
  background-size: 200% 100%; animation: hold-shimmer 1.3s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .is-loading { animation: none; } }

/* Charges: the amounts in gold (gold-deep is the readable gold in every theme). */
.fees tbody td:last-child { color: var(--gold-deep); font-weight: 500; }
/* Pages set .detail-main / .fact-main to flex:1 in their own styles; the icon sits after the text. */
body .detail:has(> .copy), body .dt:has(> .copy), body .fact:has(> .copy) { justify-content: flex-start; }
body .detail:has(> .copy) > .detail-main, body .dt:has(> .copy) > .dt-main, body .fact:has(> .copy) > .fact-main { flex: 0 1 auto; }
body button.copy::before { min-width: 15px; }
/* Copy icon, final (18 Nov 2026): no border, no box, sits on the value's line; a tick when done. */
body button.copy, body button.copy.done {
  align-self: flex-end; height: 20px; min-height: 20px; min-width: 0; width: 22px; padding: 0;
  margin: 0 0 0 2px; border: 0 !important; background: transparent !important; box-shadow: none;
  font-size: 0; gap: 0; border-radius: 4px; line-height: 20px;
}
body button.copy::before { width: 15px; height: 15px; min-width: 15px; }
body button.copy::after { inset: -12px -10px; } /* a finger-sized target around a small icon */
@media (hover: hover) and (pointer: fine) { body button.copy:hover { color: var(--ink); } }
/* Give every copyable value a fixed line, and the icon the same box, so they line up exactly. */
body .detail-v, body .fact-v { line-height: 20px; }
body .dt-v { line-height: 24px; }
body .dt button.copy { height: 24px; line-height: 24px; }
body button.copy::before { transform: translateY(-1px); }

/* The amount on Add money (18 Nov 2026): plainly empty until typed in, no box behind it, and a
   line under it that turns gold while you type. */
body .amt-in {
  background: transparent !important; -webkit-appearance: none; appearance: none; box-shadow: none;
  border-radius: 0; caret-color: var(--gold);
}
body .amt-in:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px transparent inset; }
body .amt-in::placeholder { color: var(--muted); opacity: .45; }
body .amt-row {
  width: max-content; min-width: 140px; margin: 6px auto 14px; padding: 4px 10px 8px;
  border-bottom: 1.5px solid var(--line-strong); transition: border-color .2s ease;
}
body .amt-row:focus-within { border-bottom-color: var(--gold); }
body .amt-row:has(.amt-in:placeholder-shown) .amt-cur { opacity: .5; }
html body .amt-in::placeholder { color: var(--muted); opacity: .35; }
/* Shimmer in the panel's own tone: a faint light passing, not a dark box. */
html body .is-loading {
  background: linear-gradient(90deg, var(--track) 25%, color-mix(in srgb, var(--ink) 11%, transparent) 50%, var(--track) 75%);
  background-size: 200% 100%;
}
/* The icon right against the text: no row gap, just a small space (18 Nov 2026). */
body .detail:has(> .copy), body .dt:has(> .copy), body .fact:has(> .copy) { gap: 0; }
body button.copy, body button.copy.done { width: 16px; margin-left: 7px; }

/* Phones: content stops above the floating menu instead of scrolling under it (18 Nov 2026).
   A band in the page colour sits behind the menu, fading in just above it. */
.tabbar-shield { display: none; }
@media (max-width: 899px) {
  .tabbar-shield {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 29; pointer-events: none;
    height: calc(96px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent 0, var(--bg) 22px);
  }
}

/* Phones: the selected tab is gold text with a short gold line above the icon, no box (18 Nov 2026). */
@media (max-width: 899px) {
  .tab { position: relative; }
  .tab[aria-current="page"] { background: none; color: var(--gold-deep); font-weight: 500; }
  .tab[aria-current="page"]::before {
    content: ""; position: absolute; top: 3px; left: 50%; width: 18px; height: 2px; margin-left: -9px;
    border-radius: 2px; background: var(--gold-deep);
  }
  .tab:not([aria-current="page"]):active { background: var(--track); }
}

/* Short points inside a notice (Add money: first top-up). */
.fs-points { margin: 6px 0 0; padding: 0; list-style: none; }
.fs-points li { position: relative; padding-left: 14px; margin-top: 4px; line-height: 1.5; }
.fs-points li::before {
  content: ""; position: absolute; left: 1px; top: .62em; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .55;
}

/* Nothing beside the logo: each page already has its own title (18 Nov 2026). */
.topbar .mark > span { display: none; }
.notice-alert .fs-points li:first-child { margin-top: 0; }
/* Phones: a small gold dot under the selected tab instead of a line above it. */
@media (max-width: 899px) {
  .tab[aria-current="page"]::before { content: none; }
  .tab[aria-current="page"]::after {
    content: ""; position: absolute; bottom: 1px; left: 50%; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 50%; background: var(--gold-deep);
  }
  .tab { padding-bottom: 9px; }
}
.notice-alert .fs-points li::before { background: #E8963A; opacity: 1; }

/* The top bar stays put on every screen size, phones included (18 Nov 2026). */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 35; padding-top: env(safe-area-inset-top); }
body:has(> .topbar) { padding-top: calc(64px + env(safe-area-inset-top)); }

/* No visible scroll bar; the page still scrolls with a finger, trackpad or wheel. */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Moving between pages (18 Nov 2026): the browser keeps the current page on screen until the
   next one can paint, then cross-fades. The top bar and the menu do not move at all. Supported
   in Chrome, Edge and Safari 18.2+; elsewhere pages simply load as before. */
@view-transition { navigation: auto; }
.topbar { view-transition-name: tcc-topbar; }
.tabbar { view-transition-name: tcc-tabbar; }
.tabbar-shield { view-transition-name: tcc-shield; }
::view-transition-group(tcc-topbar), ::view-transition-group(tcc-tabbar), ::view-transition-group(tcc-shield) { animation: none; }
::view-transition-old(tcc-topbar), ::view-transition-new(tcc-topbar),
::view-transition-old(tcc-tabbar), ::view-transition-new(tcc-tabbar) { animation: none; }
/* The old page stays fully drawn while the new one fades in over it, so the themed ground never
   dims to black in between. */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: vt-in .18s ease-out both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Freeze confirmation sheet. */
.fz-in { text-align: center; padding-top: 26px; }
.fz-in::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: -12px auto 18px; }
.fz-ico { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--gold) 14%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.fz-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--gold-deep); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fz-in h2 { font-size: 20px; font-weight: 500; margin: 0 0 12px; }
.fz-points { list-style: none; margin: 0 auto 22px; padding: 0; max-width: 320px; text-align: left; }
.fz-points li { position: relative; padding-left: 16px; margin-top: 7px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fz-points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.fz-actions { display: grid; gap: 10px; max-width: 420px; margin: 0 auto; }
.fz-actions .btn { width: 100%; }
.fz-cancel { background: transparent !important; border-color: transparent !important; color: var(--muted) !important; }
.fz-cancel:hover { color: var(--ink) !important; }

/* Bottom sheets rise from the bottom edge (18 Nov 2026). */
.sheet-in { transform: translateY(100%); transition: transform .2s cubic-bezier(.4,0,1,1); }
.sheet.open .sheet-in { transform: translateY(0); transition: transform .34s cubic-bezier(.16,1,.3,1); }
@media (prefers-reduced-motion: reduce) { .sheet-in, .sheet.open .sheet-in { transition: none; } }
.dt-v.is-loading { min-width: 9em; height: 22px; display: block; margin-top: 4px; }
#d-exp.is-loading, #d-cvv.is-loading { min-width: 4em; width: 4em; }
/* Wider screens show the sheet as a centred card: it fades up a little instead. */
@media (min-width: 560px) {
  .sheet-in { transform: translateY(18px) scale(.98); transition: transform .16s ease-in; }
  .sheet.open .sheet-in { transform: none; transition: transform .28s cubic-bezier(.16,1,.3,1); }
  .fz-in::before { display: none; }
}

/* The card's state, on the card face: a small frosted tag, top left. */
.card .card-top { position: relative; }
body .card .pill.card-state {
  position: absolute; top: 0; left: 0; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 9px !important;
  border-radius: 999px; background: rgba(0,0,0,.32) !important; border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.88) !important; font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
body .card .pill.card-state:empty { display: none; }
html:not(.theme-dark) body .card .pill.card-state { background: rgba(255,255,255,.55) !important; color: #2a2620 !important; border-color: rgba(0,0,0,.08); }

/* The four round actions: labels on one line whether the action is a link or a button. */
.actions .action { line-height: 1.25; font-family: inherit; }
/* Softer band behind the phone menu: a light veil, not a black block (18 Nov 2026). */
@media (max-width: 899px) {
  .tabbar-shield {
    height: calc(84px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent 0, color-mix(in srgb, var(--bg) 55%, transparent) 60%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
  }
}

/* Freeze sheet, v2 (18 Nov 2026): a floating card, left-aligned, buttons side by side. */
.sheet:has(.fz-in) { padding: 0 10px calc(10px + env(safe-area-inset-bottom)); }
.sheet .fz-in {
  text-align: left; max-width: 520px; border-radius: 28px;
  padding: 22px 22px 20px;
}
.fz-in::before { margin: -8px auto 18px; }
.fz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.fz-head .fz-ico { width: 42px; height: 42px; margin: 0; flex: none; }
.fz-head .fz-ico svg { width: 20px; height: 20px; }
.fz-head h2 { margin: 0; font-size: 19px; }
.fz-points { margin: 0 0 22px; max-width: none; padding-left: 2px; }
.fz-actions { grid-template-columns: 1fr 1.6fr; max-width: none; gap: 10px; }
.fz-actions .btn { min-height: 52px; }
.fz-cancel { border: 1px solid var(--line-strong) !important; color: var(--ink) !important; }

/* The copy tick: a soft fade-in in place, no bounce and no jump (18 Nov 2026). */
body button.copy::before, body button.copy.done::before { transform: translateY(-1px); }
body button.copy.done::before { animation: copy-tick-soft .18s ease-out both; }
@keyframes copy-tick-soft { from { opacity: 0; transform: translateY(-1px) scale(.85); } to { opacity: 1; transform: translateY(-1px) scale(1); } }
body button.copy, body button.copy.done { transition: color .15s ease; }

/* Sign out's text lines up with the right edge exactly as the logo does with the left: the
   button keeps its hover padding, pulled out by the same amount. */
.topbar-in > .iconbtn:last-child, .topbar-in > :last-child > .iconbtn:last-child { margin-right: -16px; }

/* Anything marked hidden stays hidden, whatever display its class gives it (19 Nov 2026: the
   empty code-step notice on sign-in showed its dot because .notice sets display: flex). */
[hidden] { display: none !important; }
