/* ============================================================
   Splitit embedded — the host shell (docs/embedded/SPEC.md)
   The bank's chrome around Splitit: header (data-header), account rows
   (data-rows), tab bar / rail, transaction list with the "Pay over time"
   tag. Everything is drawn from the --host-* theme contract below; a bank
   sets those in embedded/banks/<id>/theme.css and never edits this file.

   <html> attributes (set by embedded/host.js):
     data-bank         the bank id (theme.css keys off it)
     data-header       solid | utility | curved
     data-rows         group | striped | carousel
     data-host-nav     bar | rail
     data-host-cols    1 | 2
     data-host-preview a preview: draw the stand-in status bar
     data-host-label   uppercase | none (from --host-label-case)
     data-host-tab-case uppercase | none (from --host-tab-case, else the label case)
     data-host-tab-marker top | none (from --host-tab-marker)
     data-fold         vertical | horizontal | none
   ============================================================ */

/* ── The theme contract: defaults (a neutral bank) ─────────────── */
:root {
  --host-primary: #2B4C7E;        /* brand colour: header, active tab, selected */
  --host-primary-ink: #FFFFFF;    /* text and icons on --host-primary */
  --host-primary-dark: #1D3557;   /* pressed / deeper brand tone */
  --host-accent: #4F7FC0;         /* secondary brand tone: icon discs, highlights */
  --host-cta: #2B4C7E;            /* primary buttons (Splitit's CTA too, in host mode) */
  --host-cta-ink: #FFFFFF;        /* text on --host-cta */
  --host-link: #2B5FA8;           /* links, tags, Splitit accents (its teal) */
  --host-link-ink: #FFFFFF;       /* text on a --host-link fill */
  --host-bg: #F2F4F7;             /* page */
  --host-surface: #FFFFFF;        /* cards, bars */
  --host-ink: #1A1F26;            /* primary text */
  --host-muted: #5A6472;          /* secondary text */
  --host-line: rgba(26, 31, 38, .12);   /* hairlines */
  --host-radius-card: 12px;
  --host-radius-btn: 10px;
  --host-font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --host-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --host-label-case: none;        /* none | uppercase: small labels */
  --host-stripe-a: var(--host-accent);   /* striped rows: left half of the top stripe */
  --host-stripe-b: var(--host-primary);  /* striped rows: right half */
  /* Optional (used with a fallback where they are read, so a theme may leave them out):
     --host-radius-chip       pills: section pills, tags (default --host-radius-btn)
     --host-font-wordmark     the text wordmark (default --host-font-display)
     --host-wordmark-size     / --host-wordmark-tracking (default 20px / -0.01em)
     --host-tab-case          tab labels (default --host-label-case)
     --host-tab-marker        top | none: a bar on the active tab's outer edge (default none)
     --host-tab-bg / --host-tab-ink / --host-tab-icon / --host-tab-stroke / --host-tab-label-size /
     --host-tab-label-weight / --host-tab-active-weight: the bank's own tab bar (defaults: surface,
     muted, 24px, 1.75, 11px, 600, label weight)
     --host-money-weight      balances (default 600)
     --host-group-head-bg     / --host-group-head-ink: group cards' head (default none / muted)
     --host-assist-bg         / --host-assist-ink / --host-assist-line: the assistant pill
                              (default outline: none / the header ink / ink 55%)
     --host-segment-active    the segmented switch's active colour (default --host-accent) */
  /* Derived; a theme may restate them. */
  --host-header-bg: var(--host-primary);
  --host-header-ink: var(--host-primary-ink);
  --host-tab-active: var(--host-primary);
  --host-soft: color-mix(in srgb, var(--host-link) 10%, transparent);
  --host-pos: #1E7B4C;
  --host-danger: #B3261E;
}
:root[data-theme="dark"] {
  --host-bg: #0E1217;
  --host-surface: #171D25;
  --host-ink: #EDF0F4;
  --host-muted: #A3ACB9;
  --host-line: rgba(237, 240, 244, .12);
  --host-link: color-mix(in srgb, var(--host-primary) 38%, #FFFFFF);
  --host-link-ink: #0E1217;
  --host-tab-active: var(--host-link);
  --host-pos: #6FCF97;
  --host-danger: #F2A49D;
}

/* ── Page (bank pages only) ───────────────────────────────────── */
html:has(.host-app), html:has(.host-app) body { margin: 0; background: var(--host-bg); }
.host-app {
  position: relative; box-sizing: border-box;
  min-height: 100vh; min-height: 100svh; height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--host-bg); color: var(--host-ink);
  font: 400 15px/1.4 var(--host-font-body);
  -webkit-font-smoothing: antialiased;
  --pad: 20px;
}
.host-app:not([data-ready]) { visibility: hidden; }
.host-app *, .host-nav, .host-nav * { box-sizing: border-box; }
:where(.host-app, .host-nav) button { font: inherit; color: inherit; }   /* (0,0,1): a class's colour wins */
.host-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior-y: contain;
  padding-bottom: 32px;
  scrollbar-width: none;
}
.host-scroll::-webkit-scrollbar { display: none; }
html[data-host-nav="bar"] .host-scroll { padding-bottom: calc(112px + 24px); }
/* An OS side column on a compact window (the Duo closed, a Split View half): the
   page and the tab bar keep out of it, by the same insets the split sheet reads
   (--host-in-l / --host-in-r, set by host.js: one source). */
