/* B.Meet.B — "carbon-copy bill book meets stock ticker".
   Carbon-blue ink is the brand; the pink duplicate copy marks Highlighted; the yellow triplicate copy
   marks Flash. Mobile first → tablet (640) → desktop (1024). */

@font-face { font-family: Hind; font-weight: 400; font-display: swap; src: url(/fonts/hind-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Hind; font-weight: 500; font-display: swap; src: url(/fonts/hind-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Hind; font-weight: 600; font-display: swap; src: url(/fonts/hind-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Hind; font-weight: 700; font-display: swap; src: url(/fonts/hind-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Hind; font-weight: 400 500; font-display: swap; src: url(/fonts/hind-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: Hind; font-weight: 600 700; font-display: swap; src: url(/fonts/hind-devanagari-600-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: Archivo; font-weight: 100 900; font-display: swap; src: url(/fonts/archivo-latin-wght-normal.woff2) format('woff2-variations'); }

:root {
  --fs: .88;                  /* text size: Profile → Text size sets .82 / .88 / 1 / 1.12 on <html> (app.js) */
  --fs-chrome: min(var(--fs), 1);   /* the top bar and the tabs grow no bigger than Large: their icons must stay on screen */
  --paper: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #EBEDF4;
  --surface-3: #E1E4EE;
  --line: #DADDE8;
  --line-strong: #C3C7D8;
  --ink: #141833;
  --ink-2: #474C6B;
  --ink-3: #6E7392;
  --brand: #2E3DA0;
  --brand-strong: #22307F;
  --brand-ink: #FFFFFF;
  --brand-soft: #E5E8FA;
  --pink: #F8DCE6;
  --pink-ink: #9A1F4F;
  --yellow: #FCEFB4;
  --yellow-ink: #6B4F00;
  --up: #0B7D55;
  --up-soft: #DDF3EA;
  --down: #B83227;
  --down-soft: #FBE3E0;
  --warn: #9A6100;
  --warn-soft: #FDF0D5;
  --wa: #128C7E;
  --ink-accent: #FCEFB4;      /* accents on var(--ink) surfaces (toasts, ticker): dark in light mode… */
  --toast-err-ink: #FFFFFF;
  --shadow-1: 0 1px 2px rgba(20, 24, 51, .06), 0 1px 1px rgba(20, 24, 51, .04);
  --shadow-2: 0 6px 24px -8px rgba(20, 24, 51, .22), 0 2px 6px rgba(20, 24, 51, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --display: Archivo, "Segoe UI", system-ui, sans-serif;
  --body: Hind, "Segoe UI", system-ui, -apple-system, sans-serif;
  --top-h: 56px;
  --tabs-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D0F1E; --surface: #151934; --surface-2: #1C2142; --surface-3: #242A52; --line: #293058; --line-strong: #3A4270;
    --ink: #E8EAF7; --ink-2: #B0B5D3; --ink-3: #8C92B6;
    --brand: #8E9BFF; --brand-strong: #B2BBFF; --brand-ink: #0D0F1E; --brand-soft: #222A57;
    --pink: #4A1D31; --pink-ink: #F7A8C6; --yellow: #3D3310; --yellow-ink: #F2D56B;
    --up: #3DD69B; --up-soft: #103628; --down: #FF8A7A; --down-soft: #3D1A17; --warn: #F2C14E; --warn-soft: #3A2C0B; --wa: #3CCF9E;
    --ink-accent: #2E3DA0; --toast-err-ink: #2A0E0B;   /* …and light in dark mode, so the accent turns deep blue */
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 10px 30px -10px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0D0F1E; --surface: #151934; --surface-2: #1C2142; --surface-3: #242A52; --line: #293058; --line-strong: #3A4270;
  --ink: #E8EAF7; --ink-2: #B0B5D3; --ink-3: #8C92B6;
  --brand: #8E9BFF; --brand-strong: #B2BBFF; --brand-ink: #0D0F1E; --brand-soft: #222A57;
  --pink: #4A1D31; --pink-ink: #F7A8C6; --yellow: #3D3310; --yellow-ink: #F2D56B;
  --up: #3DD69B; --up-soft: #103628; --down: #FF8A7A; --down-soft: #3D1A17; --warn: #F2C14E; --warn-soft: #3A2C0B; --wa: #3CCF9E;
  --ink-accent: #2E3DA0; --toast-err-ink: #2A0E0B;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 10px 30px -10px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* App colour (Profile → App colour, app.js applyAccent): the brand ink in another colour, with paper, cards and lines
   tinted to match; carbon blue stays the default.
   No green or red: those already mean money in / something wrong. */
:root[data-accent="teal"] { --paper: #F1F6F7; --surface-2: #E6EFF1; --surface-3: #DBE7EA; --line: #D2DFE2; --line-strong: #B9CCD1; --brand: #0B6874; --brand-strong: #07535D; --brand-soft: #DCEFF1; }
:root[data-accent="violet"] { --paper: #F5F3FA; --surface-2: #ECE7F6; --surface-3: #E2DBF0; --line: #DCD5EA; --line-strong: #C5BBDB; --brand: #6A2EA5; --brand-strong: #55228A; --brand-soft: #EEE4FA; }
:root[data-accent="saffron"] { --paper: #F8F5F0; --surface-2: #F1EAE0; --surface-3: #E8DFD2; --line: #E3D8CA; --line-strong: #CEBFAB; --brand: #A64B08; --brand-strong: #873D06; --brand-soft: #FCEBD9; }
:root[data-accent="slate"] { --paper: #F3F4F6; --surface-2: #E9ECF0; --surface-3: #DFE3E9; --line: #D9DEE5; --line-strong: #C2C9D3; --brand: #334155; --brand-strong: #1E293B; --brand-soft: #E6EAF0; }
:root[data-accent="maroon"] { --paper: #F9F3F4; --surface-2: #F2E7EA; --surface-3: #EADAE0; --line: #E6D5DA; --line-strong: #D2B9C1; --brand: #8E1B3A; --brand-strong: #74132F; --brand-soft: #FBE4EA; }   /* the shaadi dhandha opens in this one (server/verticals.js theme.app) */
:root[data-accent="ocean"] { --paper: #F0F5F9; --surface-2: #E4EDF4; --surface-3: #D8E5EE; --line: #CFDDE8; --line-strong: #B5C9D8; --brand: #0A5585; --brand-strong: #07436B; --brand-soft: #DCEBF6; }    /* … and electronics in this */
@media (prefers-color-scheme: dark) {
  :root[data-accent="teal"]:not([data-theme="light"]) { --paper: #0B1618; --surface: #12232A; --surface-2: #182D35; --surface-3: #1F3840; --line: #24404A; --line-strong: #35575F; --brand: #5CC8D4; --brand-strong: #8ADDE6; --brand-soft: #12363B; --ink-accent: #0B6874; }
  :root[data-accent="violet"]:not([data-theme="light"]) { --paper: #110D1C; --surface: #1A1530; --surface-2: #221B3D; --surface-3: #2B234B; --line: #31285A; --line-strong: #433872; --brand: #C39BF5; --brand-strong: #D9BEFA; --brand-soft: #2E1E4A; --ink-accent: #6A2EA5; }
  :root[data-accent="saffron"]:not([data-theme="light"]) { --paper: #15100B; --surface: #201912; --surface-2: #2A2117; --surface-3: #352A1D; --line: #3D3021; --line-strong: #54432E; --brand: #FFB066; --brand-strong: #FFC994; --brand-soft: #3E2510; --ink-accent: #A64B08; }
  :root[data-accent="slate"]:not([data-theme="light"]) { --paper: #0E1115; --surface: #161B22; --surface-2: #1D232C; --surface-3: #252C37; --line: #2A323E; --line-strong: #3B4554; --brand: #A9B6C9; --brand-strong: #CBD5E1; --brand-soft: #232C39; --ink-accent: #334155; }
  :root[data-accent="maroon"]:not([data-theme="light"]) { --paper: #170B0F; --surface: #22121A; --surface-2: #2C1721; --surface-3: #371D29; --line: #40222F; --line-strong: #5A3242; --brand: #FF8FA8; --brand-strong: #FFB3C4; --brand-soft: #3F1424; --ink-accent: #8E1B3A; }
  :root[data-accent="ocean"]:not([data-theme="light"]) { --paper: #08121A; --surface: #0F1D28; --surface-2: #152634; --surface-3: #1B3040; --line: #1F3647; --line-strong: #2E4C62; --brand: #5CC2F2; --brand-strong: #8FD6F7; --brand-soft: #0F3247; --ink-accent: #0A5585; }
}
:root[data-theme="dark"][data-accent="teal"] { --paper: #0B1618; --surface: #12232A; --surface-2: #182D35; --surface-3: #1F3840; --line: #24404A; --line-strong: #35575F; --brand: #5CC8D4; --brand-strong: #8ADDE6; --brand-soft: #12363B; --ink-accent: #0B6874; }
:root[data-theme="dark"][data-accent="violet"] { --paper: #110D1C; --surface: #1A1530; --surface-2: #221B3D; --surface-3: #2B234B; --line: #31285A; --line-strong: #433872; --brand: #C39BF5; --brand-strong: #D9BEFA; --brand-soft: #2E1E4A; --ink-accent: #6A2EA5; }
:root[data-theme="dark"][data-accent="saffron"] { --paper: #15100B; --surface: #201912; --surface-2: #2A2117; --surface-3: #352A1D; --line: #3D3021; --line-strong: #54432E; --brand: #FFB066; --brand-strong: #FFC994; --brand-soft: #3E2510; --ink-accent: #A64B08; }
:root[data-theme="dark"][data-accent="slate"] { --paper: #0E1115; --surface: #161B22; --surface-2: #1D232C; --surface-3: #252C37; --line: #2A323E; --line-strong: #3B4554; --brand: #A9B6C9; --brand-strong: #CBD5E1; --brand-soft: #232C39; --ink-accent: #334155; }
:root[data-theme="dark"][data-accent="maroon"] { --paper: #170B0F; --surface: #22121A; --surface-2: #2C1721; --surface-3: #371D29; --line: #40222F; --line-strong: #5A3242; --brand: #FF8FA8; --brand-strong: #FFB3C4; --brand-soft: #3F1424; --ink-accent: #8E1B3A; }
:root[data-theme="dark"][data-accent="ocean"] { --paper: #08121A; --surface: #0F1D28; --surface-2: #152634; --surface-3: #1B3040; --line: #1F3647; --line-strong: #2E4C62; --brand: #5CC2F2; --brand-strong: #8FD6F7; --brand-soft: #0F3247; --ink-accent: #0A5585; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--paper); color: var(--ink);
  font: 400 max(min(16px, 12px), calc(16px * var(--fs)))/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: max(16px, 1em); }   /* never below 16px: iPhones zoom into smaller fields */
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
/* Default icon size; components override with their own rules. */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ---------- boot + wordmark ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.wordmark { font-family: var(--display); font-weight: 850; letter-spacing: -.035em; font-size: max(min(22px, 12px), calc(22px * var(--fs))); color: var(--ink); white-space: nowrap; }
.wordmark i { font-style: normal; color: var(--brand); display: inline-block; transform: translateY(-.02em); }
/* The mark before the name: the app icon's yellow disc with the handshake (Lucide, ISC — public/icons/LICENSE-Lucide.txt). */
.wordmark::before { content: ""; display: inline-block; width: 1.18em; height: 1.18em; margin-right: .3em; vertical-align: -.22em;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='12' fill='%23FCEFB4'/><g transform='translate(4.4 4.4) scale(.633)' fill='none' stroke='%232E3DA0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m11 17 2 2a1 1 0 1 0 3-3'/><path d='m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4'/><path d='m21 3 1 11h-2'/><path d='M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3'/><path d='M3 4h8'/></g></svg>") center / contain no-repeat; }
.wordmark--xl { font-size: max(min(40px, 12px), calc(40px * var(--fs))); }
.wordmark--light { color: #fff; }
.wordmark--light i { color: #FCEFB4; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { height: var(--top-h); display: flex; align-items: center; gap: 8px; padding-inline: 16px; }
.topbar__brand { display: flex; align-items: center; gap: 8px; margin-right: auto; min-height: 44px; }
.topbar__actions { display: flex; align-items: center; gap: 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--up); box-shadow: 0 0 0 0 var(--up); animation: pulse 2.4s infinite; flex: none; }
.live-dot.off { background: var(--ink-3); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--up) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* overflow-x: clip — nothing may ever widen the page sideways; a phone screen must never pan. */
.layout { flex: 1; display: flex; width: 100%; max-width: 1360px; margin: 0 auto; overflow-x: clip; }
.sidenav { display: none; }
.maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topslot:not(:empty) { padding: 12px 16px 0; }
.topslot > .banner { max-width: 880px; margin: 0 auto; width: 100%; }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(var(--tabs-h) + 28px + env(safe-area-inset-bottom, 0px)); }
.main--bare { padding-bottom: 32px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabs__in { height: var(--tabs-h); display: flex; align-items: stretch; justify-content: space-around; max-width: 560px; margin: 0 auto; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 600 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1 var(--body); color: var(--ink-3); position: relative; letter-spacing: .01em;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--brand); }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.tab--add { flex: 0 0 72px; }
.tab--add .tab__plus {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-2); margin-top: -18px;
}
.tab--add .tab__plus svg { width: 26px; height: 26px; }
.count {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--down); color: #fff; font: 700 max(min(11px, 12px), calc(11px * var(--fs)))/18px var(--body); text-align: center;
  font-variant-numeric: tabular-nums; border: 2px solid var(--surface);
}
.icon-btn .count { top: 2px; left: auto; right: 0; }

/* ---------- tablet: icon rail ---------- */
@media (min-width: 640px) {
  .tabs { display: none; }
  .main { padding: 24px 24px 48px; }
  .topslot:not(:empty) { padding: 20px 24px 0; }
  .sidenav {
    display: flex; flex-direction: column; gap: 4px; flex: 0 0 88px;
    position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); align-self: flex-start;
    height: calc(100vh - var(--top-h) - env(safe-area-inset-top, 0px)); padding: 16px 8px; overflow-y: auto;
    border-right: 1px solid var(--line);
  }
  .navlink {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 4px; border-radius: 12px; color: var(--ink-2); font: 600 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1.1 var(--body); text-align: center;
  }
  .navlink svg { width: 24px; height: 24px; flex: none; }
  .navlink:hover { background: var(--surface-2); }
  .navlink[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
  .navlink .count { top: 4px; left: calc(50% + 4px); }
  .navlink--add { background: var(--brand); color: var(--brand-ink); margin-bottom: 6px; }
  .navlink--add:hover { background: var(--brand-strong); }
  .sidenav__sep { height: 1px; background: var(--line); margin: 8px 6px; }
  .sidenav__label { display: none; }
  /* Sign out sits at the foot of the side menu, always one tap away. */
  .navlink--out { margin-top: auto; width: 100%; background: none; border: 0; cursor: pointer; color: var(--ink-3); }
  .navlink--out:hover { color: var(--down, #B42318); }
}
/* ---------- desktop: full sidebar ---------- */
@media (min-width: 1024px) {
  .sidenav { flex-basis: 236px; padding: 20px 14px; }
  .navlink { flex-direction: row; gap: 12px; padding: 10px 12px; font-size: max(min(15px, 12px), calc(15px * var(--fs))); text-align: left; }
  .navlink .count { position: static; margin-left: auto; border: 0; }
  .sidenav__label { display: block; font: 700 max(min(11px, 12px), calc(11px * var(--fs)))/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 14px 12px 6px; }
  .main { padding: 28px 32px 56px; }
  .topslot:not(:empty) { padding: 24px 32px 0; }
}

/* ---------- page scaffolding ---------- */
.page { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.page--wide { max-width: 1180px; }
.page--narrow { max-width: 560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: max(12px, calc(clamp(24px, 5vw, 32px) * var(--fs))); font-weight: 800; }
.page-head p { color: var(--ink-3); margin-top: 4px; }
.eyebrow { font: 700 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1 var(--body); letter-spacing: .13em; text-transform: uppercase; color: var(--brand); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-title h2 { font-size: max(min(18px, 12px), calc(18px * var(--fs))); font-weight: 750; display: flex; align-items: center; gap: 8px; }
.section-title h2 .i { width: 20px; height: 20px; color: var(--brand); }
.section-title a { font-weight: 600; color: var(--brand); font-size: max(min(14px, 12px), calc(14px * var(--fs))); display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; justify-content: flex-end; margin-block: -10px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-weight: 600; font-size: max(min(14px, 12px), calc(14px * var(--fs)));
  min-height: 40px; margin-block: -9px; padding-right: 12px; }     /* a finger-sized target, same spacing */
.back svg { width: 18px; height: 18px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card--pad { padding: 16px; }
@media (min-width: 640px) { .card--pad { padding: 20px; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--lg { gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole (position:relative) card is the link */
/* A growing button starts from its label's width: beside a wide neighbour it drops to its own line
   instead of being squeezed until the label spills out ("Naya rate bhejiye" on a 360px phone). */
.btn.grow { flex-basis: auto; white-space: normal; text-align: center; }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: 650 max(min(15px, 12px), calc(15px * var(--fs)))/1.1 var(--body); white-space: nowrap; transition: background .15s, border-color .15s, transform .06s, opacity .15s;
  background: var(--surface-2); color: var(--ink);
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--brand-strong); }
.btn--ghost { background: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--quiet { background: transparent; color: var(--brand); padding-inline: 10px; }
.btn--quiet:hover { background: var(--brand-soft); }
.btn--danger { background: var(--down-soft); color: var(--down); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--up { background: var(--up); color: #fff; }
.btn--sm { min-height: 36px; padding: 7px 12px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); border-radius: 10px; }
.btn--block { width: 100%; white-space: normal; text-align: center; }   /* full width already: a long label wraps instead of spilling */
.btn--lg { min-height: 52px; font-size: max(min(16.5px, 12px), calc(16.5px * var(--fs))); padding-inline: 22px; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 99px; border: 2.5px solid currentColor; border-color: var(--brand-ink) transparent var(--brand-ink) transparent; animation: spin .8s linear infinite; }
.btn--ghost.is-busy::after, .btn:not(.btn--primary).is-busy::after { border-color: var(--ink-2) transparent var(--ink-2) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 23px; height: 23px; }

/* ---------- language switch ---------- */
.seg--lang { flex: none; }
.seg--lang button { min-height: 34px; padding-inline: 10px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
.seg--lang-top { padding: 3px; }
.seg--lang-top button { min-height: 30px; padding-inline: 9px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); font-weight: 700; }
/* On a phone the top bar has no room for it — the language switch lives on the profile page there. */
@media (max-width: 599px) { .topbar .seg--lang-top { display: none; } }

/* ---------- chips, badges ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--surface); font: 600 max(min(14px, 12px), calc(14px * var(--fs)))/1 var(--body); color: var(--ink-2);
}
.chip svg { width: 16px; height: 16px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
/* Reasons in a sheet: every one readable, none cut at the screen edge. */
.chips--wrap { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
.chips--wrap .chip { flex: 0 1 auto; height: auto; min-height: 40px; padding-block: 8px; line-height: 1.25; text-align: left; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 700 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1 var(--body); letter-spacing: .02em; white-space: nowrap; background: var(--surface-2); color: var(--ink-2);
}
.badge svg { width: 13px; height: 13px; }
.badge--ok { background: var(--up-soft); color: var(--up); }
.badge--rx { background: var(--down-soft); color: var(--down); }
.badge--flash { background: var(--yellow); color: var(--yellow-ink); }
.badge--hl { background: var(--pink); color: var(--pink-ink); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--brand { background: var(--brand-soft); color: var(--brand); }
.badge--auto { background: var(--brand); color: var(--brand-ink); }

/* ---------- ticker ---------- */
.ticker {
  position: relative; display: flex; align-items: center; gap: 0; overflow: hidden;
  height: 40px; border-radius: 12px; background: var(--ink); color: var(--surface);
  margin-inline: -16px; border-radius: 0;
}
@media (min-width: 640px) { .ticker { margin-inline: 0; border-radius: 12px; } }
.ticker__tag {
  flex: none; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px;
  font: 800 max(min(12px, 12px), calc(12px * var(--fs)))/1 var(--display); letter-spacing: .12em; text-transform: uppercase; background: var(--brand); color: var(--brand-ink); z-index: 1;
}
.ticker__tag .live-dot { background: #7CF2C4; }
.ticker__track { display: flex; gap: 36px; white-space: nowrap; padding-left: 20px; animation: tick var(--tick-dur, 60s) linear infinite; will-change: transform; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 8px; font: 500 max(min(14px, 12px), calc(14px * var(--fs)))/1 var(--body); min-height: 40px; }
.ticker__item b { font-family: var(--display); font-weight: 700; color: var(--ink-accent); }
.ticker__item .k { font: 800 max(min(10.5px, 12px), calc(10.5px * var(--fs)))/1 var(--display); letter-spacing: .1em; padding: 4px 6px; border-radius: 4px; background: color-mix(in srgb, currentColor 14%, transparent); }
.ticker__item .k--flash { background: #FCEFB4; color: #4B3700; }
.ticker__item .k--rate { background: #7CF2C4; color: #073A28; }
.ticker__item.is-new { animation: glow 2.2s ease-out; }
@keyframes glow { 0% { color: var(--ink-accent); } 100% { color: inherit; } }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ticker { background: #05060F; color: var(--ink); } }
:root[data-theme="dark"] .ticker { background: #05060F; color: var(--ink); }

/* ---------- search ---------- */
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 44px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 16px; box-shadow: var(--shadow-1);
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- product cards ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 164px; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; }
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .rail { margin-inline: 0; padding-inline: 2px; grid-auto-columns: 184px; } }
.tile { scroll-snap-align: start; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
.tile__img { position: relative; aspect-ratio: 1; background: var(--surface-2); }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile__img .badge { position: absolute; left: 8px; top: 8px; }
.tile__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.tile__name { font: 650 max(min(14.5px, 12px), calc(14.5px * var(--fs)))/1.25 var(--body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.tile__meta { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile__price { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); font-weight: 800; font-size: max(min(17px, 12px), calc(17px * var(--fs))); }
.tile__price s { font: 500 max(min(12.5px, 12px), calc(12.5px * var(--fs))) var(--body); color: var(--ink-3); }
.tile--flash { border-color: color-mix(in srgb, var(--yellow-ink) 35%, var(--line)); }
.tile--flash .tile__body { background: linear-gradient(to bottom, var(--yellow), var(--surface) 70%); }

.feed { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); position: relative; }
.pcard:hover { border-color: var(--line-strong); }
.pcard__img { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pcard__name { font: 650 max(min(16px, 12px), calc(16px * var(--fs)))/1.25 var(--body); }
.pcard__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pcard__meta { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__seller { display: flex; align-items: center; gap: 6px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-2); min-width: 0; }
.pcard__seller span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__seller svg { width: 15px; height: 15px; flex: none; color: var(--up); }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pcard__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.price { font-family: var(--display); font-weight: 800; font-size: max(min(18px, 12px), calc(18px * var(--fs))); font-variant-numeric: tabular-nums; }
.price small { font: 500 max(min(12.5px, 12px), calc(12.5px * var(--fs))) var(--body); color: var(--ink-3); margin-left: 4px; }
.price--private { font: 600 max(min(13.5px, 12px), calc(13.5px * var(--fs))) var(--body); color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.price--private svg { width: 15px; height: 15px; }
.pcard .btn { position: relative; z-index: 1; }

.new-pill {
  position: sticky; top: calc(var(--top-h) + 10px + env(safe-area-inset-top, 0px)); z-index: 20; align-self: center;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; border: 0;
  background: var(--brand); color: var(--brand-ink); font: 700 max(min(14px, 12px), calc(14px * var(--fs)))/1 var(--body); box-shadow: var(--shadow-2);
  animation: drop .35s ease-out;
}
.new-pill svg { width: 16px; height: 16px; }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }

/* ---------- feed layout with aside on desktop ---------- */
.with-aside { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.aside { display: none; }
@media (min-width: 1180px) {
  .with-aside { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--top-h) + 24px); }
}
.tape { display: flex; flex-direction: column; }
.tape__item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.tape__item:last-child { border-bottom: 0; }
.tape__item time { font: 600 max(min(12px, 12px), calc(12px * var(--fs)))/1.6 var(--display); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tape__item.is-new { animation: tapeflash 2.5s ease-out; }
@keyframes tapeflash { 0% { background: var(--yellow); } 100% { background: transparent; } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.stat b { display: block; font: 800 max(min(22px, 12px), calc(22px * var(--fs)))/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.kpi b { display: block; font: 800 max(min(28px, 12px), calc(28px * var(--fs)))/1.1 var(--display); font-variant-numeric: tabular-nums; margin-top: 6px; }
.kpi span { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-3); }
.kpi--vital { border-color: var(--brand); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.kpi--vital .eyebrow { font-size: max(min(10.5px, 12px), calc(10.5px * var(--fs))); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label { font: 650 max(min(14px, 12px), calc(14px * var(--fs)))/1.2 var(--body); color: var(--ink); }
.field__hint { font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); }
.field__err { font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--down); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 16px; line-height: 1.35; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field.has-err .input, .field.has-err .select, .field.has-err .textarea { border-color: var(--down); }
.input-group { display: flex; align-items: stretch; }
.input-group__pre { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 12px 0 0 12px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.input-group .input { border-radius: 0 12px 12px 0; }
.grid-2 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.seg { display: flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 6px; }
.swatch { display: grid; justify-items: center; gap: 6px; padding: 8px 0; min-height: 64px; border: 1.5px solid transparent; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); cursor: pointer; font: 600 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1.1 var(--body); }
.swatch i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.swatch[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; font: 650 max(min(14.5px, 12px), calc(14.5px * var(--fs)))/1.1 var(--body); color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { flex: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .15s; margin-top: 1px; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 99px; background: #fff; box-shadow: var(--shadow-1); transition: transform .18s; }
.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: .5; }
.switch__text b { display: block; font-weight: 650; font-size: max(min(15px, 12px), calc(15px * var(--fs))); }
.switch__text span { font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); }

.checks { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check:has(input:disabled) { opacity: .5; cursor: not-allowed; }

.roles { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.role { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.role svg { width: 26px; height: 26px; flex: none; color: var(--brand); margin-top: 2px; }
.role b { display: block; font-size: max(min(16px, 12px), calc(16px * var(--fs))); }
.role span { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-3); line-height: 1.35; display: block; margin-top: 2px; }
.role[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }

.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.steps span.on { background: var(--brand); }

/* ---------- photos + voice ---------- */
.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; border-radius: 99px; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.photo button svg { width: 16px; height: 16px; }
.photo--add { display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: var(--surface); color: var(--ink-3); cursor: pointer; font: 600 max(min(12.5px, 12px), calc(12.5px * var(--fs)))/1.2 var(--body); text-align: center; }
.photo--add span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.photo--add svg { width: 26px; height: 26px; }
.voice { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.voice__btn { width: 44px; height: 44px; border-radius: 99px; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.voice__btn svg { width: 20px; height: 20px; }
.voice__btn.is-rec { background: var(--down); animation: recpulse 1.2s infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--down) 25%, transparent); } }
.voice__wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 28px; }
.voice__wave i { flex: 1; border-radius: 2px; background: currentColor; opacity: .35; }
.voice__wave i.on { opacity: 1; }
.voice__time { font: 700 max(min(13px, 12px), calc(13px * var(--fs)))/1 var(--display); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.voice__label { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); font-weight: 600; }

/* ---------- product page ---------- */
.pdp { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 32px; } }
.gallery { display: flex; flex-direction: column; gap: 8px; }
.gallery__main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; }
.gallery__thumbs button { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-2); }
.gallery__thumbs button[aria-pressed="true"] { border-color: var(--brand); }
.pdp h1 { font-size: max(12px, calc(clamp(24px, 4.6vw, 34px) * var(--fs))); font-weight: 800; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.pricebox { padding: 16px; border-radius: var(--radius); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.pricebox--flash { background: var(--yellow); color: var(--yellow-ink); }
.pricebox .price { font-size: max(min(30px, 12px), calc(30px * var(--fs))); }
.countdown { font: 700 max(min(14px, 12px), calc(14px * var(--fs)))/1 var(--display); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.countdown svg { width: 16px; height: 16px; }
/* Action dock — phones: the page's main action sticks just above the tab bar (or the screen's bottom
   edge when signed out) on a solid strip of page colour, so content scrolling under it is cut cleanly
   instead of peeking round the button. Tablet and up: back in the flow. */
.shell { --dock-b: env(safe-area-inset-bottom, 0px); }
.shell:has(> .tabs) { --dock-b: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); }
.dock { position: sticky; bottom: var(--dock-b); z-index: 10; display: flex; gap: 10px; margin-inline: -16px; padding: 10px 16px; background: var(--paper); }
.dock > .btn { flex: 1 1 auto; min-width: 0; white-space: normal; text-align: center; line-height: 1.15; }
.dock > .callout { flex: 1; }
@media (min-width: 640px) { .dock { position: static; margin-inline: 0; padding: 0; background: none; } }

.seller-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 800 max(min(19px, 12px), calc(19px * var(--fs)))/1 var(--display); letter-spacing: -.02em; }
.avatar--lg { width: 72px; height: 72px; border-radius: 20px; font-size: max(min(28px, 12px), calc(28px * var(--fs))); }
.avatar--pink { background: var(--pink); color: var(--pink-ink); }

/* ---------- asks ---------- */
.list { display: flex; flex-direction: column; }
.li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--surface-2); }
.li img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.li__title { font-weight: 650; font-size: max(min(15.5px, 12px), calc(15.5px * var(--fs))); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li__title a::after { content: ""; position: absolute; inset: 0; }
.li__sub { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); }
.li.is-unread { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.li.is-unread .li__title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--brand); margin-right: 8px; vertical-align: middle; }
.li--note { grid-template-columns: 40px minmax(0, 1fr) auto; }
.note-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.note-ico svg { width: 20px; height: 20px; }
.note-ico--up { background: var(--up-soft); color: var(--up); }
.note-ico--flash { background: var(--yellow); color: var(--yellow-ink); }
.li__body { font-size: max(min(14px, 12px), calc(14px * var(--fs))); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.status { font: 700 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1 var(--body); letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; }
.status--open { background: var(--warn-soft); color: var(--warn); }
.status--quoted { background: var(--brand-soft); color: var(--brand); }
.status--accepted { background: var(--up-soft); color: var(--up); }
.status--declined, .status--closed { background: var(--surface-3); color: var(--ink-3); }

.timeline { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 520px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.bubble--me { align-self: flex-end; background: var(--brand-soft); border-color: transparent; }
.bubble--quote { border: 1.5px solid var(--brand); }
.bubble--accepted { border-color: var(--up); background: var(--up-soft); }
.bubble--superseded { opacity: .55; }
.bubble__head { display: flex; align-items: center; gap: 8px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); margin-bottom: 6px; flex-wrap: wrap; }
.bubble .price { font-size: max(min(24px, 12px), calc(24px * var(--fs))); }

.deal { padding: 18px; border-radius: var(--radius); background: var(--up-soft); color: var(--ink); display: flex; flex-direction: column; gap: 12px; }
.deal h3 { color: var(--up); font-size: max(min(18px, 12px), calc(18px * var(--fs))); display: flex; gap: 8px; align-items: center; }
.deal h3 svg { width: 22px; height: 22px; }
.deal .btn { white-space: normal; text-align: left; max-width: 100%; }
.stars { display: flex; gap: 4px; }
.stars button { border: 0; background: none; padding: 2px; color: var(--line-strong); }
.stars button svg { width: 30px; height: 30px; }
.stars button[aria-pressed="true"] { color: #E0A100; }

/* ---------- sell dashboard ---------- */
.mine { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); position: relative; }
.mine__name { font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine__name::after { content: ""; position: absolute; inset: 0; }           /* the whole row opens the product */
.mine__actions, .mine .badge, .mine button { position: relative; z-index: 1; }
.mine:last-child { border-bottom: 0; }
.mine img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.mine__actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 760px) {
  .mine { grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; }
  .mine__actions { grid-column: auto; justify-content: flex-end; }
}
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--pink-ink); border-radius: 99px; }
.meter--brand i { background: var(--brand); }

/* ---------- referral ---------- */
.refhero { padding: 20px; border-radius: 22px; color: #fff; display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #5B69E0 0%, rgba(91,105,224,0) 55%), linear-gradient(140deg, #2E3DA0 0%, #1A2168 100%);
  box-shadow: 0 14px 34px -18px rgba(26, 33, 104, .8); }
.refhero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 99px; border: 28px solid rgba(255,255,255,.08); }
.refcode { font: 850 max(min(30px, 12px), calc(30px * var(--fs)))/1 var(--display); letter-spacing: .04em; }
.refhero .btn { background: rgba(255,255,255,.14); color: #fff; }
.refhero .btn--wa { background: #25D366; color: #06371C; }
.refhero .muted { color: rgba(255,255,255,.78); }
.money { font: 850 max(min(34px, 12px), calc(34px * var(--fs)))/1 var(--display); font-variant-numeric: tabular-nums; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rule:last-child { border-bottom: 0; }
.rule b.amt { font: 800 max(min(18px, 12px), calc(18px * var(--fs)))/1.2 var(--display); min-width: 64px; }
.callout { padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); font-size: max(min(14px, 12px), calc(14px * var(--fs))); display: flex; gap: 10px; }
.callout svg { width: 20px; height: 20px; flex: none; color: var(--warn); margin-top: 1px; }
.callout--info { background: var(--brand-soft); }
.callout--info svg { color: var(--brand); }
.callout--danger { background: var(--down-soft); }
.callout--danger svg { color: var(--down); }

/* ---------- Fill it with AI (Add product) ---------- */
.aifill { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface) 65%); }
.aifill__head { display: flex; gap: 12px; align-items: flex-start; }
.aifill__head > .i, .aifill__head > svg { width: 22px; height: 22px; flex: none; color: var(--brand); padding: 9px; border-radius: 12px; background: var(--brand-soft); box-sizing: content-box; }
.aifill__head b { font: 750 max(min(17px, 12px), calc(17px * var(--fs)))/1.25 var(--body); }
.aifill__head p { font-size: max(min(14px, 12px), calc(14px * var(--fs))); color: var(--ink-2); margin-top: 3px; }
.aifill__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.aifill__actions .btn { white-space: normal; }
.aifill__live { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.aifill__live p { flex: 1; min-width: 0; font-size: max(min(15.5px, 12px), calc(15.5px * var(--fs))); }
.aifill__dot { width: 12px; height: 12px; border-radius: 99px; background: var(--down); flex: none; animation: rec-blink 1.1s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .3; } }
.aifill__work { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); padding: 4px 0; }
.aifill__notes { margin: 6px 0 0; padding-left: 18px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-2); }
.spinner { width: 18px; height: 18px; flex: none; border-radius: 99px; border: 2.5px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.linkbtn { align-self: flex-start; min-height: 40px; padding: 0; margin-block: -6px; background: none; border: 0; color: var(--brand); font: 650 max(min(14px, 12px), calc(14px * var(--fs))) var(--body); cursor: pointer; }
.input.is-ai, .select.is-ai, .textarea.is-ai { border-color: color-mix(in srgb, var(--brand) 65%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.ai-usage { font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
@media (prefers-reduced-motion: reduce) { .aifill__dot, .spinner { animation: none; } }

/* ---------- empty + skeleton ---------- */
.empty { padding: 36px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink-3); }
.empty svg { width: 40px; height: 40px; color: var(--line-strong); }
.empty b { color: var(--ink); font-size: max(min(16px, 12px), calc(16px * var(--fs))); }
.sk { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- sheet (dialog) ---------- */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); overflow: hidden; }
.sheet::backdrop { background: rgba(10, 12, 30, .5); backdrop-filter: blur(2px); }
.sheet[open] { animation: sheetin .22s ease-out; display: flex; flex-direction: column; }
@keyframes sheetin { from { transform: translateY(24px); opacity: 0; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: 10px auto 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px 4px; }
.sheet__head h2 { font-size: max(min(20px, 12px), calc(20px * var(--fs))); font-weight: 800; }
.sheet__body { padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 22px; } .sheet__grip { display: none; } }

/* ---------- "new version" bar (lib/update.js): solid, above the tab bar on phones, bottom-left on wide screens ---------- */
.updbar { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + 12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--surface);
  border: 1.5px solid var(--brand); box-shadow: 0 10px 30px rgba(20, 24, 51, .18); max-width: 560px; margin-inline: auto; }
.updbar__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #FCEFB4; color: #2E3DA0; flex: none; }
.updbar__ico svg { width: 19px; height: 19px; }
.updbar__txt { flex: 1 1 160px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); line-height: 1.3; }
@media (min-width: 640px) { .updbar { right: auto; bottom: 20px; left: 20px; margin: 0; } }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 10px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 640px) { .toasts { left: auto; right: 20px; top: auto; bottom: 20px; align-items: flex-end; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: min(100%, 420px); padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-2); animation: toastin .25s ease-out; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.toast svg { width: 22px; height: 22px; flex: none; }
.toast b { display: block; font-weight: 700; }
.toast__text { flex: 1; min-width: 0; }
.toast__text span { opacity: .8; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast a, .toast button { color: var(--ink-accent); font-weight: 700; background: none; border: 0; padding: 4px 6px; white-space: nowrap; min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
.toast--err { background: var(--down); color: var(--toast-err-ink); }
.toast--err a, .toast--err button { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.toast.out { animation: toastout .2s ease-in forwards; }
@keyframes toastin { from { transform: translateY(-10px); opacity: 0; } }
@keyframes toastout { to { transform: translateY(-6px); opacity: 0; } }

/* ---------- banners ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.banner svg { width: 22px; height: 22px; color: var(--brand); flex: none; }
.banner--warn { background: var(--warn-soft); }
.banner--warn svg { color: var(--warn); }
.offline-bar { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); z-index: 25; background: var(--ink); color: var(--surface); font: 600 max(min(13px, 12px), calc(13px * var(--fs)))/1 var(--body); text-align: center; padding: 8px; }

/* ---------- landing ---------- */
.landing { display: flex; flex-direction: column; }
.hero { position: relative; overflow: hidden; background: var(--brand); color: #fff; padding: 28px 20px 0; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 32px); pointer-events: none; }
.hero__in { position: relative; max-width: 1120px; margin: 0 auto; display: grid; gap: 28px; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.1fr .9fr; align-items: end; padding-top: 24px; } }
.hero__nav { position: relative; max-width: 1120px; margin: 0 auto 28px; display: flex; align-items: center; gap: 8px; }
.hero__nav .wordmark { display: inline-flex; align-items: center; min-height: 44px; }
.hero__nav .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero__nav .btn--ghost:hover { background: rgba(255,255,255,.1); }
/* The homepage's dhandha switch (pages/landing.js) */
.me-out { margin-left: auto; }
.dswitch { display: flex; gap: 4px; padding: 4px; margin: 0 0 20px; width: 100%; overflow-x: auto; background: rgba(255,255,255,.12); border-radius: 999px; scrollbar-width: none; }
.dswitch a { flex: 1 0 auto; justify-content: center; display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 10px; border-radius: 999px; color: #fff; font-weight: 700; white-space: nowrap; text-decoration: none; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
@media (min-width: 640px) { .dswitch { width: fit-content; max-width: 100%; } .dswitch a { flex: none; padding: 0 14px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); } }
.dswitch a svg { width: 18px; height: 18px; flex: none; }
.dswitch a[aria-current="page"] { background: #FCEFB4; color: #2A2200; }
.dswitch a:not([aria-current="page"]):hover { background: rgba(255,255,255,.12); }
.hero__in > * { min-width: 0; }               /* a long switch or slip never widens the page */
/* Three or more dhandhe on a phone: equal tabs, the icon over a two-line label, all in view. */
@media (max-width: 560px) {
  .dswitch { border-radius: 20px; overflow: visible; }
  .dswitch a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; min-height: 54px; padding: 6px 4px; border-radius: 16px; white-space: normal; text-align: center;
    line-height: 1.12; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
}
.hero h1 { font-size: max(12px, calc(clamp(38px, 9vw, 68px) * var(--fs))); font-weight: 850; letter-spacing: -.035em; line-height: .98; }
.hero h1 em { font-style: normal; color: #FCEFB4; }
.hero__lede { font-size: max(12px, calc(clamp(17px, 2.4vw, 20px) * var(--fs))); line-height: 1.5; opacity: .88; max-width: 34ch; margin-top: 16px; }
.hero__ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero__ctas .btn--primary { background: #FCEFB4; color: #2A2200; }
.hero__ctas .btn--primary:hover { background: #fff5c9; }
.hero__ctas .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero__proof { display: flex; gap: 20px; margin: 24px 0 28px; flex-wrap: wrap; }
.hero__proof div b { display: block; font: 850 max(min(26px, 12px), calc(26px * var(--fs)))/1 var(--display); font-variant-numeric: tabular-nums; }
.hero__proof div span { font-size: max(min(13px, 12px), calc(13px * var(--fs))); opacity: .75; }
.billbook { position: relative; align-self: end; margin-top: 18px; }
.billbook__sheet { background: #fff; color: #141833; border-radius: 14px 14px 0 0; padding: 18px 18px 22px; box-shadow: 0 -12px 40px -12px rgba(0,0,0,.4); position: relative; z-index: 2; }
.billbook__under { position: absolute; left: 12px; right: 12px; top: -10px; bottom: 0; background: #F8DCE6; border-radius: 14px 14px 0 0; z-index: 1; transform: rotate(-1.2deg); }
.billbook__under--2 { left: 22px; right: 22px; top: -18px; background: #FCEFB4; transform: rotate(1.4deg); z-index: 0; }
.billbook__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px dashed #C3C7D8; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.billbook__row b { font: 800 max(min(16px, 12px), calc(16px * var(--fs))) var(--display); color: #2E3DA0; font-variant-numeric: tabular-nums; }
.billbook__row s { color: #6E7392; font-size: max(min(13px, 12px), calc(13px * var(--fs))); margin-right: 6px; }
/* Sits on the sheet's top edge, clear of the "Today's quotes" line under it at any text size. */
.billbook__stamp { position: absolute; right: 12px; top: -38px; z-index: 3; background: #fff; transform: rotate(-5deg); border: 2.5px solid #0B7D55; color: #0B7D55; font: 850 max(min(13px, 12px), calc(13px * var(--fs)))/1 var(--display); letter-spacing: .1em; padding: 6px 8px; border-radius: 6px; text-transform: uppercase; }
.lsec { padding: 48px 20px; }
.lsec__in { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.lsec h2 { font-size: max(12px, calc(clamp(26px, 5vw, 38px) * var(--fs))); font-weight: 850; letter-spacing: -.025em; }
.lsec__lede { color: var(--ink-2); font-size: max(min(17px, 12px), calc(17px * var(--fs))); max-width: 60ch; }
.aud { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .aud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .aud { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.aud__card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.aud__card svg { width: 30px; height: 30px; color: var(--brand); }
.aud__card h3 { font-size: max(min(19px, 12px), calc(19px * var(--fs))); font-weight: 750; }
.aud__card p { color: var(--ink-2); font-size: max(min(15px, 12px), calc(15px * var(--fs))); }
.aud__card ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.aud__card--note { background: var(--surface-2); border-style: dashed; }
.how { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); counter-reset: how; }
@media (min-width: 760px) { .how { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.how li { list-style: none; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); counter-increment: how; }
.how li::before { content: counter(how); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: 800 max(min(16px, 12px), calc(16px * var(--fs)))/1 var(--display); margin-bottom: 12px; }
.how h3 { font-size: max(min(17px, 12px), calc(17px * var(--fs))); margin-bottom: 4px; }
.how p { color: var(--ink-2); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.split { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.lfoot { padding: 28px 20px 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
.lfoot__in { max-width: 1120px; margin: 0 auto; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; align-items: center; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth__side { display: none; background: var(--brand); color: #fff; padding: 40px; position: relative; overflow: hidden; }
.auth__side::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 32px); }
@media (min-width: 960px) { .auth__side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth__side h2 { font-size: max(min(40px, 12px), calc(40px * var(--fs))); font-weight: 850; letter-spacing: -.03em; max-width: 14ch; position: relative; }
.auth__side p { opacity: .85; max-width: 38ch; position: relative; }
.auth__main { padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 40px; display: flex; flex-direction: column; align-items: center; }
.auth__box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; margin-top: 12px; }
@media (min-width: 640px) { .auth__main { justify-content: center; } }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-head { display: flex; align-items: center; gap: 6px; margin: 6px 0 -2px; font: 700 max(min(13px, 12px), calc(13px * var(--fs)))/1.3 var(--body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.demo-head svg { width: 16px; height: 16px; }
.demo-grid button { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font: 600 max(min(13.5px, 12px), calc(13.5px * var(--fs)))/1.3 var(--body); color: var(--ink-2); }
.demo-grid button b { display: block; color: var(--ink); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.demo-grid button:hover { border-color: var(--brand); background: var(--brand-soft); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: max(min(13px, 12px), calc(13px * var(--fs))); font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- form + live preview ---------- */
.split-form { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .split-form { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .split-form__aside { position: sticky; top: calc(var(--top-h) + 24px); }
}

/* ---------- misc ---------- */
.install-card { padding: 16px; border-radius: var(--radius); background: var(--ink); color: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.install-card .btn { background: #FCEFB4; color: #2A2200; }
.kbd-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
table.tbl { width: 100%; border-collapse: collapse; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.tbl th { text-align: left; font: 700 max(min(11.5px, 12px), calc(11.5px * var(--fs)))/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl-wrap { overflow-x: auto; }
.center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker__track { animation: none; overflow-x: auto; }
}

/* =====================================================================================
   One design for every role — owner, admin, seller, buyer, MR.
   Phone first: everything below is laid out for 360–430 px and only widens after.
   ===================================================================================== */

/* ---------- hello card: who you are + the three numbers that matter to you ---------- */
.hello {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 16px; padding: 18px; border-radius: 22px; color: #fff;
  /* Fixed indigo, not var(--brand): dark mode lightens --brand, and white text must stay readable. */
  background: radial-gradient(120% 120% at 100% 0%, #5B69E0 0%, rgba(91,105,224,0) 55%), linear-gradient(140deg, #2E3DA0 0%, #1A2168 100%);
  box-shadow: 0 14px 34px -18px rgba(26, 33, 104, .8);
}
.hello::before, .hello::after { content: ""; position: absolute; z-index: -1; border-radius: 999px; border: 26px solid rgba(255,255,255,.07); }
.hello::before { width: 190px; height: 190px; right: -60px; top: -70px; }
.hello::after { width: 120px; height: 120px; left: -50px; bottom: -70px; border-width: 18px; }
/* The hello card in its dhandha's colours (app.js adoptPrefs → :root[data-dhandha]): a marigold toran for shaadi, a
   circuit grid for electronics. Fixed colours, like the indigo one, so the white text reads in light and dark. */
:root[data-dhandha="event"] .hello { padding-top: 28px; background: radial-gradient(120% 120% at 100% 0%, #E2465F 0%, rgba(226,70,95,0) 55%), linear-gradient(140deg, #A3122F 0%, #5E0B26 100%); box-shadow: 0 14px 34px -18px rgba(94, 11, 38, .8); }
:root[data-dhandha="event"] .hello::before { width: auto; height: 18px; inset: 0 0 auto 0; border: 0; border-radius: 0;
  background: radial-gradient(circle at 9px 9px, #FFB21E 0 5.5px, rgba(255,178,30,0) 6px) 0 0 / 18px 18px repeat-x,
    radial-gradient(circle at 9px 15px, #FF7A1A 0 3px, rgba(255,122,26,0) 3.5px) 9px 0 / 36px 18px repeat-x,
    linear-gradient(#2F9E44, #2F9E44) 0 3px / 100% 2px no-repeat; }
:root[data-dhandha="electronics"] .hello { background: radial-gradient(120% 120% at 100% 0%, rgba(34,211,238,.42) 0%, rgba(34,211,238,0) 55%), linear-gradient(140deg, #0B2A5B 0%, #05112B 100%); box-shadow: 0 14px 34px -18px rgba(5, 17, 43, .85); }
:root[data-dhandha="electronics"] .hello::before { width: 240px; height: 240px; right: -50px; top: -70px; border: 0; border-radius: 0;
  background: linear-gradient(rgba(34,211,238,.2) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(34,211,238,.2) 1px, transparent 1px) 0 0 / 22px 22px;
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent); }
.hello__top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hello__avatar { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font: 800 max(min(17px, 12px), calc(17px * var(--fs)))/1 var(--display); }
.hello__who { min-width: 0; }
.hello__hi { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: rgba(255,255,255,.8); }
.hello__name { font: 800 max(min(23px, 12px), calc(23px * var(--fs)))/1.1 var(--display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello__role { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 99px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font: 700 max(min(12px, 12px), calc(12px * var(--fs)))/1 var(--body); }
.hello__role svg { width: 14px; height: 14px; }
.hello__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hello__stat { display: grid; gap: 4px; padding: 11px 12px; border-radius: 15px; background: rgba(255,255,255,.1); color: inherit; min-width: 0; container-type: inline-size; }
a.hello__stat:hover { background: rgba(255,255,255,.16); }
.hello__stat b { font: 800 max(min(22px, 12px), calc(22px * var(--fs)))/1 var(--display); font-size: min(var(--kpi-max, 22px), calc(100cqi / (var(--len, 1) * .64))); white-space: nowrap; }
.hello__stat span { font-size: max(min(12px, 12px), calc(12px * var(--fs))); line-height: 1.25; color: rgba(255,255,255,.82); }
.hello__note { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: rgba(255,255,255,.85); display: flex; gap: 8px; align-items: center; }
.hello__note svg { width: 16px; height: 16px; flex: none; }
.hello .btn { background: #fff; color: #1A2168; }
.hello .btn--ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.hello--slim { padding: 14px 16px; gap: 10px; border-radius: 18px; }
.hello--slim .hello__name { font-size: max(min(19px, 12px), calc(19px * var(--fs))); }
@media (min-width: 640px) { .hello { padding: 22px 24px; } .hello__stats { gap: 12px; } .hello__stat { padding: 14px 16px; --kpi-max: 26px; } }

/* ---------- action tiles: one tap to each job ---------- */
.acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .acts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1100px) { .acts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.act {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 112px; padding: 14px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.act:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.act:active { transform: scale(.98); }
.act__ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--t-bg); color: var(--t-fg); }
.act__ico svg { width: 22px; height: 22px; }
.act b { font: 750 max(min(15.5px, 12px), calc(15.5px * var(--fs)))/1.2 var(--display); }
.act__sub { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); line-height: 1.3; color: var(--ink-3); margin-top: -6px; }
.act__badge { position: absolute; top: 12px; right: 12px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px;
  background: var(--down); color: #fff; font: 700 max(min(12px, 12px), calc(12px * var(--fs)))/22px var(--body); text-align: center; }
.t-brand  { --t-bg: var(--brand-soft); --t-fg: var(--brand); }
.t-pink   { --t-bg: var(--pink);       --t-fg: var(--pink-ink); }
.t-yellow { --t-bg: var(--yellow);     --t-fg: var(--yellow-ink); }
.t-up     { --t-bg: var(--up-soft);    --t-fg: var(--up); }
.t-warn   { --t-bg: var(--warn-soft);  --t-fg: var(--warn); }
.t-down   { --t-bg: var(--down-soft);  --t-fg: var(--down); }
.t-ink    { --t-bg: var(--surface-2);  --t-fg: var(--ink-2); }

/* ---------- console & list pages ---------- */
.console { display: grid; gap: 18px; }
.console-head { display: grid; gap: 12px; }
.console-head h1 { font: 800 max(12px, calc(clamp(24px, 6vw, 32px) * var(--fs)))/1.1 var(--display); letter-spacing: -.01em; }
.console-head p { color: var(--ink-3); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.subnav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--surface); font: 650 max(min(13.5px, 12px), calc(13.5px * var(--fs)))/1 var(--body); color: var(--ink-2); }
.subnav a svg { width: 16px; height: 16px; }
.subnav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (min-width: 640px) { .subnav { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }
.toolbar { display: grid; gap: 10px; }
.rows { display: grid; gap: 10px; }
.rowc {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--ink);
}
a.rowc:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.rowc__pic { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center;
  font: 800 max(min(15px, 12px), calc(15px * var(--fs)))/1 var(--display); color: var(--ink-2); }
.rowc__pic.t-brand, .rowc__pic.t-pink, .rowc__pic.t-yellow, .rowc__pic.t-up, .rowc__pic.t-warn, .rowc__pic.t-down { background: var(--t-bg); color: var(--t-fg); }
.rowc__pic svg { width: 22px; height: 22px; }
.rowc__body { min-width: 0; display: grid; gap: 3px; }
.rowc__title { font-weight: 700; font-size: max(min(15px, 12px), calc(15px * var(--fs))); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.rowc__sub { font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); line-height: 1.35; overflow-wrap: anywhere; }
.rowc__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.rowc__end { display: grid; justify-items: end; gap: 6px; text-align: right; }
.rowc__end b { font: 800 max(min(16px, 12px), calc(16px * var(--fs)))/1 var(--display); }
.rowc__end small { font-size: max(min(12px, 12px), calc(12px * var(--fs))); color: var(--ink-3); }
.rowc__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.rowc--off { background: var(--surface-2); }
.rowc--off .rowc__title { color: var(--ink-2); }
.more-row { display: flex; justify-content: center; padding: 6px 0 14px; }

/* stat tiles with a week-on-week delta */
.kpi__delta { display: inline-flex; align-items: center; gap: 3px; font: 700 max(min(12.5px, 12px), calc(12.5px * var(--fs)))/1 var(--body); }
.kpi__delta svg { width: 14px; height: 14px; }
.kpi__delta--good { color: var(--up); }
.kpi__delta--bad { color: var(--down); }
.kpi__delta--flat { color: var(--ink-3); }
.kpis--tight { gap: 10px; }
.kpis--tight .kpi { padding: 14px; }
.kpis--tight .kpi b { font-size: max(min(24px, 12px), calc(24px * var(--fs))); margin: 6px 0 4px; }

/* column chart (one series, hover + table view) */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .c-bar { fill: var(--brand); }
.chart .c-hit { fill: transparent; cursor: default; }
.chart .c-col:hover .c-bar, .chart .c-col:focus .c-bar { fill: var(--brand-strong); }
.chart .c-col:focus { outline: none; }
.chart .c-grid { stroke: var(--line); stroke-width: 1; }
.chart .c-base { stroke: var(--line-strong); stroke-width: 1; }
.chart text { fill: var(--ink-3); font: 500 max(min(11px, 12px), calc(11px * var(--fs))) var(--body); }
.chart .c-label { fill: var(--ink); font-weight: 700; }
.chart__tip { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, calc(-100% - 8px)); white-space: nowrap;
  padding: 7px 10px; border-radius: 10px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-2); font-size: max(min(12px, 12px), calc(12px * var(--fs))); line-height: 1.35; }
.chart__tip b { display: block; font: 800 max(min(15px, 12px), calc(15px * var(--fs)))/1.2 var(--display); }
.chart__table { margin-top: 8px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); }
.chart__table summary { cursor: pointer; color: var(--brand); font-weight: 650; padding-block: 10px; margin-block: -6px; }
.chart__table table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.chart__table td, .chart__table th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }

/* a password shown exactly once */
.secret { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px;
  background: var(--yellow); color: var(--yellow-ink); font: 800 max(min(22px, 12px), calc(22px * var(--fs)))/1 var(--display); letter-spacing: .05em; word-break: break-all; }

/* settings rows */
.setrow { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setrow:last-child { border-bottom: 0; }
.setrow label { font-weight: 650; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.setrow label small { display: block; font-weight: 400; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); margin-top: 2px; }
.setrow .input { text-align: right; }
.setrow .field__err { grid-column: 1 / -1; }
.i.flip { transform: rotate(180deg); }
/* Grid children default to min-width:auto, so a long chip row would widen the page past the phone. */
.console > *, .console-head > *, .toolbar > *, .rows > * { min-width: 0; }

/* =====================================================================================
   Native-feeling navigation on phones (router.js, gestures.js, the sheet in ui.js)
   ===================================================================================== */
html { touch-action: manipulation; }                  /* no double-tap-zoom delay on taps */
@media (display-mode: standalone) { html, body { overscroll-behavior-y: none; } }
.rail, .chips, .subnav, .ticker { overscroll-behavior-x: contain; }
.sheet__body { overscroll-behavior: contain; }
.sheet { touch-action: pan-y; }

/* The top bar and the tab bar are not part of the page: they stay still while pages move. */
.topbar { view-transition-name: topbar; }
.topbar, .tabs, .hero__nav { --fs: var(--fs-chrome); }
.tabs { view-transition-name: tabs; }
.sidenav { view-transition-name: sidenav; }
::view-transition-old(topbar), ::view-transition-new(topbar),
::view-transition-old(tabs), ::view-transition-new(tabs),
::view-transition-old(sidenav), ::view-transition-new(sidenav) { animation: none; }
::view-transition-group(root) { animation-duration: .28s; }
html[data-nav="forward"]::view-transition-old(root) { animation: .28s cubic-bezier(.2, .8, .2, 1) both nav-out-left; }
html[data-nav="forward"]::view-transition-new(root) { animation: .28s cubic-bezier(.2, .8, .2, 1) both nav-in-right; }
html[data-nav="back"]::view-transition-old(root) { animation: .28s cubic-bezier(.2, .8, .2, 1) both nav-out-right; }
html[data-nav="back"]::view-transition-new(root) { animation: .28s cubic-bezier(.2, .8, .2, 1) both nav-in-left; }
html[data-nav="tab"]::view-transition-old(root) { animation: .14s ease-out both nav-fade-out; }
html[data-nav="tab"]::view-transition-new(root) { animation: .2s ease-out both nav-fade-in; }
/* The screen coming in sits on top and carries a soft edge shadow, like a pushed native screen. */
html[data-nav="forward"]::view-transition-new(root), html[data-nav="back"]::view-transition-old(root) { z-index: 1; box-shadow: -10px 0 30px rgba(10, 12, 30, .12); }
@keyframes nav-in-right  { from { transform: translateX(100%); } }
@keyframes nav-out-left  { to   { transform: translateX(-28%); filter: brightness(.94); } }
@keyframes nav-in-left   { from { transform: translateX(-28%); filter: brightness(.94); } }
@keyframes nav-out-right { to   { transform: translateX(100%); } }
@keyframes nav-fade-in   { from { opacity: 0; transform: translateY(6px); } }
@keyframes nav-fade-out  { to   { opacity: 0; } }

/* Browsers without View Transitions still get a gentle entrance. */
#outlet.enter-forward { animation: .26s cubic-bezier(.2, .8, .2, 1) both nav-in-soft-right; }
#outlet.enter-back    { animation: .26s cubic-bezier(.2, .8, .2, 1) both nav-in-soft-left; }
#outlet.enter-tab     { animation: .2s ease-out both nav-fade-in; }
@keyframes nav-in-soft-right { from { transform: translateX(24px); opacity: 0; } }
@keyframes nav-in-soft-left  { from { transform: translateX(-24px); opacity: 0; } }

/* A thin bar while the next screen loads (only shown after 150 ms, so fast pages never flash it). */
.navprogress { position: fixed; z-index: 100; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 3px; transform-origin: left;
  background: linear-gradient(90deg, #5B69E0, var(--brand)); animation: navprogress 2.4s cubic-bezier(.1, .8, .2, 1) forwards; }
@keyframes navprogress { from { transform: scaleX(0); } to { transform: scaleX(.9); } }

/* iPhone edge swipe: the page follows the finger with a shadow on its left edge. */
html.edge-swiping #outlet { box-shadow: -14px 0 30px rgba(10, 12, 30, .16); background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  #outlet.enter-forward, #outlet.enter-back, #outlet.enter-tab, .navprogress { animation: none; }
}

/* Console → Settings: Free / Pro / Business limits as one table; numbered set-up steps */
.plantab { display: grid; gap: 0; }
.plantab__row { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plantab__row:last-child { border-bottom: 0; }
.plantab__row--head { padding: 4px 0 6px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-2); }
.plantab__row--head b { text-align: right; padding-right: 10px; }
.plantab__label { font-weight: 650; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.plantab__label small { display: block; font-weight: 400; font-size: max(min(12px, 12px), calc(12px * var(--fs))); color: var(--ink-3); margin-top: 2px; }
.plantab .input { text-align: right; padding-inline: 8px; min-width: 0; width: 100%; }
.plantab__free { text-align: right; padding-right: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.plantab .field__err { font-size: max(min(12px, 12px), calc(12px * var(--fs))); }
@media (max-width: 480px) {
  .plantab__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plantab__row--head span:first-child { display: none; }
  .plantab__label { grid-column: 1 / -1; }
}
ol.howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-2); }
ol.howto b { color: var(--ink); }
code.sel { user-select: all; word-break: break-all; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }

/* Seller plans: the strip on My products, the Plans page (pages/plans.js) */
.planstrip { display: grid; gap: 10px; color: inherit; text-decoration: none; }
.planstrip:hover { border-color: var(--brand); }
.planstrip__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.planstrip__cell { display: grid; gap: 2px; padding: 8px 7px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.planstrip__cell span { font-size: max(min(11.5px, 12px), calc(11.5px * var(--fs))); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planstrip__cell b { font: 800 max(min(16px, 12px), calc(16px * var(--fs)))/1.1 var(--display); }
.is-full { color: var(--down); }
.planuse { display: grid; gap: 14px; }
.planuse__row { display: grid; gap: 6px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.planuse__row span { display: inline-flex; gap: 8px; align-items: center; }
.meter--full i { background: var(--down); }
.plangrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plancard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.plancard h2 { font-size: max(min(19px, 12px), calc(19px * var(--fs))); }
.plancard--cur { border-color: var(--up); }
.plancard--top { border-color: var(--brand); background: linear-gradient(170deg, var(--brand-soft), var(--surface) 60%); }
.plancard__price { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.plancard__price b { font: 800 max(min(28px, 12px), calc(28px * var(--fs)))/1 var(--display); }
.plancard__price span { color: var(--ink-3); font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.plancard__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.plancard__list li { display: flex; gap: 8px; align-items: center; }
.plancard__list .i { color: var(--brand); flex: none; }

/* Feed: the city filter chip and its picker sheet */
.chip--city { border-color: var(--brand); color: var(--brand); }
.chip--city[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink, #fff); border-color: var(--brand); }
.citylist { display: grid; gap: 6px; }
.citylist__item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: inherit; }
.citylist__item[aria-selected="true"] { border-color: var(--brand); background: var(--brand-soft); }
.citylist__item small { display: block; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); margin-top: 2px; }
.citylist__item .badge { vertical-align: 1px; }

/* AI tools: a bill → drafts (pages/billImport.js), a shortage list → asks (pages/shortList.js) */
.aifill__more { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); font-weight: 650; color: var(--brand); }
.billpages { display: flex; flex-wrap: wrap; gap: 10px; }
.billpages figure { position: relative; margin: 0; width: 96px; height: 128px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.billpages figure img { width: 100%; height: 100%; object-fit: cover; }
.billpages figure .icon-btn { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; background: var(--surface); border-radius: 99px; }
.billpages__add { width: 96px; height: 128px; border-radius: 12px; border: 2px dashed var(--line-strong); background: var(--surface); color: var(--brand);
  display: grid; place-content: center; justify-items: center; gap: 6px; font: 650 max(min(13px, 12px), calc(13px * var(--fs)))/1.2 var(--body); }
.billpages__add svg { width: 26px; height: 26px; }
.billrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.billrow:last-child { border-bottom: 0; }
.billrow__pick { padding-top: 10px; }
.billrow__pick input { width: 22px; height: 22px; accent-color: var(--brand); }
.billrow__body { display: grid; gap: 8px; min-width: 0; }
.billrow__name { font-weight: 650; }
.billrow__nums { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.billrow__nums label { display: grid; gap: 4px; font-size: max(min(12px, 12px), calc(12px * var(--fs))); color: var(--ink-3); min-width: 0; }
.billrow__nums .input { min-width: 0; padding-inline: 10px; }
.billrow__had { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--up); }
.billrow--had { background: color-mix(in srgb, var(--up-soft) 45%, transparent); }
.is-off { opacity: .45; }
.bigtick { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-inline: auto; border-radius: 99px; background: var(--up-soft); color: var(--up); }
.bigtick svg { width: 32px; height: 32px; }
.listline { padding: 0; overflow: hidden; }
.listline__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.listline__head .billrow__pick { padding-top: 0; }
.listline__qty { display: flex; align-items: center; gap: 6px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); }
.listline__qty .input { width: 76px; min-height: 40px; padding-inline: 8px; text-align: right; }
.listline__opts { display: grid; }
.listopt { display: grid; grid-template-columns: auto 48px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.listopt:last-child { border-bottom: 0; }
.listopt input { width: 20px; height: 20px; accent-color: var(--brand); }
.listopt img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.listopt:has(input:checked) { background: var(--brand-soft); }
.listopt__body { display: grid; gap: 2px; min-width: 0; }
.listopt__body b { font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listopt__body small { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listopt__price { font-size: max(min(14px, 12px), calc(14px * var(--fs))); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.listline__none { display: flex; gap: 6px; align-items: center; margin: 0; padding: 12px 14px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.typeit summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 650; color: var(--brand); }
.typeit[open] summary { margin-bottom: 6px; }
.demand { display: grid; }
.demand__row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.demand__row:last-child { border-bottom: 0; }
.demand__row small { display: block; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); margin-top: 2px; }

/* Near-expiry clearance (pages/clearance.js): amber, distinct from the yellow flash */
.badge--exp { background: var(--warn-soft); color: var(--warn); }
.btn--exp { border-color: var(--warn); color: var(--warn); }
.pricebox__exp { display: flex; gap: 6px; align-items: flex-start; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
.clear-offer { border-color: var(--warn); }
.clear-offer__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.clear-offer__price b { font: 800 max(min(34px, 12px), calc(34px * var(--fs)))/1 var(--display); }
.clear-offer__price span { color: var(--ink-2); font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.clear-offer__cost { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: max(min(14px, 12px), calc(14px * var(--fs))); color: var(--up); }
.clear-offer__cost.is-loss { color: var(--down); }

/* Licence reader (Console → Licences) */
.lic { display: grid; gap: 12px; }
.lic__read { display: grid; gap: 10px; }
.lic__checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lic__checks li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); line-height: 1.35; }
.lic__checks svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.lic__c--pass { background: var(--up-soft); color: var(--up); }
.lic__c--warn { background: var(--warn-soft); color: var(--warn); }
.lic__c--fail { background: var(--down-soft); color: var(--down); font-weight: 650; }
.lic__dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
.lic__dl dt { color: var(--ink-3); font-size: max(min(12px, 12px), calc(12px * var(--fs))); }
.lic__dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.lic__none { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-3); }
.lic__none svg { width: 18px; height: 18px; flex: none; }

/* Chat inside an ask (pages/ask.js) — WhatsApp-simple */
.chatnote { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 0; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); text-align: center; }
.chatnote svg { width: 14px; height: 14px; flex: none; }
/* Scrolled to, a bubble clears the composer and the tabs that sit over the bottom of the screen. */
.timeline > * { scroll-margin-bottom: calc(var(--dock-b, 0px) + 84px); }
.bubble--msg { padding: 8px 12px 6px; max-width: min(82%, 420px); cursor: pointer; outline-offset: 2px; }
.bubble--msg:not(.bubble--me) { align-self: flex-start; }
.bubble__text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: max(min(15px, 12px), calc(15px * var(--fs))); line-height: 1.4; }
.bubble__photo { display: block; margin: -2px -6px 6px; }
.bubble__photo img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; }
.bubble__voice { display: block; width: 240px; max-width: 100%; height: 40px; margin-bottom: 2px; }
.bubble__meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: max(min(11.5px, 12px), calc(11.5px * var(--fs))); color: var(--ink-3); margin-top: 2px; }
.bubble__masked { display: flex; gap: 5px; align-items: center; margin: 4px 0 0; font-size: max(min(12px, 12px), calc(12px * var(--fs))); color: var(--ink-3); }
.bubble__masked svg { width: 13px; height: 13px; flex: none; }
.bubble__acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.bubble__acts[hidden] { display: none; }
.bubble__acts .chip { height: 34px; padding: 0 12px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); }
.bubble__share { display: flex; width: fit-content; gap: 6px; align-items: center; min-height: 36px; margin-top: 6px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); font-weight: 650; color: var(--wa, #128C7E); }
.bubble__share svg, .bubble__acts svg { width: 16px; height: 16px; }
.ticks { display: inline-flex; color: var(--ink-3); }
.ticks svg { width: 14px; height: 14px; }
.ticks svg + svg { margin-left: -8px; }
.ticks.is-read { color: #2F80ED; }
.icon-btn--wa { color: var(--wa, #128C7E); }
.composer { position: sticky; bottom: var(--dock-b, 0px); z-index: 10; display: flex; align-items: flex-end; gap: 6px; margin: 0 -16px; padding: 8px 10px;
  background: var(--paper); border-top: 1px solid var(--line); }
@media (min-width: 640px) { .composer { bottom: 0; margin: 0; border: 1px solid var(--line); border-radius: 16px; } }
.composer__input { flex: 1; min-width: 0; min-height: 44px; max-height: 132px; resize: none; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 400 max(min(15px, 12px), calc(15px * var(--fs)))/1.4 var(--body); }
.composer__input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.composer__btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; color: var(--ink-2); }
.composer__btn svg, .composer__send svg { width: 22px; height: 22px; }
.composer__send { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--brand); color: #fff; }
.composer:not(.has-text) > .composer__send:not([data-rsend]) { display: none; }
.composer.has-text > [data-cvoice] { display: none; }
.composer:not(:has([data-cvoice])) > .composer__send { display: grid; }
.composer.is-rec > :not(.composer__recbar) { display: none; }
.composer__recbar { flex: 1; display: flex; align-items: center; gap: 8px; }
.composer__recbar[hidden] { display: none; }
.composer__rec { flex: 1; display: flex; align-items: center; gap: 8px; font-size: max(min(15px, 12px), calc(15px * var(--fs))); color: var(--ink-2); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--down); animation: recblink 1s ease-in-out infinite; }
@keyframes recblink { 50% { opacity: .25; } }
.li__chat { display: flex; gap: 4px; align-items: center; min-width: 0; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-2); }
.li__chat > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.li--unread .li__chat { color: var(--ink); font-weight: 650; }
.unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--up); color: #fff; font: 700 max(min(12px, 12px), calc(12px * var(--fs)))/1 var(--body); }
.seg__dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--up); vertical-align: middle; }
.plancard__note { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: max(min(13px, 12px), calc(13px * var(--fs))); line-height: 1.4; color: var(--ink-3); }
.plancard__note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* Public pricing page (pages/pricing.js) and the plans on the homepage */
.hero--slim { padding-bottom: 36px; }
.hero--slim h1 { font-size: max(12px, calc(clamp(32px, 7vw, 54px) * var(--fs))); }
.inclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.inclist li { display: flex; gap: 10px; align-items: flex-start; font-size: max(min(15.5px, 12px), calc(15.5px * var(--fs))); line-height: 1.4; }
.inclist svg { width: 20px; height: 20px; flex: none; color: var(--up); margin-top: 1px; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: max(min(16px, 12px), calc(16px * var(--fs))); line-height: 1.45; color: var(--ink-2); }
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.faq summary { min-height: 48px; padding: 12px 16px; cursor: pointer; font-weight: 650; font-size: max(min(15.5px, 12px), calc(15.5px * var(--fs))); display: flex; align-items: center; }
.faq details p { margin: 0; padding: 0 16px 14px; color: var(--ink-2); font-size: max(min(15px, 12px), calc(15px * var(--fs))); line-height: 1.5; }
.lplans { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.lplans a { display: grid; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: inherit; }
.lplans a:hover { border-color: var(--brand); }
.lplans b { font: 800 max(min(26px, 12px), calc(26px * var(--fs)))/1 var(--display); }
.lplans span { color: var(--ink-3); font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.hero__link { color: #fff; }
@media (max-width: 420px) { .hero__link { display: none; } }
/* A visitor's top bar on a phone: Madad and Sign in fit; search and Join free are on the page itself
   (the feed's search box, Sign in → Join free, the hero's big Join free). */
@media (max-width: 459px) { .topbar__wide, .hero__join { display: none; } }
/* Footer links are tap targets too */
.lfoot a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Madad (help assistant, lib/madad.js) ---------- */
/* The way into Madad: a yellow labelled pill, the same yellow as the logo's dots, so nobody has to guess what a "?"
   means. It pulses until Madad has been opened once on this phone; .madad-tip is the one-time bubble under it. */
.madad-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border: 0; border-radius: 99px;
  background: #FCEFB4; color: #2A2200; font: 700 max(min(14px, 12px), calc(14px * var(--fs)))/1 var(--body); white-space: nowrap; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(42, 34, 0, .14); }
.madad-btn svg { width: 19px; height: 19px; flex: none; }
.madad-btn:hover { background: #F8E58A; }
.madad-btn--new { animation: madadPulse 2s ease-out infinite; }
@keyframes madadPulse { 0% { box-shadow: inset 0 0 0 1px rgba(42,34,0,.14), 0 0 0 0 rgba(246, 200, 40, .75); }
  70% { box-shadow: inset 0 0 0 1px rgba(42,34,0,.14), 0 0 0 10px rgba(246, 200, 40, 0); }
  100% { box-shadow: inset 0 0 0 1px rgba(42,34,0,.14), 0 0 0 0 rgba(246, 200, 40, 0); } }
@media (max-width: 374px) { .madad-btn { padding: 0 10px 0 8px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); gap: 4px; } }
.madad-tip { position: fixed; z-index: 40; width: min(280px, calc(100vw - 24px)); display: flex; align-items: flex-start;
  background: #FCEFB4; color: #2A2200; border-radius: 14px; box-shadow: 0 10px 30px rgba(20, 16, 0, .22); animation: tipIn .25s ease-out; }
.madad-tip::before { content: ''; position: absolute; top: -7px; left: calc(var(--arrow, 50%) - 8px); border: 8px solid transparent;
  border-top: 0; border-bottom-color: #FCEFB4; }
.madad-tip__body { flex: 1; text-align: left; border: 0; background: none; color: inherit; padding: 12px 0 12px 14px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.madad-tip__body b { font-size: max(min(15px, 12px), calc(15px * var(--fs))); }
.madad-tip__body span { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); line-height: 1.35; }
.madad-tip__x { width: 40px; height: 40px; color: #2A2200; flex: none; }
@keyframes tipIn { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .madad-btn--new, .madad-tip { animation: none; } }
.sheet--madad .sheet__body { gap: 12px; min-height: min(70vh, 560px); }
.madad__intro { display: flex; gap: 8px; align-items: flex-start; font-size: max(min(14px, 12px), calc(14px * var(--fs))); margin: 0; }
.madad__intro svg { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 1px; }
.madad__log { display: flex; flex-direction: column; gap: 8px; }
.madad__log:empty { display: none; }
.madad__a { background: var(--surface-2); border-color: transparent; cursor: default; }
.madad__a--err { background: var(--down-soft, var(--surface-2)); }
.madad__typing { padding: 10px 14px; }
.madad__bar { display: flex; gap: 8px; align-items: flex-end; margin-top: auto; position: sticky; bottom: 0; background: var(--surface); padding-top: 6px; }
.madad__input { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 10px 12px; font-size: max(min(16px, 12px), calc(16px * var(--fs))); }
.madad__mic, .madad__send { width: 44px; height: 44px; flex: none; border-radius: 99px; }
.madad__mic { background: var(--brand-soft); color: var(--brand); }
.madad__send { background: var(--brand); color: #fff; }
.madad__voice { display: flex; gap: 8px; align-items: center; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-3); }
.madad__voice:empty { display: none; }

/* Madad picture guides: swipeable steps, each a real screen with the tap target marked (public/help/). */
.madad__guide { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.madad__gtitle { display: flex; gap: 6px; align-items: center; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.madad__gtitle svg { width: 16px; height: 16px; color: var(--brand); }
.madad__steps { list-style: none; margin: 0 -12px; padding: 0 12px 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.madad__step { position: relative; flex: 0 0 min(74%, 240px); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.madad__step p { margin: 0; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); line-height: 1.35; }
.madad__n { position: absolute; top: 12px; left: 12px; z-index: 1; width: 24px; height: 24px; border-radius: 99px; background: var(--brand); color: #fff; font-size: max(min(13px, 12px), calc(13px * var(--fs))); font-weight: 700; display: grid; place-items: center; }
.madad__shot { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; display: block; }
.madad__shot img { display: block; width: 100%; aspect-ratio: 390 / 460; object-fit: cover; background: var(--surface-2); }
.madad__step:not(:has(.madad__shot)) p { padding-top: 30px; }
.madad__zoom { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.madad__zoom::backdrop { background: rgba(10, 12, 24, .82); }
.madad__zoom img { display: block; max-width: min(96vw, 520px); max-height: 88vh; border-radius: 14px; }
.madad__zoom .icon-btn { position: fixed; top: 12px; right: 12px; background: rgba(255,255,255,.9); }

/* ---------- Market list (pages/quick.js) and Requirements (pages/needs.js) ---------- */
.qrow { display: grid; grid-template-columns: 52px 1fr; gap: 10px 12px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.qrow--mine { border-color: var(--up); }
.qrow__pic { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.qrow__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qrow__name { font-size: max(min(15.5px, 12px), calc(15.5px * var(--fs))); line-height: 1.25; }
.qrow__sub { font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); }
.qrow__state { display: flex; gap: 4px; align-items: center; font-size: max(min(13px, 12px), calc(13px * var(--fs))); font-weight: 600; color: var(--up); }
.qrow__state svg { width: 14px; height: 14px; }
.qrow__form, .qrow__unhide { grid-column: 1 / -1; }
.qrow__form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.qrow__f { display: flex; flex-direction: column; gap: 3px; font-size: max(min(12px, 12px), calc(12px * var(--fs))); font-weight: 600; color: var(--ink-3); }
.qrow__f .input { min-height: 40px; padding: 8px 10px; font-size: 16px; }
.qrow__acts { grid-column: 1 / -1; display: flex; gap: 8px; }
.qrow__acts .btn { flex: 1; }
.qrow__unhide { justify-self: start; }
.qrow__more { grid-column: 1 / -1; justify-self: start; margin-top: -4px; }
.needcard { display: block; color: inherit; text-decoration: none; }
.needcard:hover { border-color: var(--line-strong); }
.needcard__text { display: block; font-size: max(min(17px, 12px), calc(17px * var(--fs))); line-height: 1.3; overflow-wrap: anywhere; }
.needcard__meta { margin-top: 4px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-2); }
.needcard__who { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
.needcard__who svg { width: 15px; height: 15px; color: var(--brand); }
.needcard__pic { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }

/* ---------- Stock file se maal (pages/stockFile.js) ---------- */
.cardh { margin: 0; font-size: max(min(17px, 12px), calc(17px * var(--fs))); display: flex; gap: 8px; align-items: center; }
.cardh svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
.howto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: howto; }
.howto li { position: relative; padding-left: 44px; display: flex; flex-direction: column; gap: 2px; counter-increment: howto; }
.howto li::before { content: counter(howto); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font: 800 max(min(15px, 12px), calc(15px * var(--fs)))/30px var(--display); text-align: center; }
.howto b { font-size: max(min(15.5px, 12px), calc(15.5px * var(--fs))); }
.howto span { font-size: max(min(14px, 12px), calc(14px * var(--fs))); color: var(--ink-3); line-height: 1.4; }
.srow__head { padding: 12px 14px 4px; font: 700 max(min(13px, 12px), calc(13px * var(--fs))) var(--body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: start; }
.srow:last-child { border-bottom: 0; }
.srow__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.srow__body b { font-size: max(min(15px, 12px), calc(15px * var(--fs))); overflow-wrap: anywhere; }
.srow__body span { font-size: max(min(13px, 12px), calc(13px * var(--fs))); }
.srow__nums { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); }
.srow__nums b { color: var(--ink); }
.srow > .badge { grid-column: 2; grid-row: 1; }

/* ---------- B.Meet.B master: product suggestions under "Product name" (pages/productForm.js) ---------- */
.mwrap { position: relative; }
.mlist { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 25; max-height: min(60vh, 420px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-strong, var(--line)); border-radius: 14px; box-shadow: 0 14px 36px rgba(10, 14, 40, .18); }
.mrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px;
  border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; cursor: pointer; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover, .mrow:focus-visible { background: var(--surface-2); }
.mrow img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.mrow__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mrow__body b { font-size: max(min(15px, 12px), calc(15px * var(--fs))); overflow-wrap: anywhere; }
.mrow__body .muted { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.mrow__salt, .qrow__salt { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--brand); overflow-wrap: anywhere; }

/* ---------- Master list (pages/admin/catalog.js) ---------- */
@media (min-width: 900px) { .kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis--4 .kpi b { font-size: max(min(24px, 12px), calc(24px * var(--fs))); }
.mtools { align-items: start; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3, var(--surface-2)); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s; }
.mrowc { align-items: start; }
.mphoto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px; border-radius: 12px; background: var(--warn-soft); font-size: max(min(13px, 12px), calc(13px * var(--fs))); }
.mphoto img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }


/* ---------- Where you are: country → state → district → town / village (lib/place.js) ---------- */
.placebox { display: flex; flex-direction: column; gap: inherit; }
.placebox .muted { font-weight: 400; }
.prow { grid-template-columns: 36px minmax(0, 1fr); }
.prow__ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--brand); }
.prow__ico svg { width: 18px; height: 18px; }
.plist__note { margin: 0; padding: 12px 14px; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--muted); }
.meant { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--brand-soft, var(--surface-2)); font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.meant svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.needcard__item { display: inline-flex; gap: 4px; align-items: center; margin-top: 2px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--up); }
.needcard__item svg { width: 14px; height: 14px; }
.linkbtn { display: inline-flex; gap: 6px; align-items: center; padding: 6px 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: max(min(14px, 12px), calc(14px * var(--fs))); cursor: pointer; }
.linkbtn svg { width: 16px; height: 16px; }
.btn--wrap { white-space: normal; text-align: center; line-height: 1.3; max-width: 100%; }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }

/* ---------- Delivery after the deal (pages/ask.js, pages/track.js) ---------- */
.status--d-accepted { background: var(--warn-soft); color: var(--warn); }
.status--d-packed, .status--d-out { background: var(--brand-soft); color: var(--brand-strong, var(--brand)); }
.status--d-delivered { background: var(--up-soft); color: var(--up); }
.delivery { gap: 14px; }
.delivery__h { display: flex; gap: 8px; align-items: center; font-size: max(min(18px, 12px), calc(18px * var(--fs))); }
.delivery__h svg { width: 20px; height: 20px; color: var(--brand); }
.dsteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.dsteps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 14px; color: var(--ink-3); }
.dsteps li:last-child { padding-bottom: 0; }
.dsteps li:not(:last-child)::before { content: ''; position: absolute; left: 12px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.dsteps li.is-done:not(:last-child)::before { background: var(--up); }
.dsteps__dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong, var(--line)); display: grid; place-items: center; background: var(--surface); }
.dsteps li.is-done .dsteps__dot { background: var(--up); border-color: var(--up); color: #fff; }
.dsteps li.is-now .dsteps__dot { box-shadow: 0 0 0 4px var(--up-soft); }
.dsteps__dot svg { width: 14px; height: 14px; }
.dsteps li > span:last-child { display: flex; flex-direction: column; padding-top: 3px; }
.dsteps li.is-done > span:last-child { color: var(--ink); }
.dsteps small { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); }
.dfact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.dfact > svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.dfact > span { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.dcode { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; border-radius: 14px; background: var(--brand-soft); text-align: center; }
.dcode b { font-size: max(min(34px, 12px), calc(34px * var(--fs))); letter-spacing: .3em; padding-left: .3em; color: var(--ink); }
.dcode small { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); }
.track h1 { display: flex; gap: 8px; align-items: center; }
.track h1 svg { width: 24px; height: 24px; color: var(--brand); }

/* ---------- Udhaar khata (pages/khata.js) ---------- */
.krow { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.krow__meta { font-size: max(min(13px, 12px), calc(13px * var(--fs))); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 0 4px; align-items: center; }
.krow__meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.krow__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex-shrink: 0; }
.krow__right b { font-size: max(min(17px, 12px), calc(17px * var(--fs))); }
.krow__warn { color: var(--down); font-weight: 700; }
.kparty__name { font-size: max(min(22px, 12px), calc(22px * var(--fs))); margin: 0 0 2px; overflow-wrap: anywhere; }
.kparty__acts .btn { width: 100%; }
.kentries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kentry { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.kentry--void { opacity: .55; }
.kentry--void b.num { text-decoration: line-through; }
.kentry__ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.kentry__ico svg { width: 16px; height: 16px; }
.kentry__ico--sale { background: var(--warn-soft); color: var(--warn); }
.kentry__ico--payment { background: var(--up-soft); color: var(--up); }
.kentry__meta { font-size: max(min(13px, 12px), calc(13px * var(--fs))); margin-top: 2px; }
.kentry__note { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); margin-top: 4px; color: var(--ink-2); }
.kentry__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.kentry__plus { color: var(--warn); }
.kentry__minus { color: var(--up); }

/* ---------- Order book (pages/orders.js) ---------- */
.orow { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; width: 100%; }
.orow__top { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; }
.orow__top b { overflow-wrap: anywhere; }
.orow__meta { font-size: max(min(13px, 12px), calc(13px * var(--fs))); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
.orow__meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.orow__warn { color: var(--warn); font-weight: 700; }
.oline { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.oline.is-off { opacity: .55; }
.oline__head { display: flex; gap: 10px; align-items: flex-start; }
.oline__asked { display: block; overflow-wrap: anywhere; }
.oline__nums { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.oline__nums label { display: flex; flex-direction: column; gap: 4px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); min-width: 0; }
.oline__nums .input { min-width: 0; }
.oline__amt { min-width: 76px; text-align: right; padding-bottom: 12px; font-size: max(min(16px, 12px), calc(16px * var(--fs))); }
.oline__foot { gap: 8px; flex-wrap: wrap; align-items: center; }
.oline__short { display: inline-flex; gap: 8px; align-items: center; font-size: max(min(14px, 12px), calc(14px * var(--fs))); color: var(--ink-2); min-height: 32px; }
.oorder__total { padding: 12px; border-top: 2px solid var(--line-strong); font-size: max(min(17px, 12px), calc(17px * var(--fs))); }
.olist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.olist li { display: flex; gap: 10px; align-items: baseline; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.olist li.is-short { color: var(--ink-3); text-decoration: line-through; }
.olist li.is-short b { text-decoration: none; font-weight: 600; }
.omsg { white-space: pre-wrap; font: max(min(14px, 12px), calc(14px * var(--fs)))/1.5 var(--body); margin: 10px 0 0; overflow-wrap: anywhere; }
.kpi small { display: block; font-size: max(min(13px, 12px), calc(13px * var(--fs))); }
.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis--3 .kpi { padding: 12px; }
.kpis--3 .kpi span { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); line-height: 1.25; display: block; }
.kpis--3 .kpi b { font-size: max(min(22px, 12px), calc(22px * var(--fs))); }
.omsgbox > summary { padding-block: 9px; cursor: pointer; }

/* ---------- Quotations (pages/quotes.js) ---------- */
.banner--ok { background: var(--up-soft); color: inherit; text-decoration: none; }
.banner--ok svg { color: var(--up); }
a.banner { color: inherit; text-decoration: none; }
.qline__nums { display: grid; grid-template-columns: 1fr 1fr 84px auto; gap: 8px; align-items: end; }
.qline__nums label, .qline__more label { display: flex; flex-direction: column; gap: 4px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); color: var(--ink-3); min-width: 0; }
.qline__nums .input, .qline__nums .select, .qline__more .input { min-width: 0; }
.qline__more { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.qdoc .olist li { align-items: flex-start; }
.qdoc__meta { display: block; margin-top: 2px; }
.qdoc__tot { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 2px solid var(--line-strong); font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.qdoc__grand { font-size: max(min(18px, 12px), calc(18px * var(--fs))); padding-top: 4px; }
.qterms { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
@media (max-width: 380px) { .qline__nums { grid-template-columns: 1fr 1fr 76px; } .qline__nums .oline__amt { grid-column: 1 / -1; text-align: right; padding: 0; } }
.qdock { flex-direction: column; gap: 8px; }
.qdock__sum { align-items: baseline; gap: 10px; }
.qdock__sum b { font-size: max(min(20px, 12px), calc(20px * var(--fs))); }
.qdock__btns { display: flex; gap: 8px; }
.qdock__btns .btn { flex: 1 1 0; min-width: 0; }
.qdock__btns .btn { white-space: normal; line-height: 1.15; text-align: center; }

/* ---------- Signature pad (lib/signpad.js) ---------- */
.signpad { position: relative; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: #fff; overflow: hidden; }
.signpad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.signpad__hint { position: absolute; inset: 0; display: grid; place-items: center; color: #8a90a6; font-size: max(min(14px, 12px), calc(14px * var(--fs))); pointer-events: none; }

/* ---------- Machines & AMC (pages/equipment.js) ---------- */
.eqphotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eqphotos figure { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.eqphotos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eqphotos figure .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; }
.eqphotos__add { aspect-ratio: 4 / 3; border: 1.5px dashed var(--line-strong); border-radius: 10px; background: var(--surface); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font: 600 max(min(13px, 12px), calc(13px * var(--fs)))/1.2 var(--body); color: var(--ink-2); }
.eqphotos__add svg { width: 22px; height: 22px; }
.eqphotos--view a { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; }
.eqcheck { display: flex; gap: 10px; align-items: center; min-height: 36px; font-size: max(min(15px, 12px), calc(15px * var(--fs))); }
.eqcheck input { width: 20px; height: 20px; }
.eqdl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.eqdl dt { color: var(--ink-3); }
.eqdl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.eqchecks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); color: var(--ink-3); }
.eqchecks li { display: flex; gap: 8px; align-items: center; }
.eqchecks li svg { width: 16px; height: 16px; }
.eqchecks li.is-done { color: var(--ink); }
.eqchecks li.is-done svg { color: var(--up); }
.eqsig { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.eqsig img { width: 150px; height: 50px; object-fit: contain; background: #fff; border-radius: 8px; flex: none; }

/* ---------- Staff (pages/staff.js) ---------- */
.srow__ico, .odeliv__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); }
.srow__ico svg, .odeliv__ico svg { width: 20px; height: 20px; }
.srow { display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none; }
.srow__name { font-size: max(min(16px, 12px), calc(16px * var(--fs))); min-width: 0; overflow-wrap: anywhere; }
.srow--left { opacity: .62; }
.skpis .kpi b { font-size: max(12px, calc(clamp(17px, 5.2vw, 24px) * var(--fs))); overflow-wrap: anywhere; }
.sperms { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sperms legend { font: 650 max(min(14px, 12px), calc(14px * var(--fs)))/1.3 var(--body); color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.sperm { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.sperm:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.sperm input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--brand); }
.sperm__ico { color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
.sperm__ico svg { width: 18px; height: 18px; }
.sperm b { display: block; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); }
.sperm small { display: block; color: var(--ink-3); font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); line-height: 1.3; margin-top: 2px; }
.sdetails { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.sdetails summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.sdetails[open] summary { margin-bottom: 10px; }
.scomm { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .scomm { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.slines { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sline { padding: 9px 12px; gap: 10px; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); border-top: 1px solid var(--line); }
.sline:first-child { border-top: 0; }
.sline small { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.sline--sum { background: var(--surface-2); font-weight: 650; }
.sline--total { background: var(--brand-soft); font-size: max(min(16px, 12px), calc(16px * var(--fs))); font-weight: 700; }
.sline--total b { color: var(--brand); }
.sel--sm { width: auto; min-height: 38px; padding-block: 6px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.spw__pw { font-size: max(min(20px, 12px), calc(20px * var(--fs))); letter-spacing: .04em; }
.chip--on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.oassign { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); }
.oassign.is-on { border-color: var(--brand); background: var(--brand-soft); }
.oassign svg { width: 18px; height: 18px; flex-shrink: 0; }

/* GST bill form (pages/bills.js): each order line with GST %, HSN, batch and expiry */
.blines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bline { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.bline b { min-width: 0; overflow-wrap: anywhere; }
.bline__f { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.bline__f label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); min-width: 0; }
.bline__f label.has-err .input, .bline__f label.has-err .select { border-color: var(--down); }
.bline__f .field__err { font-size: max(min(12px, 12px), calc(12px * var(--fs))); }
.input--sm { min-height: 38px; padding-block: 6px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.bline__f .select, .bline__f .input { width: 100%; min-width: 0; }

/* Stock register (pages/stock.js) */
a.kpi { color: inherit; text-decoration: none; }
.kpi--warn { border-color: var(--warn); background: linear-gradient(160deg, var(--warn-soft), var(--surface) 70%); }
.kentry--out { color: var(--down); }
.sin__f { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.sin__f label { display: grid; gap: 4px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); min-width: 0; }
.sin__f label.has-err .input { border-color: var(--down); }
.sin__f .field__err { font-size: max(min(12px, 12px), calc(12px * var(--fs))); }
.sin__f .input { width: 100%; }
.sugg { display: grid; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.sugg__row { display: flex; gap: 6px; align-items: center; min-height: 44px; padding: 8px 12px; text-align: left; background: none; border: 0;
  border-top: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; flex-wrap: wrap; }
.sugg__row:first-child { border-top: 0; }
.sugg__row:hover { background: var(--surface-2); }
.sugg__new { color: var(--brand); font-weight: 600; }
.sugg__new svg { width: 16px; height: 16px; }

/* Network (pages/network.js) */
.netqr { width: 132px; height: 132px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 4px; flex: none; }
.netlink { display: block; font-size: max(min(13px, 12px), calc(13px * var(--fs))); padding: 6px 10px; border-radius: 8px; background: var(--surface-2); overflow-wrap: anywhere; }

/* Reports (pages/reports.js) */
.rep__sub { padding-left: 26px; color: var(--ink-3); font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); }
.rep__link { color: inherit; text-decoration: none; }
.rep__day { display: grid; grid-template-columns: 92px 1fr auto 70px; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.rep__dname { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); color: var(--ink-2); }
.rep__bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.rep__bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; min-width: 2px; }
.rep__day small { text-align: right; }
.text-down { color: var(--down); }

/* Supplier khata (pages/suppliers.js) */
.kentry--in { color: var(--up); }
.rline.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }

/* ---------- credit notes + GSTR-1 (P12) ---------- */
.bline.is-off { opacity: .55; }
.bline__left { align-self: end; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); padding-bottom: 12px; }
.gsec summary { gap: 10px; }
.gsec summary .grow { display: grid; gap: 2px; min-width: 0; }
.gsec summary small { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.gsec .slines { margin-top: 2px; }

/* ---------- party rates + the customer's order link (P13) ---------- */
.plcard { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; color: inherit; text-decoration: none; }
.pllist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plrow { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.plrow.is-on { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.plrow b { overflow-wrap: anywhere; }
.plrow small { display: block; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.plrow__rate { font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); margin-top: 2px; }
.qstep { display: flex; align-items: center; flex: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qstep__btn { width: 40px; height: 44px; border: 0; background: var(--paper); font: 700 max(min(20px, 12px), calc(20px * var(--fs)))/1 var(--body); color: var(--ink); cursor: pointer; }
.qstep__btn:disabled { color: var(--ink-3); opacity: .5; }
.qstep__in { width: 48px; height: 44px; border: 0; text-align: center; font: 600 max(min(16px, 12px), calc(16px * var(--fs)))/1 var(--body); background: var(--surface); color: var(--ink); -moz-appearance: textfield; }
.qstep__in::-webkit-outer-spin-button, .qstep__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.plfix { display: grid; gap: 4px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); width: 104px; flex: none; }
.plink { padding: 10px 12px; border-radius: 12px; background: var(--paper); font-size: max(min(13px, 12px), calc(13px * var(--fs))); overflow-wrap: anywhere; }
.pldue { padding: 8px 10px; border-radius: 12px; background: var(--warn-soft); gap: 8px; align-items: center; }
.plok { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--up-soft); color: var(--up); margin: 0 auto; }
.plok svg { width: 28px; height: 28px; }

/* ---------- counter bill (P14) ---------- */
.cscan { display: flex; gap: 8px; }
.cscan .input { flex: 1; min-width: 0; font-size: 17px; }
.cscan__cam { flex: none; width: 52px; padding: 0; }
.cfound { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cfound__btn { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); font: inherit; cursor: pointer; min-height: 48px; }
.cfound__btn small { display: block; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.cempty { display: grid; place-items: center; gap: 6px; padding: 22px 12px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--ink-3); text-align: center; }
.cempty svg { width: 28px; height: 28px; }
.cempty p { margin: 0; }
.crate { width: 92px; }
.ccust { flex: 1; min-width: 0; justify-content: flex-start; }
.ctoday { font-size: max(min(13px, 12px), calc(13px * var(--fs))); white-space: nowrap; }
.cvideo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: #000; }
.ccust__name { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- insights (P15) ---------- */
.text-up { color: var(--up); }
.inlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inrow { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.inrow b { overflow-wrap: anywhere; }
.inrow small { display: block; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.inrow.is-loss { box-shadow: inset 3px 0 0 var(--down); }
.inrow.is-thin { box-shadow: inset 3px 0 0 var(--warn); }
.inrow__right { flex: none; display: grid; justify-items: end; gap: 2px; text-align: right; }

/* ---------- parcel delivery (lib/parcel.js) ---------- */
.seg--wrap { flex-wrap: wrap; }
.seg--wrap button { flex: 1 1 40%; }
.parcel__text { margin: 0; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); background: var(--surface); padding: 10px 12px; border-radius: 10px; }
.kparty__papers { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: max(min(14px, 12px), calc(14px * var(--fs))); margin-top: 4px; }
.oline__nums--scheme { margin-top: -2px; }
.oline__scheme { align-self: center; white-space: nowrap; }
.parcel__quote { font-size: max(min(17px, 12px), calc(17px * var(--fs))); padding: 10px 14px; border-radius: 12px; background: var(--surface-2, var(--brand-soft)); }
.porow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.porow:last-child { border-bottom: 0; }
.poqty { width: 84px; flex: none; text-align: right; }
.banner--danger { background: var(--down-soft); }
.banner--danger svg { color: var(--down); }
.krow--line { min-height: 44px; }
/* Salesman routes (P22): numbered shops, done ones dimmed */
.rstop__n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: max(min(14px, 12px), calc(14px * var(--fs))); }
.rshops { list-style: none; margin: 0; padding: 0; }
.rshop { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.rshop.is-done { opacity: .72; }
.rshop.is-done .rstop__n { background: var(--up); color: #fff; }
.rshop .krow__right { flex-direction: row; align-items: center; }
.rstops .btn--icon { width: 40px; min-width: 40px; padding: 0; }
.rvisits { list-style: none; margin: 0; padding: 0; }
.rvisits .krow__right { color: inherit; text-decoration: none; }
.rfield { border: 0; padding: 0; margin: 0; min-width: 0; }
.rfield legend { font: 650 max(min(14px, 12px), calc(14px * var(--fs)))/1.2 var(--body); color: var(--ink); padding: 0; margin-bottom: 8px; }
/* Delivery balance */
.wbal__amt { font: 800 max(min(34px, 12px), calc(34px * var(--fs)))/1.1 var(--display); }
.wlist { list-style: none; margin: 0; padding: 0; }
.wlist .krow__meta a { display: inline-flex; align-items: center; min-height: 32px; }

/* ---------- dhandhe (server/verticals.js) and the Event pack: bookings, kiraya, menu, the ready list ---------- */
.roles--one { grid-template-columns: minmax(0, 1fr); }
.switch--inline { padding: 6px 10px; align-items: center; background: transparent; }
.bcal { gap: 10px; display: grid; }
.bcal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bterms > summary { padding-block: 8px; cursor: pointer; }
.bcal__wd { text-align: center; overflow: hidden; text-overflow: clip; white-space: nowrap; font-size: max(min(11.5px, 12px), calc(11.5px * var(--fs))); color: var(--ink-3); font-weight: 650; }
.bcal__day { position: relative; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: grid; place-items: center; padding: 2px; color: var(--ink-2); }
.bcal__day.has { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); font-weight: 750; }
.bcal__day.is-today { outline: 2px solid var(--yellow); outline-offset: -2px; }
.bcal__day.is-on { background: var(--brand); color: var(--brand-ink); }
.bcal__dots { display: flex; gap: 2px; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); }
.bcal__dots i { width: 5px; height: 5px; border-radius: 99px; background: var(--brand); }
.bcal__dots i.q { background: var(--warn); }
.bcal__day.is-on .bcal__dots i { background: var(--brand-ink); }
.bdate { flex: none; display: grid; place-items: center; width: 48px; min-height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong, var(--brand)); line-height: 1; }
.bdate b { font: 800 max(min(20px, 12px), calc(20px * var(--fs)))/1 var(--display); }
.bdate small { font-size: max(min(11.5px, 12px), calc(11.5px * var(--fs))); font-weight: 700; text-transform: uppercase; }
.brow { gap: 12px; align-items: center; }
.bline { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; background: var(--surface); }
.bline__top { display: flex; gap: 8px; align-items: center; min-width: 0; }
.bline__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bline__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; align-items: end; }
.bline__nums label { display: grid; gap: 4px; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); font-weight: 650; }
.bline__nums .input { min-width: 0; }
.bline__amt { justify-self: end; font-weight: 750; padding-bottom: 10px; }
.bsum { border-top: 1px dashed var(--line-strong); padding-top: 8px; }
.bfacts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); }
.bfacts > span { display: inline-flex; gap: 6px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.bfacts svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.bmoney { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .bmoney { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bmoney > div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: grid; gap: 2px; min-width: 0; }
.bmoney > div > span { font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); color: var(--ink-3); font-weight: 650; }
.bmoney > div > b { font: 800 max(min(19px, 12px), calc(19px * var(--fs)))/1.15 var(--display); }
.bmoney > .is-due { background: var(--warn-soft); }
.bprofit { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding-top: 8px; border-top: 1px dashed var(--line-strong); color: var(--ink-2); }
.neg { color: var(--down); }
.matlist { list-style: none; margin: 0; padding: 0; display: grid; }
.matlist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.matlist li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.matlist li:last-child { border-bottom: 0; }
.pickrow { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); min-height: 56px; }
.pickrow b { display: block; overflow-wrap: anywhere; }
.pickrow small { display: block; }
.pickrow > .grow { min-width: 0; }
.pickrow > svg { flex: none; color: var(--brand); }
.pickrow.is-added { background: var(--up-soft); border-color: var(--up); }
.pickrow input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.pickrow__img { flex: none; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); }
.pickrow__img img { width: 100%; height: 100%; object-fit: cover; }
.pickrow__qty { width: 96px; flex: none; }
.pickrow--card { gap: 12px; text-align: left; width: 100%; color: var(--ink); }
.starterbox { border: 1.5px dashed var(--brand); background: var(--brand-soft); }
.starter-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.starter-strip:empty { display: none; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.starter-card { display: grid; gap: 4px; text-align: left; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); min-width: 0; }
.starter-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.starter-card b { display: block; font-size: max(min(13.5px, 12px), calc(13.5px * var(--fs))); line-height: 1.25; overflow-wrap: anywhere; }
.starter-card small { color: var(--ink-3); }
.starter-card.is-mine { opacity: .6; }
.starter-h { margin: 6px 0 0; font-size: max(min(14.5px, 12px), calc(14.5px * var(--fs))); color: var(--ink-2); }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) 84px 76px 40px; gap: 6px; align-items: center; }
.seg--wrap { flex-wrap: wrap; }
.seg--wrap button { flex: 1 1 auto; min-width: 30%; }
.credit { margin: 4px 0 0; font-size: max(min(11.5px, 12px), calc(11.5px * var(--fs))); }
.sphoto__now { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.sphoto__cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.sphoto__cand { display: grid; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-3); text-align: left; }
.sphoto__cand img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
@media print { .topbar, .tabs, .sidenav, .madad-btn, .bslip .btn, .back { display: none !important; } .bslip { box-shadow: none; border: 0; } }

/* ---------- homepage moods (server/verticals.js → theme; pages/landing.js) ----------
   Each dhandha's homepage has its own feeling: the medicines one keeps its trust-blue ledger; the shaadi one is a
   maroon-and-marigold doorway with a genda toran, diyas and a wedding card; the electronics one is a night-blue board
   with current running through its circuits. Colours come from the registry as --m-* on .landing. */
@font-face { font-family: "Yatra One"; font-weight: 400; font-display: swap; src: url(/fonts/yatra-one-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20B9; }
@font-face { font-family: "Yatra One"; font-weight: 400; font-display: swap; src: url(/fonts/yatra-one-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: Rajdhani; font-weight: 600; font-display: swap; src: url(/fonts/rajdhani-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Rajdhani; font-weight: 700; font-display: swap; src: url(/fonts/rajdhani-latin-700-normal.woff2) format('woff2'); }

.hero__join { background: #FCEFB4; color: #2A2200; }
.lsec--alt { background: var(--surface); }
.landing[data-mood] { --m-ink: var(--m-hero2); }
:root[data-theme="dark"] .landing[data-mood] { --m-ink: var(--m-accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .landing[data-mood] { --m-ink: var(--m-accent); } }
.landing[data-mood] .hero { background: radial-gradient(90% 70% at 88% 6%, color-mix(in srgb, var(--m-glow) 42%, transparent), transparent 62%), linear-gradient(165deg, var(--m-hero2) 0%, var(--m-hero) 62%); }
.landing[data-mood] .hero__in > div:first-child > .eyebrow { color: var(--m-gold) !important; }
.landing[data-mood] .hero h1 em { color: var(--m-accent); }
.landing[data-mood] .hero__join, .landing[data-mood] .hero__ctas .btn--primary { background: var(--m-accent); color: var(--m-accent-ink); }
.landing[data-mood] .hero__ctas .btn--primary:hover { background: color-mix(in srgb, var(--m-accent) 82%, #fff); }
.landing[data-mood] .hero__ctas .btn--ghost, .landing[data-mood] .hero__nav .btn--ghost { border-color: color-mix(in srgb, var(--m-gold) 55%, transparent); }
.landing[data-mood] .dswitch { background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m-gold) 25%, transparent); }
.landing[data-mood] .dswitch a[aria-current="page"] { background: var(--m-accent); color: var(--m-accent-ink); }
.landing[data-mood] .hero__proof b { color: var(--m-gold); }
.landing[data-mood] .ticker__tag { background: var(--m-hero); color: var(--m-gold); }
.landing[data-mood] .lsec .eyebrow { color: var(--m-ink); }
.landing[data-mood] .lsec--alt { background: color-mix(in srgb, var(--m-accent) 8%, var(--surface)); }
.landing[data-mood] .aud__card { border-top: 3px solid var(--m-accent); }
.landing[data-mood] .aud__card > svg { width: 44px; height: 44px; padding: 8px; border-radius: 14px; color: var(--m-ink); background: color-mix(in srgb, var(--m-accent) 18%, transparent); }
.landing[data-mood] .aud__card--note { border-top-style: dashed; }
.landing[data-mood] .how li::before { background: var(--m-hero); color: var(--m-gold); }
.landing[data-mood] .install-card { background: linear-gradient(160deg, var(--m-hero2), var(--m-hero)); color: #fff; }
.landing[data-mood] .install-card .btn { background: var(--m-accent); color: var(--m-accent-ink); }
.landing[data-mood] [data-install-slot] .btn--primary { background: var(--m-hero); color: #fff; }
.landing[data-mood] .lplans a:hover { border-color: var(--m-accent); }

/* Shaadi: maroon, marigold and gold — a toran over the door, rangoli dots, a slow mandala, diyas and a wedding card. */
.landing[data-mood="festive"] .hero { padding-top: clamp(104px, 9.6vw, 150px); }
.landing[data-mood] .hero__nav, .landing[data-mood] .hero__in { z-index: 1; }
.landing[data-mood="festive"] .hero::before { background-image: radial-gradient(circle, color-mix(in srgb, var(--m-gold) 30%, transparent) 1.3px, transparent 1.9px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(110% 80% at 85% 35%, #000 15%, transparent 72%); mask-image: radial-gradient(110% 80% at 85% 35%, #000 15%, transparent 72%); }
.landing[data-mood="festive"] .hero::after { content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: 40px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--m-gold) 16%, transparent) 0 5deg, transparent 5deg 12deg);
  -webkit-mask-image: radial-gradient(circle, transparent 14%, #000 15%, #000 24%, transparent 25%, transparent 31%, #000 32%, #000 43%, transparent 44%, transparent 50%, #000 51%, #000 58%, transparent 59%);
  mask-image: radial-gradient(circle, transparent 14%, #000 15%, #000 24%, transparent 25%, transparent 31%, #000 32%, #000 43%, transparent 44%, transparent 50%, #000 51%, #000 58%, transparent 59%);
  animation: mandala 120s linear infinite; }
@keyframes mandala { to { transform: rotate(360deg); } }
.toran { position: absolute; top: 0; left: 0; width: 100%; height: clamp(96px, 9vw, 140px); pointer-events: none; z-index: 2; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.toran__strand { transform-box: fill-box; transform-origin: 50% 0; animation: sway 3.4s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
.sparks { position: absolute; inset: 0; pointer-events: none; }
.sparks i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #FFE8A3; box-shadow: 0 0 10px 3px rgba(255,178,30,.65); opacity: .15; animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .1; transform: scale(.7); } 50% { opacity: .95; transform: scale(1.15); } }
.landing[data-mood="festive"] .hero h1 { font-family: "Yatra One", var(--display); font-weight: 400; letter-spacing: 0; line-height: 1.08; text-shadow: 0 3px 18px rgba(0,0,0,.25); }
.landing[data-mood="festive"] .hero h1 em { background: linear-gradient(100deg, #FFC93C 0%, #FFB21E 35%, #FFF1BF 50%, #FFB21E 65%, #FFC93C 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.landing[data-mood="festive"] .lsec h2 { font-family: "Yatra One", var(--display); font-weight: 400; letter-spacing: 0; }
.wcard { position: relative; align-self: end; margin-top: 30px; }
.wcard__card { position: relative; z-index: 2; background: #FFF8E7; color: #3A1300; border-radius: 18px 18px 0 0; padding: 26px 20px 22px; border: 2px solid #E9B949; border-bottom: 0;
  outline: 1px solid #E9B949; outline-offset: -9px; box-shadow: 0 -14px 44px -12px rgba(0,0,0,.55);
  background-image: radial-gradient(circle at 0 0, #F4CB6A 0 12px, transparent 13px), radial-gradient(circle at 100% 0, #F4CB6A 0 12px, transparent 13px),
    radial-gradient(circle at 50% 0, rgba(244,203,106,.35), transparent 55%); }
.wcard__shubh { text-align: center; color: #A3122F; font: 400 max(min(19px, 12px), calc(19px * var(--fs)))/1.2 "Yatra One", var(--display); }
.wcard__who { text-align: center; color: #5E0B26; margin-top: 4px; font: 400 max(min(27px, 12px), calc(27px * var(--fs)))/1.1 "Yatra One", var(--display); }
.wcard__when { text-align: center; color: #7A4B2A; margin: 6px 0 6px; font-size: max(min(13px, 12px), calc(13px * var(--fs))); }
.wcard .billbook__row { border-bottom-color: #E9C98A; }
.wcard .billbook__row b { color: #8A1538; }
.wcard .billbook__row b.wcard__paid { color: #0B7D55; }
.wcard__seal { position: absolute; right: 12px; top: -38px; z-index: 3; width: 88px; height: 88px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(circle at 35% 30%, #E03131, #9C1A1A 70%); color: #FFE8A3;
  font: 400 max(min(18px, 12px), calc(18px * var(--fs)))/1 "Yatra One", var(--display); box-shadow: 0 8px 20px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,232,163,.45), inset 0 0 0 7px #B42323, inset 0 0 0 8px rgba(255,232,163,.35); }
.wcard__seal small { display: block; margin-top: 4px; font: 700 max(min(10px, 12px), calc(10px * var(--fs)))/1.1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.diya { position: absolute; bottom: 4px; width: 58px; z-index: 3; overflow: visible; }
.diya--l { left: -8px; } .diya--r { right: -8px; }
.diya__flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flick 1.3s ease-in-out infinite alternate; }
.diya__glow { animation: glow 2.1s ease-in-out infinite alternate; }
@keyframes flick { 0% { transform: scale(1, 1) rotate(-3deg); } 50% { transform: scale(.92, 1.08) rotate(2deg); } 100% { transform: scale(1.04, .95) rotate(-1deg); } }
@keyframes glow { from { opacity: .22; } to { opacity: .5; } }

/* Electronics: night blue, a blueprint grid, current running along the traces, an LED rate board. */
.landing[data-mood="electric"] .hero::before { background-image: linear-gradient(color-mix(in srgb, var(--m-accent) 8%, transparent) 1px, transparent 1px),
  linear-gradient(90deg, color-mix(in srgb, var(--m-accent) 8%, transparent) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 98%); mask-image: linear-gradient(180deg, #000 30%, transparent 98%); }
.circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.circuit__base path { fill: none; stroke: color-mix(in srgb, var(--m-accent) 24%, transparent); stroke-width: 2; }
.circuit__flow path { fill: none; stroke: var(--m-accent); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 22 520; animation: current 3.4s linear infinite;
  filter: drop-shadow(0 0 4px var(--m-accent)); }
@keyframes current { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -542; } }
.circuit__node circle { fill: var(--m-hero); stroke: var(--m-accent); stroke-width: 2; }
@media (max-width: 899px) { .circuit { opacity: .4; } }
.landing[data-mood="electric"] .hero h1 { font-family: Rajdhani, var(--display); font-weight: 700; letter-spacing: -.01em; line-height: .96; }
.landing[data-mood="electric"] .hero h1 em { text-shadow: 0 0 22px color-mix(in srgb, var(--m-accent) 65%, transparent); animation: neon 6s infinite; }
@keyframes neon { 0%, 90%, 94%, 100% { opacity: 1; } 92% { opacity: .55; } 93% { opacity: .9; } }
.landing[data-mood="electric"] .lsec h2 { font-family: Rajdhani, var(--display); font-weight: 700; letter-spacing: -.01em; }
.ratebrd { position: relative; align-self: end; margin: 30px 0 28px; padding: 16px 16px 14px; border-radius: 18px; color: #E6F6FF;
  background: linear-gradient(180deg, rgba(8,28,62,.94), rgba(3,12,30,.97)); border: 1px solid color-mix(in srgb, var(--m-accent) 55%, transparent);
  box-shadow: 0 22px 50px -20px rgba(0,0,0,.65), 0 0 44px -12px color-mix(in srgb, var(--m-accent) 55%, transparent); }
.ratebrd__head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px dashed color-mix(in srgb, var(--m-accent) 35%, transparent); }
.ratebrd__head b { font: 700 max(min(19px, 12px), calc(19px * var(--fs)))/1 Rajdhani, var(--display); letter-spacing: .02em; }
.ratebrd__head span:last-child { margin-left: auto; opacity: .7; font-size: max(min(12.5px, 12px), calc(12.5px * var(--fs))); }
.ratebrd__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--m-accent) 12%, transparent);
  font: 600 max(min(16px, 12px), calc(16px * var(--fs)))/1.25 Rajdhani, var(--display); }
.ratebrd__row small { display: block; opacity: .6; font: 500 max(min(12.5px, 12px), calc(12.5px * var(--fs)))/1.3 var(--body); }
.ratebrd__row b { color: var(--m-gold); font: 700 max(min(21px, 12px), calc(21px * var(--fs)))/1 Rajdhani, var(--display); letter-spacing: .02em; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px color-mix(in srgb, var(--m-gold) 45%, transparent); }
.ratebrd__foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ratebrd__foot span { display: inline-flex; gap: 5px; align-items: center; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--m-accent) 14%, transparent); color: #A5F3FC;
  font: 600 max(min(12.5px, 12px), calc(12.5px * var(--fs)))/1 var(--body); }
.ratebrd__foot svg { width: 15px; height: 15px; }
.ratebrd__stamp { position: absolute; right: 12px; top: -18px; display: inline-flex; gap: 5px; align-items: center; padding: 7px 11px; border-radius: 9px; transform: rotate(-4deg);
  background: var(--m-gold); color: #1A1400; font: 700 max(min(14px, 12px), calc(14px * var(--fs)))/1 Rajdhani, var(--display); letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--m-gold) 40%, transparent); }
.ratebrd__stamp svg { width: 16px; height: 16px; }

/* Clay items floating round the hero's picture (landing.js floats), like the owner's poster samples. */
.hfloat { position: absolute; z-index: 5; width: clamp(84px, 9.5vw, 138px); height: auto; pointer-events: none;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .32)); transform: rotate(var(--r, 0deg)); animation: hfloat 7s ease-in-out infinite; }
.hfloat--0 { left: -78px; top: -36px; --r: -10deg; }
.hfloat--1 { right: -70px; top: 30%; --r: 8deg; animation-delay: -2.4s; }
.hfloat--2 { left: -74px; top: 52%; --r: 6deg; width: clamp(76px, 8.5vw, 120px); animation-delay: -4.6s; }
.hfloat--3 { right: 22%; top: -74px; --r: -6deg; width: clamp(66px, 7vw, 104px); animation-delay: -1.2s; }
@keyframes hfloat { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(calc(var(--r, 0deg) * -.4)); } }
@media (max-width: 560px) { .hfloat { width: 78px; } .hfloat--2, .hfloat--3 { display: none; } .hfloat--0 { left: -8px; top: -52px; } .hfloat--1 { right: -14px; top: 30%; } }

@media (prefers-reduced-motion: reduce) {
  .hfloat { animation: none; }
  .landing[data-mood] .hero::after, .toran__strand, .sparks i, .diya__flame, .diya__glow, .circuit__flow path, .landing[data-mood] .hero h1 em { animation: none; }
  .sparks i { opacity: .6; }
}

/* Dawa & surgical: the trust-blue ledger with a teal pulse — a heartbeat across the hero, capsules, the rate chit. */
.ecg { position: absolute; left: 0; width: 100%; top: 44%; height: 110px; pointer-events: none; opacity: .55; }
.ecg__base { fill: none; stroke: color-mix(in srgb, var(--m-glow) 28%, transparent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ecg__beat { fill: none; stroke: var(--m-glow); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 160 1400; animation: beat 4.2s linear infinite; filter: drop-shadow(0 0 5px var(--m-glow)); }
@keyframes beat { from { stroke-dashoffset: 1560; } to { stroke-dashoffset: 0; } }
.caps { position: absolute; inset: 0; pointer-events: none; }
.caps i { position: absolute; opacity: .55; transform: rotate(var(--r)); animation: drift 9s ease-in-out infinite alternate; }
.caps .cap { width: 46px; height: 18px; border-radius: 99px; background: linear-gradient(90deg, var(--m-accent) 50%, rgba(255,255,255,.9) 50%);
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 -3px 0 rgba(0,0,0,.08); }
.caps .plus { width: 22px; height: 22px; }
.caps .plus::before, .caps .plus::after { content: ""; position: absolute; inset: 8px 0; border-radius: 3px; background: var(--m-glow); }
.caps .plus::after { inset: 0 8px; }
@keyframes drift { from { transform: translateY(0) rotate(var(--r)); } to { transform: translateY(-14px) rotate(calc(var(--r) + 10deg)); } }
@media (max-width: 899px) { .caps i:nth-child(1), .caps i:nth-child(n+4) { display: none; } .ecg { top: 52%; opacity: .4; } }
.landing[data-mood="clinic"] .hero h1 em { background: linear-gradient(95deg, #FCEFB4 10%, #B8F5E6 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing[data-mood="clinic"] .aud__card { border-top-color: var(--m-glow); }
.landing[data-mood="clinic"] .aud__card > svg { background: color-mix(in srgb, var(--m-glow) 16%, transparent); }
.landing[data-mood="clinic"] .lsec--alt { background: color-mix(in srgb, var(--m-glow) 7%, var(--surface)); }
.landing[data-mood="clinic"] .billbook__sheet { border-top: 5px solid var(--m-glow); }
.qchip { position: absolute; left: 8px; top: -54px; z-index: 4; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 14px 14px 14px 4px;
  background: #fff; color: #0B6874; font: 700 max(min(13px, 12px), calc(13px * var(--fs)))/1 var(--display); box-shadow: 0 10px 26px rgba(0,0,0,.28); animation: bob 4s ease-in-out infinite; }
.qchip svg { width: 16px; height: 16px; color: #0F9E8E; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .ecg__beat, .caps i, .qchip { animation: none; } }
