/* Overvue — monochrome, dark by default with a light theme. Mirrors the app's AppPalette. */
:root {
  --bg: #0a0a0c;
  --surface: #131316;
  --surface-high: #1c1c20;
  --border: #2a2a2f;
  --border-strong: #3a3a40;
  --text: #f5f5f7;
  --text-soft: #c7c7cc;
  --text-dim: #8e8e93;
  --accent: #fafafa;
  --on-accent: #0a0a0c;
  --green: #34d399;
  --red: #f87171;
  --amber: #fbbf24;
  --nav-bg: rgba(10, 10, 12, .78);
  --glow: rgba(255, 255, 255, .07);
  --frame: #47474e;
  --frame-edge: rgba(0, 0, 0, .65);
  --shadow-phone: 0 50px 100px -30px rgba(0, 0, 0, .85);
  --shadow-badge: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 10px 30px -18px rgba(0, 0, 0, .8);
  --shadow-badge-hover: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 20px 40px -18px rgba(0, 0, 0, .95);
  /* net-worth segment colours: brand constants in the app, same in both themes */
  --c-liquid: #10b981; --c-invest: #8b5cf6; --c-lent: #f59e0b; --c-debt: #ef4444;
  --pill-a: 16%; --badge-a: 18%; --banner-a: 12%;
  --radius: 20px;
  --maxw: 1120px;
  color-scheme: dark;
}
/* Light theme: the app's AppPalette.light(). Toggled from the nav, remembered in localStorage. */
:root[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #fafbfc;
  --surface-high: #ffffff;
  --border: #e4e6eb;
  --border-strong: #cbd2db;
  --text: #0a0a0c;
  --text-soft: #374151;
  --text-dim: #6b7280;
  --accent: #18181b;
  --on-accent: #ffffff;
  --green: #047857;
  --red: #dc2626;
  --amber: #b45309;
  --nav-bg: rgba(244, 245, 247, .82);
  --glow: rgba(15, 23, 42, .06);
  --frame: #c6c7cc;
  --frame-edge: rgba(15, 23, 42, .2);
  --shadow-phone: 0 40px 80px -30px rgba(15, 23, 42, .35);
  --shadow-badge: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .25);
  --shadow-badge-hover: 0 1px 2px rgba(15, 23, 42, .06), 0 20px 40px -18px rgba(15, 23, 42, .35);
  --pill-a: 10%; --badge-a: 12%; --banner-a: 6%;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.theme-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 700px; z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 30%, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
h1 span { color: var(--text-dim); }
.lede { margin-top: 24px; font-size: 20px; color: var(--text-dim); max-width: 520px; }
.hero-stores { margin-top: 36px; }
.hero-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 24px;
  font-size: 15px; font-weight: 500; color: var(--text-dim); transition: color .15s ease;
}
.hero-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.hero-link:hover { color: var(--text); }
.hero-link:hover svg { transform: translateY(2px); }

/* ---------- Store badges ---------- */
.stores { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.stores-center { justify-content: center; margin-top: 0; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 184px; padding: 10px 22px 10px 16px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px;
  color: var(--text); text-align: left; line-height: 1.15; white-space: nowrap;
  box-shadow: var(--shadow-badge);
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.store-badge:hover {
  transform: translateY(-2px); background: var(--surface-high); border-color: var(--text-dim);
  box-shadow: var(--shadow-badge-hover);
}
.store-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.store-badge svg { width: 28px; height: 28px; fill: currentColor; flex-shrink: 0; }
.store-badge small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--text-dim); }
.store-badge b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin-top: 1px; }
.cta-link {
  display: inline-block; margin-top: 26px; font-size: 15px; color: var(--text-dim);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border-strong);
  transition: color .15s ease, text-decoration-color .15s ease;
}
.cta-link:hover { color: var(--text); text-decoration-color: var(--text); }

