/* ==========================================================================
   Diplomat Exchange — site styles
   A clean fintech system: heavy tight headlines, rounded app-like cards, pill
   buttons and one bright signal colour (the logo's gold, turned up to yellow).
   Light is the base theme; dark redefines the same tokens.
   ========================================================================== */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #f3f4f1;          /* grey cards on white */
  --surface-2: #ffffff;        /* raised cards */
  --text: #0f1114;
  --muted: #5b6068;
  --line: #e4e6e9;
  --line-strong: #cfd3d8;

  --accent: #ffc629;           /* signal yellow */
  --accent-hover: #ffd459;
  --accent-ink: #0f1114;       /* text on accent */
  --accent-soft: #fff4cc;
  --hero-bg: #ffc629;
  --hero-ink: #0f1114;

  --ink: #0f1114;              /* dark buttons and tiles */
  --ink-text: #ffffff;
  --good: #0a7a3d;             /* savings, positive numbers */
  --good-soft: #e2f6e9;
  --sky: #dcebff;
  --sky-ink: #0b2a52;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 32px -12px rgba(16, 24, 40, 0.18);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 30px 60px -20px rgba(16, 24, 40, 0.28);

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 32px;
  --pill: 999px;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* — dark theme: chosen explicitly (data-theme, set before paint by App.razor), or
     following the OS when scripts have not run — */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #16191e;
  --surface-2: #1c2026;
  --text: #f2f3f5;
  --muted: #9aa1ab;
  --line: #262b32;
  --line-strong: #353b44;
  --accent-soft: #2a2512;
  --hero-bg: #14171c;
  --hero-ink: #f2f3f5;
  --ink: #ffc629;
  --ink-text: #0f1114;
  --good: #4ade80;
  --good-soft: #10261a;
  --sky: #15223a;
  --sky-ink: #cfe0ff;
  --shadow-sm: none;
  --shadow: 0 0 0 1px #262b32;
  --shadow-lg: 0 0 0 1px #2c323a, 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0b0d10;
    --surface: #16191e;
    --surface-2: #1c2026;
    --text: #f2f3f5;
    --muted: #9aa1ab;
    --line: #262b32;
    --line-strong: #353b44;
    --accent-soft: #2a2512;
    --hero-bg: #14171c;
    --hero-ink: #f2f3f5;
    --ink: #ffc629;
    --ink-text: #0f1114;
    --good: #4ade80;
    --good-soft: #10261a;
    --sky: #15223a;
    --sky-ink: #cfe0ff;
    --shadow-sm: none;
    --shadow: 0 0 0 1px #262b32;
    --shadow-lg: 0 0 0 1px #2c323a, 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  transition: background-color .25s ease, color .25s ease;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p a, .faq-a a, .calc-note a, .rate-card-note a { text-decoration: underline; text-underline-offset: 3px; }

:focus { outline: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
h1:focus { outline: none; }
::selection { background: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--text); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: 20px; letter-spacing: -0.015em; font-weight: 700; }

.tnum { font-variant-numeric: tabular-nums; }
.container { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 96px) 0; }
.section-first { padding-top: clamp(40px, 6vw, 72px); }
main.container { padding-bottom: clamp(56px, 8vw, 96px); }

.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 16px 24px;
  flex-wrap: wrap; margin-bottom: 28px;
}
.section-head h2 { max-width: 22ch; }

/* Small label above a heading. */
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0;
  color: var(--muted); margin-bottom: 16px;
}
.kicker { display: flex; }
.kicker-inline { margin-bottom: 0; }
.eyebrow {
  padding: 6px 14px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--hero-ink) 8%, transparent); color: var(--hero-ink);
}
.meta { font-size: 13px; color: var(--muted); }
.link-arrow { font-weight: 600; font-size: 15px; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--text); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--pill);
  font: 600 16px/1.2 var(--font-body); letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ink { background: var(--ink); color: var(--ink-text); }
.btn-ink:hover { color: var(--ink-text); box-shadow: 0 8px 20px -8px rgba(0,0,0,.45); }
.btn-soft { background: color-mix(in srgb, var(--hero-ink) 10%, transparent); color: var(--hero-ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--hero-ink) 16%, transparent); color: var(--hero-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--pill);
  background: var(--surface); font-size: 13px; font-weight: 600;
}

