/* ==========================================================================
   Kosher Travel — design tokens
   ========================================================================== */
:root {
  color-scheme: light;

  --bg: #faf9f7;
  --bg-tint: #f2efe9;
  --surface: #ffffff;
  --surface-2: #f5f3ef;
  --surface-3: #eeebe4;
  --border: #e5e1d8;
  --border-strong: #d5cfc2;

  --ink: #16181b;
  --ink-2: #3f434a;
  --muted: #74777e;
  --faint: #9a9ca2;

  --accent: #0d6b63;
  --accent-hover: #0a564f;
  --accent-ink: #ffffff;
  --accent-tint: #e6f1ef;
  --accent-line: #bcdcd7;

  --star: #dc9a1f;
  --danger: #a53420;
  --danger-tint: #fbeceb;
  --good: #2f7d55;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

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

  --shadow-sm: 0 1px 2px rgba(20, 22, 25, .05);
  --shadow-md: 0 1px 2px rgba(20, 22, 25, .04), 0 6px 18px -6px rgba(20, 22, 25, .12);
  --shadow-lg: 0 2px 4px rgba(20, 22, 25, .04), 0 18px 40px -14px rgba(20, 22, 25, .22);

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --header-h: 56px;
  --tabbar-h: 62px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #0e1012;
    --bg-tint: #14171a;
    --surface: #171a1d;
    --surface-2: #1e2226;
    --surface-3: #262b30;
    --border: #272c31;
    --border-strong: #363c43;

    --ink: #eceef0;
    --ink-2: #c3c7cc;
    --muted: #949aa1;
    --faint: #6f757c;

    --accent: #5ac5b9;
    --accent-hover: #74d3c8;
    --accent-ink: #06231f;
    --accent-tint: #142c29;
    --accent-line: #21403b;

    --star: #e8b23f;
    --danger: #eb8a76;
    --danger-tint: #2a1815;
    --good: #6fc492;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -6px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 18px 40px -14px rgba(0, 0, 0, .7);
  }
}

/* ==========================================================================
   base — mobile first.
   Everything below the first min-width query is the phone layout. Breakpoints
   only ever add: 600px (large phone / small tablet), 860px (tablet, where the
   bottom tab bar gives way to inline nav), 1040px (desktop).
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

/* Rules below set display on elements toggled with the hidden attribute
   (.btn, .stat-row, .tabbar), and would otherwise win. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  /* room for the bottom tab bar, plus the iOS home indicator */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 640;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: 27px; }
h2 { font-size: 19px; }
h3 { font-size: 17px; }

p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

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

img { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
main { padding: var(--sp-5) 0 var(--sp-6); }
/* Visually hidden but still focusable and readable by assistive tech. The
   resets matter: form controls otherwise keep their min-height and padding
   here and reserve real space in the layout. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 600px) {
  h1 { font-size: 32px; }
  h2 { font-size: 21px; }
  .wrap { padding: 0 20px; }
  main { padding: var(--sp-6) 0 var(--sp-7); }
}
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  h1 { font-size: 34px; }
}

/* ==========================================================================
   header + bottom tab bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--surface); } }
/* a hairline of accent under the header, fading out to the right */
.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent 55%);
  opacity: .5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--accent), color-mix(in srgb, var(--accent) 58%, #000));
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.brand-mark svg { width: 20px; height: 20px; }

/* the inline nav is desktop-only; phones get .tabbar instead */
.nav { display: none; align-items: center; gap: var(--sp-1); }
.nav .navlink {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  transition: background .15s, color .15s;
}
.nav .navlink:hover { background: var(--surface-2); color: var(--ink); }
.nav .navlink[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }

.header-account { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.whoami {
  display: none;
  font-size: 13px;
  color: var(--muted);
  max-width: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar {
  position: fixed;
  z-index: 50;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) { .tabbar { background: var(--surface); } }
.tabbar a {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px;
  border-radius: var(--r-md);
  color: var(--muted);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 21px; height: 21px; flex: none; }
.tabbar a span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabbar a:active { background: var(--surface-2); }
.tabbar a[aria-current="page"] { color: var(--accent); }

@media (min-width: 860px) {
  .nav { display: flex; }
  .whoami { display: block; }
  .tabbar { display: none; }
}

/* ==========================================================================
   buttons — 44px minimum touch target
   ========================================================================== */
button, .btn {
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
@media (hover: hover) {
  button:hover, .btn:hover { background: var(--surface-2); border-color: var(--muted); }
}
button:active, .btn:active { transform: translateY(1px); }

.btn-primary, button.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .btn-primary:hover, button.primary:hover { background: var(--accent-hover); border-color: transparent; }
}

button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
@media (hover: hover) {
  button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
}

button.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  background: transparent;
}
@media (hover: hover) {
  button.danger:hover { background: var(--danger-tint); border-color: var(--danger); }
}

/* "small" stays finger-sized on touch screens, and only shrinks where there
   is a real pointer */
button.small, .btn.small { font-size: 14px; padding: 8px 12px; border-radius: var(--r-sm); }
@media (hover: hover) and (pointer: fine) {
  button, .btn { min-height: 0; padding: 9px 15px; font-size: 14px; }
  button.small, .btn.small { min-height: 0; padding: 5px 10px; font-size: 13px; }
}
button.block, .btn.block { width: 100%; }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ==========================================================================
   forms
   ========================================================================== */
label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.hint { font-size: 12.5px; font-weight: 400; color: var(--muted); line-height: 1.45; }

input, select, textarea {
  font: inherit;
  /* 16px keeps iOS Safari from zooming in when a field is focused */
  font-size: 16px;
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
@media (hover: hover) {
  input:hover, select:hover, textarea:hover { border-color: var(--muted); }
}
select {
  appearance: none;
  padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input[type="file"] { padding: 10px 13px; background: var(--surface-2); cursor: pointer; }

.field { margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }
.field .hint { display: block; margin-top: 5px; }
/* hints written inside a label stay on the label's line */
.field label .hint, label .hint { display: inline; margin-top: 0; margin-left: 2px; }

/* single column on phones; the grid only kicks in when there is room */
.grid-2, .grid-3 { display: grid; gap: 0 var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.check-row { display: flex; gap: 10px; align-items: flex-start; }
.check-row input { width: auto; min-height: 0; flex: none; margin-top: 4px; }
.check-row label { margin: 0; }

/* ==========================================================================
   surfaces
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: var(--sp-4);
}
@media (min-width: 600px) { .card { padding: var(--sp-5); } }

.page-head { margin-bottom: var(--sp-4); }
.page-head h1 { margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 68ch; font-size: 15px; }
@media (min-width: 600px) { .page-head { margin-bottom: var(--sp-5); } }

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--sp-6) 0;
  background:
    radial-gradient(720px 300px at 8% -30%, var(--accent-tint), transparent 70%),
    radial-gradient(520px 260px at 96% -10%, color-mix(in srgb, var(--star) 14%, transparent), transparent 70%),
    var(--bg-tint);
  border-bottom: 1px solid var(--border);
}
.hero .wrap { position: relative; z-index: 1; }
/* dotted flight path arcing across the hero */
.hero-deco {
  position: absolute;
  top: 0; right: 0;
  width: 460px;
  max-width: 78%;
  color: var(--accent);
  opacity: .22;
  pointer-events: none;
}
.hero h1 { max-width: 26ch; margin-bottom: 10px; font-size: 28px; }
.hero p { color: var(--ink-2); max-width: 62ch; font-size: 15.5px; }
.hero-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-4); }
.hero-actions .btn { flex: 1 1 auto; }
@media (min-width: 600px) {
  .hero { padding: var(--sp-7) 0 calc(var(--sp-7) - 8px); }
  .hero h1 { font-size: clamp(30px, 4.4vw, 44px); max-width: 30ch; margin-bottom: 12px; }
  .hero p { font-size: 16.5px; }
  .hero-actions { margin-top: var(--sp-5); }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ==========================================================================
   stats — two up on the narrowest screens
   ========================================================================== */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
/* three stats in a 2-up grid would leave a hole; the odd one out spans */
.stat-row > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.stat::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
  opacity: .5;
  margin-bottom: 8px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 660;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 550;
}
@media (min-width: 600px) {
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 25px; }
  .stat span { font-size: 12px; }
}

/* ==========================================================================
   filters — a collapsible sheet on phones, a bar on desktop
   ========================================================================== */
.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  align-items: end;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.filters label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.filters label .hint { text-transform: none; letter-spacing: 0; }
.filters button[type="reset"] { width: 100%; }
/* the search field and the reset button take the full width of the sheet */
.filters > *:first-child, .filters > *:last-child { grid-column: 1 / -1; }
@media (min-width: 600px) { .filters { margin-bottom: var(--sp-5); } }
@media (min-width: 1040px) {
  .filters { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; }
  .filters > *:first-child, .filters > *:last-child { grid-column: auto; }
  .filters button[type="reset"] { width: auto; }
}

/* ==========================================================================
   review cards
   ========================================================================== */
.reviews { display: grid; gap: var(--sp-3); }
@media (min-width: 600px) { .reviews { gap: var(--sp-4); } }

.review {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4);
  transition: box-shadow .18s, border-color .18s;
}
.review::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 2px;
  border-radius: var(--r-pill);
  background: var(--accent);
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity .18s, transform .18s;
}
@media (hover: hover) {
  .review:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
  .review:hover::before { opacity: .55; transform: scaleY(1); }
}
@media (min-width: 600px) { .review { padding: var(--sp-4) var(--sp-5); } }

