/* AI&I Real Estate Finder — engine (home page) */

:root {
  --indigo: #6366f1;
  --purple: #a855f7;
  --indigo-soft: #818cf8;
  --purple-soft: #c084fc;
  --pink: #f472b6;
  --radius: 1.1rem;
  --gap: 0.75rem;
  --font-head: "Space Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --board-w: min(100% - 3rem, clamp(56.25rem, 66vw, 83.75rem));
}

/* Dark is the engine default */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a19;
  --glow-1: rgba(99, 102, 241, 0.42);
  --glow-2: rgba(168, 85, 247, 0.34);
  --glow-3: rgba(244, 114, 182, 0.24);
  --panel: #15152d;
  --panel-glass: rgba(21, 21, 45, 0.72);
  --panel-strong: #1c1c3a;
  --nav-bg: #0f0f24;
  --nav-glass: rgba(15, 15, 36, 0.7);
  --border: rgba(165, 170, 255, 0.22);
  --border-strong: rgba(165, 170, 255, 0.42);
  --text: #f1f1ff;
  --muted: #c3c5ee;
  --accent-text: #b4b8ff;
  --link: #c7cbff;
  --chip-bg: rgba(129, 140, 248, 0.16);
  --bubble-user: #2b2b63;
  --bubble-bot: #1a1a38;
  --btn-text: #ffffff;
  --btn-bg-1: #5b5ef0;
  --btn-bg-2: #9333ea;
  --coral: #ff9a8b;
  --focus: #f9a8d4;
  --tile-text: #ffffff;
  --gauge-track: rgba(165, 170, 255, 0.2);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f3ff;
  --glow-1: rgba(99, 102, 241, 0.22);
  --glow-2: rgba(168, 85, 247, 0.18);
  --glow-3: rgba(244, 114, 182, 0.16);
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.8);
  --panel-strong: #f3f2ff;
  --nav-bg: #fbfbff;
  --nav-glass: rgba(251, 251, 255, 0.78);
  --border: rgba(79, 70, 229, 0.2);
  --border-strong: rgba(79, 70, 229, 0.42);
  --text: #17153a;
  --muted: #47446e;
  --accent-text: #4338ca;
  --link: #4338ca;
  --chip-bg: rgba(99, 102, 241, 0.1);
  --bubble-user: #e6e5ff;
  --bubble-bot: #f6f5ff;
  --btn-text: #ffffff;
  --btn-bg-1: #4f46e5;
  --btn-bg-2: #7e22ce;
  --coral: #b4321f;
  --focus: #be185d;
  --tile-text: #ffffff;
  --gauge-track: rgba(79, 70, 229, 0.16);
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-font-size="md"] { font-size: 112.5%; }
html[data-font-size="lg"] { font-size: 125%; }
html[data-font-size="xl"] { font-size: 137.5%; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(42rem 30rem at 12% -6%, var(--glow-1), transparent 70%),
    radial-gradient(38rem 28rem at 92% 4%, var(--glow-2), transparent 70%),
    radial-gradient(46rem 30rem at 55% 110%, var(--glow-3), transparent 70%);
  background-attachment: fixed;
  overflow-wrap: anywhere;
}

h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--link); }
button, textarea { font: inherit; color: inherit; }
svg { display: block; }

:focus-visible { outline: 0.15rem solid var(--focus); outline-offset: 0.15rem; border-radius: 0.4rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--panel); color: var(--text); padding: 0.5rem 0.9rem; border-radius: 0.6rem;
}
.skip:focus { top: calc(0.75rem + env(safe-area-inset-top)); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav {
    background: var(--nav-glass);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
  }
}
.nav-row {
  width: var(--board-w);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); min-width: 0; }
