/* 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");
}

html { background: var(--bg); }
body { background: var(--page-glow), var(--bg); background-attachment: fixed; 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; }

/* ---- 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; }
  .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); }

  /* Home: the card on the left, balance and actions on the right, panels side by side. */
  #live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 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-top: 6px; }
  #live > .actions { grid-column: 2; grid-row: 2; }
  #live > section.panel:nth-of-type(1) { grid-column: 1; grid-row: 5; margin-top: 28px; }
  #live > section.panel:nth-of-type(2) { grid-column: 2; grid-row: 5; margin-top: 28px; }
}

/* 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;
}