/* the score sits under the flight on phones, beside it when there is room */
.review-top { display: block; }
.review h3 { margin-bottom: 3px; }
.review .route { color: var(--muted); font-size: 13.5px; }
.review .route .sep { color: var(--faint); margin: 0 6px; }

.score-badge {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-top: 6px;
}
.score-badge .num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.02em;
}
.score-badge .num small { color: var(--muted); font-weight: 500; font-size: 12px; }
@media (min-width: 600px) {
  .review-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
  .score-badge { flex: none; display: grid; justify-items: end; gap: 2px; margin-top: 0; }
  .score-badge .num { font-size: 15px; }
}

.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-3); }
.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag.hechsher {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent-line);
  font-weight: 600;
}

.review .comment { margin: var(--sp-3) 0 0; color: var(--ink-2); white-space: pre-wrap; }

.review .photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.review .photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: zoom-in;
  transition: transform .18s, box-shadow .18s;
}
@media (hover: hover) {
  .review .photos img:hover { transform: scale(1.015); box-shadow: var(--shadow-md); }
}
@media (min-width: 600px) {
  .review .photos { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); margin-top: var(--sp-4); }
}

.review .byline {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}
.review .byline b { color: var(--ink-2); font-weight: 600; }
@media (min-width: 600px) { .review .byline { margin-top: var(--sp-4); } }

.hidden-flag {
  display: inline-block;
  margin-top: var(--sp-3);
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  background: var(--danger-tint);
  border-radius: var(--r-pill);
  padding: 2px 10px;
}
.row-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); flex-wrap: wrap; }
.row-actions .btn, .row-actions button { flex: 1 1 auto; }
@media (min-width: 600px) {
  .row-actions { margin-top: var(--sp-4); }
  .row-actions .btn, .row-actions button { flex: 0 0 auto; }
}

/* stars ------------------------------------------------------------------ */
.stars { color: var(--star); font-size: 15px; letter-spacing: .5px; white-space: nowrap; }
.stars .off { color: var(--border-strong); }
.stars.fractional { position: relative; display: inline-block; }
.stars.fractional .fill {
  position: absolute; inset: 0 auto 0 0;
  overflow: hidden; white-space: nowrap; color: var(--star);
}