/* ==========================================================================
   Form fields
   ========================================================================== */
.field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: 500 16px/1.3 var(--font-body); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.input:hover { border-color: var(--muted); }
.input:focus-visible { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); outline: none; }
select.input option, .calc-ccy option { background: var(--surface-2); color: var(--text); }
.validation-message { display: block; font-size: 13px; color: #c2410c; margin-top: 6px; }


/* ==========================================================================
   Header
   ========================================================================== */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--ink-text); padding: 10px 16px; border-radius: var(--pill);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 28px; padding-block: 12px; }
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; }
.site-nav { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.site-nav a {
  font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: var(--pill);
  transition: background-color .2s ease;
}
.site-nav a:hover { background: var(--surface); }
.header-phone { font-size: 15px; font-weight: 600; white-space: nowrap; }
.header-phone:hover { text-decoration: underline; text-underline-offset: 3px; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: var(--surface); color: var(--text); border: 0;
  transition: background-color .2s ease;
}
.theme-toggle:hover { background: var(--line); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ==========================================================================
   Heroes
   ========================================================================== */
.hero { background: var(--hero-bg); color: var(--hero-ink); }
.hero-title {
  font-size: clamp(44px, 7vw, 92px); font-weight: 900; line-height: 0.98; letter-spacing: -0.035em; word-spacing: 0.04em;
  margin: 0 0 20px;
}
.hero-title .hl { display: block; }
.hero-lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; margin: 0 0 28px; max-width: 52ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
/* On the yellow block, the primary action goes dark so it does not vanish into the background. */
.hero-actions .btn-primary { background: var(--ink); color: var(--ink-text); }
.hero-actions .btn-ghost { border-color: color-mix(in srgb, var(--hero-ink) 30%, transparent); color: var(--hero-ink); }
.hero-actions .btn-ghost:hover { border-color: var(--hero-ink); }
.hero-kicker { display: inline-block; font-size: 14px; font-weight: 600; margin-bottom: 16px; opacity: .8; }

/* Home: centred headline on the colour block, three cards straddling its lower edge. */
.hero-home {
  background: linear-gradient(var(--hero-bg) 0, var(--hero-bg) calc(100% - 220px), var(--bg) calc(100% - 220px));
}
.hero-center { text-align: center; padding-block: clamp(48px, 8vw, 96px) clamp(36px, 5vw, 56px); }
.hero-center .hero-title { max-width: 14ch; margin-inline: auto; }
.hero-center .hero-lede { margin-inline: auto; }
.hero-center .hero-actions { justify-content: center; }
.hero-center .eyebrow { margin-bottom: 24px; }

.hero-cards {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px; align-items: stretch;
}
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 10px;
  margin-block: 40px;
}
.tile p { margin: 0; font-size: 15px; line-height: 1.55; opacity: .85; }
.tile-title { font-size: 24px; letter-spacing: -0.02em; }
.tile-link { font-weight: 600; font-size: 15px; margin-top: 4px; }
.tile-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tile-dark { background: #0f1114; color: #f2f3f5; }
:root[data-theme="dark"] .tile-dark { background: var(--surface); }
.tile-dark .tile-link { color: var(--accent); }
.tile-art { margin-top: auto; height: 130px; color: #f2f3f5; }
.tile-sky { background: var(--sky); color: var(--sky-ink); }
.tile-rates { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.tile-rates a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px 10px 10px; border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface-2) 85%, transparent); color: var(--text);
  transition: transform .2s ease;
}
.tile-rates a:hover { transform: translateX(3px); }
.tile-rate-code { font-weight: 700; }
.tile-rate-val { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }

/* Sub-pages: text left, converter right, on the colour block. */
.hero-sub > .container {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(40px, 6vw, 80px);
}
.hero-compact > .container { grid-template-columns: minmax(0, 1fr); }
.hero-title-sub { font-size: clamp(40px, 5.6vw, 76px); max-width: 15ch; }
.hero-title-sub span { display: block; }
.hero .gold { color: inherit; }
.hero-title-sub .gold { opacity: .55; }
:root[data-theme="dark"] .hero-title-sub .gold,
:root[data-theme="dark"] .hero-title .hl { color: var(--accent); opacity: 1; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.crumbs a { opacity: .7; }
.crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.crumbs span[aria-hidden] { opacity: .4; }

/* Rate summary on currency pages. */
.rate-card {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  background: var(--surface-2); color: var(--text);
  border-radius: var(--r-md); padding: 8px; margin: 0 0 28px; max-width: 560px;
  box-shadow: var(--shadow);
}
.rate-card > div { padding: 12px 14px; border-radius: var(--r-sm); }
.rate-card > div:nth-child(2) { background: var(--accent-soft); }
.rate-card-val { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.025em; }
.rate-card-sell { color: var(--text); }
.rate-card-mid { color: var(--muted); }
.rate-card-note { grid-column: 1 / -1; margin: 0; padding: 4px 14px 8px; font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Converter card
   ========================================================================== */
.hero-calc { position: relative; z-index: 1; }
.calc {
  background: var(--surface-2); color: var(--text);
  border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.calc-box {
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 12px 12px 12px 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.calc-box:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent); }
.calc-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.calc-row { display: flex; align-items: center; gap: 12px; }
.calc-amount {
  flex: 1 1 0; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text);
  font: 800 clamp(28px, 2.6vw, 36px)/1.2 var(--font-display); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.calc-amount:focus-visible { outline: none; }
.calc-out { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calc-ccy {
  flex: 0 0 auto; appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 700 16px/1 var(--font-body); color: var(--text);
  padding: 12px 36px 12px 16px; border-radius: var(--pill); border: 0;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%235b6068' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 14px center;
}
.calc-ccy:hover { background-color: var(--line); }
.calc-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; }
.chip-rate { background: var(--surface); }
.calc-swap {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .3s ease, border-color .2s ease;
}
.calc-swap:hover { transform: rotate(180deg); border-color: var(--text); }
.calc-facts { list-style: none; margin: 4px 0 0; padding: 0 6px; display: grid; gap: 10px; font-size: 14px; }
.calc-facts li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.calc-facts b { margin-left: auto; color: var(--text); font-weight: 600; }
.calc-ico {
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--text);
}
.calc-save {
  margin-top: 4px; padding: 12px 16px; border-radius: var(--r-sm);
  background: var(--good-soft); color: var(--good); font-size: 14px; font-weight: 500;
}
.calc-save b { font-weight: 800; }
.calc-cta { margin-top: 4px; }
.calc-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 4px 6px 0; }

/* ==========================================================================
   Ticker (sub-pages)
   ========================================================================== */
.ticker { border-bottom: 1px solid var(--line); background: var(--bg); }
.ticker-item {
  flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 10px;
  padding: 8px 16px; border-radius: var(--pill); background: var(--surface);
}
.ticker-pair { font-size: 13px; font-weight: 600; color: var(--muted); }
.ticker-val { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Home blocks
   ========================================================================== */
.trust {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  padding-block: clamp(24px, 4vw, 40px) 0;
}
.trust-item { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 500; line-height: 1.4; }
.trust-ico {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sky); color: var(--sky-ink);
}

.panel { border-radius: var(--r-lg); padding: clamp(28px, 4vw, 56px); margin-top: clamp(56px, 8vw, 96px); }
.panel-accent { background: var(--accent-soft); }
.panel-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.panel-head h2 { margin-bottom: 12px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 17px; }

.compare {
  background: var(--surface-2); border-radius: var(--r-md); padding: clamp(18px, 3vw, 28px);
  max-width: 820px; margin: 0 auto; box-shadow: var(--shadow); display: grid; gap: 10px;
}
.compare-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.compare-head b { color: var(--text); }
.compare-row { display: flex; align-items: center; gap: 14px; }
.compare-bar {
  min-width: 0; padding: 12px 18px; border-radius: var(--pill);
  background: var(--surface); display: flex; flex-direction: column; line-height: 1.25;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.compare-name { font-weight: 700; font-size: 15px; white-space: nowrap; }
.compare-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-val { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.compare-row.is-us .compare-bar { background: var(--accent); color: var(--accent-ink); }
.compare-row.is-us .compare-sub { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.compare .calc-note { margin: 8px 0 0; }

/* — statement (sub-pages) — */
.statement {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px clamp(32px, 6vw, 96px); align-items: start;
  padding-top: clamp(56px, 8vw, 96px);
}
.statement h2 { max-width: 16ch; }
.statement p { font-size: 17px; line-height: 1.65; margin: 0; color: var(--muted); max-width: 60ch; }
.use-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.use-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.use-list li::before {
  content: ""; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--good-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><path d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%230a7a3d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center;
}

/* ==========================================================================
   Currency cards & rate board
   ========================================================================== */
.cur-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px;
}
.cur-card {
  display: grid; gap: 4px; height: 100%; padding: 20px;
  border-radius: var(--r-md); background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.cur-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--surface-2); }
.cur-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cur-sym {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 6px; border-radius: var(--pill);
  background: var(--ink); color: var(--ink-text); font-weight: 700; font-size: 15px;
}
.cur-code { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.cur-name { font-size: 14px; color: var(--muted); }
.cur-rates { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-weight: 700; font-size: 16px; }
.cur-rates small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cur-pair { font-size: 12px; color: var(--muted); }

.board { border-radius: var(--r-md); background: var(--surface); padding: 6px; }
.board-row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr);
  gap: 16px; align-items: center; padding: 14px 18px; border-radius: var(--r-sm);
  transition: background-color .2s ease;
}
.board-row + .board-row { border-top: 1px solid var(--line); }
.board-row:hover { background: var(--surface-2); }
.board-code { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.board-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.board-name { display: block; font-size: 13px; color: var(--muted); }
.board-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.board-val { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.board-val-sell { color: var(--text); }
.board-settle { text-align: right; font-size: 14px; font-weight: 600; }
.board-settle a { border-bottom: 2px solid var(--accent); }
.board-empty { padding: 32px 18px; color: var(--muted); }

/* — conversion tables — */
.conv-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.conv-tables > div { background: var(--surface); border-radius: var(--r-md); padding: 22px; }
.conv-title { font-size: 20px; margin-bottom: 12px; }
.conv { width: 100%; border-collapse: collapse; font-size: 15px; }
.conv th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px 8px; }
.conv td { padding: 11px 6px; border-top: 1px solid var(--line); font-weight: 500; }
.conv td:last-child, .conv th:last-child { text-align: right; }
.conv td:last-child { font-weight: 700; }

/* ==========================================================================
   Services, steps
   ========================================================================== */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.service { background: var(--surface); border-radius: var(--r-md); padding: 24px; display: grid; gap: 10px; align-content: start; }
.service-ico {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
}
.service h3 { font-size: 19px; }
.service p { margin: 0; font-size: 15px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.step { background: var(--surface); border-radius: var(--r-md); padding: 26px; display: grid; gap: 10px; align-content: start; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--ink-text); font-weight: 800; font-size: 15px;
}
.step h3 { font-size: 22px; margin-top: 6px; }
.step p { margin: 0; font-size: 15px; color: var(--muted); }
.step-time {
  justify-self: start; margin-top: 4px;
  padding: 5px 12px; border-radius: var(--pill); background: var(--good-soft); color: var(--good);
  font-size: 13px; font-weight: 600;
}

/* ==========================================================================
   North York band, neighbourhood tags
   ========================================================================== */
.local-band {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 6vw, 80px);
  margin-top: clamp(56px, 8vw, 96px); padding: clamp(28px, 4vw, 56px);
  border-radius: var(--r-lg); background: var(--sky); color: var(--sky-ink);
}
.local-band .kicker { color: inherit; opacity: .75; }
.local-band h2 { max-width: 14ch; }
.local-band p { margin: 0 0 20px; font-size: 17px; line-height: 1.6; }
.hood-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.hood-list li { border-radius: var(--pill); background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.section .hood-list li { background: var(--surface); }
.hood-links a { display: block; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--text); }
.hood-links li { transition: transform .2s ease; }
.hood-links li:hover { transform: translateY(-2px); }
.local-band .btn-ghost { border-color: currentColor; color: inherit; }

/* ==========================================================================
   Testimonial, FAQ
   ========================================================================== */
.pullquote { margin-top: clamp(56px, 8vw, 96px); }
.pullquote figure {
  max-width: 820px; margin: 0 auto; text-align: center;
  padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface);
}
.stars { color: #f5a524; letter-spacing: 4px; font-size: 20px; margin-bottom: 14px; }
.pullquote blockquote {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; letter-spacing: -0.02em;
}
.pullquote figcaption { margin-top: 18px; font-size: 15px; color: var(--muted); font-weight: 500; }

.faq { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border-radius: var(--r-md); transition: background-color .2s ease; }
.faq-item[open] { background: var(--surface-2); box-shadow: var(--shadow); }
.faq-q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; font-weight: 700; font-size: 17px; line-height: 1.35;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-sign {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 500;
  transition: transform .2s ease;
}
.faq-item[open] .faq-sign { background: var(--accent); color: var(--accent-ink); transform: rotate(45deg); }
.faq-sign::before { content: "+"; }
.faq-a { margin: 0; padding: 0 22px 22px; color: var(--muted); font-size: 16px; max-width: 72ch; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px);
  align-items: start; margin-block: clamp(56px, 8vw, 96px);
  padding: clamp(28px, 4vw, 56px); border-radius: var(--r-lg);
  background: #0f1114; color: #f2f3f5;
}
:root[data-theme="dark"] .contact { background: var(--surface); }
.contact .kicker { color: #9aa1ab; }
.contact h2 { font-size: clamp(36px, 4.6vw, 60px); margin-bottom: 20px; }
.contact-phone {
  display: inline-block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.02em; color: var(--accent);
}
.contact-details { display: grid; gap: 18px; margin-top: 32px; font-size: 15px; }
.contact-details a { color: #f2f3f5; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #5b6068; }
.contact-label { display: block; font-size: 13px; font-weight: 600; color: #9aa1ab; margin-bottom: 2px; }
.contact-sub { display: block; font-size: 13px; color: #9aa1ab; margin-top: 2px; }
.form-card { background: var(--surface-2); color: var(--text); border-radius: var(--r-md); padding: clamp(22px, 3vw, 32px); }
:root[data-theme="dark"] .form-card { background: var(--bg); }
.form-card h3 { font-size: 24px; margin-bottom: 6px; }
.form-card > p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.form-fields { display: grid; gap: 16px; }
.form-sent { padding: 16px 18px; border-radius: var(--r-sm); background: var(--good-soft); color: var(--good); font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--surface); }
.site-footer .container {
  padding-block: clamp(40px, 6vw, 64px) 28px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px;
}
.site-footer img { height: 56px; width: auto; margin-bottom: 14px; }
.footer-blurb { font-size: 14px; color: var(--muted); margin: 0; max-width: 34ch; }
.footer-heading { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.footer-links { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-links-2col { grid-template-columns: repeat(3, max-content); column-gap: 18px; font-weight: 600; }
.footer-address { font-size: 14px; line-height: 1.7; margin: 0; color: var(--muted); }
.footer-address a:hover { color: var(--text); }
.footer-legal {
  grid-column: 1 / -1; display: flex; gap: 8px 24px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}

.credit { margin-left: auto; }
.credit a { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--accent); padding-bottom: 1px; transition: border-color .2s ease; }
.credit a:hover { border-color: var(--text); }
@media (max-width: 640px) { .credit { margin-left: 0; } }

/* ==========================================================================
   Blazor error UI
   ========================================================================== */
#blazor-error-ui {
  display: none; position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 1000;
  background: var(--ink); color: var(--ink-text); padding: 14px 20px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); font-size: 14px;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 12px; }
#blazor-error-ui a { color: inherit; text-decoration: underline; }

/* ==========================================================================
   Motion
   Everything here is transform/opacity/clip-path only, so it stays on the GPU,
   and all of it is switched off under prefers-reduced-motion (see the end).
   ========================================================================== */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1); }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes rise-blur { from { opacity: 0; transform: translateY(0.45em); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes pop { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes float-a { 0%, 100% { transform: translate(0, 0) rotate(-6deg); } 50% { transform: translate(6px, -16px) rotate(4deg); } }
@keyframes float-b { 0%, 100% { transform: translate(0, 0) rotate(5deg); } 50% { transform: translate(-8px, 14px) rotate(-5deg); } }
@keyframes blob { 0%, 100% { transform: translate(-10%, -5%) scale(1); } 50% { transform: translate(10%, 8%) scale(1.15); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes flow { to { stroke-dashoffset: -44; } }
@keyframes ping { 0% { r: 6; opacity: .9; } 100% { r: 22; opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes tick { 0% { background-color: color-mix(in srgb, var(--accent) 65%, transparent); } 100% { background-color: transparent; } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }

/* — scroll reveal (JS adds data-in when an element enters the viewport) — */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.rv[data-in] { opacity: 1; transform: none; }

/* — children of a .stagger container cascade in once their section is revealed — */
.stagger > :nth-child(1) { --i: 0; }  .stagger > :nth-child(2) { --i: 1; }  .stagger > :nth-child(3) { --i: 2; }
.stagger > :nth-child(4) { --i: 3; }  .stagger > :nth-child(5) { --i: 4; }  .stagger > :nth-child(6) { --i: 5; }
.stagger > :nth-child(7) { --i: 6; }  .stagger > :nth-child(8) { --i: 7; }  .stagger > :nth-child(9) { --i: 8; }
.stagger > :nth-child(10) { --i: 9; } .stagger > :nth-child(11) { --i: 10; } .stagger > :nth-child(12) { --i: 11; }
.stagger > :nth-child(13) { --i: 12; } .stagger > :nth-child(14) { --i: 13; } .stagger > :nth-child(15) { --i: 14; }
.stagger > :nth-child(n+16) { --i: 15; }
.rv .stagger > *, .rv.stagger > *, [data-in] .stagger > * { opacity: 0; }
[data-in] .stagger > *, [data-in].stagger > * {
  animation: pop .7s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 55ms + 80ms);
}

/* — home hero: words blur up one by one, then the rest, then the cards — */
.hero-title.words .w { display: inline-block; animation: rise-blur .9s var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
.intro { animation: rise .8s var(--ease-out) both; animation-delay: calc(var(--d) * 90ms + 120ms); }
.stagger-in > * { animation: pop 1s var(--ease-out) backwards; }
.stagger-in > :nth-child(1) { animation-delay: .75s; }
.stagger-in > :nth-child(2) { animation-delay: .62s; }
.stagger-in > :nth-child(3) { animation-delay: .88s; }

/* — sub-page heroes: title lines rise in sequence — */
.hero-title-sub span { animation: rise-blur .9s var(--ease-out) both; }
.hero-title-sub span:nth-child(2) { animation-delay: .1s; }
.hero-title-sub span:nth-child(3) { animation-delay: .2s; }
.hero-sub .rate-calculator-wrapper { animation: pop 1s var(--ease-out) .35s both; }

/* — floating currency chips and a drifting light behind the home headline — */
.hero-home { position: relative; overflow: hidden; }
.hero-home::before {
  content: ""; position: absolute; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  left: 15%; top: -35%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, #ffffff 45%, transparent), transparent 62%);
  animation: blob 18s ease-in-out infinite;
}
:root[data-theme="dark"] .hero-home::before { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%); }
.hero-center, .hero-cards { position: relative; z-index: 1; }
.hero-float { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.fl {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-lg);
  font: 800 26px/1 var(--font-display);
  translate: calc(var(--px, 0) * var(--depth, 20px)) calc(var(--py, 0) * var(--depth, 20px));
  transition: translate .6s var(--ease-out);
  opacity: 0; animation: pop .9s var(--ease-out) forwards, float-a 7s ease-in-out infinite;
}
.fl-1 { left: 9%;  top: 18%; --depth: 28px; animation-delay: .9s, 1.8s; }
.fl-2 { right: 10%; top: 14%; --depth: -22px; width: 72px; height: 72px; animation-name: pop, float-b; animation-delay: 1s, 1.9s; animation-duration: .9s, 8s; }
.fl-3 { left: 17%; top: 34%; --depth: -16px; width: 52px; height: 52px; font-size: 22px; animation-delay: 1.1s, 2s; animation-duration: .9s, 9s; }
.fl-4 { right: 17%; top: 31%; --depth: 24px; animation-name: pop, float-b; animation-delay: 1.2s, 2.1s; animation-duration: .9s, 6.5s; }
.fl-5 { left: 3%;  top: 40%; --depth: 12px; width: 48px; height: 48px; font-size: 20px; animation-delay: 1.3s, 2.2s; animation-duration: .9s, 10s; }
.fl-6 { right: 3%; top: 26%; --depth: -14px; width: 56px; height: 56px; font-size: 18px; animation-name: pop, float-b; animation-delay: 1.4s, 2.3s; animation-duration: .9s, 7.5s; }
.fl-2, .fl-4 { background: var(--ink); color: var(--ink-text); }
@media (max-width: 900px) { .hero-float { display: none; } }

/* — tiles: flowing transfer line, ping at the origin, slowly turning globe, live dot — */
.tile-art .flow { animation: flow 1.6s linear infinite; }
.tile-art .ping { animation: ping 2s ease-out infinite; }
.tile-art .spin { animation: spin 14s linear infinite; }
.live-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: middle;
  background: var(--good); animation: pulse-dot 1.6s ease-out infinite;
}
.tile { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* — pointer spotlight on cards (JS feeds --mx/--my) — */
.cur-card, .service, .step, .tile { position: relative; isolation: isolate; }
.cur-card::before, .service::before, .step::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  transition: opacity .3s ease;
}
.cur-card:hover::before, .service:hover::before, .step:hover::before { opacity: 1; }
.service:hover .service-ico { transform: rotate(-8deg) scale(1.08); }
.service-ico { transition: transform .4s var(--ease-spring); }
.cur-card:hover .cur-sym { transform: scale(1.12) rotate(-6deg); }
.cur-sym { transition: transform .4s var(--ease-spring); }

/* — buttons: a light sweep across the primary on hover; springy press — */
.btn-primary, .btn-ink { position: relative; overflow: hidden; }
.btn-primary::after, .btn-ink::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-120%) skewX(-20deg);
}
.btn-primary:hover::after, .btn-ink:hover::after { animation: shine .8s ease; }
.btn { transition: background-color .2s ease, transform .35s var(--ease-spring), box-shadow .3s ease, border-color .2s ease; }
.btn:active { transform: scale(.97); }

/* — converter: payout flashes when it changes; swap spins with a spring — */
.tick { animation: tick 1s ease-out; border-radius: 6px; }
.calc-swap { transition: transform .5s var(--ease-spring), border-color .2s ease; }
.calc-box { transition: border-color .2s ease, box-shadow .2s ease, transform .3s var(--ease-out); }
.calc-box:focus-within { transform: translateY(-1px); }
.calc-save { transition: transform .3s var(--ease-spring); }

/* — savings bars grow from the left once their panel is revealed — */
.compare-bar { clip-path: inset(0 100% 0 0 round 999px); transition: clip-path 1.1s var(--ease-out); }
[data-in] .compare-bar { clip-path: inset(0 0 0 0 round 999px); }
[data-in] .compare-row:nth-child(3) .compare-bar { transition-delay: .15s; }
[data-in] .compare-row:nth-child(4) .compare-bar { transition-delay: .3s; }
.compare-val { opacity: 0; transition: opacity .6s ease .6s; }
[data-in] .compare-val { opacity: 1; }

/* — ticker: an endless, edge-faded marquee that pauses on hover — */
.ticker { overflow: hidden; }
.marquee {
  overflow: hidden; padding-block: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 10px; padding-right: 10px; }

/* — FAQ: answer slides open — */
.faq-item[open] .faq-a { animation: rise .45s var(--ease-out); }
.faq-sign { transition: transform .35s var(--ease-spring), background-color .2s ease; }

/* — header gains a shadow once the page scrolls — */
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
:root[data-scrolled] .site-header { box-shadow: 0 6px 24px -12px rgba(16, 24, 40, .25); }

/* — thin progress bar under the header while scrolling — */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-calc { grid-column: 1 / -1; grid-row: 1; }
  .tile { margin-block: 0 40px; }
  .hero-home { background: linear-gradient(var(--hero-bg) 0, var(--hero-bg) 55%, var(--bg) 55%); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .site-header .container { flex-wrap: wrap; gap: 8px 12px; }
  .site-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; margin-inline: -8px; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; }
  .header-phone { margin-left: auto; }
  .hero-sub > .container,
  .statement, .contact, .local-band, .conv-tables { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .board-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 8px; }
  .board-row > div:first-child, .board-settle { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 640px) {
  .hero-cards { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; }
  .tile { margin-block: 0; }
  .hero-home { background: linear-gradient(var(--hero-bg) 0, var(--hero-bg) 40%, var(--bg) 40%); }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .rate-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .header-phone { display: none; }
  .site-footer .container { grid-template-columns: minmax(0, 1fr); }
  .compare-sub { display: none; }
  .compare-val { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv, .stagger > *, .intro, .hero-title .w, .fl { opacity: 1 !important; transform: none !important; filter: none !important; }
  .compare-bar { clip-path: none !important; }
  .compare-val { opacity: 1 !important; }
  .fl { translate: none !important; }
  .marquee-track { width: auto; flex-wrap: wrap; }
  .marquee-group[aria-hidden] { display: none; }
  .scroll-progress { display: none; }
}

/* ==========================================================================
   Phone: app shell
   Bottom tab bar, a header that tucks away on scroll, swipeable carousels and
   press feedback — so on a phone the site behaves like an installed app.
   ========================================================================== */
html { -webkit-tap-highlight-color: transparent; }
a, button, summary, select, input { touch-action: manipulation; }
#convert { scroll-margin-top: 90px; }

.tabbar { display: none; }

@media (max-width: 760px) {
  :root { --tabbar-h: 64px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* — header: compact, and slides away while scrolling down — */
  .site-nav, .header-phone { display: none; }
  .site-header { padding-top: env(safe-area-inset-top); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .3s ease; }
  .site-header .container { flex-wrap: nowrap; gap: 10px; padding-block: 10px; }
  .brand { margin-right: auto; }
  .brand img { height: 38px; }
  .header-cta { min-height: 38px; padding: 6px 16px; font-size: 14px; }
  :root[data-scroll-dir="down"] .site-header { transform: translateY(-100%); }

  /* — bottom tab bar — */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--tabbar-h); font-size: 11px; font-weight: 600; color: var(--muted);
    transition: color .2s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  }
  .tab svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
  .tab.is-active { color: var(--text); }
  .tab.is-active svg { transform: translateY(-1px) scale(1.08); }
  .tab.is-active::after {
    content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-top: 1px;
  }
  .tab:active { transform: scale(.9); }

  /* Centre action: a raised yellow button. */
  .tab-fab { justify-content: flex-end; padding-bottom: 8px; color: var(--text); }
  .fab-ring {
    width: 56px; height: 56px; border-radius: 50%; margin-top: -26px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 80%, #000), 0 0 0 5px var(--bg);
  }
  .fab-ring svg { stroke-width: 2.2; }
  .tab-fab:active .fab-ring { transform: scale(.92); }

  #blazor-error-ui { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }

  /* — swipeable rows: cards snap into place, the row bleeds to the screen edge — */
  .swipe {
    display: grid !important; grid-auto-flow: column; grid-template-columns: none !important;
    grid-auto-columns: 78%; gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px;
    scrollbar-width: none;
  }
  .swipe::-webkit-scrollbar { display: none; }
  .swipe > * { scroll-snap-align: start; }
  .cur-grid.swipe { grid-auto-columns: 46%; grid-template-rows: repeat(2, auto); }
  .trust.swipe { grid-auto-columns: 72%; }
  .trust.swipe .trust-item { background: var(--surface); border-radius: var(--r-md); padding: 14px; }

  /* — app-like sizing — */
  .hero-center { padding-block: 32px 28px; }
  .hero-title { font-size: clamp(40px, 12vw, 56px); }
  .hero-lede { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .calc { border-radius: 24px; padding: 14px; }
  .calc-amount { font-size: 30px; }
  .section { padding-top: 48px; }
  .section-head { margin-bottom: 16px; }
  h2 { font-size: 28px; }
  .panel, .local-band, .contact { border-radius: 24px; margin-inline: calc(var(--gutter) * -0.5); }
  .faq-q { padding: 16px 18px; font-size: 16px; }

  /* — press feedback instead of hover on touch screens — */
  .cur-card:active, .service:active, .step:active, .tile:active, .faq-q:active, .tile-rates a:active, .hood-links li:active {
    transform: scale(.97); transition: transform .12s ease;
  }
  .btn:active { transform: scale(.96); }
}

/* Touch screens don't get stuck hover states. */
@media (hover: none) {
  .cur-card:hover, .tile:hover, .btn:hover { transform: none; box-shadow: none; }
  .cur-card:hover::before, .service:hover::before, .step:hover::before { opacity: 0; }
}

/* — page change: content slides in after an in-app navigation — */
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#main.page-in { animation: page-in .45s cubic-bezier(.16,1,.3,1); }

/* Installed (home-screen) mode: the app owns the whole screen. */
@media (display-mode: standalone) {
  .site-header { padding-top: env(safe-area-inset-top); }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-scroll-dir="down"] .site-header { transform: none; }
}
