:root {
  /* StreetFeel: warm paper, street ink, one coral accent. Coral (#F2645A) is for marks, lines and large shapes only:
     it fails contrast as text, so links, small text and selected states use --accent (a darker coral). */
  color-scheme: light dark;
  --bg: light-dark(#f7f5ef, #111719);
  --surface: light-dark(#fffdf9, #182124);
  --surface-2: light-dark(#f0ece3, #1f2a2e);
  --ink: light-dark(#17242b, #efebe2);
  --muted: light-dark(#56636b, #a9b1b4);
  --muted-2: light-dark(#5f696f, #8c959a); /* passes 4.5:1 on paper, oat and the soft tints */
  --line: light-dark(#e5e0d5, #2a3539);
  --line-strong: light-dark(#d2cbbd, #38464b);
  --coral: #f2645a;
  --accent: light-dark(#b53a30, #ff8b7f);
  --accent-soft: light-dark(#fbe9e5, #3a1e1b);
  --accent-line: light-dark(#f2c4bc, #6a2f29);
  --on-accent: light-dark(#ffffff, #17242b);
  --sage: light-dark(#4f8a68, #78a98b);
  --sky: light-dark(#3f78a3, #6e9fc5);
  --good: light-dark(#2b7350, #7cc39b);
  --good-soft: light-dark(#e6f1ea, #14291d);
  --warn: light-dark(#8a5a05, #e7b35e);
  --warn-soft: light-dark(#f8edd9, #2e2410);
  --bad: light-dark(#a9372f, #f08a80);
  --bad-soft: light-dark(#fbe8e5, #371b18);
  --error: light-dark(#a9372f, #f08a80);

  --shadow: 0 1px 2px rgb(23 36 43 / .04), 0 10px 30px -14px rgb(23 36 43 / .14);
  --shadow-lg: 0 2px 6px rgb(23 36 43 / .06), 0 30px 60px -20px rgb(23 36 43 / .26);
  --display: "Funnel Display", system-ui, sans-serif;
  --text: "Funnel Sans", system-ui, sans-serif;
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 .9375rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, fieldset, legend, figure { margin: 0; padding: 0; border: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .2em; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, scale .12s;
}
.btn:active { scale: .98; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .8125rem; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in oklab, var(--ink) 86%, var(--coral)); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--ink); }

/* The main button: ink, with a coral line that runs while it's working */
.btn-ai {
  position: relative;
  isolation: isolate;
  min-height: 52px;
  padding: 0 24px;
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
}
.btn-ai .icon { color: var(--coral); }
.btn-ai[aria-busy="true"] { cursor: progress; }
.btn-ai[aria-busy="true"]::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: conic-gradient(from var(--spin), transparent 0 70%, var(--coral) 85%, transparent 100%);
  filter: blur(10px);
  opacity: .55;
  animation: spin 2.2s linear infinite;
}
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent);
}
/* Wordmark: the skyline mark (one coral line: street, house, tall building, rounded building) and "StreetFeel" */
.logo { display: flex; align-items: center; gap: 10px; font: 800 1.3rem/1 var(--display); letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.logo b { font-weight: 500; } /* "Street" bold, "Feel" lighter */
.mark { width: 48px; height: 18px; flex: none; overflow: visible; color: var(--coral);
  fill: none; stroke: currentColor; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; }

.search { position: relative; flex: 1; max-width: 480px; }
body[data-state="landing"] .search { visibility: hidden; }
.search .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); }
.search input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }
.search kbd {
  position: absolute; right: 12px; top: 50%; translate: 0 -50%;
  min-width: 22px; padding: 1px 6px; text-align: center;
  font: 500 .75rem var(--text); color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2);
}
.search-err:not(:empty) {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--surface); color: var(--error); font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
}

.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme {
  display: flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.theme label { position: relative; display: grid; place-items: center; width: 32px; height: 30px; border-radius: 999px; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.theme label:hover { color: var(--ink); }
.theme input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.theme .icon { width: 16px; height: 16px; }
.theme label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(23 36 43 / .14); }
.theme label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.credits {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line); border-radius: 999px;
  font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.credits b { font: 700 .9375rem var(--display); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .top { gap: 12px; }
  .credits span { display: none; }
  .search kbd { display: none; }
  .search input { padding-right: 14px; }
  .top-right .btn-primary { display: none; }
  .logo { font-size: 1.1rem; gap: 7px; }
  .logo .mark { width: 40px; height: 15px; }
}
/* Phones follow the system theme, which leaves room for the name beside the search box. */
@media (max-width: 560px) { .theme { display: none; } }

.pill-note {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .8125rem; font-weight: 500; color: var(--muted);
}
.pill-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.pill-note.sample .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* Landing */
.landing { padding: clamp(16px, 3.5vh, 40px) 16px 80px; }
.ask { max-width: 760px; margin: 0 auto; text-align: center; }
.ask-title {
  margin-top: 22px;
  font: 700 clamp(2.75rem, 7.5vw, 5rem)/.95 var(--display);
  letter-spacing: -.04em;
  text-wrap: balance;
}
.ask-lede { margin: 16px auto 0; font-size: 1.0625rem; color: var(--muted); text-wrap: balance; }
@media (max-width: 480px) { .ask-lede { font-size: .9375rem; } } /* one line on phones */
@media (max-width: 374px) { .ask-lede { font-size: .875rem; } }

.pc-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding: 8px 8px 8px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  transition: border-color .2s, box-shadow .2s;
}
.pc-field:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), 0 0 0 5px color-mix(in oklab, var(--accent) 16%, transparent); }
.pc-field > .icon { width: 22px; height: 22px; color: var(--muted); }
#postcode {
  flex: 1; min-width: 0; height: 52px;
  border: 0; background: none;
  font: 600 1.25rem var(--display); letter-spacing: .01em;
}
#postcode:placeholder-shown { font-family: var(--text); font-weight: 400; font-size: 1.0625rem; letter-spacing: 0; }
#postcode:not(:placeholder-shown) { text-transform: uppercase; }
#postcode::placeholder { color: var(--muted-2); }
#postcode:focus-visible { outline: none; }
.pc-field:has([aria-invalid="true"]) { border-color: var(--error); }
@media (max-width: 560px) {
  .pc-field { flex-wrap: wrap; border-radius: var(--r-xl); padding: 8px 8px 8px 18px; }
  .pc-field .btn-ai { width: 100%; }
}
.go-wide { width: 100%; min-height: 56px; margin-top: 28px; font-size: 1.0625rem; }
.pc-field { padding-right: 20px; }
.err { color: var(--error); font-size: .875rem; font-weight: 500; }
.err:not(:empty) { margin-top: 10px; }
.hint { margin-top: 6px; font-size: .8125rem; color: var(--muted); }

.prefs { position: relative; margin-top: 36px; text-align: left; }
.prefs-panel .prefs { margin-top: 0; }
.prefs > legend { font-weight: 600; font-size: 1rem; }
.landing .prefs > legend { font: 700 1.5rem var(--display); letter-spacing: -.02em; }
.landing .prefs > legend, .landing .prefs-help { text-align: center; width: 100%; }
.prefs-help { margin: 2px 0 14px; color: var(--muted); font-size: .875rem; }
/* Personas: compact pills by default (results panel), big cards on the landing page */
.personas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.persona {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: .8125rem; font-weight: 600; text-align: left; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, scale .12s;
}
.persona .icon { width: 15px; height: 15px; }
.persona-desc, .persona-check { display: none; }
.persona:hover { border-color: var(--accent); }
.persona:active { scale: .98; }
.persona[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.landing .personas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.landing .persona {
  flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 150px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); font-size: 1rem;
}
.landing .persona:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.landing .persona-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.landing .persona-icon .icon { width: 20px; height: 20px; }
.landing .persona-name { font: 700 1rem/1.2 var(--display); letter-spacing: -.01em; }
.landing .persona-desc { display: block; font-size: .8125rem; font-weight: 400; line-height: 1.4; color: var(--muted); }
.landing .persona-check { position: absolute; top: 12px; right: 12px; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.landing .persona-check .icon { width: 13px; height: 13px; stroke-width: 3; }
.landing .persona[aria-pressed="true"] { border: 2px solid var(--accent); padding: 15.5px; background: var(--accent-soft); color: var(--ink); box-shadow: var(--shadow-lg); }
.landing .persona[aria-pressed="true"] .persona-icon { background: var(--accent); color: var(--on-accent); }
.landing .persona[aria-pressed="true"] .persona-check { display: grid; }
@media (max-width: 860px) { .landing .personas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .landing .persona { min-height: 0; } .landing .persona[data-persona="all"] { grid-column: 1 / -1; } }

/* Categories: the secondary, fine-tuning layer */
.fine-tune { margin-top: 32px; }
.fine-h { font-weight: 600; font-size: .875rem; }
.fine-help { margin: 2px 0 10px; font-size: .8125rem; color: var(--muted); }
.landing .fine-tune { text-align: center; }
.landing .chip { min-height: 36px; padding: 0 12px 0 8px; gap: 6px; font-size: .8125rem; }
.landing .chip .icon:not(.lock) { width: 15px; height: 15px; }
.landing .chip .tick { width: 16px; height: 16px; }
.prefs-panel .fine-tune { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-tag { font-size: .6875rem; font-weight: 600; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.landing .chips { justify-content: center; max-width: 720px; margin-inline: auto; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px 0 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  font-weight: 500; font-size: .875rem; cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, scale .12s;
}
.chip:hover { border-color: var(--accent); }
.chip:active { scale: .97; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.chip .tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); }
.chip .tick .icon { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip:has(input:checked) .tick .icon { opacity: 1; }
.chip:has(input:disabled) { cursor: default; }
.chip-soon { opacity: .55; }
/* Always-included context chips: quiet grey, no tick (the lock says it), not clickable-looking */
.chips-fixed { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 16px; }
.landing .chips-fixed { justify-content: center; }
.chips-h .icon { width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.chips-h { margin: 0 0 8px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.chips-context { gap: 6px; }
.chip.chip-context, .chip.chip-context:hover, .chip.chip-context:has(input:checked) { background: var(--surface-2); border-color: var(--line); color: var(--muted); cursor: default; scale: none; }
.landing .chip.chip-context { min-height: 32px; padding: 0 12px; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip .lock { width: 13px; height: 13px; opacity: .7; }

.seg legend { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 8px; }
[aria-invalid="true"] { border-color: var(--error) !important; }
.seg { display: flex; flex-wrap: wrap; }
.seg legend { width: 100%; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; min-width: 104px; padding: 10px 18px; text-align: center; font-weight: 600; font-size: .875rem; background: var(--surface-2); border: 1px solid var(--line-strong); }
.seg label:first-of-type span { border-radius: 999px 0 0 999px; border-right: 0; }
.seg label:last-of-type span { border-radius: 0 999px 999px 0; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-sm { align-self: flex-start; }
.seg-sm span { min-width: 64px; padding: 6px 14px; font-size: .8125rem; }

/* Dashboard */
.dash {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 20px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 32px) 48px;
  align-items: start;
  outline: none;
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 960px) {
  .dash { grid-template-columns: 1fr; display: flex; flex-direction: column; align-items: stretch; }
  .col { display: contents; }
  .area { order: 1; } .ai { order: 2; } .scores { order: 3; } .cards-wrap { order: 4; } .prefs-panel { order: 5; } .dash-foot { order: 6; }
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel-title { font: 600 1rem var(--text); margin-bottom: 12px; }

.area-name {
  margin-top: 16px;
  font: 700 clamp(2rem, 3.2vw, 2.5rem)/1 var(--display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.area-sub { margin-top: 8px; color: var(--muted); font-size: .875rem; }
.score-scope { margin-top: 12px; font-size: .875rem; color: var(--muted); text-wrap: pretty; }
.score-scope a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.prefs-status { margin-top: 12px; font-size: .875rem; font-weight: 500; color: var(--good); }
.prefs-status:empty { display: none; }
.topic-key { margin-top: 10px; font-size: .75rem; line-height: 1.45; color: var(--muted); }
.connect { display: grid; gap: 6px; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: .8125rem; }
.connect li { display: flex; align-items: center; gap: 10px; }
.connect .icon { width: 16px; height: 16px; color: var(--muted); }
.connect-src { padding-left: 26px; font-size: .75rem; color: var(--muted-2); }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.score { display: flex; align-items: baseline; gap: 2px; }
.score-num { font: 800 4rem/.85 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.score-of { font: 500 1.25rem var(--display); color: var(--muted-2); }
.band { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; text-align: right; }
.band small { display: block; font-size: .6875rem; font-weight: 500; opacity: .85; }
.band:has(small) { flex-direction: column; align-items: flex-end; gap: 0; padding: 6px 14px; border-radius: var(--r-md); line-height: 1.3; }
.band.good, .badge.good { background: var(--good-soft); color: var(--good); }
.band.warn, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.band.bad, .badge.bad { background: var(--bad-soft); color: var(--bad); }

.radar { margin: 12px auto 0; max-width: 300px; }
.radar svg { display: block; width: 100%; height: auto; overflow: visible; }
.radar .ring { fill: none; stroke: var(--line); }
.radar .ring-outer { fill: var(--surface-2); stroke: var(--line); }
.radar .axis { stroke: var(--line); }
.radar .shape { fill: color-mix(in oklab, var(--coral) 16%, transparent); stroke: var(--coral); stroke-width: 2; stroke-linejoin: round; transform-origin: 150px 150px; animation: grow .9s var(--ease) both .1s; }
.radar .pt { fill: var(--surface); stroke: var(--coral); stroke-width: 2; animation: fade .4s both .6s; }
.radar .lbl { font: 600 14px var(--text); fill: var(--muted); }
.radar .val { font: 700 15px var(--display); fill: var(--ink); }
@keyframes grow { from { transform: scale(0); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.cat-rows { margin-top: 16px; display: grid; gap: 6px; }
.cat-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2);
  font-size: .875rem; font-weight: 500;
}
.cat-row .icon { color: var(--muted); }
.cat-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .6875rem; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.is-strength .cat-tag { background: var(--good-soft); color: var(--good); }
.is-watch .cat-tag { background: var(--warn-soft); color: var(--warn); }
.cat-row a { text-decoration: none; }
.cat-row a:hover { color: var(--accent); }
.cat-row .num { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; }
.cat-row .num small { margin-left: 6px; font: 600 .75rem var(--text); }
.cat-row .num small.plain { margin: 0; color: var(--muted); }
.good-t { color: var(--good); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }

/* AI verdict */
.ai {
  position: relative;
  isolation: isolate;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--coral);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ai-title { display: flex; align-items: center; gap: 10px; font: 600 .9375rem var(--text); }
.ai-title .mark { width: 34px; height: 13px; stroke-width: 30; }
.ai[aria-busy="true"] .ai-title .mark { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { scale: .7; opacity: .6; } }
.ai-actions { display: flex; gap: 6px; }
.verdict {
  margin-top: 16px;
  max-width: 62ch;
  min-height: 5.5em;
  font: 400 clamp(1rem, 1.4vw, 1.125rem)/1.6 var(--text);
  letter-spacing: -.005em;
  text-wrap: pretty;
}
/* Highlights: emphasis with a calm underline (sage for a strength, coral for a watch-out), not traffic-light blocks */
.verdict-lead { font-weight: 500; font-size: 1.08em; }
.verdict-body { margin-top: 10px; }
.verdict-body:empty { display: none; }
.verdict-check { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.verdict-check-h { margin-bottom: 6px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.verdict-check ul { display: grid; gap: 8px; padding-left: 1.1em; list-style: disc; }
.verdict-check li::marker { color: var(--coral); }
.verdict mark { background: none; color: var(--ink); font-weight: 600; text-decoration: underline 2px; text-underline-offset: .22em; text-decoration-skip-ink: none; }
.verdict mark.good { text-decoration-color: var(--sage); }
.verdict mark.warn { text-decoration-color: var(--coral); }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.15em; background: var(--accent); animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.skeleton { display: grid; gap: 10px; }
.skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton i:nth-child(2) { width: 92%; } .skeleton i:nth-child(3) { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* The conversation scrolls inside the card, so the verdict and the question box stay put however much is asked.
   Edges fade where there's more to scroll to (classes set in app.js). */
.thread { position: relative; display: grid; align-content: start; gap: 12px; max-height: min(480px, 60vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-gutter: stable; padding-right: 6px; }
.thread:not(:empty) { margin-top: 20px; }
.thread.more-above { mask-image: linear-gradient(to bottom, transparent, #000 32px); }
.thread.more-below { mask-image: linear-gradient(to top, transparent, #000 32px); }
.thread.more-above.more-below { mask-image: linear-gradient(to bottom, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.q { justify-self: end; max-width: 80%; padding: 10px 16px; border-radius: 18px 18px 4px 18px; background: var(--ink); color: var(--bg); font-weight: 500; }
.a { white-space: pre-line; max-width: 62ch; padding: 12px 16px; border-radius: 18px 18px 18px 4px; background: var(--surface-2); line-height: 1.55; }

.asks-wrap { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

.asks-label { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); font-weight: 500; }
.asks-label .icon { width: 15px; height: 15px; }
.asks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ask-chip {
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); color: var(--accent);
  font-size: .8125rem; font-weight: 500; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.ask-chip:hover { border-color: var(--accent); }
.ask-box {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  padding: 6px 6px 6px 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.ask-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent); }
.ask-box input { flex: 1; min-width: 0; height: 36px; border: 0; background: none; }
.ask-box input:focus-visible { outline: none; }
.ask-box input::placeholder { color: var(--muted-2); }
.send { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer; transition: opacity .15s; }
.send .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.ask-box:has(input:placeholder-shown) .send { background: var(--surface-2); color: var(--muted); }
.ask-box[aria-busy="true"] .send { opacity: .35; cursor: progress; }

/* Category cards: a bento grid that adapts to its own width */
.cards-wrap { container-type: inline-size; }
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; } /* cards in a row share one height: the owner prefers the even grid */
@container (min-width: 560px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card.wide { grid-column: span 2; } }
@container (min-width: 860px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .card.wide { grid-column: span 2; } }
.card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  scroll-margin-top: 84px;
  container-type: inline-size;
}
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head .icon { width: 20px; height: 20px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.card-head h3 { flex: 1; font: 600 .9375rem var(--text); }
.badge { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge.neutral { background: var(--surface-2); color: var(--muted); }
.badge.unavail { background: none; border: 1px dashed var(--line-strong); color: var(--muted); }
.card-lead { font-size: .9375rem; line-height: 1.45; text-wrap: pretty; }
.ctax { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ctax .env-group { margin: 0; }
.ctax-lead { font-size: .9375rem; line-height: 1.45; }
.ctax-bands { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.ctax-bands li { display: grid; place-items: center; gap: 1px; padding: 6px 0; border-radius: var(--r-sm); background: var(--surface-2); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ctax-bands b { font: 700 .875rem var(--display); color: var(--ink); }
.ctax-bands .is-common { background: var(--accent-soft); color: var(--accent); }
.ctax-bands .is-common b { color: var(--accent); }
.card-note { max-width: 62ch; font-size: .8125rem; color: var(--muted); }
.card.full .card-note { max-width: none; } /* a full-width card keeps all its text on one width */
.src { padding: 3px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .6875rem; font-weight: 600; }
.source-note { font-size: .75rem; line-height: 1.45; color: var(--muted-2); }
.flag-note { padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: .8125rem; line-height: 1.45; }

.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; align-items: center; gap: 10px; font-size: .8125rem; }
.bar-row span:first-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.track b { display: block; height: 100%; border-radius: 3px; transform-origin: left; animation: fill .9s var(--ease) both .3s; }
@keyframes fill { from { transform: scaleX(0); } }
/* Home page example verdict: static (no animation), same score, match and radar as the results page */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.example-link { margin-top: 12px; font-size: .875rem; }
.example-link a { color: var(--accent); }
.example { max-width: 760px; margin: 88px auto 0; scroll-margin-top: 84px; }
.example-h { margin-bottom: 20px; text-align: center; font: 700 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); letter-spacing: -.025em; text-wrap: balance; }
/* Section kicker: the street-and-signal line, then a small label. The one recurring brand device. */
.kicker { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; font: 600 .75rem var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ""; width: 28px; height: 8px; flex: none;
  background: radial-gradient(circle at 19px 4px, var(--coral) 3px, transparent 3.5px), linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat; }
.score-kicker { margin-bottom: 6px; font: 600 .75rem var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.example-card { gap: 0; padding: 0; overflow: hidden; }
.example-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: .875rem; }
.example-asof { margin-left: auto; font-size: .8125rem; color: var(--muted); }
.example-top .chip-tag { background: var(--surface); border: 1px solid var(--line); }
/* Phone: score, verdict, radar, buttons. Wider: text column on the left, radar centred beside it. */
.example-body { display: grid; gap: 16px; padding: 24px; grid-template-areas: "score" "copy" "rows" "actions"; }
.example-rows { grid-area: rows; margin: 0; }
.example-score { grid-area: score; }
.example-score .score-row { justify-content: flex-start; margin: 0; padding: 0; border: 0; }
/* Strengths and watch-outs: worked out from the scores, no AI */
.signals { grid-area: signals; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.sig-h { margin-bottom: 6px; font: 600 .6875rem var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.signals ul { display: grid; gap: 6px; }
.signals li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .875rem; }
.signals li b { font: 700 .9375rem var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.signals li small { font: 600 .75rem var(--text); color: var(--muted); }
.example-score .score-num { font-size: 3.25rem; }
.example-copy { grid-area: copy; }
.example-verdict { margin-bottom: 8px; font: 700 1.25rem/1.3 var(--display); letter-spacing: -.01em; text-wrap: pretty; }
.example-actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 10px; }
@container (min-width: 620px) {
  .example-body { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto auto 1fr; grid-template-areas: "score rows" "copy rows" "actions rows"; column-gap: 40px; padding: 28px 32px; }
  .example-rows { align-self: center; }
  .example-actions { align-self: end; margin-top: 4px; }
}
@media (max-width: 560px) { .example-actions .btn { flex: 1 1 100%; } .example-asof { margin-left: 0; } .example-top { padding-inline: 20px; } .example-body { padding: 20px; } }
.fill-good { background: var(--good); } .fill-warn { background: var(--warn); } .fill-bad { background: var(--bad); } .fill-neutral { background: var(--muted-2); }
.neutral-t { color: var(--muted); }
.lvl { min-width: 54px; text-align: right; font-weight: 600; font-size: .75rem; }

.card.full { grid-column: 1 / -1; }
.cards { grid-auto-flow: row dense; } /* a short card fills a gap left beside a full-width one */
.split-cols, .split-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@container (min-width: 640px) { .split-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 36px; align-items: start; } }
.sch { display: grid; gap: 12px; }
.sch-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sm { min-height: 32px; padding: 0 12px 0 8px; font-size: .8125rem; }
.chip-sm .tick { width: 16px; height: 16px; }
.sch-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.sch-table thead th { padding: 8px 10px; border-bottom: 1px solid var(--line-strong); text-align: left; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sch-table tbody th, .sch-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.sch-table tbody th { font-weight: 600; }
.sch-num { font-variant-numeric: tabular-nums; }
.sch-act { text-align: right !important; }
.link-btn { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: .8125rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.sch-more { justify-self: center; }
.sch-more[aria-busy="true"] { opacity: .6; cursor: progress; }
.sch-detail > td { padding: 18px 16px; background: var(--surface-2); }
.sch-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.sch-h { margin: 0 0 6px; font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sch-h:not(:first-child) { margin-top: 18px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.kv b { font-weight: 600; text-align: right; }
.muted { color: var(--muted-2); }
.sch-contact { margin: 4px 0 6px; font-size: .8125rem; line-height: 1.5; }
.sch-contact a { color: var(--accent); }
.sch-split { display: flex; flex: 0 1 60%; height: 22px; overflow: hidden; border-radius: 11px; font-size: .6875rem; font-weight: 600; }
.sch-split span { display: grid; place-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.sch-split .shade-0 { color: var(--surface); }
.sch-split .shade-3 { color: var(--ink); }
.sch-hist { display: grid; }
.sch-hist li { display: grid; grid-template-columns: 96px 10px 1fr; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.sch-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.sch-link { display: inline-block; margin-top: 10px; font-size: .8125rem; font-weight: 600; color: var(--accent); }
.sch-period { margin: -2px 0 4px; font-size: .75rem; font-style: italic; color: var(--muted); }
.sch-exam { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.sch-exam b { font-weight: 700; font-variant-numeric: tabular-nums; }
.sch-exam small { grid-column: 1 / -1; font-size: .75rem; }
.sch-foot { margin-top: 16px; font-size: .75rem; font-style: italic; color: var(--muted-2); }
/* Narrow cards: each school becomes a two-line row (name and rating, then phase, students and distance). */
@container (max-width: 620px) {
  .sch-table thead { display: none; }
  .sch-table, .sch-table tbody { display: block; }
  .sch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .sch-row > * { padding: 0 !important; border: 0 !important; }
  .sch-row > th { flex: 1 1 100%; }
  .sch-row > .sch-phase, .sch-row > .sch-num { font-size: .8125rem; color: var(--muted); }
  .sch-row > .sch-num::before { content: "· "; }
  .sch-row > td:nth-last-child(2) { margin-left: auto; }
  .sch-detail { display: block; }
  .sch-detail > td { display: block; }
  .sch-cols { grid-template-columns: 1fr; gap: 8px; }
}
.school-dist { font: 600 .8125rem var(--display); color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.tiles-2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.tile .icon { color: var(--muted); }
.tile-val { margin-top: 8px; font: 700 1.5rem/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-lbl { margin-top: 4px; font-size: .75rem; color: var(--muted); line-height: 1.35; }

.stacks { display: grid; gap: 16px; }
.stack-h { font-weight: 600; font-size: .8125rem; color: var(--muted); margin-bottom: 6px; }
.stack-bar { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.stack-seg { height: 100%; }
.shade-0 { background: color-mix(in oklab, var(--ink) 82%, var(--surface)); }
.shade-1 { background: color-mix(in oklab, var(--ink) 62%, var(--surface)); }
.shade-2 { background: color-mix(in oklab, var(--ink) 44%, var(--surface)); }
.shade-3 { background: color-mix(in oklab, var(--ink) 28%, var(--surface)); }
.shade-4 { background: color-mix(in oklab, var(--ink) 16%, var(--surface)); }
.stack-legend { display: grid; gap: 3px; margin-top: 8px; font-size: .75rem; }
.stack-legend li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; }
.stack-swatch { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgb(23 36 43 / .15); } /* the lightest shade still shows on paper */
.stack-legend b { font-variant-numeric: tabular-nums; }
.stack-legend em { font-style: normal; color: var(--muted-2); font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.rows { display: grid; gap: 6px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: .875rem; }
.row b { font: 700 .9375rem var(--display); font-variant-numeric: tabular-nums; }
.row { align-items: center; }
.row-sub { display: block; margin-top: 2px; font-size: .8125rem; color: var(--muted); }
.row b { white-space: nowrap; }

.env { display: grid; gap: 6px; }
.env-sec { border-radius: var(--r-md); background: var(--surface-2); interpolate-size: allow-keywords; }
.env-sec summary {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 12px; list-style: none; cursor: pointer; border-radius: var(--r-md); font-size: .875rem;
}
.env-sec summary::-webkit-details-marker { display: none; }
.env-sec summary:hover .chev { color: var(--ink); }
.env-sec summary > .icon { color: var(--muted); }
.env-t { font-weight: 500; }
.env-sec summary .icon { width: 16px; height: 16px; }
.chev { color: var(--muted-2); transition: rotate .2s var(--ease); }
.env-sec[open] .chev { rotate: 180deg; }
.env-sec::details-content { block-size: 0; overflow: hidden; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
.env-sec[open]::details-content { block-size: auto; }
.env-body { display: grid; gap: 8px; padding: 2px 12px 12px; }
.env-headline { font-weight: 600; font-size: .875rem; }
.env-explain { font-size: .8125rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.env-group { margin-top: 6px; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.env-item { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.env-item > .icon { margin-top: 2px; color: var(--muted); }
.env-item-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 600; font-size: .875rem; }
.env-item-h em { font: 700 .8125rem var(--display); font-style: normal; color: var(--muted); }
.env-item-t { margin-top: 2px; font-size: .8125rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.env-fig { margin-top: 6px; font-size: .75rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.env-advice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--ink); font-size: .8125rem; line-height: 1.5; }
.env-advice .icon { margin-top: 2px; color: var(--accent); }
.aff, .aff-body { display: flex; flex-direction: column; gap: 14px; }
.flag { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.flag .icon { color: var(--muted); margin-top: 2px; }
.flag-t { font-weight: 600; font-size: .875rem; }
.flag-d { font-size: .8125rem; color: var(--muted); }
.trend-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.trend-big { font: 800 1.75rem/1 var(--display); letter-spacing: -.03em; }
.trend-sub { font-size: .8125rem; color: var(--muted); }
.spark { width: 100%; height: 44px; display: block; overflow: visible; }
.spark .area-fill { fill: url(#spark-grad); }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.axis-lbls { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type { padding: 8px 6px; border-radius: var(--r-md); background: var(--surface-2); text-align: center; }
.type p:first-child { font-size: .75rem; color: var(--muted); }
.type p:last-child { font: 700 1rem var(--display); }

.dash-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.dash-foot a { font-size: .8125rem; color: var(--muted); }
@media (max-width: 560px) { .dash-foot { flex-direction: column; } .dash-foot p { display: flex; flex-wrap: wrap; justify-content: center; } }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; }

/* Buy dialog */
.buy {
  width: min(680px, calc(100vw - 32px));
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.buy::backdrop { background: rgb(8 14 26 / .45); backdrop-filter: blur(6px); }
.buy[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; translate: 0 12px; scale: .98; } }
.buy-close { position: absolute; top: 16px; right: 16px; }
.buy h2 { font: 700 1.625rem var(--display); letter-spacing: -.02em; }
.buy-sub { margin-top: 4px; color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 600px) { .packs { grid-template-columns: 1fr; } }
.pack { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 20px 16px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); text-align: center; }
.pack.featured { border: 2px solid var(--accent); background: var(--accent-soft); }
.pack-tag { position: absolute; top: -11px; left: 50%; translate: -50% 0; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pack-name { font-weight: 600; font-size: .875rem; color: var(--muted); }
.pack-n { font: 800 2.25rem/1.1 var(--display); letter-spacing: -.03em; }
.pack-n span { font: 500 .875rem var(--text); color: var(--muted); letter-spacing: 0; }
.pack-price { font: 700 1.25rem var(--display); }
.pack-per { font-size: .8125rem; color: var(--muted); margin-bottom: 12px; }
.pack .btn { margin-top: auto; }
.unlimited { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.unlimited > div { flex: 1; text-align: left; }
.unlimited .pack-per, .unlimited .pack-name { margin: 0; }
@media (max-width: 600px) { .unlimited { flex-wrap: wrap; } }
.card .err:not(:empty) { margin-top: -6px; }
.buy-msg:not(:empty) { margin-top: 14px; font-size: .875rem; color: var(--muted); text-align: center; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  /* Still show that something is working, without movement: the glow and placeholders stay, the verdict mark dims. */
  .ai[aria-busy="true"] .ai-title .mark { opacity: .5; }
}
/* Thumb-sized controls on phones and touch screens: at least 44px tall. */
@media (max-width: 560px), (pointer: coarse) {
  .landing .chip, .persona, .ask-chip, .btn-sm { min-height: 44px; }
  .site-foot p { gap: 0 8px; }
  .site-foot a { display: inline-block; padding: 12px 6px; }
}

/* Methodology page */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 16px 80px; }
.doc h1 { font: 700 clamp(2.5rem, 7vw, 3.75rem)/1 var(--display); letter-spacing: -.035em; }
.doc h2 { margin-top: 36px; font: 600 1.25rem var(--display); }
.doc p, .doc li { max-width: 64ch; color: var(--muted); margin-top: 10px; }
.doc ul { list-style: disc; padding-left: 1.2em; }

/* ---------- Compare two postcodes (/compare) ---------- */
.radar .ghost { fill: none; stroke: var(--muted-2); stroke-width: 1.5; stroke-dasharray: 5 4; stroke-linejoin: round; opacity: .8; }
.radar .val.none { fill: var(--muted-2); }
.cmp { max-width: 1040px; margin: 0 auto; padding: 24px clamp(16px, 3vw, 32px) 48px; outline: none; }
.cmp-title { font: 700 clamp(1.75rem, 3vw, 2.25rem)/1.1 var(--display); letter-spacing: -.03em; }
.cmp-fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; margin-top: 16px; }
.cmp-field { display: grid; gap: 4px; min-width: 0; }
.cmp-field label { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.cmp-field input, .cmp-field select { height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); font: 600 1rem var(--text); }
.cmp-field input { width: 13ch; text-transform: uppercase; }
.cmp-field input:placeholder-shown { text-transform: none; font-weight: 400; }
.cmp-field [aria-invalid="true"] { border-color: var(--error); }
.cmp-vs { align-self: center; margin-top: 18px; color: var(--muted); font-weight: 600; }
.cmp-fields > .btn { margin-top: 22px; min-height: 44px; }
.cmp-out { margin-top: 24px; }
.cmp-out[aria-busy="true"] .cmp-cards, .cmp-out[aria-busy="true"] .cmp-mobile { display: none; }
.cmp-verdict { max-width: none; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 1.0625rem; line-height: 1.5; }
.cmp-verdict mark { background: none; color: var(--ink); font-weight: 600; text-decoration: underline 2px var(--sage); text-underline-offset: .22em; }
/* Two cards whose parts line up across: each card is a subgrid over the same five rows. */
.cmp-cards { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto); column-gap: 20px; margin-top: 20px; }
.cmp-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cmp-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.cmp-card .radar { cursor: default; }
.cmp-head .area-name { margin-top: 0; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.cmp-head .area-name a { text-decoration: none; }
.cmp-head .area-name a:hover { color: var(--accent); }
.cmp-card .cat-row { min-height: 44px; }
.gap { margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 .75rem var(--text); }
.cmp-more { align-self: end; margin-top: 16px; font-size: .875rem; font-weight: 600; color: var(--accent); }
.cmp-mobile { display: none; }
.cmp-legend { display: flex; justify-content: center; gap: 18px; margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.cmp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cmp-legend .key { width: 22px; border-top: 2px solid var(--accent); }
.cmp-legend .key.dashed { border-top: 2px dashed var(--muted-2); }
.cmp-legend b { color: var(--ink); }
.cmp-table { width: 100%; margin-top: 16px; border-collapse: separate; border-spacing: 0 6px; font-size: .875rem; }
.cmp-table th, .cmp-table td { padding: 10px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.cmp-table td, .cmp-table thead th { white-space: nowrap; }
.cmp-table th:first-child { width: 100%; }
.cmp-table th:first-child { text-align: left; font-weight: 500; }
.cmp-table thead th { padding-block: 0 4px; font-size: .8125rem; }
.cmp-table thead a { font-weight: 700; color: var(--accent); }
.cmp-table tbody tr > * { background: var(--surface-2); }
.cmp-table tbody tr > :first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.cmp-table tbody tr > :last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.cmp-table td { font: 700 1rem var(--display); }
.cmp-table tr.overall > * { background: var(--accent-soft); }
.cmp-table small.plain { font: 600 .75rem var(--text); color: var(--muted); }
.cmp-table .gap { margin-left: 4px; }
@media (max-width: 700px) {
  .cmp-cards { display: none; }
  .cmp-mobile { display: block; padding: 16px; margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); }
  .cmp-field input { width: 100%; }
  .cmp-fields > .cmp-field { flex: 1 1 40%; }
  .cmp-vs { display: none; }
}
/* Results page: the way into compare, and back out to it */
.cmp-start { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.cmp-start .btn .icon { width: 16px; height: 16px; }
.cmp-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cmp-inline input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); text-transform: uppercase; }
.cmp-inline input:placeholder-shown { text-transform: none; }
.cmp-inline .err { flex-basis: 100%; }
.back-chip { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border: 1px solid var(--accent-line); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .875rem; font-weight: 600; text-decoration: none; }
.back-chip .icon { width: 16px; height: 16px; }
.back-chip[hidden] { display: none; }
@media (max-width: 960px) { .back-chip { order: 0; align-self: flex-start; } }

/* ---------- Homepage sections ---------- */
.ask-title span { color: var(--accent); }
.outside, .ask-demo, .facts { max-width: 960px; margin: 96px auto 0; }
.outside { text-align: center; }
.outside h2, .ask-demo h2, .facts h2 { font: 700 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.outside-lede { max-width: 52ch; margin: 10px auto 0; color: var(--muted); }
.outside-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 28px; text-align: left; }
.outside-grid li { display: grid; gap: 4px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.outside-grid .icon { width: 20px; height: 20px; margin-bottom: 4px; color: var(--ink); }
.outside-grid b { font: 600 .9375rem var(--display); }
.outside-grid span { font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.ask-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.ask-demo .kicker { justify-content: flex-start; }
.ask-demo-copy p:not(.kicker) { margin-top: 10px; color: var(--muted); max-width: 42ch; }
.ask-demo-chat { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--line); border-top: 3px solid var(--coral); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.ask-demo-chat .q { max-width: 85%; }
.ask-demo-chat .a { max-width: none; }
.ask-demo-src { font-size: .75rem; color: var(--muted-2); }
@media (max-width: 760px) { .ask-demo { grid-template-columns: 1fr; gap: 18px; } }
.facts { max-width: 680px; text-align: center; padding-bottom: 24px; }
.facts h2 span { color: var(--accent); }
.facts p { max-width: 60ch; margin: 12px auto 0; color: var(--muted); }
.facts a { color: var(--accent); font-weight: 600; }

/* ---------- Report: place, StreetFeel Score, signals ---------- */
.place-code { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font: 700 .8125rem var(--text); letter-spacing: .04em; }
.place .area-name { margin-top: 12px; }
.score-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.score-block .score-row { margin: 0; padding: 0; border: 0; }
/* The street-and-signal line as a 0-100 scale: band edges at 40 / 60 / 80 as small ticks, the coral point at the score. */
.score-line { position: relative; height: 14px; margin-top: 14px;
  background: linear-gradient(var(--line-strong), var(--line-strong)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 40% 50% / 2px 8px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 60% 50% / 2px 8px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 80% 50% / 2px 8px no-repeat; }
.score-line i { position: absolute; top: 50%; left: var(--at); width: 14px; height: 14px; translate: -50% -50%; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px var(--surface); }
.score-line { margin-bottom: 16px; }
.score-line b { position: absolute; top: 15px; translate: -50% 0; font-size: .6875rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.score-line::before { content: ""; position: absolute; left: 0; top: 50%; height: 2px; width: var(--at); translate: 0 -50%; background: var(--ink); } /* the street walked so far */
.area .signals { margin-top: 18px; grid-template-columns: 1fr; }
.scores .panel-title { margin-bottom: 4px; }
/* Ask StreetFeel */
.asks-label b { font-weight: 600; color: var(--ink); }
.asks-label span { color: var(--muted); font-weight: 400; }
.ask-jump { position: fixed; z-index: 40; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 .9375rem var(--text); box-shadow: var(--shadow-lg); cursor: pointer; }
.ask-jump .icon { color: var(--coral); }
@media (min-width: 961px) { .ask-jump { display: none !important; } }
@media (max-width: 960px) { body[data-state="dash"] .dash { padding-bottom: 88px; } } /* room so the button never covers the last lines */

/* Legal pages and the site footer */
.doc-date { font-size: .8125rem; color: var(--muted-2); }
.doc b { color: var(--ink); font-weight: 600; }
.doc a { color: var(--accent); }
.site-foot { max-width: 960px; margin: 56px auto 0; padding: 20px 16px 32px; border-top: 1px solid var(--line); }
.site-foot p { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: .8125rem; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