/* experience panel ------------------------------------------------------- */
.subscores {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-line);
  border-radius: var(--r-md);
}
.subscores-head {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
/* label and value on one line, meter below, until there is room for a row */
.subscore {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px var(--sp-3);
  padding: 5px 0;
  font-size: 13.5px;
}
.subscore > span:first-child { color: var(--ink-2); }
.subscore .meter {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}
.subscore .meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.subscore .val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
@media (min-width: 600px) {
  .subscores { margin-top: var(--sp-4); padding: var(--sp-4); }
  .subscores-head { margin-bottom: var(--sp-3); }
  .subscore {
    grid-template-columns: minmax(0, max-content) minmax(70px, 150px) auto;
    justify-content: start;
    gap: var(--sp-4);
  }
  .subscore .meter { grid-column: auto; }
}
.experience-notes {
  margin: var(--sp-3) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  white-space: pre-wrap;
}
.subscores-head + .experience-notes { padding-top: 0; border-top: none; margin-top: 0; }

/* ==========================================================================
   accordion sections (the rating form)
   ========================================================================== */
.accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-3);
  overflow: hidden;
}
.accordion[open] { box-shadow: var(--shadow-md); }
.accordion > summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary:active { background: var(--surface-2); }
@media (hover: hover) { .accordion > summary:hover { background: var(--surface-2); } }
.accordion[open] > summary {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-tint), transparent);
}

.accordion-title { font-weight: 640; font-size: 15.5px; letter-spacing: -0.015em; }
.accordion-sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.accordion-state {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.accordion-state .stars { font-size: 13px; }
.accordion-state.is-set { color: var(--accent); font-weight: 600; }
.accordion-state .label-text { display: none; }
.chev { flex: none; width: 20px; height: 20px; color: var(--faint); transition: transform .2s ease; }
.accordion[open] .chev { transform: rotate(180deg); }
.accordion-body { padding: var(--sp-4); }
@media (min-width: 600px) {
  .accordion { margin-bottom: var(--sp-4); }
  .accordion > summary { padding: var(--sp-4) var(--sp-5); }
  .accordion-body { padding: var(--sp-5); }
  .accordion-state .label-text { display: inline; }
}

/* the byline block */
.fieldset {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  margin: 0 0 var(--sp-4);
  background: var(--surface);
}
.fieldset legend { font-size: 13px; font-weight: 640; padding: 0 6px; }
.fieldset > .hint { display: block; margin: 0 0 var(--sp-4); }

/* upload area ------------------------------------------------------------
   The native file input is visually hidden and this label stands in for it,
   which is the only way to restyle "Choose files". It doubles as a drop
   target on desktop. */
.uploader {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-4);
  cursor: pointer;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-tint), transparent 60%),
    var(--surface-2);
  transition: border-color .18s, background .18s, transform .12s;
}
.uploader:active { transform: scale(.995); }
@media (hover: hover) {
  .uploader:hover { border-color: var(--accent); }
}
#photos:focus-visible + .uploader { outline: 2px solid var(--accent); outline-offset: 2px; }
.uploader.is-dragging {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-tint);
}
.uploader.is-full { opacity: .6; }
.uploader-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.uploader-icon svg { width: 26px; height: 26px; }
.uploader-text { display: grid; gap: 2px; min-width: 0; }
.uploader-text b { font-size: 14.5px; font-weight: 640; }

/* photo thumbs on the form ---------------------------------------------- */
.thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.thumbs:empty { display: none; }
.thumb { position: relative; }
.thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: block;
}
.thumb button {
  position: absolute; top: -8px; right: -8px;
  width: 30px; height: 30px; min-height: 0; padding: 0;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  font-size: 16px; line-height: 1;
}
@media (min-width: 600px) {
  .thumbs { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .thumb button { width: 24px; height: 24px; top: -7px; right: -7px; font-size: 15px; }
}

/* form action row: full-width primary on phones */
.form-actions { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-actions > * { width: 100%; }
@media (min-width: 600px) {
  .form-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .form-actions > * { width: auto; }
}

/* ==========================================================================
   notices, empty states
   ========================================================================== */
.notice {
  display: block;
  line-height: 1.5;
  padding: 12px 14px;
  margin-bottom: var(--sp-4);
  font-size: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-2);
}
.notice.error { border-left-color: var(--danger); background: var(--danger-tint); color: var(--danger); }
.notice.ok { border-left-color: var(--good); background: var(--accent-tint); color: var(--good); }
.notice code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: var(--sp-6) var(--sp-4);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
}
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty-mark {
  display: block;
  width: 40px;
  margin: 0 auto var(--sp-3);
  color: var(--accent);
  opacity: .35;
}
.empty-mark svg { width: 100%; height: auto; }
@media (min-width: 600px) { .empty { padding: var(--sp-7) var(--sp-4); } }

