/* ============================================================
   findmybrowser — refined brutalist: bold poster type, cream
   paper, ink lines, one blue. Clean grid, no gradients, light only.
   ============================================================ */

@font-face {
  font-family: "Archivo Black";
  src: url("../assets/fonts/ArchivoBlack.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #FBF5EA;
  --card: #FFFFFF;
  --card-2: #F3ECDD;
  --ink: #101010;
  --ink-soft: #4A4A4A;
  --ink-faint: #8A8578;
  --blue: #2B5CFF;
  --blue-soft: #E8EEFF;
  --yellow: #FFC700;
  --mint: #B9F2CB;
  --mint-ink: #0A5C2E;
  --amber: #FFE2A9;
  --amber-ink: #8A4B08;
  --line: 2px solid var(--ink);
  --shadow: 3px 3px 0 var(--ink);
  --shadow-lg: 5px 5px 0 var(--ink);
  --r: 2px;
  --disp: "Archivo Black", "Arial Black", sans-serif;
  --font: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: var(--ink); }

.disp, .q-title, .result-title, .welcome h1 { font-family: var(--disp); font-weight: 400; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: var(--line);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { text-decoration: none; display: block; }
.wordmark {
  display: inline-block;
  color: var(--ink);
  font-family: var(--disp);
  font-size: 1.05rem;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.wordmark b { color: var(--blue); font-weight: 400; animation: wm-blink 4s infinite; }
@keyframes wm-blink { 0%, 88% { opacity: 1; } 92% { opacity: 0; } 96% { opacity: 1; } }

.tabs { display: flex; gap: 26px; }
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.tab:hover { border-bottom-color: var(--ink); }
.tab.is-active { border-bottom-color: var(--blue); }

/* ---------- layout ---------- */

.main { max-width: 1100px; margin: 0 auto; padding: 40px 24px 90px; }

.view { display: none; }
.view.is-active { display: block; animation: viewIn .22s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { max-width: 760px; margin: 8px auto 44px; text-align: center; }
.page-head h1 {
  font-family: var(--disp);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.page-head p { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }

/* ---------- quiz shell ---------- */

.quiz-shell { max-width: 860px; margin: 0 auto; }

.quiz-topbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.quiz-nav { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-ghost {
  appearance: none;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .12s, box-shadow .12s;
}
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }

.btn-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.icon { width: 20px; height: 20px; display: block; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumb {
  appearance: none;
  font: inherit;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--blue-soft);
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: var(--r);
  padding: 3px 10px;
  cursor: pointer;
}
.crumb:hover { background: var(--blue); color: #fff; }
.crumb-sep { color: var(--ink-faint); font-size: .7rem; }

/* ---------- progress ---------- */

.progress {
  height: 12px;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 30px;
}
.progress i { display: block; height: 100%; background: var(--blue); transition: width .35s ease; }

/* ---------- question ---------- */

.q-card { animation: qIn .25s ease; position: relative; }
@keyframes qIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.q-ghost {
  position: absolute;
  top: -30px; right: -6px;
  font-family: var(--disp);
  font-size: clamp(7rem, 20vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px #E7DEC7;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.q-card > *:not(.q-ghost) { position: relative; z-index: 1; }

.q-eyebrow {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  margin: 0 0 16px;
}
.q-title {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.0;
  text-transform: uppercase;
  letter-spacing: -.005em;
  margin: 0 0 12px;
}
.q-hint { color: var(--ink-soft); margin: 0 0 30px; max-width: 640px; font-size: 1.02rem; }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.option {
  appearance: none;
  font: inherit;
  color: var(--ink);
  text-align: left;
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.option:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.option:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.option.is-selected { background: var(--blue-soft); border-color: var(--blue); box-shadow: var(--shadow); transform: translate(-2px, -2px); }

.option-num {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--disp);
  font-size: .95rem;
  margin-top: 2px;
}
.option.is-selected .option-num { background: var(--blue); color: #fff; }
.opt-check { width: 15px; height: 15px; }

.option-label { font-weight: 700; font-size: 1.04rem; display: block; margin-bottom: 2px; }
.option-desc { color: var(--ink-soft); font-size: .88rem; display: block; }

.continue-row { margin-top: 26px; display: flex; justify-content: center; }
.continue-note { text-align: center; font-size: .82rem; font-weight: 600; color: var(--amber-ink); margin: 12px 0 0; }

/* ---------- buttons ---------- */

.btn-primary {
  appearance: none;
  font-family: var(--disp);
  font-size: 1.05rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: var(--line);
  border-radius: var(--r);
  padding: 16px 34px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--blue);
  transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--blue); }
.btn-primary:disabled { opacity: .45; cursor: default; transform: none; box-shadow: 3px 3px 0 var(--blue); }
.btn-primary--sm { font-size: .9rem; padding: 13px 26px; }

/* ---------- welcome ---------- */

.welcome { padding: 30px 0 10px; }
.welcome-cols {
  display: grid;
  grid-template-columns: 1.2fr .85fr;
  gap: 56px;
  align-items: center;
}
.welcome-cols > * { min-width: 0; }
.welcome h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  line-height: .96;
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin: 10px 0 22px;
}
.welcome h1 em { font-style: normal; color: var(--blue); }
.welcome h1 mark {
  background: var(--yellow);
  color: var(--ink);
  padding: 0 10px 2px 6px;
  margin-left: -6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.welcome p { color: var(--ink-soft); max-width: 600px; margin: 0 0 32px; font-size: 1.12rem; font-weight: 500; }

/* the collection: a specimen sheet */
.wall {
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
}
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
}
.stamp, .stamp-void {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--card-2);
  border-bottom: 1px solid var(--card-2);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--card);
}
.stamp { cursor: pointer; transition: background .1s; position: relative; }
.stamp img { width: 22px; height: 22px; object-fit: contain; transition: transform .05s linear; }
.stamp .logo-mono { width: 22px; height: 22px; font-size: .62rem; transition: transform .05s linear; }
.stamp:hover, .stamp:focus-visible { background: var(--blue-soft); outline: none; }
.stamp:hover img, .stamp:focus-visible img,
.stamp:hover .logo-mono, .stamp:focus-visible .logo-mono { transform: scale(1.25); }
.stamp-void {
  background: repeating-linear-gradient(45deg, var(--card), var(--card) 5px, var(--card-2) 5px, var(--card-2) 7px);
}
.wall-caption {
  border-top: var(--line);
  padding: 8px 12px;
  height: 52px; /* fixed two-line label — hover must never move the layout */
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.wall-cap-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}
.wall-caption b { color: var(--blue); font-weight: 700; }

.welcome-stats { display: flex; gap: 0; margin-top: 40px; border-top: var(--line); }
.wstat { padding: 14px 22px 0 0; margin-right: 22px; border-right: 2px solid var(--ink); flex: 0 0 auto; }
.wstat:last-child { border-right: 0; }
.wstat b { display: block; font-family: var(--disp); font-size: 1.9rem; line-height: 1; }
.wstat span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }

/* ---------- logos ---------- */

.b-logo {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  display: grid; place-items: center;
}
.b-logo img { width: 36px; height: 36px; object-fit: contain; }
.logo-mono {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--disp);
  font-size: 1.3rem;
  text-transform: uppercase;
}
.logo-sm { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; }
.logo-sm img { width: 26px; height: 26px; object-fit: contain; }
.logo-sm .logo-mono { font-size: .8rem; border: 2px solid var(--ink); }

/* ---------- results ---------- */

.result-head { margin-bottom: 26px; }
.result-eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  margin: 0 0 16px;
}
.result-title {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.0;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.result-note { color: var(--ink-soft); margin: 0; max-width: 680px; font-size: 1.02rem; }

.result-hero {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  padding: 26px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.result-hero .result-title { color: var(--paper); }
.result-hero .result-note { color: #B9B29E; font-size: .95rem; }
.hero-pct {
  font-family: var(--disp);
  font-size: clamp(3.2rem, 9vw, 6rem);
  line-height: 1;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.howto {
  background: var(--card);
  border: var(--line);
  border-left: 8px solid var(--blue);
  border-radius: var(--r);
  padding: 18px 22px;
  margin: 26px 0 22px;
}
.howto h3 { margin: 0 0 6px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.howto p { margin: 0; font-size: 1.02rem; font-weight: 500; }

.result-list { display: flex; flex-direction: column; gap: 16px; }

.b-card {
  position: relative;
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  padding: 22px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.b-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.b-card--top { box-shadow: 6px 6px 0 var(--blue); }
.b-card--top:hover { box-shadow: 8px 8px 0 var(--blue); }

.b-card-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.b-name { font-family: var(--disp); font-size: 1.5rem; text-transform: uppercase; letter-spacing: .01em; }
.b-badge {
  position: absolute;
  top: -13px; right: 18px;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--disp);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 12px;
}
.match-pill {
  font-family: var(--disp);
  font-size: 1.05rem;
  color: var(--blue);
  background: var(--blue-soft);
  border: 2px solid var(--blue);
  border-radius: var(--r);
  padding: 4px 12px;
  font-variant-numeric: tabular-nums;
}
.b-card--top .match-pill { background: var(--blue); color: #fff; border-color: var(--blue); }

.b-tagline { color: var(--ink-soft); font-size: .98rem; font-weight: 500; margin: 0 0 12px; }

.b-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  color: var(--ink);
  background: var(--card);
  padding: 2px 8px;
}
.chip--engine { background: var(--ink); color: var(--paper); }
.chip--open { background: var(--mint); }

.fit-rows { display: flex; flex-direction: column; gap: 6px; }
.fit-row { display: flex; flex-wrap: wrap; gap: 6px; }
.why-chip, .trade-chip {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 4px 10px;
}
.why-chip { background: var(--mint); color: var(--ink); }
.trade-chip { background: var(--amber); color: var(--ink); }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row {
  appearance: none; font: inherit;
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  padding: 9px 14px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.mini-row:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.mini-rank { flex: 0 0 26px; font-family: var(--disp); font-size: .85rem; color: var(--ink-faint); }
.mini-name { font-weight: 700; flex: 1; font-size: .95rem; }
.mini-engine { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.mini-pct { font-family: var(--disp); font-size: 1rem; color: var(--blue); font-variant-numeric: tabular-nums; }

.also { margin-top: 30px; }
.also h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); margin: 0 0 12px; }
.also-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.result-actions { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- map overlay ---------- */

.map-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.map-fab:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--blue); color: var(--blue); }

.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16, 16, 16, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: overlayIn .18s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.overlay-panel {
  position: relative;
  background: var(--paper);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: 8px 8px 0 var(--ink);
  width: min(960px, 100%);
  max-height: min(86vh, 900px);
  max-height: min(86dvh, 900px);
  display: flex;
  flex-direction: column;
  animation: panelIn .22s ease;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.overlay-panel--narrow { width: min(640px, 100%); }
.overlay-panel--map { width: min(1000px, 100%); }

.overlay-head { padding: 24px 28px 16px; border-bottom: var(--line); }
.overlay-head h2 { margin: 0 0 4px; font-family: var(--disp); font-size: 1.25rem; text-transform: uppercase; }
.overlay-head p { margin: 0; color: var(--ink-soft); font-size: .9rem; max-width: 660px; }

.overlay-close {
  position: absolute; top: 14px; right: 14px;
  appearance: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
  transition: background .12s;
}
.overlay-close:hover { background: var(--ink); color: var(--paper); }
.overlay-close svg { width: 14px; height: 14px; }

.overlay-body { padding: 22px 28px 28px; overflow-y: auto; }

.map-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; }
@media (max-width: 720px) { .map-cols { grid-template-columns: 1fr; } }

.map-col-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-faint);
  margin: 0 0 14px;
  font-weight: 700;
}

.flow { list-style: none; margin: 0; padding: 0; }
.flow-item { position: relative; padding-bottom: 4px; }
.flow-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px; top: 36px; bottom: -2px;
  width: 2px;
  background: #D8D0BE;
}
.flow-item.is-answered:not(:last-child)::before { background: var(--blue); }

.flow-node {
  appearance: none; font: inherit;
  display: flex; align-items: flex-start; gap: 13px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 5px 6px;
  cursor: pointer;
  color: var(--ink);
}
.flow-node:hover:not(:disabled) .flow-q { text-decoration: underline; text-decoration-thickness: 2px; }
.flow-node:disabled { cursor: default; opacity: .45; }

.flow-dot {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  font-family: var(--disp);
  font-size: .78rem;
}
.flow-check { width: 13px; height: 13px; }
.flow-item.is-answered .flow-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.flow-item.is-current .flow-dot { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--blue); }
.flow-dot--end { background: var(--ink); color: var(--paper); }

.flow-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.flow-q { font-size: .9rem; font-weight: 700; }
.flow-item.is-upcoming .flow-q { color: var(--ink-soft); font-weight: 500; }
.flow-a { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.flow-a--empty { color: var(--ink-faint); font-weight: 500; text-transform: none; letter-spacing: 0; font-style: italic; }
.flow-item.is-current .flow-a { color: var(--ink); }

.map-note { font-size: .8rem; color: var(--ink-faint); margin: 14px 2px 0; }

/* ---------- browser modal ---------- */

.bm-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.bm-logo { width: 72px; height: 72px; border: var(--line); border-radius: var(--r); background: var(--card); display: grid; place-items: center; flex: 0 0 auto; }
.bm-logo img { width: 46px; height: 46px; object-fit: contain; }
.bm-name { font-family: var(--disp); font-size: 1.7rem; text-transform: uppercase; margin: 0; line-height: 1.05; }
.bm-tagline { color: var(--ink-soft); font-weight: 500; margin: 2px 0 0; }
.bm-desc { margin: 14px 0 18px; font-size: .98rem; }

.b-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
@media (max-width: 620px) { .b-cols { grid-template-columns: 1fr; } }
.b-col h4 { margin: 0 0 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.b-col--plus h4 { color: var(--mint-ink); }
.b-col--minus h4 { color: var(--amber-ink); }
.b-col ul { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--ink-soft); }
.b-col li { margin-bottom: 3px; }

.bm-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: var(--line);
  border-radius: var(--r);
  padding: 9px 16px;
  text-decoration: none;
  margin-top: 20px;
  box-shadow: none;
  transition: transform .12s, box-shadow .12s;
}
.bm-link:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--blue); }
.bm-link .btn-icon { width: 12px; height: 12px; }