html[data-host-nav="bar"] .host-app { padding-left: var(--host-in-l, 0px); padding-right: var(--host-in-r, 0px); }
html[data-host-nav="bar"] .host-app > .host-nav { left: var(--host-in-l, 0px); right: var(--host-in-r, 0px); }
html[data-host-nav="rail"] .host-scroll { margin-right: var(--host-rail-w); }

/* Stand-in status bar, previews only (the Splitit pages draw the same one). */
.host-status { display: none; }
html[data-host-preview] .host-status {
  display: flex; align-items: center; justify-content: space-between;
  position: absolute; top: 0; left: 0; right: 0; z-index: 12; height: 59px;
  padding: 0 28px; font: 600 15px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--host-header-bg); color: var(--host-header-ink);
  pointer-events: none;
}
html[data-header="utility"][data-host-preview] .host-status { background: var(--host-surface); color: var(--host-ink); }
.host-sig svg { height: 13px; width: auto; display: block; }
html[data-host-preview] .host-app { padding-top: 59px; }
.host-app { padding-top: env(safe-area-inset-top, 0px); }

/* ── Header ───────────────────────────────────────────────────── */
.host-header { background: var(--host-header-bg); color: var(--host-header-ink); }
.host-header-in { padding: 4px var(--pad) 20px; }
html[data-host-cols="2"] .host-header-in { padding-left: var(--host-a-x); padding-right: calc(var(--host-end) - var(--host-rail-w)); }
html[data-host-cols="1"][data-host-nav="rail"] .host-header-in { padding-left: var(--host-a-x); padding-right: max(24px, calc(100vw - var(--host-a-x) - var(--host-a-w) - var(--host-rail-w))); }
.host-hrow { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.host-wordmark {
  font: 700 var(--host-wordmark-size, 20px)/1.1 var(--host-font-wordmark, var(--host-font-display));
  letter-spacing: var(--host-wordmark-tracking, -0.01em); margin-right: auto; min-width: 0; white-space: nowrap;
}
/* Labels under the header's icons (config headerLabels). */
.host-hbtn.has-label, .host-icon-btn.has-label { flex-direction: column; gap: 3px; min-width: 44px; padding: 2px 2px; }
.host-hrow:has(.has-label) .host-hactions { gap: 2px; }
.host-hbtn.has-label .hi, .host-icon-btn.has-label .hi { width: 22px; height: 22px; }
.host-hlabel { font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; }
.host-h1-date { display: inline-block; margin-left: 10px; font: 400 16px/1.2 var(--host-font-body); letter-spacing: 0; white-space: nowrap; opacity: .92; vertical-align: 3px; }
.host-h1-sep { margin-right: 6px; opacity: .7; }
/* A segmented switch under the header (config segments: BofA's Accounts | Dashboard). */
.host-seg { display: flex; margin-top: 2px; border-bottom: 1px solid var(--host-line); }
.host-seg-item {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px;
  border: 0; background: transparent; color: var(--host-muted); text-decoration: none; cursor: pointer;
  font-size: 16px; font-weight: 500; box-shadow: inset 0 -2px 0 transparent;
}
.host-seg-item.is-active { color: var(--host-segment-active, var(--host-accent)); box-shadow: inset 0 -2px 0 currentColor; }
.host-hactions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.host-hbtn, .host-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 44px; min-height: 44px; padding: 0 6px;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  text-decoration: none; cursor: pointer;
}
.host-hbtn .hi, .host-icon-btn .hi { width: 24px; height: 24px; }
.host-back { margin-left: -10px; padding-right: 10px; font-weight: 600; }
.host-back span { font-size: 16px; }
.host-assist {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px;
  border: 0; background: transparent; color: inherit; cursor: pointer;
}
.host-assist > span {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--host-assist-bg, transparent); color: var(--host-assist-ink, currentColor);
  border: 1px solid var(--host-assist-line, color-mix(in srgb, currentColor 55%, transparent));
}
.host-assist.is-round { width: 44px; justify-content: center; padding: 0; }
.host-assist.is-round > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; border: 0; }
.host-assist.is-round .hi { width: 40px; height: 40px; padding: 9px; border-radius: 999px; background: var(--host-accent); color: var(--host-primary-ink); }
.host-h1 { margin: 12px 0 0; font: 600 28px/1.15 var(--host-font-display); letter-spacing: -0.01em; }
.host-hsub { margin: 4px 0 0; font-size: 14px; opacity: .85; }

