/* ==========================================================================
   mr-research design system
   Light is the base palette; dark is redefined twice so that both the
   explicit toggle and the untouched system default resolve correctly.
   ========================================================================== */

:root {
  --bg: #eef2f1;
  --surface: #ffffff;
  --surface-2: #e7edec;
  --surface-3: #dde5e4;
  --border: #ccd8d6;
  --border-soft: #e2eae9;
  --text: #14262b;
  --text-dim: #56696e;
  --text-mute: #85999e;
  --accent: #12707c;
  --accent-ink: #ffffff;
  --accent-soft: #d6ecec;
  --signal: #b1611c;
  --signal-soft: #f6e6d4;
  --ok: #21785a;
  --ok-soft: #d9ede4;
  --danger: #a33b31;
  --danger-soft: #f6ded9;
  --shadow-1: 0 1px 2px rgb(20 38 43 / 8%), 0 1px 1px rgb(20 38 43 / 4%);
  --shadow-2: 0 10px 30px rgb(20 38 43 / 12%);
  --overlay: rgb(20 38 43 / 40%);

  --head-h: 56px;
  --bar-h: 52px;
  --shell-max: 1360px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-pill: 999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  --utility: "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1418;
    --surface: #121f24;
    --surface-2: #18292f;
    --surface-3: #1f343b;
    --border: #294049;
    --border-soft: #1c2f36;
    --text: #e3eeef;
    --text-dim: #9db2b7;
    --text-mute: #708890;
    --accent: #56c6cf;
    --accent-ink: #06171a;
    --accent-soft: #10333a;
    --signal: #e2a35c;
    --signal-soft: #35291b;
    --ok: #6ecfa3;
    --ok-soft: #12332a;
    --danger: #f08a7e;
    --danger-soft: #3a1f1c;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-2: 0 14px 34px rgb(0 0 0 / 45%);
    --overlay: rgb(4 10 12 / 62%);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1418;
  --surface: #121f24;
  --surface-2: #18292f;
  --surface-3: #1f343b;
  --border: #294049;
  --border-soft: #1c2f36;
  --text: #e3eeef;
  --text-dim: #9db2b7;
  --text-mute: #708890;
  --accent: #56c6cf;
  --accent-ink: #06171a;
  --accent-soft: #10333a;
  --signal: #e2a35c;
  --signal-soft: #35291b;
  --ok: #6ecfa3;
  --ok-soft: #12332a;
  --danger: #f08a7e;
  --danger-soft: #3a1f1c;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-2: 0 14px 34px rgb(0 0 0 / 45%);
  --overlay: rgb(4 10 12 / 62%);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + var(--s-4));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(26px, 3vw, 36px);
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: currentColor;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.num,
time,
kbd {
  font-family: var(--utility);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  margin: 0;
  font: 600 10px/1.4 var(--utility);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.shell {
  width: min(var(--shell-max), calc(100% - var(--s-6)));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   App bar
   -------------------------------------------------------------------------- */

.app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--head-h);
  padding: 0 var(--s-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: inherit;
}

.brand__seal {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 11px/1 var(--utility);
  letter-spacing: 0.05em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-size: 14px;
  font-weight: 600;
}

.brand__text small {
  font: 500 10px/1.3 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.app-nav {
  display: flex;
  gap: var(--s-1);
}

.app-nav a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius-sm);
  font: 600 11px/1 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: background 140ms ease-out, color 140ms ease-out;
}

.app-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.app-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: background 140ms ease-out, color 140ms ease-out,
    border-color 140ms ease-out;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--text-mute);
}