/* ---------- App tour (tabs + phone) ---------- */
.showcase { display: grid; justify-items: center; gap: 20px; }
.tabs {
  display: inline-flex; gap: 4px; padding: 4px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-dim); font: inherit; font-size: 14px; font-weight: 600;
  line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.tab svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent); color: var(--on-accent); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pane { animation: pane-in .4s ease both; }
.pane[hidden] { display: none; }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- iPhone mockup ---------- */
.phone {
  position: relative; width: 316px; margin: 0 auto; padding: 11px; border-radius: 53px;
  background: #0b0b0d; /* black bezel; the metal frame is the ring outside it */
  box-shadow: 0 0 0 2.5px var(--frame), 0 0 0 3.5px var(--frame-edge), var(--shadow-phone);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; background: var(--frame); border-radius: 2px; }
.phone::before { left: -6.5px; top: 140px; height: 44px; box-shadow: 0 58px 0 0 var(--frame); }
.phone::after { right: -6.5px; top: 172px; height: 76px; }
.screen { position: relative; overflow: hidden; border-radius: 42px; background: var(--bg); }

/* ---------- In-phone UI ----------
   Laid out in the app's logical points (393 x 852) and scaled as one unit, so every size
   below is copied from the Flutter widgets. Scoped to .ui so nothing leaks into the page. */
.ui {
  position: relative; width: 393px; height: 852px; zoom: .7481;
  color: var(--text); font-size: 14px; line-height: 1.3; letter-spacing: -0.1px; text-align: left;
  -webkit-user-select: none; user-select: none;
}
.ui .ms {
  font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; display: inline-block;
  width: 1em; height: 1em; overflow: hidden; flex-shrink: 0; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}
.ui .island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 126px; height: 37px; border-radius: 20px; background: #000; z-index: 3; }
.ui .statusbar { position: absolute; top: 0; left: 0; right: 0; height: 59px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px 0 48px; font-size: 17px; font-weight: 600; letter-spacing: -0.3px; z-index: 2; }
.ui .sb-icons { display: inline-flex; align-items: center; gap: 6px; }
.ui .sb-icons svg { width: 18px; height: 18px; fill: currentColor; }
.ui .sb-icons .sb-batt { width: 27px; }
.ui .content { position: absolute; top: 59px; left: 0; right: 0; bottom: 96px; padding: 12px 20px 0; overflow: hidden; }
.ui .home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: var(--text); z-index: 3; }

/* bottom navigation: surface fill, hairline top border, 62pt row + home-indicator inset */
.ui .navbar { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; background: var(--surface); border-top: .5px solid var(--border); z-index: 2; }
.ui .nb-item { height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; border: 0; background: none; font: inherit; color: var(--text-dim); cursor: default; }
.ui button.nb-item { cursor: pointer; }
.ui button.nb-item:hover { color: var(--text); }
.ui button.nb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 12px; }
.ui .nb-item .l { margin-top: 4px; font-size: 11px; line-height: 1.2; letter-spacing: 0; font-weight: 500; }
.ui .nb-item.on { color: var(--text); }
.ui .nb-item.on .l { font-weight: 600; }
.ui .nb-item.on .ms { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.ui .nb-add { height: 62px; display: grid; place-items: center; }
.ui .nb-add i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.ui .nb-add svg { width: 26px; height: 26px; }

/* spacing helpers (SizedBox heights) */
.ui .mt2 { margin-top: 2px; } .ui .mt3 { margin-top: 3px; } .ui .mt4 { margin-top: 4px; } .ui .mt6 { margin-top: 6px; }
.ui .mt10 { margin-top: 10px; } .ui .mt12 { margin-top: 12px; } .ui .mt14 { margin-top: 14px; } .ui .mt16 { margin-top: 16px; }
.ui .mt18 { margin-top: 18px; } .ui .mt20 { margin-top: 20px; } .ui .mt28 { margin-top: 28px; }
.ui .grow { flex: 1; min-width: 0; }
.ui .pos { color: var(--green); } .ui .neg { color: var(--red); } .ui .dim { color: var(--text-dim); }

/* headers */
.ui .hdr { display: flex; align-items: center; gap: 12px; }
.ui .greet { font-size: 14px; font-weight: 500; color: var(--text-dim); }
.ui .name { margin-top: 2px; font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-high); border: 1px solid var(--border); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.ui .ph { display: flex; align-items: flex-start; gap: 12px; padding-top: 4px; }
.ui .ph h5 { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.5px; }
.ui .ph p { margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--text-dim); }
.ui .hbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-high); border: 1px solid var(--border); }
.ui .hbtn .ms { font-size: 19px; }
.ui .sh { padding: 0 4px; font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -0.3px; }