/* utility (BofA-like): a light bar, a search pill, the greeting as a card */
html[data-header="utility"] .host-header { background: var(--host-surface); color: var(--host-ink); border-bottom: 1px solid var(--host-line); }
html[data-header="utility"] .host-header-in { padding-bottom: 14px; }
html[data-header="utility"] .host-wordmark { color: var(--host-primary); }
html[data-theme="dark"][data-header="utility"] .host-wordmark { color: var(--host-ink); }
.host-search { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.host-search-pill {
  flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--host-bg); color: var(--host-muted); text-align: left; cursor: pointer;
}
.host-search-pill .hi { width: 18px; height: 18px; }

/* curved (Citizens-like): a deep band with a rounded foot, the first card overlaps it */
/* The band's rounded foot runs on behind the first cards (drawn by .host-main, so no block overlaps another). */
html[data-header="curved"] .host-main::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 60px; z-index: 0;
  background: var(--host-header-bg); border-radius: 0 0 28px 28px;
}
html[data-header="curved"] .host-main > * { position: relative; z-index: 1; }
html[data-header="curved"] .host-h1 { font-size: 32px; font-weight: 500; }

/* ── Content columns ──────────────────────────────────────────── */
.host-main { padding: 16px var(--pad) 0; position: relative; }
.host-col { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.host-col-b { margin-top: 16px; }
/* A narrow column (the far half of a Fold in book, beside the rail): rows drop
   their monogram so names and dates keep a line. */
.host-col { container-type: inline-size; }
@container (max-width: 300px) {
  .host-row > .host-mono { display: none; }
  .host-elig .host-tx-tag { padding-left: 0; }
  .host-card-head .host-powered { white-space: nowrap; }
}
html[data-host-cols="2"] .host-main {
  display: grid; grid-template-columns: var(--host-a-w) var(--host-b-w); column-gap: var(--host-gap);
  padding-left: var(--host-a-x); padding-right: 0; align-items: start;
}
html[data-host-cols="2"] .host-col-b { margin-top: 0; }
html[data-host-cols="1"]:not([data-host-nav="bar"]) .host-main { padding-left: var(--host-a-x); width: calc(var(--host-a-x) + var(--host-a-w)); }

.host-h2 { margin: 8px 0 -4px; font: 600 20px/1.2 var(--host-font-display); }
html[data-header="curved"] .host-col-a > .host-h2:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.host-label { text-transform: var(--host-label-case); }
html[data-host-label="uppercase"] .host-label { letter-spacing: .06em; font-size: 11px; font-weight: 700; }

/* ── Cards and rows ───────────────────────────────────────────── */
.host-card {
  display: block; position: relative;
  background: var(--host-surface); color: var(--host-ink);
  border: 1px solid var(--host-line); border-radius: var(--host-radius-card);
  overflow: hidden; text-decoration: none;
}
.host-card-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 16px 4px; }
.host-card-head .host-powered, .host-card-head .host-link { margin-left: auto; }
.host-card-head .host-link { white-space: nowrap; flex: none; }
.host-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 64px; padding: 12px 16px;
  border: 0; border-top: 1px solid var(--host-line); background: transparent;
  color: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.host-card-head + .host-row { border-top: 0; }