/* ==========================================================================
   tables — stacked cards on phones, a real table from 760px up
   ========================================================================== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }

table.admin, table.admin thead, table.admin tbody, table.admin tr, table.admin th, table.admin td {
  display: block;
}
table.admin thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
table.admin tbody tr {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
table.admin tbody tr:first-child { padding-top: 0; }
table.admin tbody tr:last-child { border-bottom: none; padding-bottom: 0; }
table.admin td {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding: 3px 0;
  border: none;
  text-align: right;
}
table.admin td::before {
  content: attr(data-label);
  flex: none;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  text-align: left;
}
table.admin td:empty { display: none; }
/* action cells lay their buttons out in a wrapping row, not label-and-value */
table.admin td.cell-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
table.admin td.cell-actions button { flex: 1 1 auto; }
table.admin td[data-label=""]::before { content: none; }
table.admin td:first-child {
  font-weight: 640;
  font-size: 16px;
  padding-bottom: var(--sp-2);
}
table.admin a { color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  table.admin a:hover { color: var(--accent); text-decoration: underline; }
}

@media (min-width: 760px) {
  table.admin, table.admin thead, table.admin tbody, table.admin tr { display: revert; }
  table.admin th, table.admin td { display: table-cell; }
  table.admin thead { position: static; width: auto; height: auto; clip-path: none; }
  table.admin th, table.admin td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  table.admin td::before { content: none; }
  table.admin thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 650;
    border-bottom-color: var(--border-strong);
    white-space: nowrap;
  }
  table.admin tbody tr { transition: background .12s; }
  @media (hover: hover) { table.admin tbody tr:hover { background: var(--surface-2); } }
  table.admin tbody tr:last-child td { border-bottom: none; }
  table.admin td:first-child { font-weight: 550; font-size: 14px; padding-bottom: 11px; }
  table.admin td:empty { display: table-cell; }
  table.admin td.cell-actions { white-space: nowrap; margin-top: 0; }
  table.admin td.cell-actions button { flex: 0 0 auto; }
}

.score-cell { white-space: nowrap; }
.score-cell .stars { font-size: 13px; }
.score-cell small { color: var(--muted); font-size: 11px; margin-left: 6px; }
@media (min-width: 760px) {
  .score-cell small { display: block; margin: 1px 0 0; }
}
.no-data { color: var(--faint); }

.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  margin-bottom: var(--sp-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.tabs button {
  flex: 1 1 0;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  min-height: 42px;
  box-shadow: none;
}
.tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 640;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 600px) {
  .tabs { display: inline-flex; margin-bottom: var(--sp-5); }
  .tabs button { flex: 0 0 auto; }
}

/* ==========================================================================
   lightbox, sheets, footer
   ========================================================================== */
dialog.lightbox {
  border: none; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh;
}
dialog.lightbox img { display: block; max-width: 96vw; max-height: 88vh; border-radius: var(--r-md); }
dialog.lightbox::backdrop { background: rgba(8, 10, 12, .86); backdrop-filter: blur(3px); }

dialog.sheet {
  border: none;
  padding: var(--sp-5) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  /* bottom sheet on phones */
  margin: auto auto 0;
  width: 100%;
  max-width: 100%;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.gis-slot { display: flex; justify-content: center; min-height: 44px; }
dialog.sheet::backdrop { background: rgba(8, 10, 12, .5); backdrop-filter: blur(3px); }
@media (min-width: 600px) {
  dialog.sheet {
    margin: auto;
    width: min(420px, calc(100vw - 32px));
    border-radius: var(--r-xl);
    padding: var(--sp-5);
  }
}

.site-footer::before {
  content: "";
  display: block;
  width: 46px;
  height: 2px;
  margin: 0 auto var(--sp-4);
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .45;
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-5) 0 var(--sp-6);
  font-size: 13px;
  color: var(--muted);
}
.site-footer p { max-width: 70ch; }
@media (min-width: 860px) { .site-footer { padding-bottom: var(--sp-7); } }