/* SurfaceCard */
.ui .sc { background: var(--surface-high); border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.ui .sc.r24 { border-radius: 24px; }
.ui .sc.flush { padding: 0; overflow: hidden; }
.ui .ctitle { display: flex; align-items: center; gap: 12px; }
.ui .tm { font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -0.2px; }
.ui .lbl { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--text-dim); }
.ui .lbl .info { font-size: 15px; padding: 2px; box-sizing: content-box; }
.ui .sub13 { font-size: 13px; line-height: 1.3; color: var(--text-dim); }
.ui .amt38 { font-size: 38px; font-weight: 700; line-height: 1.12; letter-spacing: -1.2px; }
.ui .amt34 { font-size: 34px; font-weight: 700; line-height: 1.12; letter-spacing: -1px; }
.ui .amt28 { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -0.8px; }
.ui .hr { height: 1px; background: var(--border); }
.ui .view { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.ui .view .ms { font-size: 18px; }

/* StatusPill: text-safe colour on a tint of itself */
.ui .pill { --pc: var(--text-dim); display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 10px; font-size: 12px; line-height: 1.2; font-weight: 600; letter-spacing: 0; white-space: nowrap; color: var(--pc); background: color-mix(in srgb, var(--pc) var(--pill-a), transparent); }
.ui .pill.pos { --pc: var(--green); }
.ui .pill .ms { font-size: 13px; }

/* NetWorthHero */
.ui .nwbar { display: flex; gap: 2px; height: 8px; border-radius: 8px; overflow: hidden; }
.ui .nwbar i { display: block; min-width: 3px; }
.ui .legend { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 10px; }
.ui .legend div { display: flex; align-items: center; min-width: 0; font-size: 13px; color: var(--text-dim); }
.ui .legend i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-right: 8px; }
.ui .legend span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui .legend b { margin-left: 6px; font-weight: 600; color: var(--text); white-space: nowrap; }