.host-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.host-row-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.host-row-sub { font-size: 13px; color: var(--host-muted); line-height: 1.35; }
.host-row-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.host-per { font-weight: 400; color: var(--host-muted); font-size: 13px; }
.host-last4 { white-space: nowrap; font-variant-numeric: tabular-nums; }
.host-chev { width: 18px; height: 18px; flex: 0 0 auto; color: var(--host-muted); }
.host-big { display: block; font: var(--host-money-weight, 600) 30px/1.15 var(--host-font-body); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.host-link { color: var(--host-link); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.host-powered { font-size: 12px; font-weight: 500; color: var(--host-muted); letter-spacing: 0; text-transform: none; }
.host-note { margin: 0; padding: 12px 16px 16px; border-top: 1px solid var(--host-line); font-size: 13px; color: var(--host-muted); }
.host-mono {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: var(--host-soft); color: var(--host-link); font-weight: 700; font-size: 15px;
}
/* Real marks (logo.dev via app.js): the merchant's on a white tile, cropped round;
   the initial underneath stays when a mark does not load. */
.host-mono.has-logo { background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px var(--host-line); }
.host-mono .mlogo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The bank's own mark beside its wordmark */
.host-wordmark { display: inline-flex; align-items: center; gap: 8px; }
.host-banklogo { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; object-fit: cover; background: #fff; }
.host-hrow { position: relative; }
.host-hmark { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; overflow: hidden; border-radius: 7px; pointer-events: none; }
.host-hmark .host-banklogo { width: 100%; height: 100%; display: block; }
.host-menu-ic { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--host-soft); color: var(--host-link); }
.host-menu-ic .hi { width: 20px; height: 20px; }

/* group: grouped cards (Chase-like); the head may be a brand band (--host-group-head-*) */
.host-group .host-card-head { min-height: 44px; padding: 12px 16px; background: var(--host-group-head-bg, transparent); color: var(--host-group-head-ink, var(--host-muted)); }
.host-group-name { font-weight: 600; font-size: 14px; color: inherit; }
.host-acct .host-row-amt { font-size: 17px; font-weight: var(--host-money-weight, 600); }
/* stackBalance: the balance over its label, right-aligned */
.host-row-fig { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.host-acct.is-stacked { min-height: 76px; }
.host-acct.is-stacked .host-row-amt { font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.host-acct.is-stacked .host-row-sub.host-label { white-space: nowrap; }
.host-elig-lbl { font-size: 12px; line-height: 1.2; color: var(--host-muted); white-space: nowrap; }
.host-tx-tag .host-elig-lbl { display: inline-flex; align-items: center; min-height: 44px; margin-right: 10px; }

/* striped: category cards with a two-tone top stripe (BofA-like) */
.host-striped { border-top: 0; }
.host-striped::before {
  content: ''; display: block; height: 4px;
  background: linear-gradient(90deg, var(--host-stripe-a) 0 50%, var(--host-stripe-b) 50% 100%);
}
.host-cat-h { margin: 0; font: inherit; }
.host-striped .host-card-head { min-height: 56px; padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--host-line); }
/* The category head is a disclosure button (collapsible, expanded by default). */
.host-striped button.host-card-head { width: 100%; border: 0; border-bottom: 1px solid var(--host-line); background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.host-striped button.host-card-head[aria-expanded="false"] { border-bottom-color: transparent; }
.host-disclose { transition: transform 200ms ease; }
.host-card-head[aria-expanded="true"] .host-disclose { transform: rotate(180deg); }
.host-cat-body > .host-row:first-child { border-top: 0; }
.host-striped .host-card-head .host-row-title { font-size: 17px; font-weight: 700; }
.host-striped .host-card-head .host-row-amt { margin-left: auto; }
.host-striped .host-card-head + .host-row { border-top: 0; }

/* carousel: one card per account, swiped (Citizens-like) */
.host-carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad) 4px; scroll-padding: 0 var(--pad);
}
.host-carousel::-webkit-scrollbar { display: none; }
/* Two columns: room for every card, so the carousel lays them out as a grid. */
html[data-host-cols="2"] .host-carousel { margin: 0; padding: 0; overflow: visible; grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* A grid card is narrow: the whole card is the link, so its chevron steps aside. */
html[data-host-cols="2"] .host-splitit.is-compact .host-chev { display: none; }
html[data-host-cols="2"] .host-dots { display: none; }
.host-slide { scroll-snap-align: start; display: flex; }
.host-slide > .host-card { flex: 1; }
.host-acc-card { display: flex; flex-direction: column; gap: 2px; padding: 16px; min-height: 168px; text-align: left; width: 100%; cursor: pointer; font: inherit; }
.host-acc-card .host-big { margin-top: auto; padding-top: 12px; }
.host-acc-ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 999px; background: var(--host-soft); color: var(--host-link); }
.host-acc-ic .hi { width: 22px; height: 22px; }
.host-dots { display: flex; justify-content: center; gap: 6px; margin-top: -6px; }
.host-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--host-line); }
.host-dots span.is-on { background: var(--host-primary); }
html[data-theme="dark"] .host-dots span.is-on { background: var(--host-link); }