.brand-mark {
  width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7e22ce 55%, #be185d);
  box-shadow: 0 0.4rem 1.2rem rgba(99, 102, 241, 0.35);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-top { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.brand-bottom { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.88rem;
  padding: 0.4rem 0.75rem; border-radius: 999px;
}
.nav-links a:hover { color: var(--text); background: var(--chip-bg); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--chip-bg); }
.nav-tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.size-group { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 0.15rem; gap: 0.1rem; }
.size-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  min-width: 2rem; height: 2rem; border-radius: 999px; font-weight: 700; line-height: 1;
  font-family: var(--font-head);
}
.size-btn.s1 { font-size: 0.75rem; }
.size-btn.s2 { font-size: 0.88rem; }
.size-btn.s3 { font-size: 1rem; }
.size-btn.s4 { font-size: 1.15rem; }
.size-btn[aria-pressed="true"] { background: linear-gradient(135deg, var(--btn-bg-1), var(--btn-bg-2)); color: var(--btn-text); }
.theme-btn {
  width: 2.4rem; height: 2.4rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  display: grid; place-items: center;
}
.theme-btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
:root[data-theme="dark"] .icon-moon,
:root[data-theme="light"] .icon-sun { display: none; }

/* ---------- Hero ---------- */
main { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.hero {
  width: var(--board-w); margin: 0 auto;
  padding: 0.9rem 0 0.8rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
}
.chip {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent-text); background: var(--chip-bg); border: 1px solid var(--border);
  padding: 0.25rem 0.75rem; border-radius: 999px;
}
.hero h1 { font-size: clamp(1.7rem, 4.6vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; }
.grad {
  color: var(--purple-soft);
  background: linear-gradient(90deg, var(--indigo-soft), var(--purple-soft) 50%, var(--pink));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
:root[data-theme="light"] .grad {
  color: #6d28d9;
  background: linear-gradient(90deg, #4338ca, #7e22ce 50%, #be185d);
  -webkit-background-clip: text; background-clip: text;
}
.subline { color: var(--text); font-size: 0.95rem; line-height: 1.45; max-width: 52rem; }
.subline strong { font-weight: 600; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.chip-link {
  display: inline-flex; align-items: center; min-height: 2.2rem;
  padding: 0.35rem 0.95rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.85rem;
  color: var(--text); border: 1px solid var(--border-strong); background: var(--panel);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .chip-link { background: var(--panel-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.chip-link:hover { border-color: var(--indigo-soft); }

/* ---------- Board ---------- */
.board {
  width: var(--board-w); margin: 0 auto;
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-bottom: 1rem;
}
.card {
  position: relative; min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 1.2rem 2.4rem rgba(5, 5, 20, 0.28);
  overflow: hidden;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .card { background: var(--panel-glass); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
}
:root[data-theme="light"] .card { box-shadow: 0 1rem 2rem rgba(60, 50, 160, 0.1); }
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0.2rem;
  background: linear-gradient(90deg, var(--indigo), var(--purple));
}
.match-card::before { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.shortlist-card::before { background: linear-gradient(90deg, var(--indigo-soft), var(--purple-soft)); }
.details-card::before { background: linear-gradient(90deg, var(--pink), var(--indigo)); }
.card h2 { font-size: 1.05rem; font-weight: 600; }

@media (min-width: 700px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chat-card { grid-column: 1 / -1; grid-row: 1; }
  .match-card { grid-column: 1; grid-row: 2; }
  .shortlist-card { grid-column: 2; grid-row: 2; }
  .details-card { grid-column: 3; grid-row: 2; }
}
@media (min-width: 1100px) {
  .board { grid-template-columns: 1.36fr 1.06fr 0.98fr 0.98fr; }
  .chat-card { grid-column: 1; grid-row: 1; }
  .match-card { grid-column: 2; grid-row: 1; }
  .shortlist-card { grid-column: 3; grid-row: 1; }
  .details-card { grid-column: 4; grid-row: 1; }
}

/* ---------- Chat card ---------- */
.chat-card {
  padding: 0;
  height: var(--chat-h, clamp(22rem, 100svh - 9rem, 40rem));
}
@media (min-width: 1100px) {
  .chat-card { height: var(--chat-h, clamp(22rem, 100svh - 21rem, 38rem)); }
}
.chat-placeholder { display: none; }
.chat-inner {
  container-type: inline-size;
  container-name: chat;
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1rem;
  min-height: 0;
}
.chat-head { flex: none; min-width: 0; }
.chat-sub { color: var(--muted); font-size: 0.82rem; margin-top: 0.1rem; }
.chat-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; }
.chat-actions { display: flex; gap: 0.35rem; flex: none; align-items: center; }
.icon-btn {
  width: 2.2rem; height: 2.2rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  display: grid; place-items: center;
}
.icon-btn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover:not(:disabled) { border-color: var(--indigo-soft); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.text-btn {
  height: 2.2rem; padding: 0 0.8rem; border-radius: 999px; cursor: pointer; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--border); background: transparent; color: var(--text); white-space: nowrap;
}
.text-btn:hover { border-color: var(--indigo-soft); }
.count-chip {
  flex: none;
  font-size: 0.72rem; font-weight: 600; color: var(--accent-text);
  background: var(--chip-bg); border-radius: 999px; padding: 0.15rem 0.6rem;
}
.log-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.log {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 0.2rem 0.15rem 0.4rem;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  position: relative;
}
.msg {
  flex: none;
  max-width: 100%;
  padding: 0.7rem 0.85rem; border-radius: 0.9rem;
  font-size: 0.9rem; line-height: 1.55;
  border: 1px solid var(--border);
}
.msg p + p, .msg p + ul, .msg ul + p { margin-top: 0.5rem; }
.msg ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.msg li + li { margin-top: 0.2rem; }
.msg.bot { background: var(--bubble-bot); align-self: flex-start; }
.msg.user { background: var(--bubble-user); align-self: flex-end; max-width: 88%; }
.msg.error { border-color: var(--coral); color: var(--coral); background: var(--bubble-bot); }
.msg a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
.msg .sources { margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); }
.msg .sources ul { margin-top: 0.25rem; }
.msg .next-line { font-weight: 600; }
.scroll-cue {
  flex: none; align-self: center;
  font-size: 0.72rem; font-weight: 600; color: var(--accent-text);
  background: var(--panel-strong); border: 1px solid var(--border);
  padding: 0.1rem 0.6rem; border-radius: 999px; margin-top: 0.25rem;
}
.scroll-cue[hidden] { display: none; }

/* thinking bubble */
.thinking { display: flex; flex-direction: column; gap: 0.35rem; }
.dots { display: inline-flex; gap: 0.35rem; align-items: center; height: 1rem; }
.dots span {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--purple-soft);
  animation: pulse 1.2s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.2s; background: var(--indigo-soft); }
.dots span:nth-child(3) { animation-delay: 0.4s; background: var(--pink); }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.35; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
.wait-note { font-size: 0.8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .dots span { animation: none; opacity: 1; transform: none; }
}

/* composer */
.composer {
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.45rem;
}
.composer textarea {
  width: 100%; min-width: 0; resize: none;
  min-height: 2.6rem; max-height: 8rem;
  padding: 0.6rem 0.85rem; border-radius: 1.3rem;
  border: 1px solid var(--border-strong); background: var(--panel-strong); color: var(--text);
  font-size: 0.9rem; line-height: 1.4;
  overflow-y: hidden;
}
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer textarea.scrolling { overflow-y: auto; }
.composer-buttons { display: flex; gap: 0.45rem; justify-content: flex-end; align-items: center; }
@container chat (min-width: 18.5rem) {
  .composer { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}
.mic-btn {
  width: 2.6rem; height: 2.6rem; border-radius: 50%; flex: none; cursor: pointer;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  display: grid; place-items: center;
}
.mic-btn[hidden] { display: none; }
.mic-btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mic-btn[aria-pressed="true"] {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #be185d, #7e22ce);
  box-shadow: 0 0 0 0.25rem rgba(244, 114, 182, 0.3);
}
.send-btn {
  height: 2.6rem; padding: 0 1.15rem; border-radius: 999px; border: 0; cursor: pointer; flex: none;
  font-weight: 700; color: var(--btn-text);
  background: linear-gradient(135deg, var(--btn-bg-1), var(--btn-bg-2));
}
.send-btn:disabled { cursor: progress; opacity: 0.7; }
.voice-status { flex: none; font-size: 0.78rem; color: var(--muted); }
.error-line { flex: none; font-size: 0.8rem; color: var(--coral); font-weight: 600; }
.voice-status[hidden], .error-line[hidden] { display: none; }
.chat-note { flex: none; font-size: 0.72rem; color: var(--muted); }

/* Full page mode: only the inner panel moves, the card keeps its size so nothing behind reflows.
   The card drops its blur here because backdrop-filter would trap the fixed panel inside the card. */
.chat-card.is-full { -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; }
.chat-card.is-full .chat-inner {
  position: fixed; z-index: 60;
  top: calc(0.75rem + env(safe-area-inset-top));
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  left: calc(0.75rem + env(safe-area-inset-left));
  right: calc(0.75rem + env(safe-area-inset-right));
  max-width: 64rem; margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.45);
}
.full-backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(6, 6, 18, 0.55);
}
:root[data-theme="light"] .full-backdrop { background: rgba(40, 36, 90, 0.25); }

/* ---------- Side cards ---------- */
.pill {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--accent-text); background: var(--chip-bg); border: 1px solid var(--border);
  padding: 0.2rem 0.65rem; border-radius: 999px;
}
.match-tile {
  margin-top: 0.7rem; padding: 0.9rem; border-radius: 0.9rem;
  background: linear-gradient(135deg, #4f46e5, #7e22ce 60%, #be185d);
  color: var(--tile-text);
}
.tile-kind { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #f5f3ff; }
.tile-title { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin-top: 0.2rem; line-height: 1.25; }
.fit-row { display: flex; align-items: baseline; gap: 0.4rem; margin-top: 0.75rem; }
.fit-score { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.fit-label { color: var(--muted); font-size: 0.8rem; }
.match-card, .shortlist-card { display: flex; flex-direction: column; }
.match-card > *, .shortlist-card > * { flex: none; }
.fit-why { margin-top: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.why-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.match-card .scroll-cue, .shortlist-card .scroll-cue, .details-card .scroll-cue { flex: none; }

.gauge-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.6rem; }
.gauge { width: 4rem; height: 4rem; flex: none; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: var(--gauge-track); stroke-width: 7; }
.gauge-fill { fill: none; stroke: var(--purple-soft); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
:root[data-theme="light"] .gauge-fill { stroke: #7e22ce; }
.gauge-text { transform: rotate(90deg); transform-origin: 32px 32px; fill: var(--text); font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.rank-note { font-size: 0.8rem; color: var(--muted); }
.list-wrap { display: flex; flex-direction: column; min-height: 0; }
.short-list { list-style: none; margin: 0.7rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; overflow-y: auto; min-height: 0; }
.short-list li { flex: none; }
.short-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.65rem; border-radius: 0.7rem; cursor: pointer; text-align: left;
  border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 0.85rem;
}
.short-btn:hover { border-color: var(--indigo-soft); }
.short-btn[aria-current="true"] { border-color: var(--purple-soft); background: var(--chip-bg); }
.short-name { min-width: 0; font-weight: 600; }
.short-score { flex: none; font-family: var(--font-head); font-weight: 700; color: var(--accent-text); }

.details-card { display: flex; flex-direction: column; }
.details-scroll { min-height: 0; overflow-y: auto; margin-top: 0.5rem; }
.details-name { font-family: var(--font-head); font-weight: 600; font-size: 1rem; }
.details-list { margin: 0.5rem 0 0; display: grid; gap: 0.4rem; }
.details-list div { display: grid; gap: 0.05rem; }
.details-list dt { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-text); }
.details-list dd { margin: 0; font-size: 0.85rem; }
.details-list a { color: var(--link); }
.guide-link { display: inline-block; margin-top: 0.6rem; font-weight: 600; font-size: 0.85rem; color: var(--link); }
.guide-link[hidden] { display: none; }
.next-step {
  flex: none; margin-top: 0.75rem; padding: 0.7rem 0.8rem; border-radius: 0.8rem;
  background: var(--panel-strong); border: 1px solid var(--border-strong);
}
.next-step h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-text); }
.next-step p { margin-top: 0.25rem; font-size: 0.85rem; }

/* ---------- Footer ---------- */
.foot {
  width: var(--board-w); margin: 0 auto;
  padding: 0.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
  color: var(--muted); font-size: 0.75rem; text-align: center;
  display: grid; gap: 0.3rem;
}

@media (max-width: 699px) {
  .nav-row { gap: 0.45rem 0.75rem; }
}