/* ---------- family board (one big Miro-style canvas) ---------- */

.board-wrap { position: relative; }
.board-tools {
  position: absolute;
  top: 12px; right: 12px;
  display: flex; gap: 6px;
  z-index: 2;
}
.board-tool {
  appearance: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.board-tool:hover { background: var(--blue-soft); }
.board-tool svg { width: 15px; height: 15px; }

.board-scroll {
  overflow: auto;
  height: min(76vh, 900px);
  border: var(--line);
  border-radius: var(--r);
  cursor: grab;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--card-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--card-2) 1px, transparent 1px);
  background-size: 28px 28px;
}
.board-scroll.is-panning { cursor: grabbing; user-select: none; }

.fam-caption h2 {
  display: inline;
  font-family: var(--disp);
  font-size: 24px;
  line-height: 1.5;
  text-transform: uppercase;
  background: var(--yellow);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 3px 10px;
  margin: 0;
  color: var(--ink);
  font-weight: 400;
}
.fam-caption p {
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 12px 0 0;
  max-width: 560px;
}

.fam-svg { display: block; font-family: var(--font); }
.fam-svg .edge { fill: none; stroke: var(--ink); stroke-width: 2; }

.fam-node .box { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.fam-node .name { font-size: 13px; font-weight: 700; fill: var(--ink); }
.fam-node .sub { font-size: 9.5px; fill: var(--ink-faint); font-weight: 500; }
.fam-node .mono { font-family: var(--disp); font-size: 13px; fill: var(--paper); }

.fam-node.is-b { cursor: pointer; outline: none; }
.fam-node.is-b:hover .box, .fam-node.is-b:focus-visible .box { stroke: var(--blue); stroke-width: 3; }

.fam-node.is-label .box { fill: var(--ink); }
.fam-node.is-label .name { fill: var(--paper); }
.fam-node.is-label .sub { fill: #B8B29F; }

.fam-node.is-dead .box { fill: var(--paper); stroke-dasharray: 6 4; }
.fam-node.is-dead .name { fill: var(--ink-soft); }

/* ---------- features ---------- */

.feat-cat { margin-bottom: 44px; }
.feat-cat > h2 {
  font-family: var(--disp);
  font-size: 1.15rem;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: var(--line);
}
.cat-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  flex: 0 0 auto;
}
.cat-icon .icon { width: 17px; height: 17px; }

.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

.feat-card {
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
}
.feat-card h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; }
.feat-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: .88rem; }