/* BudgetSnapshotCard */
.ui .snap { display: flex; align-items: center; gap: 20px; }
.ui .ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ui .ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ui .ring circle { fill: none; stroke-width: 10; }
.ui .ring .track { stroke: var(--border); }
.ui .ring .fill { stroke: #10b981; stroke-linecap: round; }
.ui .ring .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ui .ring .c b { font-size: 20px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; }
.ui .ring .c small { font-size: 11px; color: var(--text-dim); }
.ui .mline { display: flex; align-items: center; font-size: 13px; color: var(--text-dim); }
.ui .mline span { flex: 1; }
.ui .mline b { font-size: 14px; font-weight: 600; color: var(--text); }
.ui .mline b.pos { color: var(--green); }
.ui .dv { height: 1px; margin: 8.5px 0; background: var(--border); }

/* BudgetPredictionChart */
.ui .chart { display: block; width: 100%; height: auto; overflow: visible; }
.ui .chart .gl { stroke: var(--border); stroke-width: 1; }
.ui .chart .ax { fill: var(--text-dim); font-size: 11px; }
.ui .chart .area { opacity: .08; }
.ui .chart .today { stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.ui .chart .dot { fill: var(--surface-high); stroke-width: 2; }
.ui .chart .blabel { font-size: 11px; font-weight: 700; }
.ui .chart .tlabel { fill: var(--text-dim); font-size: 11px; font-weight: 600; }
.ui .clegend { display: flex; justify-content: center; gap: 16px; font-size: 11px; font-weight: 500; color: var(--text-dim); }
.ui .clegend span { display: inline-flex; align-items: center; gap: 6px; }

/* Budget screen */
.ui .prog { height: 8px; border-radius: 6px; background: var(--border); overflow: hidden; }
.ui .prog.h6 { height: 6px; }
.ui .prog i { display: block; height: 100%; background: #10b981; }
.ui .figs { display: flex; }
.ui .figs.gap12 { gap: 12px; }
.ui .fig { flex: 1; min-width: 0; }
.ui .fig small { display: block; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui .fig b { display: block; margin-top: 2px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.ui .fig.f15 b { font-size: 15px; }
.ui .fig.f18 b { margin-top: 4px; font-size: 18px; font-weight: 700; letter-spacing: -0.4px; }
.ui .fig b.pos { color: var(--green); } .ui .fig b.neg { color: var(--red); }
.ui .mchip { display: inline-flex; align-items: center; gap: 2px; padding: 7px 8px 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ui .mchip .ms { font-size: 18px; }
.ui .banner { --tone: var(--green); display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--tone) var(--banner-a), transparent); border: 1px solid color-mix(in srgb, var(--tone) 20%, transparent); }
.ui .banner .bi { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); }
.ui .banner .bi .ms { font-size: 20px; }
.ui .banner b { display: block; font-size: 14px; font-weight: 600; }
.ui .banner small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--text-dim); }

/* IconBadge: circle by default, rounded square in category rows */
.ui .badge { --c: var(--text-dim); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--c); background: color-mix(in srgb, var(--c) var(--badge-a), transparent); }
.ui .badge .ms { font-size: 20px; }
.ui .badge.sq { width: 36px; height: 36px; border-radius: 10.8px; }
.ui .badge.sq .ms { font-size: 18px; }