/* ── The Splitit area card (entry point a) ────────────────────── */
.host-splitit { color: var(--host-ink); }
.host-splitit-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.host-splitit-ic { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--host-soft); color: var(--host-link); }
.host-splitit-ic .hi { width: 22px; height: 22px; }
.host-splitit-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.host-splitit-fig { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px 16px; }
.host-splitit-foot { display: block; padding: 12px 16px; border-top: 1px solid var(--host-line); color: var(--host-link); font-size: 14px; font-weight: 600; }
.host-splitit.is-compact { display: flex; flex-direction: column; min-height: 168px; }
.host-splitit.is-compact .host-splitit-fig { margin-top: auto; }
.host-splitit.is-compact .host-splitit-foot { display: none; }
.host-splitit.is-flat { display: block; text-decoration: none; }

/* ── Transactions and the eligible tag (entry point b) ────────── */
.host-tx, .host-elig { flex-wrap: wrap; row-gap: 0; }
.host-tx-tag { flex: 0 0 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; margin-top: -4px; margin-bottom: -8px; }
.host-elig .host-tx-tag { justify-content: flex-start; padding-left: 52px; }
.host-tx.is-void .host-row-amt { text-decoration: line-through; color: var(--host-muted); }
.host-tag {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; text-decoration: none; color: var(--host-link);
}
.host-tag > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--host-radius-chip, var(--host-radius-btn));
  border: 1.5px solid var(--host-link); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.host-tag.is-quiet > span { border-color: transparent; background: var(--host-soft); font-weight: 500; }
.host-status-txt { font-size: 13px; color: var(--host-muted); min-height: 32px; display: inline-flex; align-items: center; }