.feat-browsers { display: flex; flex-wrap: wrap; gap: 6px; }
.feat-b {
  appearance: none; font: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 700;
  background: var(--card-2);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 3px 9px 3px 4px;
  cursor: pointer;
  transition: background .12s;
}
.feat-b:hover { background: var(--blue-soft); }
.feat-b img { width: 18px; height: 18px; object-fit: contain; }
.feat-b .logo-mono { width: 18px; height: 18px; font-size: .6rem; }

/* ---------- directory ---------- */

.directory-controls { max-width: 760px; margin: 0 auto 12px; display: flex; flex-direction: column; gap: 14px; }

#dir-search {
  font: inherit;
  font-weight: 500;
  width: 100%;
  padding: 13px 18px;
  border: var(--line);
  border-radius: var(--r);
  background: var(--card);
  color: var(--ink);
  outline: none;
}
#dir-search:focus { box-shadow: var(--shadow); }
#dir-search::placeholder { color: var(--ink-faint); }

.filter-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.filter-btn {
  appearance: none; font: inherit;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 5px 12px;
  cursor: pointer;
}
.filter-btn:hover { background: var(--card-2); }
.filter-btn.is-on { background: var(--ink); color: var(--paper); }

.dir-count { text-align: center; color: var(--ink-faint); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 8px 0 24px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.dir-card {
  background: var(--card);
  border: var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform .12s, box-shadow .12s;
}
.dir-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.dir-card .b-logo { width: 46px; height: 46px; }
.dir-card .b-logo img { width: 30px; height: 30px; }
.dir-card .logo-mono { font-size: 1rem; }
.dir-card h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 700; }
.dir-card .b-tagline { margin-bottom: 10px; font-size: .84rem; }
.dir-card .b-meta { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-footer {
  border-top: var(--line);
  padding: 28px 24px 36px;
  text-align: center;
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 500;
}
.site-footer p { margin: 4px 0; }
.footer-hint { color: var(--ink-faint); }
.footer-hint kbd {
  font-family: var(--mono);
  font-size: .74em;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 1px 6px;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .header-inner { padding: 12px 16px; }
  .wordmark { font-size: .9rem; }
  .tabs { gap: 16px; }
  .tab { font-size: .72rem; }
  .main { padding-top: 28px; }
  .options { grid-template-columns: 1fr; }
  .welcome-cols { grid-template-columns: 1fr; gap: 34px; }
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
  .welcome-stats { flex-wrap: wrap; }
  .wstat { padding-right: 18px; margin-right: 18px; }
  .map-fab { right: 14px; bottom: 14px; }
  .overlay { padding: 10px; }
  .overlay-body { padding: 16px; }
  .b-badge { right: 10px; }

  /* the map becomes a full-screen sheet, sized to the *dynamic* viewport so
     the bottom never hides behind a browser toolbar */
  #map-overlay { padding: 0; }
  .overlay-panel--map {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    box-shadow: none;
  }
  .overlay-body--map { padding: 16px 16px max(28px, env(safe-area-inset-bottom)); }
  .overlay-head { padding-right: 60px; }
  .result-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .q-ghost { top: -14px; }
  .board-scroll { height: 70vh; height: 70dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
