/* Layout: app shell — top bar, left rail on desktop, bottom tab bar on phones; landing is a standalone page.
   Visual idea: Indian street-sign green + auto-rickshaw marigold, tags drawn as punched price tags. */
:root {
  --bg: #F4F7F5; --surface: #FFFFFF; --surface-2: #EDF2EF; --surface-3: #E3EAE6; --line: #D9E3DE; --line-strong: #C3D1CA;
  --ink: #0F1D18; --ink-2: #44554D; --ink-3: #6F8078; --brand: #0B7A55; --brand-strong: #075C40; --brand-soft: #DCF1E7; --brand-ink: #064A34;
  --accent: #F2A900; --accent-strong: #C98A00; --accent-soft: #FFF1C7; --accent-ink: #5A3C00;
  --online: #3D5FD9; --online-soft: #E3E9FF; --offline: #0B7A55; --offline-soft: #DCF1E7;
  --good: #1E8A4C; --good-soft: #DFF3E6; --warn: #B86A00; --warn-soft: #FFF0D6; --serious: #C2410C; --serious-soft: #FFE6D8; --bad: #C93434; --bad-soft: #FCE4E4; --info: #2F64D6;
  --hero-1: #04271C; --hero-2: #0A5A40; --hero-3: #0F8A6A; --on-hero: #F2FAF6; --on-hero-2: #B9D8CB; --on-brand: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.72); --glass-line: rgba(255, 255, 255, 0.6); --glass-hero: rgba(255, 255, 255, 0.10); --glass-hero-line: rgba(255, 255, 255, 0.22);
  --shadow: 0 1px 2px rgba(15, 29, 24, 0.06), 0 8px 24px -12px rgba(15, 29, 24, 0.18); --shadow-lg: 0 24px 60px -24px rgba(6, 40, 28, 0.35);
  --map-land: #EAF1EC; --map-water: #BFDCEB; --map-road: #FFFFFF; --map-ring: #0B7A55;
  --f-display: "Bricolage Grotesque", "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 20px; --r-xl: 28px;
  --rail: 248px; --top: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08110E; --surface: #0F1A16; --surface-2: #15231E; --surface-3: #1C2D27; --line: #22352E; --line-strong: #2E463D;
    --ink: #E6F0EB; --ink-2: #A6B8AF; --ink-3: #7D8F86; --brand: #2DBA86; --brand-strong: #5ED1A6; --brand-soft: #113428; --brand-ink: #8BE3C0;
    --accent: #FFC233; --accent-strong: #FFD466; --accent-soft: #382B0B; --accent-ink: #FFD978;
    --online: #6B83EE; --online-soft: #1A2348; --offline: #22A877; --offline-soft: #113428;
    --good: #3CC27A; --good-soft: #10301F; --warn: #F0A63A; --warn-soft: #33240C; --serious: #FF8A50; --serious-soft: #3A1D10; --bad: #FF6B6B; --bad-soft: #3A1414; --info: #7EA2FF;
    --hero-1: #03130E; --hero-2: #073B2A; --hero-3: #0B6A50; --on-hero: #F2FAF6; --on-hero-2: #A9CBBE; --on-brand: #04130D;
    --glass: rgba(15, 26, 22, 0.72); --glass-line: rgba(255, 255, 255, 0.08); --glass-hero: rgba(255, 255, 255, 0.07); --glass-hero-line: rgba(255, 255, 255, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.7); --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    --map-land: #12201B; --map-water: #173845; --map-road: #1E2F29; --map-ring: #2DBA86;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08110E; --surface: #0F1A16; --surface-2: #15231E; --surface-3: #1C2D27; --line: #22352E; --line-strong: #2E463D;
  --ink: #E6F0EB; --ink-2: #A6B8AF; --ink-3: #7D8F86; --brand: #2DBA86; --brand-strong: #5ED1A6; --brand-soft: #113428; --brand-ink: #8BE3C0;
  --accent: #FFC233; --accent-strong: #FFD466; --accent-soft: #382B0B; --accent-ink: #FFD978;
  --online: #6B83EE; --online-soft: #1A2348; --offline: #22A877; --offline-soft: #113428;
  --good: #3CC27A; --good-soft: #10301F; --warn: #F0A63A; --warn-soft: #33240C; --serious: #FF8A50; --serious-soft: #3A1D10; --bad: #FF6B6B; --bad-soft: #3A1414; --info: #7EA2FF;
  --hero-1: #03130E; --hero-2: #073B2A; --hero-3: #0B6A50; --on-hero: #F2FAF6; --on-hero-2: #A9CBBE; --on-brand: #04130D;
  --glass: rgba(15, 26, 22, 0.72); --glass-line: rgba(255, 255, 255, 0.08); --glass-hero: rgba(255, 255, 255, 0.07); --glass-hero-line: rgba(255, 255, 255, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.7); --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --map-land: #12201B; --map-water: #173845; --map-road: #1E2F29; --map-ring: #2DBA86;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; margin: 0; letter-spacing: -0.015em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 750; }
h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 650; }
h4 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.lg { gap: 20px; }
.stack.sm { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }
.ico.fill { fill: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------ buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font-weight: 650; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-accent { background: var(--accent); color: #2A1C00; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: var(--surface-3); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 650; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 12px; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ico { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.input-wrap > .input { padding-left: 38px; }
.input-wrap > .prefix { position: absolute; left: 12px; color: var(--ink-2); font-weight: 650; }
.hint { font-size: 12px; color: var(--ink-3); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip:hover { border-color: var(--brand); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.toggle { position: relative; width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 0; flex: none; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.toggle[aria-pressed="true"] { background: var(--brand); }
.toggle[aria-pressed="true"]::after { transform: translateX(16px); }

/* ------------------------------------------------ tags — punched price-tag chips */
.tag { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 18px; border-radius: 6px 999px 999px 6px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tag::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tag.hit { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-ink); }
.tag.ai { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); color: var(--brand-ink); }
.tag.new { border-style: dashed; }
.tag button { border: 0; background: none; padding: 0; margin-right: -4px; color: inherit; opacity: .6; display: inline-flex; }
.tag button:hover { opacity: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------ badges & pills */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill .ico { width: 13px; height: 13px; }
.pill.off { background: var(--offline-soft); color: var(--offline); }
.pill.on { background: var(--online-soft); color: var(--online); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.serious { background: var(--serious-soft); color: var(--serious); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.dark { background: var(--ink); color: var(--surface); }
.verified { display: inline-flex; color: var(--brand); }
.verified .ico { width: 17px; height: 17px; }
.stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stars .ico { width: 15px; height: 15px; fill: var(--accent); stroke: var(--accent); }
.badge-dot { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ------------------------------------------------ avatar */
.av { --h: 150; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 16px; color: #fff; letter-spacing: 0; background: linear-gradient(140deg, hsl(var(--h) 62% 42%), hsl(calc(var(--h) + 35) 70% 30%)); position: relative; }
.av.sm { width: 32px; height: 32px; font-size: 12px; }
.av.xs { width: 26px; height: 26px; font-size: 11px; }
.av.lg { width: 72px; height: 72px; font-size: 26px; }
.av.xl { width: 104px; height: 104px; font-size: 36px; border: 4px solid var(--surface); }
.av .online-dot { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2px solid var(--surface); }
.av-stack { display: flex; }
.av-stack .av { border: 2px solid var(--surface); margin-left: -8px; }
.av-stack .av:first-child { margin-left: 0; }

/* ------------------------------------------------ cards & surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; min-width: 0; }
.card.pad-lg { padding: 24px; }
.card.flat { box-shadow: none; }
.card.raised { box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 17px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-width: 0; }
.clickable { cursor: pointer; }
.empty { text-align: center; padding: 32px 16px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 32px; height: 32px; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter.accent > i { background: var(--accent); }

/* ------------------------------------------------ app shell */
.shell { min-height: 100%; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: var(--top) minmax(0, 1fr); grid-template-areas: "top top" "rail main"; }
.topbar { grid-area: top; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 16px; padding: 0 20px; height: var(--top); background: var(--glass); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; background: none; border: 0; padding: 0; }
.logo b { font-weight: 800; }
.logo span { font-weight: 500; color: var(--ink-2); }
.logo svg { width: 30px; height: 30px; flex: none; }
.top-search { flex: 1; max-width: 520px; }
.top-search .input { height: 40px; border-radius: 999px; background: var(--surface-2); border-color: transparent; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.role-switch button { padding: 6px 12px; }
.rail { grid-area: rail; position: sticky; top: calc(var(--top) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--top)); overflow-y: auto; padding: 18px 12px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.rail .eyebrow { padding: 14px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: transparent; text-align: left; color: var(--ink-2); font-weight: 600; font-size: 14px; position: relative; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 800; background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 7px; }
.rail-card { margin-top: auto; padding: 14px; border-radius: var(--r); background: var(--surface-2); font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.main { grid-area: main; min-width: 0; padding: 24px clamp(16px, 3vw, 36px) 96px; }
.page { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-h .sub { color: var(--ink-2); margin-top: 6px; max-width: 62ch; }
.tabbar { display: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.sticky { position: sticky; top: calc(var(--top) + 20px); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; }

/* demo controls */
.demo-fab-unused { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; gap: 8px; align-items: center; }
.demo-fab .btn { box-shadow: var(--shadow-lg); }
.sample-pill { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }

/* ------------------------------------------------ overlays */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4, 18, 13, 0.5); display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
.modal { width: min(560px, 100%); max-height: min(88vh, 900px); overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 24px; animation: rise .18s ease-out; }
.modal.wide { width: min(760px, 100%); }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet { position: fixed; right: 16px; top: calc(var(--top) + 8px + env(safe-area-inset-top, 0px)); z-index: 55; width: min(380px, calc(100vw - 32px)); max-height: min(72vh, 680px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 16px; animation: rise .18s ease-out; }
.screen-link { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 8px; border-radius: 10px; font-weight: 600; color: var(--ink); }
.screen-link:hover { background: var(--surface-2); }
.screen-link .n { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.screen-link[aria-current="page"] { background: var(--brand-soft); }
.toasts { position: fixed; top: calc(76px + env(safe-area-inset-top, 0px)); right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg); font-size: 14px; animation: rise .2s ease-out; }
.toast .ico { color: var(--accent); margin-top: 2px; }
.toast b { display: block; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 50%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ------------------------------------------------ landing */
.landing { min-height: 100%; }
.l-nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 20px; padding: 14px clamp(16px, 4vw, 48px); background: var(--glass); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.l-nav nav { display: flex; gap: 22px; margin-left: 24px; }
.l-nav nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.l-nav nav a:hover { color: var(--ink); }
.hero { position: relative; overflow: hidden; color: var(--on-hero); background:
  radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
  radial-gradient(700px 500px at -10% 110%, color-mix(in srgb, var(--hero-3) 80%, transparent), transparent 60%),
  linear-gradient(160deg, var(--hero-1), var(--hero-2) 55%, var(--hero-3)); padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px) clamp(48px, 7vw, 96px); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background-image: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255,255,255,.18) 46px 48px, transparent 48px 120px); mask-image: linear-gradient(to bottom, transparent, #000 40%, transparent); }
.hero-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { color: var(--on-hero); font-size: clamp(38px, 6.2vw, 72px); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { color: var(--on-hero-2); font-size: clamp(16px, 1.6vw, 19px); max-width: 50ch; margin-top: 20px; line-height: 1.55; }
.hero-search { margin-top: 28px; display: flex; gap: 8px; padding: 8px; border-radius: 999px; background: var(--glass-hero); border: 1px solid var(--glass-hero-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); max-width: 560px; }
.hero-search .input { background: transparent; border: 0; color: var(--on-hero); height: 44px; padding-left: 44px; font-size: 16px; }
.hero-search .input::placeholder { color: var(--on-hero-2); }
.hero-search .input:focus { box-shadow: none; }
.hero-search .input-wrap { flex: 1; }
.hero-search .input-wrap > .ico { color: var(--on-hero-2); left: 16px; }
.hero-read { margin-top: 14px; min-height: 30px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--on-hero-2); font-size: 13px; }
.hero-read .tag { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: var(--on-hero); }
.hero-read .tag::before { background: var(--hero-2); box-shadow: none; }
.hero-read .tag.hit { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: #FFE7A3; }
.hero-cta { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta .btn-ghost { color: var(--on-hero); border-color: var(--glass-hero-line); }
.hero-cta .btn-ghost:hover { background: var(--glass-hero); }
.hero-panel { border-radius: var(--r-xl); padding: 18px; background: var(--glass-hero); border: 1px solid var(--glass-hero-line); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 10px; }
.hero-panel .hp-h { display: flex; align-items: center; justify-content: space-between; color: var(--on-hero-2); font-size: 13px; padding: 2px 4px 6px; }
.hp-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r); background: rgba(255,255,255,.94); color: #0F1D18; text-align: left; border: 0; width: 100%; }
.hp-card .muted { color: #44554D; }
.hp-card .meter { background: #E3EAE6; }
.hp-card .meter > i { background: #0B7A55; }
.match-badge { font-family: var(--f-mono); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.hp-card .match-badge { background: #FFF1C7; color: #5A3C00; }
.section { padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 48px); }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-in { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.section-h { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.section-h h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 780; letter-spacing: -0.03em; }
.section-h p { color: var(--ink-2); font-size: 17px; max-width: 60ch; }
.map-ex { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.map-ex-item { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; }
.map-ex-item:hover { border-color: var(--brand); }
.map-ex-item .q { font-weight: 650; }
.map-ex-item .arrow { color: var(--ink-3); }
.ex-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.ex-ico.on { background: var(--online-soft); color: var(--online); }
.how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.how .card { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.step-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.step-list li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: var(--ink-2); }
.step-list li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-weight: 800; font-size: 13px; font-family: var(--f-mono); }
.bid-demo { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.bid-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.bid-row .price { margin-left: auto; font-family: var(--f-mono); font-weight: 600; }
.bid-row.best { background: var(--brand-soft); }
.stat-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.big-num { font-family: var(--f-display); font-weight: 800; font-size: clamp(46px, 5.6vw, 84px); letter-spacing: -0.04em; line-height: .9; color: var(--brand); font-variant-numeric: tabular-nums; }
.big-num small { font-size: .38em; color: var(--ink-2); letter-spacing: -0.01em; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.trust-item { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.trust-item .ex-ico { width: 44px; height: 44px; }
.footer { padding: 36px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.footer-in { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cta-band { border-radius: var(--r-xl); padding: clamp(28px, 4vw, 48px); color: var(--on-hero); background: radial-gradient(600px 300px at 90% 0%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 60%), linear-gradient(140deg, var(--hero-1), var(--hero-3)); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--on-hero); font-size: clamp(26px, 3.4vw, 40px); }
.cta-band p { color: var(--on-hero-2); margin-top: 8px; }

/* ------------------------------------------------ auth */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; color: var(--on-hero); padding: 40px clamp(24px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; background: radial-gradient(700px 400px at 100% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%), linear-gradient(160deg, var(--hero-1), var(--hero-2) 60%, var(--hero-3)); }
.auth-art .logo, .auth-art .logo span { color: var(--on-hero); }
.auth-art h2 { color: var(--on-hero); font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.auth-art p { color: var(--on-hero-2); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 18px; }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.role-card { text-align: left; padding: 16px; border-radius: var(--r-lg); border: 1.5px solid var(--line-strong); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.role-card[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { text-align: center; font-family: var(--f-mono); font-size: 20px; height: 52px; padding: 0; }
.steps-dots { display: flex; gap: 6px; }
.steps-dots i { height: 4px; flex: 1; border-radius: 999px; background: var(--surface-3); }
.steps-dots i.on { background: var(--brand); }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* ------------------------------------------------ dashboard bits */
.greet h1 { font-size: clamp(26px, 3.2vw, 36px); }
.hero-tile { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(20px, 3vw, 30px); color: var(--on-hero); background: radial-gradient(500px 260px at 100% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 60%), linear-gradient(150deg, var(--hero-1), var(--hero-2) 60%, var(--hero-3)); display: flex; flex-direction: column; gap: 16px; }
.hero-tile h2, .hero-tile h1 { color: var(--on-hero); }
.hero-tile .muted { color: var(--on-hero-2); }
.hero-tile .input { background: rgba(255,255,255,.96); border: 0; height: 50px; border-radius: 999px; padding-left: 44px; font-size: 16px; color: #0F1D18; }
.hero-tile .input::placeholder { color: #6F8078; }
.hero-tile .input-wrap > .ico { left: 16px; color: #6F8078; }
.hero-tile .chip { background: var(--glass-hero); border-color: var(--glass-hero-line); color: var(--on-hero); }
.hero-tile .chip:hover { border-color: var(--accent); }
.hero-tile .btn-ghost { color: var(--on-hero); border-color: var(--glass-hero-line); }
.action-tile { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; }
.action-tile:hover { border-color: var(--brand); }
.action-tile .ex-ico { width: 48px; height: 48px; border-radius: 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.kpi .v { font-family: var(--f-display); font-size: 26px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; font-weight: 700; color: var(--good); display: inline-flex; gap: 4px; align-items: center; }
.kpi .d.down { color: var(--bad); }
.req-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.req-card:hover { border-color: var(--line-strong); }
.req-card .title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.req-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); font-size: 13px; }
.req-meta span { display: inline-flex; align-items: center; gap: 5px; }
.req-meta .ico { width: 14px; height: 14px; }
.budget { font-family: var(--f-mono); font-weight: 600; font-size: 17px; color: var(--ink); white-space: nowrap; }
.prov-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.prov-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.prov-card .name { font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 4px; }
.svc-line { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); font-size: 14px; min-width: 0; }
.svc-line .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.svc-line .p { font-family: var(--f-mono); font-weight: 600; white-space: nowrap; }
.svc-line .u { color: var(--ink-3); font-size: 12px; }
.match { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); min-width: 120px; }
.match .meter { flex: 1; }
.match b { font-family: var(--f-mono); color: var(--ink); font-weight: 600; }

/* AI panel */
.ai-panel { border-radius: var(--r-lg); padding: 16px; background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); display: flex; flex-direction: column; gap: 12px; }
.ai-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-ink); font-size: 14px; }
.ai-head .ico { color: var(--brand); }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.ai-cell { padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.ai-cell .eyebrow { font-size: 11px; }
.ai-cell .v { font-weight: 700; margin-top: 2px; }
.conf { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 650; }
.conf .ex-ico { width: 24px; height: 24px; border-radius: 50%; }
.conf .ex-ico .ico { width: 13px; height: 13px; }
.conf b { font-family: var(--f-mono); font-weight: 600; color: var(--brand); }
.learn-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.learn-note .ico { color: var(--accent-ink); margin-top: 1px; }
.thinking { display: inline-flex; gap: 4px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; }
.thinking i:nth-child(3) { animation-delay: .3s; }
.needs-sample { display: none !important; }
.has-sample .needs-sample { display: inline-flex !important; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.filters .grp { display: flex; align-items: center; gap: 8px; }
.filters .grp > .label { font-size: 12px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.select.sm { height: 34px; padding: 0 30px 0 12px; font-size: 13px; border-radius: 999px; width: auto; }

/* map */
.map-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--map-land); }
.map-wrap svg { display: block; width: 100%; height: auto; max-height: 560px; }
.map-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.map-pop { position: absolute; right: 12px; top: 12px; width: min(320px, calc(100% - 24px)); }
@media (max-width: 640px) { .map-pop { position: static; width: auto; padding: 10px; } .map-legend { position: static; border-radius: 0; } .stepper .st { font-size: 10px; } }
.pin { cursor: pointer; }
.pin:hover circle.halo, .pin.on circle.halo { opacity: 1; }
.me-dot { animation: pulse 1.8s infinite; }

/* profile */
.cover { height: 168px; border-radius: var(--r-xl); position: relative; overflow: hidden; background: linear-gradient(120deg, hsl(var(--h) 55% 30%), hsl(calc(var(--h) + 40) 60% 22%)); }
.cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(255,255,255,.06) 40px 42px); }
.prof-head { display: flex; gap: 18px; align-items: flex-end; margin-top: -40px; padding: 0 20px; position: relative; z-index: 1; flex-wrap: wrap; }
.prof-head .grow { padding-bottom: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-row > div { padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.stat-row b { display: block; font-family: var(--f-display); font-size: 20px; font-variant-numeric: tabular-nums; }
.stat-row span { font-size: 12px; color: var(--ink-3); }
.svc-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.svc-card[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.port { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.port-item { aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r); position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 10px; color: #fff; font-size: 13px; font-weight: 650; background: radial-gradient(120px 90px at 70% 30%, hsl(var(--h) 70% 60% / .9), transparent 70%), linear-gradient(135deg, hsl(var(--h) 55% 34%), hsl(calc(var(--h) + 30) 60% 20%)); }
.port-item .ico { position: absolute; right: 12px; top: 12px; width: 26px; height: 26px; opacity: .85; }
.port-item span { position: relative; text-shadow: 0 1px 8px rgba(0,0,0,.4); line-height: 1.25; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week button { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-2); }
.week button b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.week button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.week button[aria-pressed="true"] b { color: var(--surface); }
.week button[disabled] { opacity: .4; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.slots button { height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; }
.slots button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.rating-bars { display: flex; flex-direction: column; gap: 6px; }
.rating-bars .rb { display: grid; grid-template-columns: 26px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rating-bars .meter > i { background: var(--accent); }
.review { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }

/* stepper */
.stepper { display: flex; gap: 0; align-items: flex-start; overflow-x: auto; padding-bottom: 2px; }
.stepper .st { flex: 1; min-width: 74px; padding: 0 2px; overflow-wrap: break-word; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; color: var(--ink-3); text-align: center; font-weight: 600; }
.stepper .st::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line-strong); z-index: 0; }
.stepper .st:first-child::before { display: none; }
.stepper .st i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); position: relative; z-index: 1; font-style: normal; }
.stepper .st.done { color: var(--ink-2); }
.stepper .st.done i { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.stepper .st.done::before, .stepper .st.cur::before { background: var(--brand); }
.stepper .st.cur { color: var(--ink); }
.stepper .st.cur i { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.stepper .st i .ico { width: 13px; height: 13px; }

/* offers */
.offer { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 0.7fr)) auto; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.offer.best { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.offer .cell .eyebrow { font-size: 11px; }
.offer .cell b { font-variant-numeric: tabular-nums; }
.offer .price { font-family: var(--f-mono); font-size: 20px; font-weight: 600; }
.offer-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.offer-msg { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.range { width: 100%; accent-color: var(--brand); }
.price-band { position: relative; height: 34px; margin-top: 8px; }
.price-band .track { position: absolute; left: 0; right: 0; top: 14px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--good-soft), var(--accent-soft), var(--bad-soft)); }
.price-band .mk { position: absolute; top: 4px; width: 2px; height: 26px; background: var(--ink); border-radius: 2px; }
.price-band .mk span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-family: var(--f-mono); white-space: nowrap; color: var(--ink); }
.price-band .lbl { position: absolute; top: 24px; font-size: 11px; color: var(--ink-3); font-family: var(--f-mono); }

/* chat */
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - var(--top) - 48px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-h { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.threads { overflow-y: auto; flex: 1; }
.thread { display: flex; gap: 12px; align-items: center; padding: 12px 16px; width: 100%; border: 0; background: none; text-align: left; border-bottom: 1px solid var(--line); }
.thread:hover { background: var(--surface-2); }
.thread[aria-current="true"] { background: var(--brand-soft); }
.thread .pv { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .ub { min-width: 20px; height: 20px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.convo { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.convo-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.convo-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px; }
.msg { max-width: min(78%, 520px); display: flex; flex-direction: column; gap: 4px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg .b { padding: 9px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.me .b { background: var(--brand); color: var(--on-brand); border-color: var(--brand); border-radius: 16px 16px 4px 16px; }
.msg .t { font-size: 11px; color: var(--ink-3); padding: 0 4px; }
.sys { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.sys .ico { width: 14px; height: 14px; color: var(--brand); }
.offer-bubble { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 240px; }
.offer-bubble .amt { font-family: var(--f-mono); font-size: 22px; font-weight: 600; }
.img-bubble { width: 220px; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; position: relative; display: flex; align-items: flex-end; padding: 8px; color: #fff; font-size: 12px; background: linear-gradient(135deg, hsl(var(--h) 55% 45%), hsl(calc(var(--h) + 40) 60% 25%)); border: 1px solid var(--line); }
.img-bubble img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-bubble span { position: relative; background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 999px; }
.doc-bubble { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 220px; }
.doc-bubble .ex-ico { width: 36px; height: 36px; }
.update-bubble { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; font-size: 14px; }
.typing { align-self: flex-start; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); }
.composer { padding: 12px; border-top: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.composer .row .input { border-radius: 999px; }
.warn-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); font-size: 13px; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.warn-banner .ico { color: var(--warn); margin-top: 1px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--ink-3); font-size: 11px; font-family: var(--f-body); }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--shadow-lg); z-index: 3; }
.chart-tip b { font-family: var(--f-mono); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; border-radius: 6px; }
.hbar:hover { background: var(--surface-2); }
.hbar .bar { height: 14px; border-radius: 0 4px 4px 0; background: var(--brand); }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-family: var(--f-mono); font-size: 12px; }
.splitbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; }
.splitbar > div { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.sev { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; }

/* booking cards */
.bk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.bk-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.bk .stepper { grid-column: 1 / -1; }
.timeline { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding-bottom: 14px; position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line-strong); font-style: normal; z-index: 1; }
.timeline li.done i { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.timeline li.cur i { border-color: var(--warn); background: var(--warn-soft); }
.timeline li i .ico { width: 12px; height: 12px; }

/* notifications */
.notif { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; width: 100%; border: 0; background: none; text-align: left; border-radius: var(--r); }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.notif .ex-ico { width: 40px; height: 40px; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: none; }

/* wallet */
.wallet-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 24px; color: var(--on-hero); background: radial-gradient(400px 220px at 100% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%), linear-gradient(140deg, var(--hero-1), var(--hero-2) 55%, var(--hero-3)); display: flex; flex-direction: column; gap: 18px; min-height: 210px; }
.wallet-card .bal { font-family: var(--f-display); font-size: clamp(36px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wallet-card .muted { color: var(--on-hero-2); }
.wallet-card .glass-in { padding: 12px 14px; border-radius: var(--r); background: var(--glass-hero); border: 1px solid var(--glass-hero-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.wallet-card .btn-ghost { color: var(--on-hero); border-color: var(--glass-hero-line); }
.escrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.escrow > div { padding: 12px; border-radius: var(--r); background: var(--surface-2); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.escrow .ex-ico { width: 32px; height: 32px; border-radius: 10px; }
.amt-pos { color: var(--good); }

/* stars input */
.star-input { display: inline-flex; gap: 4px; }
.star-input button { border: 0; background: none; padding: 2px; color: var(--line-strong); }
.star-input button .ico { width: 30px; height: 30px; }
.star-input button.on { color: var(--accent); }
.star-input button.on .ico { fill: var(--accent); }
.star-input.sm button .ico { width: 20px; height: 20px; }
.photo-drop { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface-2); }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, hsl(var(--h, 160) 50% 50%), hsl(calc(var(--h, 160) + 40) 55% 28%)); display: grid; place-items: center; color: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; padding: 0; }
.thumb button .ico { width: 12px; height: 12px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.me-pulse { transform-box: fill-box; transform-origin: center; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(2.6); opacity: 0; } }
.only-mobile { display: none !important; }
.pin:focus-visible { outline: none; }
.pin:focus-visible circle:nth-child(2) { stroke: var(--accent); }
.hp-card { cursor: pointer; }
.req-card .title { overflow-wrap: anywhere; }

/* ------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .offer { grid-template-columns: minmax(0, 1fr) repeat(3, auto); }
  .offer .cell.hide-md { display: none; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  :root { --top: 58px; }
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .rail { display: none; }
  .top-search { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--glass); border-top: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 650; color: var(--ink-3); padding: 6px 0; position: relative; }
  .tabbar button[aria-current="page"] { color: var(--brand); }
  .tabbar .plus { width: 44px; height: 44px; margin-top: -18px; border-radius: 50%; background: var(--accent); color: #2A1C00; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
  .tabbar .badge-dot { top: 0; right: calc(50% - 20px); }
  .sheet { right: 12px; max-height: calc(100vh - var(--top) - 96px); }
  .hide-mobile { display: none !important; }
  .icon-btn { width: 36px; height: 36px; }
  .logo { font-size: 17px; }
  .logo svg { width: 26px; height: 26px; }
  .role-switch button { padding: 6px 9px; }
  .stepper .st { min-width: 0; font-size: 11px; }
  .split, .split-wide { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .map-ex { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-hero { grid-template-columns: minmax(0, 1fr); }
  .l-nav nav { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 28px 16px; }
  .auth-art .hide-sm { display: none; }
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--top) - 120px); border-radius: var(--r-lg); }
  .chat.open .chat-list { display: none; }
  .chat:not(.open) .convo { display: none; }
  .escrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-switch .lbl { display: none; }
  .only-mobile { display: grid !important; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .map-ex { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer { grid-template-columns: minmax(0, 1fr) auto; }
  .offer .cell.hide-sm { display: none; }
  .offer-actions { grid-column: 1 / -1; justify-content: stretch; }
  .offer-actions .btn { flex: 1; }
  .bk { grid-template-columns: minmax(0, 1fr); }
  .bk-actions { justify-content: flex-start; }
  .hbar { grid-template-columns: 96px minmax(0, 1fr) 46px; }
  .prof-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .prof-head .grow { padding-bottom: 0; }
  .hero-search { border-radius: var(--r-lg); flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .cover { height: 120px; }
  .prof-head { padding: 0 8px; margin-top: -48px; }
  .modal { padding: 18px; border-radius: var(--r-lg); }
  .role-cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.screens-btn { gap: 6px; }
@media (max-width: 1180px) { .hide-lg { display: none !important; } }
@media (max-width: 420px) { .topbar .logo > span { font-size: 15px; } .top-actions { gap: 2px; } }