.host-summary { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.host-greet .host-row { border-top: 0; }

/* ── The transaction split journey: rows, the detail, the list-detail card page ── */
a.host-row.host-tx, a.host-row.host-elig { color: inherit; }
.host-elig[hidden], .host-tx-tag[hidden] { display: none; }
/* Row status note: one quiet line under the amount, like the app's activity rows. */
.host-tx .host-tx-tag { margin-top: -10px; margin-bottom: 0; }
.host-tx-note { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--host-link); white-space: nowrap; }
.host-tx-note.is-muted { color: var(--host-muted); }
.host-tag.is-elig > span { border-color: transparent; background: var(--host-soft); color: var(--host-link); font-weight: 600; }
.host-tag.is-split > span { border-color: transparent; background: var(--host-soft); color: var(--host-ink); font-weight: 600; }
.host-sp-mark { width: 14px; height: 15px; flex: none; color: var(--host-link); }
html[data-host-panes="2"] .host-tx[aria-current] { background: var(--host-soft); box-shadow: inset 3px 0 0 var(--host-link); }
.host-txd { display: flex; flex-direction: column; gap: 16px; }
.host-txd-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px 20px; text-align: center; }
.host-mono-lg { width: 56px; height: 56px; font-size: 22px; margin-bottom: 6px; }
.host-txd-merchant { margin: 0; font: 600 18px/1.25 var(--host-font-display); }
.host-txd-amt { font-size: 34px; }
.host-txd-status {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px;
  border-radius: var(--host-radius-chip, var(--host-radius-btn)); background: color-mix(in srgb, var(--host-ink) 6%, transparent);
  font-size: 13px; font-weight: 600; color: var(--host-ink);
}
.host-txd-status.is-split { background: var(--host-soft); }
.host-txd-slot:empty { display: none; }
.host-facts { margin: 0; padding: 0 16px 8px; }
.host-fact { display: flex; justify-content: space-between; gap: 16px; min-height: 44px; align-items: center; border-top: 1px solid var(--host-line); }
.host-fact:first-child { border-top: 0; }
.host-fact dt { color: var(--host-muted); font-size: 14px; }
.host-fact dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; }
.host-detail { display: flex; flex-direction: column; gap: 16px; }
.host-detail .host-txd-merchant:focus { outline: none; }
/* One pane (phone, narrow, a Fold in book): the list only; a row pushes the detail page. */
html[data-host-page="card"][data-host-panes="1"] .host-col-b { display: none; }
/* Two panes: the detail stays in view while the list scrolls. */
html[data-host-page="card"][data-host-panes="2"] .host-col-b { position: sticky; top: 16px; }
/* The transaction page: the header already names the merchant, so the hero's own
   heading is kept for assistive tech only (the card page's detail pane shows it). */
html[data-host-page="transaction"] .host-txd-page .host-txd-merchant { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Two columns: the hero with Details under it on the left, Splitit's slot (offer or
   plan) on the right, so neither half is left blank. Phone order is unchanged. */
html[data-host-page="transaction"][data-host-cols="2"] .host-col-a { grid-column: 1 / -1; }
html[data-host-page="transaction"][data-host-cols="2"] .host-txd-page {
  display: grid; grid-template-columns: var(--host-a-w) var(--host-b-w); column-gap: var(--host-gap);
  grid-template-rows: auto auto 1fr; row-gap: 16px; align-items: start;
}
html[data-host-page="transaction"][data-host-cols="2"] .host-txd-page > .host-txd-hero { grid-column: 1; grid-row: 1; }
html[data-host-page="transaction"][data-host-cols="2"] .host-txd-page > .host-txd-facts { grid-column: 1; grid-row: 2; }
html[data-host-page="transaction"][data-host-cols="2"] .host-txd-page > .host-txd-slot { grid-column: 2; grid-row: 1 / 4; }

/* ── Tab bar (compact) and rail (wider windows) ───────────────── */
.host-nav {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 14;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: start;
  min-height: 112px; padding: 8px 6px calc(env(safe-area-inset-bottom, 0px) + 34px + 8px);
  background: var(--host-tab-bg, var(--host-surface)); border-top: 1px solid var(--host-line);
  font-family: var(--host-font-body);
}
.host-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  min-height: 52px; min-width: 44px; padding: 6px 2px;
  border: 0; background: transparent; color: var(--host-tab-ink, var(--host-muted)); text-decoration: none; cursor: pointer;
  border-radius: 12px;
}
.host-tab .hi { width: var(--host-tab-icon, 24px); height: var(--host-tab-icon, 24px); stroke-width: var(--host-tab-stroke, 1.75); }
.host-tab-label { font-size: var(--host-tab-label-size, 11px); font-weight: var(--host-tab-label-weight, 600); line-height: 1.15; text-align: center; text-transform: var(--host-tab-case, var(--host-label-case)); white-space: nowrap; letter-spacing: -0.01em; }
/* Five tabs on a phone-width bar or in a rail: one line each, a size smaller ("Pay & transfer"). */
.host-nav:has(> :nth-child(5)) .host-tab-label, html[data-host-nav="rail"] .host-tab-label { font-size: 10.5px; letter-spacing: -0.02em; }
html[data-host-tab-case="uppercase"] .host-tab-label { font-size: 10px; letter-spacing: .04em; }
/* --host-tab-marker: top — a short bar on the active tab's outer edge (the bar's top; the rail's inner edge). */
html[data-host-tab-marker="top"] .host-tab { position: relative; }
html[data-host-tab-marker="top"] .host-tab.is-active::before {
  content: ''; position: absolute; top: -9px; left: 50%; width: 32px; height: 3px; margin-left: -16px;
  border-radius: 0 0 3px 3px; background: var(--host-tab-active);
}
html[data-host-tab-marker="top"][data-host-nav="rail"] .host-tab.is-active::before { top: 50%; left: -5px; width: 3px; height: 32px; margin: -16px 0 0; border-radius: 0 3px 3px 0; }
.host-tab.is-active { color: var(--host-tab-active); }
.host-tab.is-active .host-tab-label { font-weight: var(--host-tab-active-weight, var(--host-tab-label-weight, 600)); }
html[data-host-nav="rail"] .host-app > .host-nav {
  left: var(--host-rail-x); right: auto; top: 0; bottom: 0; width: var(--host-rail-w); min-height: 0;
  grid-auto-flow: row; grid-auto-rows: min-content; align-content: start; gap: 4px;
  padding: 16px 4px; border-top: 0; border-left: 1px solid var(--host-line);
}
html[data-host-nav="rail"] .host-tab { min-height: 60px; }
/* In the OS's side column (the Duo) the status sits at its top: tabs start below it. */
html[data-host-rail="column"] .host-app > .host-nav { padding-top: 104px; }