/* Accounts overview rows */
.ui .orow { position: relative; display: flex; align-items: center; padding: 14px 10px 14px 16px; }
.ui .orow + .orow { border-top: 1px solid transparent; }
.ui .orow + .orow::before { content: ""; position: absolute; top: -1px; left: 70px; right: 0; height: 1px; background: var(--border); }
.ui .orow .tx { flex: 1; min-width: 0; margin-left: 14px; }
.ui .orow .tx b { display: block; font-size: 15px; font-weight: 600; }
.ui .orow .tx small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui .orow .val { margin-left: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.ui .orow .val.neg { color: var(--red); } .ui .orow .val.dim { color: var(--text-dim); }
.ui .orow .chev { margin-left: 2px; font-size: 20px; color: var(--text-dim); }

/* Stats */
.ui .sr { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.ui .srv { font-size: 13px; font-weight: 700; }
.ui .seg { display: flex; padding: 4px; border-radius: 14px; background: var(--surface-high); border: 1px solid var(--border); }
.ui .seg span { flex: 1; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-dim); }
.ui .seg .on { background: var(--text); color: var(--bg); }
.ui .donut { position: relative; height: 196px; display: grid; place-items: center; }
.ui .donut svg { width: 180px; height: 180px; transform: rotate(-90deg); }
.ui .donut circle { fill: none; stroke-width: 26; }
.ui .donut .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ui .donut .c small { font-size: 12px; color: var(--text-dim); }
.ui .donut .c b { margin-top: 2px; font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.ui .crow { display: flex; align-items: center; gap: 12px; }
.ui .crow + .crow { margin-top: 14px; }
.ui .ctop { display: flex; align-items: center; font-size: 14px; font-weight: 600; }
.ui .ctop span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui .ctop b { font-weight: 600; }
.ui .cbot { display: flex; align-items: center; margin-top: 6px; }
.ui .cbot .bar { flex: 1; height: 4px; border-radius: 3px; background: var(--border); overflow: hidden; }
.ui .cbot .bar i { display: block; height: 100%; }
.ui .cbot small { width: 34px; margin-left: 10px; text-align: right; font-size: 11px; font-weight: 500; color: var(--text-dim); }

/* very narrow phones: shrink the device so it never overflows the gutter */
@media (max-width: 370px) {
  .phone { width: 290px; }
  .ui { zoom: .6819; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.sec-head { max-width: 640px; margin-bottom: 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 800; }
.sec-head p { margin-top: 16px; color: var(--text-dim); font-size: 19px; }
.divider { border-top: 1px solid var(--border); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: border-color .2s ease, transform .2s ease; }
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-high); border: 1px solid var(--border); display: grid; place-items: center; margin-bottom: 20px; }
.card .ic svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 15.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 28px; border-top: 1px solid var(--border-strong); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-size: 14px; font-weight: 700; color: var(--text-dim); letter-spacing: .08em; margin-bottom: 16px; }
.step h3 { font-size: 21px; margin-bottom: 8px; letter-spacing: -0.01em; }
.step p { color: var(--text-dim); font-size: 16px; }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: center; }
.split .copy h2 { margin-bottom: 18px; }
.split .copy p { color: var(--text-dim); font-size: 19px; }
.ticks { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 32px; font-size: 16.5px; }
.ticks li::before, .ticks li::after { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; }
.ticks li::before { border-radius: 50%; background: var(--green); }
.ticks li::after { background: var(--on-accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat; }

.cta-box { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 32px; padding: 72px 24px; position: relative; overflow: hidden; }
.cta-box::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 70% at 50% 0%, var(--glow), transparent 70%); pointer-events: none; }
.cta-box > * { position: relative; }
.cta-box h2 { margin-bottom: 14px; }
.cta-box p { color: var(--text-dim); font-size: 19px; margin: 0 auto 32px; max-width: 580px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 64px 0 40px; color: var(--text-dim); font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { color: var(--text); }
.foot-brand p { margin-top: 16px; max-width: 340px; font-size: 15px; }
.foot-stores { margin-top: 22px; gap: 10px; }
.foot-stores .store-badge { min-width: 0; gap: 9px; padding: 7px 14px 7px 12px; border-radius: 12px; }
.foot-stores .store-badge svg { width: 20px; height: 20px; }
.foot-stores .store-badge small { font-size: 9.5px; }
.foot-stores .store-badge b { font-size: 14.5px; }
.foot-col { display: grid; gap: 12px; align-content: start; }
.foot-col h4 { font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin-bottom: 4px; }
.foot-col a:hover { color: var(--text); }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; }

/* ---------- Legal / text pages ---------- */
.doc { padding: 72px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc .meta { color: var(--text-dim); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -0.015em; }
.doc p, .doc li { color: var(--text-soft); margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin-bottom: 14px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.doc a:hover { text-decoration-color: var(--text); }
.doc .note { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; color: var(--text-dim); font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 48px; }
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 48px; }
  .grid, .steps { grid-template-columns: 1fr 1fr; }
  section { padding: 72px 0; }
  .nav-links { gap: 12px; }
  .nav-links a:not(.btn) { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .lede, .sec-head p, .split .copy p, .cta-box p { font-size: 17px; }
  .cta-box { padding: 56px 20px; border-radius: 24px; }
  .tab { padding: 8px 12px; font-size: 13.5px; }
  .tab svg { display: none; }
  .store-badge { flex: 1 1 auto; min-width: 0; justify-content: center; gap: 10px; padding: 9px 12px; }
  .store-badge svg { width: 24px; height: 24px; }
  .store-badge b { font-size: 16.5px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-stores .store-badge { flex: 0 1 auto; }
  .foot-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
