/* Listing Check — one stylesheet for every page. */

:root {
  --canvas: #e6e3de;
  --surface: #ffffff;
  --sunken: #f3f1ed;
  --ink: #000000;
  --ink-2: #2b2926;
  --muted: #5c5750;       /* 6.9:1 on white, 5.3:1 on canvas */
  --faint: #8a847b;       /* decorative only */
  --line: #e7e4df;
  --line-strong: #cdc8bf;

  --ok: #2d6a48;
  --ok-tint: #eaf2ec;
  --bad: #a3392c;
  --bad-tint: #f8ebe8;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-xs: 8px;

  --shadow: 0 1px 2px rgba(20, 18, 15, 0.04), 0 12px 32px -16px rgba(20, 18, 15, 0.18);

  --spring: cubic-bezier(0.34, 1.26, 0.64, 1);  /* tiny overshoot */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: 'ss01', 'tnum';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

[hidden] { display: none !important; }

.icon { flex: none; display: block; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.mono { font-family: var(--mono); font-feature-settings: normal; letter-spacing: -0.01em; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  font-weight: 550; font-size: 15px; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease), color 160ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
@media (hover: hover) { .btn-primary:hover { background: #26241f; } }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 12px; }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.4; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink);
  transition: background-color 160ms var(--ease);
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.06); }

/* -------------------------------------------------------------- brand -- */

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: #fff;
}

/* =========================================================== START ==== */

.start {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: 32px 16px 48px;
}
.start-card {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 40px;
}
.start-card .brand { margin-bottom: 40px; }
.start h1 {
  margin: 0 0 12px; text-wrap: balance;
  font-size: 34px; line-height: 1.08; letter-spacing: -0.035em; font-weight: 600;
}
.start .lede { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 36ch; }

.preview {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 28px 0 32px;
}
.preview-tag {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; background: var(--sunken);
}
.preview-tag span { display: block; font-size: 12px; color: var(--muted); }
.preview-tag strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }

.field-label { display: block; font-size: 14px; font-weight: 550; margin-bottom: 8px; }
.licence-input {
  width: 100%; height: 56px;
  padding: 0 16px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--mono); font-size: 20px; letter-spacing: 0.04em;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.licence-input::placeholder { color: #b3ada4; }
.licence-input:hover { border-color: #a9a399; }
.licence-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }
.licence-input[aria-invalid='true'] { border-color: var(--bad); }
.field-help { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.form-error {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bad-tint); color: #6e231a;
  font-size: 14px; line-height: 1.45;
}
.form-error .icon { color: var(--bad); margin-top: 1px; }
.form-error p { margin: 0; }
.form-error p + p { margin-top: 4px; }
.form-error strong { font-weight: 600; color: #5a1b13; }
.form-error[hidden] { display: none; }

.start-actions { margin-top: 24px; }
.start-actions .btn { width: 100%; height: 52px; font-size: 16px; }

.loading {
  display: flex; flex-direction: column; gap: 12px;
  height: 52px; justify-content: center;
}
.loading[hidden] { display: none; }
.loading-text { font-size: 15px; font-weight: 550; text-align: center; }
.loading-track { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.loading-track::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 35%;
  background: var(--ink); border-radius: 3px;
  animation: indeterminate 1.4s var(--ease) infinite;
}
@keyframes indeterminate {
  from { transform: translateX(-100%); }
  to { transform: translateX(300%); }
}

.fresh {
  display: flex; align-items: center; gap: 10px;
  margin-top: 20px; font-size: 14px; color: var(--muted);
  cursor: pointer; user-select: none; width: fit-content;
}
.fresh input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

.start-foot { margin: 24px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ========================================================== REVIEW ==== */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(230, 227, 222, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-inner {
  max-width: 1360px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 24px;
}
.topbar-who { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar-who .agent { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-progress { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.position { font-size: 14px; font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }
.position span { color: var(--muted); font-weight: 450; }
.bar { width: 160px; height: 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.1); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width 300ms var(--ease); }
.reviewed-count { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.topbar-line { height: 1px; background: rgba(0, 0, 0, 0.06); }

.review-main {
  max-width: 1360px; margin: 0 auto;
  padding: 24px 24px 48px;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(400px, 1fr);
  gap: 32px;
  align-items: start;
}
.col-media { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-judge { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; min-width: 0; }

/* Animate the content, never an ancestor of the fixed mobile nav: a lingering
   transform/filter would turn it into the nav's containing block. */
.swap .col-media > *,
.swap .col-judge > :not(.nav-wrap),
.center-card.swap { animation: swap-in 260ms var(--ease) backwards; }
@keyframes swap-in {
  from { opacity: 0; filter: blur(6px); transform: scale(0.98); }
  to { opacity: 1; filter: none; transform: none; }
}

/* ----------------------------------------------------------- carousel -- */

.carousel { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #d6d2cb; }
.track {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
  aspect-ratio: 3 / 2;
}
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; background: #d6d2cb; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide.broken::after {
  content: 'Photo unavailable'; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 14px;
}
.carousel-arrow {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 999px; border: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.92); color: var(--ink);
  transition: opacity 200ms var(--ease), transform 200ms var(--spring), background-color 160ms;
}
.carousel-arrow:hover { background: #fff; transform: scale(1.06); }
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }
.carousel-arrow[disabled] { opacity: 0; pointer-events: none; }
.counter {
  position: absolute; right: 16px; bottom: 16px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.62); color: #fff;
  font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.thumbs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px; margin: -2px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  scroll-behavior: smooth;
}
.thumb {
  flex: none; width: 88px; aspect-ratio: 3 / 2;
  padding: 0; border: 0; border-radius: var(--r-xs); overflow: hidden;
  background: #d6d2cb; opacity: 0.55;
  outline: 2px solid transparent; outline-offset: -2px;
  transition: opacity 160ms var(--ease), outline-color 160ms var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 0.85; }
.thumb[aria-current='true'] { opacity: 1; outline-color: var(--ink); }

.no-photos {
  aspect-ratio: 3 / 2; border-radius: var(--r-lg);
  display: grid; place-items: center; align-content: center; gap: 12px;
  background: var(--sunken); color: var(--muted);
  border: 1.5px dashed var(--line-strong);
  text-align: center; padding: 24px; font-size: 15px;
}
.no-photos .icon { margin: 0 auto; color: var(--faint); }

/* -------------------------------------------------------- property head -- */

.prop-head { display: flex; flex-direction: column; gap: 10px; }
.role {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 550;
}
.role::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.role[data-role='both']::before { box-shadow: 4px 0 0 var(--ink); margin-right: 4px; }
.address { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
.prices { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; row-gap: 4px; font-size: 15px; }
.prices .price-main { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.prices .was { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.prices .lbl { color: var(--muted); font-weight: 450; margin-right: 4px; font-size: 14px; }
.prices .mls { color: var(--muted); font-size: 13px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.facts li {
  font-size: 13px; color: var(--ink-2);
  padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.05);
}

/* ------------------------------------------------------------ verdicts -- */

.verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tag {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1.5px solid var(--surface);
  padding: 18px 18px 14px;
  transition: border-color 200ms var(--ease);
}
.tag[data-verdict='true'] { border-color: var(--ok); }
.tag[data-verdict='false'] { border-color: var(--bad); }
.tag-source { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; min-height: 20px; }
.tag-stamp { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.tag[data-verdict='true'] .tag-stamp { color: var(--ok); }
.tag[data-verdict='false'] .tag-stamp { color: var(--bad); }
.tag-value { margin: 8px 0 0; font-size: 25px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 650; text-wrap: balance; }
.tag-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.tag-sub b { color: var(--ink-2); font-weight: 550; }
.tag-spacer { flex: 1; min-height: 16px; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: var(--r-sm); background: var(--sunken);
}
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: 9px;
  border: 1.5px solid transparent; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 500;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.seg button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.seg button .icon { transition: transform 220ms var(--spring); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); font-weight: 650; }
.seg button[aria-pressed='true'] .icon { transform: scale(1.12); }
.seg .yes[aria-pressed='true'] { border-color: var(--ok); }
.seg .yes[aria-pressed='true'] .icon { color: var(--ok); }
.seg .no[aria-pressed='true'] { border-color: var(--bad); }
.seg .no[aria-pressed='true'] .icon { color: var(--bad); }

/* -------------------------------------------------------------- reveal -- */

.reveal {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease), opacity 220ms var(--ease);
  opacity: 0;
}
.reveal.open { grid-template-rows: 1fr; opacity: 1; }
.reveal > div { overflow: hidden; min-height: 0; }
.reveal-body {
  background: var(--surface); border-radius: var(--r-md);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.reveal-body label { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.reveal-body p { margin: 0; font-size: 13px; color: var(--muted); }

.select-wrap { position: relative; margin-top: 4px; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 48px; padding: 0 44px 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); font-size: 16px; font-weight: 500;
  transition: border-color 160ms var(--ease);
}
.select-wrap select:hover { border-color: #a9a399; }
.select-wrap select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }
.select-wrap .icon { position: absolute; right: 14px; top: 50%; translate: 0 -50%; rotate: 90deg; pointer-events: none; }

/* ---------------------------------------------------------------- note -- */

.note { background: var(--surface); border-radius: var(--r-md); padding: 16px 18px 18px; }
.note-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.note-head label { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.save-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; min-height: 18px; transition: opacity 200ms var(--ease); }
.save-state[data-state='saved'] { color: var(--ok); }
.save-state[data-state='error'] { color: var(--bad); }
.save-state[data-state='idle'] { opacity: 0; }
.note textarea {
  width: 100%; min-height: 84px; resize: vertical;
  padding: 12px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--sunken);
  font-size: 15px; line-height: 1.45;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.note textarea::placeholder { color: #8f897f; }
.note textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }

/* ------------------------------------------------------------- details -- */

.details { background: var(--surface); border-radius: var(--r-md); }
.details summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  border-radius: var(--r-md);
}
.details summary::-webkit-details-marker { display: none; }
.details summary .icon { transition: rotate 220ms var(--ease); rotate: 90deg; color: var(--muted); }
.details[open] summary .icon { rotate: -90deg; }
.details summary span { color: var(--muted); font-weight: 450; font-size: 14px; margin-left: auto; }
.details-body { padding: 0 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.details dl { margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 8px; font-size: 14px; align-content: start; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; text-align: right; }
.details dd small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.details h3 { grid-column: 1 / -1; margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--ink); }

/* ----------------------------------------------------------------- nav -- */

.nav { display: flex; gap: 8px; }
.nav .btn-primary { flex: 1; }
.nav .btn-secondary { min-width: 120px; }
.nav-hint { margin: 2px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.nav-hint kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--surface); }

/* --------------------------------------------------------- done/empty -- */

.center-card {
  max-width: 520px; margin: 48px auto 0;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 40px; text-align: left;
}
.done-mark { width: 56px; height: 56px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; margin-bottom: 24px; }
.center-card h1 { margin: 0 0 12px; font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
.center-card p { margin: 0; color: var(--muted); font-size: 16px; }
.tally { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 28px 0; }
.tally div { background: var(--sunken); border-radius: var(--r-sm); padding: 14px 16px; }
.tally b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tally span { font-size: 13px; color: var(--muted); }
.tally .wrong b { color: var(--bad); }
.center-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.center-actions .btn { flex: 1; }

.skeleton { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(400px, 1fr); gap: 32px; }
.skeleton i { display: block; border-radius: var(--r-lg); background: rgba(0, 0, 0, 0.05); animation: pulse 1.4s ease-in-out infinite; }
.skeleton .s-hero { aspect-ratio: 3 / 2; }
.skeleton .s-col { display: flex; flex-direction: column; gap: 16px; }
.skeleton .s-col i:nth-child(1) { height: 120px; }
.skeleton .s-col i:nth-child(2) { height: 200px; }
.skeleton .s-col i:nth-child(3) { height: 140px; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* --------------------------------------------------------------- toast -- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  translate: -50% 0;
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 12px 12px 12px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-size: 14px;
  box-shadow: var(--shadow);
  animation: toast-in 260ms var(--spring) both;
}
.toast .icon { color: #ff9d8f; }
.toast button { margin-left: 4px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff; font-size: 13px; font-weight: 550; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================================================ ADMIN ==== */

.admin-main { max-width: 1360px; margin: 0 auto; padding: 32px 24px 48px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-head h1 { margin: 0; font-size: 34px; letter-spacing: -0.035em; line-height: 1.05; font-weight: 600; }
.admin-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .select-wrap { margin: 0; }
.filters select { height: 44px; min-width: 200px; font-size: 15px; }
.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1.5px solid var(--line-strong);
  font-size: 15px; font-weight: 500; cursor: pointer; user-select: none;
}
.toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.toggle:has(input:checked) { border-color: var(--ink); }
.filters .btn { height: 44px; }

.table-card { background: var(--surface); border-radius: var(--r-md); overflow: hidden; }
.table-scroll { overflow: auto; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
thead th:first-child, tbody td:first-child { padding-left: 20px; }
thead th:last-child, tbody td:last-child { padding-right: 20px; }
thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface);
  text-align: left; font-weight: 550; color: var(--muted); font-size: 13px;
  padding: 14px 12px; white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--line);
}
tbody td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #faf9f7; }
td.nowrap { white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
td.addr { min-width: 180px; max-width: 220px; }
td.note-cell { min-width: 160px; max-width: 260px; color: var(--ink-2); }
td.center, th.center { text-align: center; }
td.cat { min-width: 110px; max-width: 130px; }
td.when { color: var(--muted); font-size: 13px; }
.mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; }
.mark.ok { background: var(--ok-tint); color: var(--ok); }
.mark.bad { background: var(--bad-tint); color: var(--bad); }
.mark.none { color: var(--faint); }
.real { font-weight: 600; color: var(--bad); white-space: nowrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 48px 16px; }
.admin-error { padding: 20px; color: var(--bad); }

/* ======================================================= RESPONSIVE ==== */

@media (max-width: 1100px) {
  .review-grid, .skeleton { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr); gap: 24px; }
  .tag-value { font-size: 22px; }
}

@media (max-width: 860px) {
  .topbar-inner { height: 56px; padding: 0 12px 0 8px; gap: 8px; }
  .bar { width: 72px; }
  .reviewed-count { display: none; }
  .topbar-progress { gap: 12px; }

  .review-main { padding: 0 0 120px; }
  .review-grid, .skeleton { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .skeleton .s-col { padding: 16px; }
  .skeleton .s-hero { border-radius: 0; }
  .col-media { gap: 12px; display: contents; }
  .col-judge { position: static; display: contents; }

  .review-grid > * > * { margin-inline: 16px; }
  .review-grid .carousel, .review-grid .no-photos { margin-inline: 0; border-radius: 0; order: 1; }
  .review-grid .no-photos { border-left: 0; border-right: 0; aspect-ratio: auto; padding: 28px 24px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; }
  .review-grid .no-photos .icon { margin: 0; }
  .review-grid .no-photos .icon { width: 22px; height: 22px; }
  .review-grid .thumbs { order: 2; margin: 8px 16px 0; padding: 2px; }
  .review-grid .prop-head { order: 3; margin-top: 14px; }
  .review-grid .verdicts { order: 4; margin-top: 14px; }
  .review-grid .reveal { order: 5; scroll-margin-bottom: 96px; }
  .review-grid .reveal.open { margin-top: 12px; }
  .review-grid .note { order: 6; margin-top: 12px; }
  .review-grid .details { order: 7; margin-top: 12px; }
  .review-grid .nav-wrap { order: 8; }

  .thumb { width: 52px; }
  .carousel-arrow { width: 36px; height: 36px; }
  .carousel-arrow.prev { left: 12px; }
  .carousel-arrow.next { right: 12px; }
  .counter { right: 12px; bottom: 12px; }

  .address { font-size: 21px; line-height: 1.18; }
  .review-grid .track { aspect-ratio: 5 / 3; }
  .review-grid .prop-head { gap: 6px; }
  .role { height: 26px; font-size: 12px; padding: 0 10px; }
  .facts li { font-size: 12px; padding: 2px 8px; }
  .details summary span { display: none; }
  /* Stacked, but each card is one compact row (text left, verdict right) so
     both tags fit on a phone screen without scrolling. */
  .verdicts { grid-template-columns: 1fr; gap: 8px; }
  .tag {
    display: grid; grid-template-columns: minmax(0, 1fr) 124px;
    column-gap: 12px; align-items: center;
    padding: 12px 12px 12px 16px;
  }
  .tag-value { font-size: 20px; margin-top: 4px; }
  .tag-sub { font-size: 13px; margin-top: 4px; }
  .tag-spacer { display: none; }
  .seg { grid-template-columns: 1fr; }
  .seg button { height: 40px; justify-content: flex-start; padding: 0 12px; }

  .details-body { grid-template-columns: 1fr; gap: 20px; }

  .nav-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    margin: 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
  }
  .nav .btn-secondary { min-width: 0; width: 112px; }
  .nav-hint { display: none; }

  .center-card { margin: 24px 16px 0; padding: 28px 24px; }
  .center-card h1 { font-size: 26px; }

  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }

  .admin-main { padding: 24px 16px 32px; }
  .admin-head h1 { font-size: 28px; }
  .filters { width: 100%; }
  .filters .select-wrap { flex: 1 1 100%; }
  .filters select { width: 100%; min-width: 0; }
  .filters .toggle { flex: 1; }
  .filters .btn { flex: 1; }
  .table-scroll { max-height: none; }
}

@media (max-width: 480px) {
  .start { place-items: start center; padding: 16px 16px 32px; }
  .start-card { padding: 28px 20px 24px; border-radius: 20px; }
  .start-card .brand { margin-bottom: 28px; }
  .start h1 { font-size: 30px; }
  .preview { margin: 24px 0 28px; }
  .preview-tag { padding: 10px 12px; }
  .preview-tag strong { font-size: 14px; }
  .topbar-who .agent { max-width: 40vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .loading-track::after { animation: none; width: 100%; opacity: 0.25; }
}