/* Focus, hover, press, motion */
.host-app :is(a, button):focus-visible, .host-nav :is(a, button):focus-visible, .host-carousel:focus-visible, .host-hero :is(a, button):focus-visible, .host-back:focus-visible {
  outline: 2px solid var(--host-link); outline-offset: 2px; border-radius: 8px;
}
.host-header :is(a, button):focus-visible { outline-color: currentColor; }
@media (hover: hover) and (pointer: fine) {
  .host-row:hover, a.host-card:hover, .host-acc-card:hover { background: color-mix(in srgb, var(--host-ink) 4%, var(--host-surface)); }
  .host-tab:hover { color: var(--host-ink); }
  .host-tab.is-active:hover { color: var(--host-tab-active); }
}
.host-row, .host-tab, .host-card, .host-tag > span { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
@media (prefers-reduced-motion: reduce) {
  .host-row, .host-tab, .host-card, .host-tag > span, .host-toast, .host-disclose { transition: none !important; }
  .host-carousel { scroll-behavior: auto; }
}

/* Toast for items outside the demo */
.host-toast {
  position: fixed; left: 50%; bottom: 128px; z-index: 40; transform: translateX(-50%);
  max-width: min(360px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px;
  background: var(--host-ink); color: var(--host-surface); font: 500 14px/1.35 var(--host-font-body);
  opacity: 0; pointer-events: none; transition: opacity 150ms ease;
}
.host-toast[data-on] { opacity: 1; }

/* ── Splitit as an account (bank home) ─────────────────────────── */
/* Splitit's own mark on a teal tile, the one brand cue on the bank's list. */
.host-sp-tile { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #0B8286; color: #fff; }
.host-sp-tile .host-sp-mark { width: 18px; height: 19px; color: #fff; }
.host-sp-acct.host-row { gap: 12px; }
.host-acc-card.host-sp-acct .host-sp-tile { width: 40px; height: 40px; margin-bottom: 8px; }
/* Inner-page header: a long back label truncates before the centred bank mark. */
.host-hrow .host-back { min-width: 0; max-width: calc(50% - 22px); }
.host-hrow .host-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The Splitit account tile: the logo's own mark (cropped from the artwork), on the bank's surface. */
.host-sp-tile { background: var(--host-surface, #fff); box-shadow: inset 0 0 0 1px var(--host-line); color: inherit; }
.host-sp-crop { display: block; width: 21px; height: 22px; overflow: hidden; }
.host-sp-crop img { display: block; height: 22px; width: auto; max-width: none; }
.host-sp-d { display: none !important; }
html[data-theme="dark"] .host-sp-l { display: none !important; }
html[data-theme="dark"] .host-sp-d { display: block !important; }
.host-acc-card.host-sp-acct .host-sp-crop { width: 23px; height: 24px; }
.host-acc-card.host-sp-acct .host-sp-crop img { height: 24px; }