.app-bar__tools {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.app-bar__tools form {
  margin: 0;
}

.logout-button {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Login guard
   -------------------------------------------------------------------------- */

.auth-page {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 32px 32px;
}

.auth-page main {
  padding-bottom: 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  width: min(1040px, calc(100% - 32px));
  min-height: min(680px, calc(100dvh - 64px));
  margin: 32px auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
}

.auth-context {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-7);
  min-width: 0;
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  background: var(--accent-soft);
  border-right: 1px solid var(--border);
}

.auth-context::after {
  content: "OBSERVATION / ACCESS / 01";
  position: absolute;
  right: -52px;
  top: 50%;
  color: color-mix(in srgb, var(--accent) 45%, transparent);
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.18em;
  transform: rotate(90deg) translateX(50%);
  transform-origin: right center;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.auth-brand > span:last-child {
  display: grid;
  line-height: 1.25;
}

.auth-brand strong {
  font-size: 14px;
}

.auth-brand small {
  color: var(--text-mute);
  font: 600 9px/1.4 var(--utility);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.auth-context__copy {
  max-width: 520px;
}

.auth-context__copy h1 {
  max-width: 12ch;
  margin-top: var(--s-3);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 0.98;
}

.auth-context__copy > p:last-child {
  max-width: 52ch;
  margin-top: var(--s-5);
  color: var(--text-dim);
}

.auth-route {
  display: flex;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-route li {
  position: relative;
  flex: 1;
  padding-top: var(--s-3);
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font: 600 8px/1.3 var(--utility);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-route li span {
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent-soft);
}

.auth-card {
  align-self: center;
  padding: clamp(28px, 5vw, 56px);
}

.auth-card__head h2 {
  margin-top: var(--s-2);
  font-size: 32px;
}

.auth-card__head > p:last-child {
  margin-top: var(--s-2);
  color: var(--text-dim);
  font-size: 13px;
}

.auth-error {
  margin-top: var(--s-5);
  padding: var(--s-3);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.auth-form label {
  margin-top: var(--s-2);
  color: var(--text-mute);
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.auth-form input:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-submit {
  justify-content: space-between;
  width: 100%;
  height: 42px;
  margin-top: var(--s-4);
}

.auth-card__note {
  margin-top: var(--s-5);
  color: var(--text-mute);
  font: 500 9px/1.5 var(--utility);
}

/* --------------------------------------------------------------------------
   Global search
   -------------------------------------------------------------------------- */

.search-wrap {
  position: relative;
  min-width: 0;
}

.global-search {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-3);
  height: 34px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: background 140ms ease-out, border-color 140ms ease-out;
}

.global-search:focus-within {
  background: var(--surface);
  border-color: var(--accent);
}

.global-search svg {
  flex: none;
  color: var(--text-mute);
}

.global-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 14px;
}

.global-search input::-webkit-search-cancel-button {
  appearance: none;
}

.global-search kbd {
  flex: none;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 10px;
  color: var(--text-mute);
}

.search-pop {
  position: absolute;
  top: calc(100% + var(--s-2));
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--s-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}

.search-pop[hidden] {
  display: none;
}

.search-hit {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.search-hit:hover,
.search-hit.is-active {
  background: var(--surface-2);
}

.search-hit__thumb {
  flex: none;
  width: 32px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.search-hit__name {
  font-weight: 600;
  font-size: 14px;
}

.search-hit__meta {
  font: 500 11px/1.3 var(--utility);
  color: var(--text-mute);
}

.search-pop__foot {
  display: block;
  padding: var(--s-3) var(--s-2);
  border-top: 1px solid var(--border-soft);
  margin-top: var(--s-1);
  font: 600 11px/1 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.search-pop__empty {
  padding: var(--s-4);
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Filter bar
   -------------------------------------------------------------------------- */

.filter-bar {
  position: sticky;
  top: var(--head-h);
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.filter-bar__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  min-height: var(--bar-h);
  padding: var(--s-2) 0;
}

.filter-bar__spacer {
  flex: 1;
}

.field {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.field > span {
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.field select,
.field input[type="search"] {
  height: 30px;
  padding: 0 var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
}

.field input[type="search"] {
  min-width: 220px;
}

.chip-set {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 30px;
  padding: 0 var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease-out, color 140ms ease-out,
    border-color 140ms ease-out;
}

.chip:hover {
  background: var(--surface-2);
  color: var(--text);
}

.chip__count {
  font: 600 10px/1 var(--utility);
  color: var(--text-mute);
}

.chip[aria-pressed="true"],
.chip[aria-current="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.chip[aria-pressed="true"] .chip__count,
.chip[aria-current="true"] .chip__count {
  color: inherit;
}

.chip[aria-current] {
  text-decoration: none;
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.segmented button {
  padding: var(--s-1) var(--s-3);
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--text-dim);
  font: 600 11px/1.6 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 140ms ease-out, color 140ms ease-out;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-checked="true"],
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-1);
}

.text-button {
  border: 0;
  background: none;
  padding: var(--s-1) var(--s-2);
  color: var(--text-dim);
  font: 600 11px/1 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.text-button:hover {
  color: var(--accent);
}

.result-count {
  font: 600 11px/1 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 32px;
  padding: 0 var(--s-4);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 12px/1 var(--body);
  cursor: pointer;
  text-decoration: none;
  transition: filter 140ms ease-out;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.primary-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-button--quiet {
  background: var(--signal-soft);
  border-color: var(--signal);
  color: var(--signal);
}

.source-button,
.source-link,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font: 600 11px/1 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
}

.source-button {
  height: 32px;
  padding: 0 var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.source-button:hover,
.source-link:hover,
.back-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Page furniture
   -------------------------------------------------------------------------- */

main {
  display: block;
  padding-bottom: var(--s-8);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding: var(--s-6) 0 var(--s-4);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.page-head p.lede {
  margin-top: var(--s-2);
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 14px;
}

.section-block {
  margin-top: var(--s-6);
}

.table-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: var(--s-3);
}

.table-toolbar--browse {
  justify-content: space-between;
}

.table-toolbar__controls {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.table-toolbar__filter input {
  width: min(320px, 70vw);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-3);
}

.section-head span {
  font: 600 11px/1 var(--utility);
  color: var(--text-mute);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Stat tiles
   -------------------------------------------------------------------------- */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-3);
}

.stat-tile {
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-tile dt {
  font: 600 10px/1.4 var(--utility);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.stat-tile dd {
  margin: var(--s-2) 0 0;
  font-family: var(--display);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-tile small {
  display: block;
  margin-top: var(--s-2);
  font: 500 11px/1.3 var(--utility);
  color: var(--text-mute);
}

/* --------------------------------------------------------------------------
   Run strip / callouts
   -------------------------------------------------------------------------- */

.run-strip {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.run-strip__status {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font: 500 12px/1.4 var(--utility);
  color: var(--text-dim);
}

.run-strip small {
  font: 500 11px/1.4 var(--utility);
  color: var(--text-mute);
}

.progress {
  flex: 1;
  min-width: 140px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 240ms ease-out;
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--signal);
  border-radius: var(--radius);
  background: var(--signal-soft);
  color: var(--text);
  font-size: 13px;
}

.callout--danger {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.callout strong {
  display: block;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Badges / rating
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 3px var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-dim);
  font: 600 10px/1.4 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--signal {
  background: var(--signal-soft);
  color: var(--signal);
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font: 600 11px/1 var(--utility);
  color: var(--text-dim);
}

.rating__stars {
  position: relative;
  display: inline-block;
  color: var(--border);
  letter-spacing: 1px;
}

.rating__stars i {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: var(--signal);
  font-style: normal;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--s-4);
}

.p-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out,
    border-color 160ms ease-out;
}

.p-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent);
}

.p-card--removed {
  opacity: 0.72;
}

.p-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  overflow: hidden;
  /* Flex items default to min-height:auto, which would let a tall image
     override the aspect ratio and give every card a different cover height. */
  min-height: 0;
}

.p-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font: 600 22px/1 var(--utility);
  color: var(--text-mute);
}

.p-card__badge {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
}

.p-card__rating {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  padding: 3px var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--overlay);
  color: #fff;
  font: 600 10px/1.4 var(--utility);
  backdrop-filter: blur(4px);
}

.p-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-3);
}

.p-card__body h3 a {
  color: inherit;
  text-decoration: none;
}

.p-card__body h3 a:hover {
  color: var(--accent);
}

.p-card__sub {
  font: 500 11px/1.4 var(--utility);
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin: 0;
  padding-top: var(--s-2);
  border-top: 1px solid var(--border-soft);
}

.p-card__stats div {
  min-width: 0;
}

.p-card__stats dt {
  font: 600 9px/1.4 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.p-card__stats dd {
  margin: 0;
  font: 600 14px/1.2 var(--utility);
  font-variant-numeric: tabular-nums;
}

.p-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: auto;
  padding: var(--s-2) var(--s-3);
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}

.p-card__foot a {
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Grid + tables
   -------------------------------------------------------------------------- */

/* The grids run domLayout:"autoHeight", so the whole 50-row page is visible and
   the page scrolls instead of a nested scrollbar. Height must stay auto. */
.grid-shell {
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.grid-profile {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  height: 100%;
}

.grid-profile img,
.grid-profile .image-placeholder {
  flex: none;
  width: 34px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.grid-profile__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.grid-profile__copy .grid-link,
.grid-profile__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-profile__copy small {
  color: var(--text-mute);
  font: 10px/1.3 var(--utility);
}

.availability-cell {
  height: 100%;
  display: grid;
  align-content: center;
  gap: 6px;
}

.availability-cell small {
  color: var(--text-dim);
  font: 10px/1 var(--utility);
}

.availability-tape {
  display: grid;
  grid-template-columns: repeat(30, minmax(2px, 1fr));
  gap: 2px;
  width: min(100%, 250px);
  height: 14px;
}

.availability-tape i {
  display: block;
  border-radius: 2px;
  background: var(--surface-3);
}

.availability-tape i.is-seen {
  background: var(--ok);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 60%, transparent);
}

.fallback-table td:first-child small {
  display: block;
  margin-top: 3px;
  color: var(--text-mute);
  font: 10px/1.3 var(--utility);
}

.grid-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.grid-link:hover {
  text-decoration: underline;
}

.grid-link--source {
  font: 600 11px/1 var(--utility);
  color: var(--text-dim);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  position: sticky;
  top: 0;
  padding: var(--s-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font: 600 10px/1.4 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

tbody td {
  padding: var(--s-3);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--surface-2);
}

.fallback-table {
  margin-top: var(--s-4);
}

/* Shown only when JavaScript never runs — the submit-based fallback controls. */
:root.has-js .js-hidden {
  display: none !important;
}

.theme-icon--dark {
  display: none;
}

:root[data-theme="dark"] .theme-icon--light {
  display: none;
}

:root[data-theme="dark"] .theme-icon--dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon--light {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-icon--dark {
    display: block;
  }

  :root[data-theme="light"] .theme-icon--light {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   Skeletons / empty states
   -------------------------------------------------------------------------- */

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface-3) 37%,
    var(--surface-2) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-card {
  height: 320px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.empty-state {
  padding: var(--s-7) var(--s-5);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
}

.empty-state strong {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  color: var(--text);
}

.empty-state p {
  margin-top: var(--s-2);
  font-size: 13px;
}

.empty-page {
  padding: var(--s-8) 0;
  text-align: center;
}

.empty-page .primary-button {
  margin-top: var(--s-4);
}

/* --------------------------------------------------------------------------
   Profile detail
   -------------------------------------------------------------------------- */

.profile-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  padding: var(--s-5) 0 var(--s-4);
}

.profile-hero__badges {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin: var(--s-2) 0;
}

.profile-hero__summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font: 500 12px/1.5 var(--utility);
  color: var(--text-dim);
}

.jump-nav {
  display: flex;
  gap: var(--s-1);
  flex-wrap: wrap;
  padding: var(--s-2) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.jump-nav a {
  padding: var(--s-1) var(--s-3);
  border-radius: var(--radius-pill);
  font: 600 10px/1.6 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
}

.jump-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: var(--s-3);
  padding: var(--s-5) 0;
}

.profile-evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  gap: var(--s-5);
  align-items: start;
  padding: var(--s-5) 0;
}

.profile-evidence__gallery {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 0;
}

.profile-contacts {
  min-width: 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery figcaption {
  padding: var(--s-2) var(--s-3);
  font: 500 10px/1.4 var(--utility);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--danger);
}

.lightbox {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  width: fit-content;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}

.lightbox::backdrop {
  background: var(--overlay);
}

.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  object-fit: contain;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: var(--s-5);
  align-items: start;
  padding-bottom: var(--s-7);
}

.paper-section,
.notebook-section {
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.paper-section + .paper-section,
.notebook-section + .notebook-section {
  margin-top: var(--s-4);
}

.paper-section h2 {
  margin: var(--s-1) 0 var(--s-3);
}

.notebook-section .eyebrow {
  margin-bottom: var(--s-3);
}

.published-description {
  white-space: pre-wrap;
  color: var(--text-dim);
  font-size: 14px;
}

.privacy-note {
  margin-bottom: var(--s-3);
  font-size: 12px;
  color: var(--text-mute);
}

.rating-histogram {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.rating-histogram div {
  display: grid;
  grid-template-columns: 34px 1fr 32px;
  align-items: center;
  gap: var(--s-3);
  font: 600 11px/1 var(--utility);
  color: var(--text-dim);
}

.rating-histogram .progress {
  min-width: 0;
}

.attribute-list,
.contact-list {
  display: grid;
  gap: var(--s-2);
  margin: 0;
}

.attribute-list div,
.contact-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px dotted var(--border);
}

.attribute-list dt,
.contact-list dt {
  font: 600 10px/1.5 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.attribute-list dd,
.contact-list dd {
  margin: 0;
  font-size: 13px;
  text-align: right;
  word-break: break-word;
}

.contact-list div {
  grid-template-columns: minmax(0, 1fr);
}

.contact-list dd {
  text-align: left;
  font-family: var(--utility);
  font-size: 12px;
}

.contact-list small,
.identity-history small {
  font: 500 10px/1.4 var(--utility);
  color: var(--text-mute);
}

.location-history,
.identity-history,
.event-timeline,
.version-list {
  list-style: none;
  margin: var(--s-3) 0 0;
  padding: 0 0 0 var(--s-4);
  border-left: 1px solid var(--border);
  display: grid;
  gap: var(--s-3);
}

.location-history li,
.identity-history li,
.event-timeline li,
.version-list li {
  position: relative;
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.location-history li::before,
.identity-history li::before,
.event-timeline li::before,
.version-list li::before {
  content: "";
  position: absolute;
  left: calc(var(--s-4) * -1 - 4px);
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.location-history span,
.identity-history span,
.event-timeline span,
.version-list span,
.event-timeline time,
.version-list time {
  font: 500 11px/1.4 var(--utility);
  color: var(--text-mute);
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
}

.review-list li {
  padding: var(--s-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg);
}

.review-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}

.review-list header span {
  font: 500 11px/1.4 var(--utility);
  color: var(--text-mute);
}

.review-list p {
  font-size: 14px;
  color: var(--text-dim);
}

.review-list blockquote {
  margin: var(--s-3) 0 0;
  padding: var(--s-3);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
}

.review-list blockquote span {
  display: block;
  margin-bottom: var(--s-1);
  font: 600 10px/1.4 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.review-list small,
.empty-row {
  font: 500 11px/1.4 var(--utility);
  color: var(--text-mute);
}

.is-removed {
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Research page
   -------------------------------------------------------------------------- */

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-4);
}

.analysis-card {
  position: relative;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.analysis-card__index {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 10px/1 var(--utility);
}

.analysis-card h2 {
  margin: var(--s-1) 0 var(--s-3);
  font-size: 17px;
}

.analysis-card strong {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--accent);
}

.analysis-card p {
  margin-top: var(--s-3);
  font-size: 13px;
  color: var(--text-dim);
}

/* The "no result yet" state is prose, not a numeral — keep it out of the
   display face so it does not read as a value. */
.analysis-card__empty {
  margin-top: 0;
  font-family: var(--utility);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.analysis-card small {
  display: block;
  margin-top: var(--s-2);
  font: 500 11px/1.4 var(--utility);
  color: var(--text-mute);
}

/* --------------------------------------------------------------------------
   Crawl city route
   -------------------------------------------------------------------------- */

.crawl-city-page {
  max-width: 1080px;
}

.crawl-city-head {
  padding-top: var(--s-7);
}

.route-count {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  color: var(--text-mute);
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.route-count strong {
  color: var(--accent);
  font: 600 34px/1 var(--display);
  letter-spacing: -0.03em;
}

.form-notice {
  margin-bottom: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--ok);
  border-radius: var(--radius-sm);
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 13px;
}

.form-notice--error {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.crawl-city-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.8fr);
  gap: var(--s-4);
  align-items: start;
}

.route-manifest,
.city-add-panel {
  padding: var(--s-5);
}

.route-manifest__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.route-manifest__head h2,
.city-add-panel h2 {
  margin-top: var(--s-1);
}

.route-state,
.route-stop__status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--s-2);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-mute);
  font: 600 9px/1 var(--utility);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.route-state--running,
.route-stop__status--running,
.route-stop__status--queued {
  background: var(--signal-soft);
  color: var(--signal);
}

.route-state--completed,
.route-stop__status--completed {
  background: var(--ok-soft);
  color: var(--ok);
}

.route-state--partial,
.route-stop__status--partial,
.route-state--resumable,
.route-stop__status--failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.route-list {
  margin: 0;
  padding: var(--s-2) 0 0;
  list-style: none;
}

.route-stop {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: var(--s-3);
  min-height: 70px;
}

.route-stop:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 25px;
  bottom: -3px;
  left: 8px;
  width: 1px;
  background: var(--border);
}

.route-stop__node {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: 17px 0 0 4px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.route-stop__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border-soft);
}

.route-stop:last-child .route-stop__body {
  border-bottom: 0;
}

.route-stop h3 {
  overflow: hidden;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop a {
  display: block;
  margin-top: 3px;
  color: var(--text-mute);
  font: 500 10px/1.3 var(--utility);
  text-decoration: none;
}

.route-stop a:hover {
  color: var(--accent);
}

.remove-city {
  padding: var(--s-2);
  border: 0;
  background: none;
  color: var(--text-mute);
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.remove-city:hover {
  color: var(--danger);
}

.remove-city:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.city-add-panel {
  position: sticky;
  top: calc(var(--head-h) + var(--s-4));
}

.city-add-panel > p:not(.eyebrow) {
  margin-top: var(--s-3);
  color: var(--text-dim);
  font-size: 13px;
}

.city-add-form {
  margin-top: var(--s-5);
}

.city-add-form label {
  display: block;
  margin-bottom: var(--s-2);
  color: var(--text-mute);
  font: 600 10px/1 var(--utility);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.city-add-form__action {
  display: flex;
  gap: var(--s-2);
}

.city-add-form input[type="text"] {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 0 var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.city-add-form input[type="text"]:focus {
  border-color: var(--accent);
  outline: 0;
}

.city-add-panel .primary-button {
  height: 34px;
  flex: none;
}

.city-add-panel .city-add-panel__note {
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-soft);
  color: var(--text-mute);
  font: 500 10px/1.5 var(--utility);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-foot {
  padding: var(--s-5) var(--s-5) var(--s-6);
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font: 500 11px/1.6 var(--utility);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .brand__text small {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-bar {
    /* minmax(0,…) lets the nav shrink instead of pushing the bar — and the
       page — wider than the viewport. */
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand nav tools"
      "search search search";
    padding: var(--s-2) var(--s-4);
    row-gap: var(--s-2);
  }

  .brand {
    grid-area: brand;
  }

  .app-nav {
    grid-area: nav;
    justify-self: end;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .app-nav::-webkit-scrollbar {
    display: none;
  }

  .app-bar__tools {
    grid-area: tools;
  }

  .search-wrap {
    grid-area: search;
  }

  .filter-bar {
    position: static;
  }

  .filter-bar__inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  /* The bar scrolls sideways as one strip; nothing inside it may wrap. */
  .filter-bar__inner > * {
    flex: none;
  }

  .chip-set {
    flex-wrap: nowrap;
  }

  .filter-bar__spacer {
    display: none;
  }

  .table-toolbar__controls {
    width: 100%;
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-evidence {
    grid-template-columns: minmax(0, 1fr);
  }

  .crawl-city-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .city-add-panel {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - var(--s-4));
  }

  .app-bar {
    column-gap: var(--s-2);
  }

  .brand__text {
    display: none;
  }

  .app-nav {
    gap: 0;
  }

  .app-nav a {
    padding: var(--s-2) 6px;
    font-size: 9px;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--s-3);
  }

  .field input[type="search"] {
    min-width: 160px;
  }

  .table-toolbar__filter {
    flex: 1 1 100%;
  }

  .table-toolbar__filter input {
    width: 100%;
  }

  .page-head {
    padding-top: var(--s-5);
  }

  .route-manifest,
  .city-add-panel {
    padding: var(--s-4);
  }

  .route-stop__body {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .route-stop__status {
    display: none;
  }

  .city-add-form__action {
    align-items: stretch;
    flex-direction: column;
  }

  .city-add-panel .primary-button {
    justify-content: center;
  }

  .logout-button {
    padding-inline: var(--s-1);
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: calc(100dvh - 32px);
    margin: 16px auto;
  }

  .auth-context {
    min-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .auth-context__copy h1 {
    font-size: clamp(36px, 11vw, 56px);
  }

  .auth-context__copy > p:last-child,
  .auth-context::after {
    display: none;
  }

  .auth-route li {
    overflow: hidden;
    text-indent: -9999px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
