/* Attrition — design system
   Quiet surfaces, generous space, photography first. One accent, used sparingly. */

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --fill: #f2f2f5;
  --fill-2: #e8e8ed;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #8e8e93;
  --hairline: rgb(0 0 0 / 8%);
  --accent: #1d7348;
  --accent-hover: #155c39;
  --accent-text: #ffffff;
  --accent-tint: #e7f3ec;
  --star: #f2a516;
  --pin: #1a73e8;
  --star-off: #d9d9de;
  --warn: #a15c00;
  --warn-tint: #fdf2e1;
  --danger: #c0352b;
  --danger-tint: #fbe9e7;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 5%), 0 2px 8px rgb(0 0 0 / 4%);
  --shadow-2: 0 4px 12px rgb(0 0 0 / 6%), 0 16px 40px rgb(0 0 0 / 8%);
  --radius-l: 18px;
  --radius: 12px;
  --radius-s: 8px;
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --fill: #2c2c2e;
    --fill-2: #3a3a3c;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --hairline: rgb(255 255 255 / 10%);
    --accent: #3ccf83;
    --accent-hover: #5bdc98;
    --accent-text: #04140b;
    --accent-tint: #12301f;
    --star: #ffb627;
    --star-off: #48484a;
    --warn: #ffb44d;
    --warn-tint: #33260f;
    --danger: #ff6b5e;
    --danger-tint: #3a1b18;
    --shadow-1: none;
    --shadow-2: 0 8px 30px rgb(0 0 0 / 50%);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.6rem); }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-tint); }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.wrap.wide { max-width: 1600px; }
main { min-height: calc(100vh - var(--header-h) - 120px); }
main.page { padding: 32px 0 80px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } main.page { padding-top: 20px; } }

.section { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 500; white-space: nowrap; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 6px; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 1.15rem/1 var(--font-display); letter-spacing: -.02em; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a, .nav button, .menu summary {
  color: var(--text); font-size: .92rem; font-weight: 500; padding: 7px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .nav button:hover, .menu summary:hover, .nav a[aria-current="page"] { background: var(--fill); text-decoration: none; }
.nav .primary { background: var(--text); color: var(--bg); }
.nav .primary:hover { background: var(--text); opacity: .86; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #fff; font-size: .7rem; font-weight: 700; margin-left: 4px; }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .8rem; text-transform: uppercase; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 6px; }
.menu-panel a, .menu-panel button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: var(--radius-s); color: var(--text); border: 0; background: none; cursor: pointer; font-size: .92rem; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--fill); text-decoration: none; }
.menu-panel hr { border: 0; border-top: 1px solid var(--hairline); margin: 6px 0; }
.menu-panel form { margin: 0; }
.menu-user { padding: 6px 12px 4px; margin: 0; }

/* Search field (header + hero) with autocomplete */
.search { position: relative; flex: 1; max-width: 560px; margin: 0; }
.search-field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: var(--fill); border-radius: 999px; border: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s; }
.search-field:focus-within { background: var(--surface); border-color: var(--hairline); box-shadow: var(--shadow-1); }
.search-field svg { flex-shrink: 0; color: var(--text-2); }
.search-field input[type=search] { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: .95rem; color: var(--text); outline: none; padding: 0; box-shadow: none; }
.search-field input[type=search]:focus { box-shadow: none; border: 0; }
.search-field input::placeholder { color: var(--text-3); }
.search-field input::-webkit-search-cancel-button { display: none; }
.kbd { font: 500 .72rem var(--font); color: var(--text-3); border: 1px solid var(--hairline); border-radius: 5px; padding: 1px 6px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 6px; z-index: 1100; max-height: 70vh; overflow: auto; text-align: left; }
.suggest:empty { display: none; }
.suggest-label { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px 4px; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: var(--radius-s); color: var(--text); }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--fill); text-decoration: none; }
.suggest img, .suggest .ph { width: 44px; height: 33px; border-radius: 6px; object-fit: cover; background: var(--fill-2); flex-shrink: 0; }
.suggest .ph { display: grid; place-items: center; color: var(--text-2); }
.suggest .s-name { font-weight: 500; }
.suggest .s-meta { font-size: .8rem; color: var(--text-2); }
.suggest .s-all { border-top: 1px solid var(--hairline); margin-top: 4px; padding-top: 10px; color: var(--accent); font-weight: 500; }

@media (max-width: 900px) {
  .site-header { height: auto; }
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav { margin-left: auto; }
  .nav .hide-sm { display: none; }
}

/* ------------------------------------------------------------------ buttons, forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-text);
  font: 600 .92rem var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--fill); color: var(--text); }
.btn.secondary:hover { background: var(--fill-2); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--hairline); }
.btn.ghost:hover { background: var(--fill); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.small { height: 32px; padding: 0 12px; font-size: .84rem; }
.btn.icon { width: 40px; padding: 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--fill-2); border-radius: var(--radius-s); padding: 9px 12px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea { resize: vertical; line-height: 1.5; }
form p, .field { margin: 0 0 16px; }
.helptext { display: block; font-size: .8rem; color: var(--text-2); margin-top: 4px; }
.errorlist { list-style: none; padding: 0; margin: 0 0 6px; color: var(--danger); font-size: .86rem; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
label.inline, .checks label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
#id_conditions { display: flex; flex-wrap: wrap; gap: 8px; }
#id_conditions > div { margin: 0; }
#id_conditions label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; padding: 6px 12px; border-radius: 999px; background: var(--fill); cursor: pointer; margin: 0; }
#id_conditions label:has(input:checked) { background: var(--accent-tint); color: var(--accent); font-weight: 500; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.hp { position: absolute; left: -9999px; }

.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-l); padding: 24px; box-shadow: var(--shadow-1); }
.panel + .panel { margin-top: 16px; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }
.narrow { max-width: 440px; margin: 40px auto; }
.messages { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: var(--radius); background: var(--accent-tint); font-size: .94rem; }
.messages li.error { background: var(--danger-tint); color: var(--danger); }
.messages li.warning { background: var(--warn-tint); }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--fill); vertical-align: middle; }
.status-published { background: var(--accent-tint); color: var(--accent); }
.status-pending { background: var(--warn-tint); color: var(--warn); }
.status-rejected { background: var(--danger-tint); color: var(--danger); }

/* ------------------------------------------------------------------ stars */
.stars { color: var(--star); letter-spacing: .5px; white-space: nowrap; }
.stars.unrated { color: var(--star-off); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; color: var(--text-2); white-space: nowrap; }
.rating .star { color: var(--star); }
.rating strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; color: var(--text); }
.card:hover { text-decoration: none; }
.card-media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--fill); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.035); }
.card-media .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); }
.pill-overlay { position: absolute; left: 10px; top: 10px; background: rgb(255 255 255 / 92%); color: #1d1d1f; font-size: .76rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(8px); }
.card-body { padding: 12px 2px 0; display: grid; gap: 3px; }
.card-title { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card-title h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.card-title .rating { flex-shrink: 0; }
.card-meta { font-size: .86rem; color: var(--text-2); }
.card-stats { font-size: .86rem; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0 8px; }
.card-stats span + span::before { content: "·"; margin-right: 8px; color: var(--text-3); }
.card.is-active .card-media { outline: 3px solid var(--accent); outline-offset: 2px; }

/* List rows (explore list view, sidebar lists) */
.rows { display: grid; gap: 2px; }
.row { display: flex; gap: 14px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: var(--radius); color: var(--text); }
.row:hover { background: var(--fill); text-decoration: none; }
.row img, .row .ph { width: 76px; height: 57px; border-radius: var(--radius-s); object-fit: cover; background: var(--fill); flex-shrink: 0; }
.row.lg img, .row.lg .ph { width: 148px; height: 111px; }
.row-body { min-width: 0; flex: 1; display: grid; gap: 2px; }
.row-body strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.lg .row-body strong { font-size: 1.05rem; }
.row-body .card-stats, .row-body .card-meta { font-size: .82rem; }
.row-body .card-stats { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.row .away { font-size: .82rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.row.is-active { background: var(--accent-tint); }

/* Tiles (home) */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-l); overflow: hidden; background: var(--fill); color: #fff; display: block; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgb(0 0 0 / 65%)); }
.tile:hover { text-decoration: none; }
.tile:hover img { transform: scale(1.04); }
.tile-text { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.tile-text strong { display: block; font: 600 1.05rem/1.25 var(--font-display); }
.tile-text span { font-size: .85rem; opacity: .85; }
.bands { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.band { display: grid; gap: 6px; padding: 22px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--hairline); color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.band:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); }
.band strong { font: 600 1.2rem var(--font-display); }
.band span { color: var(--text-2); font-size: .9rem; }
.meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.meter i { width: 18px; height: 5px; border-radius: 3px; background: var(--fill-2); }
.meter i.on { background: var(--accent); }

/* ------------------------------------------------------------------ home hero */
.hero { position: relative; height: min(72vh, 680px); min-height: 460px; color: #fff; display: flex; align-items: flex-end; isolation: isolate; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / 8%) 0%, rgb(0 0 0 / 12%) 40%, rgb(0 0 0 / 64%) 100%); }
.hero .wrap { padding-bottom: 52px; position: relative; z-index: 1; pointer-events: none; }
.hero .wrap > * { pointer-events: auto; }
.hero h1, .hero p { pointer-events: none; }
.hero-link { position: absolute; inset: 0; z-index: 0; }
.hero-credit { z-index: 1; }
.hero h1 { font-size: clamp(2.4rem, 1.6rem + 4vw, 4.4rem); letter-spacing: -.035em; margin-bottom: .2em; text-wrap: balance; }
.hero p { font-size: clamp(1rem, .9rem + .4vw, 1.2rem); opacity: .92; max-width: 48ch; }
.hero .search { max-width: 620px; margin-top: 22px; }
.hero .search-field { height: 56px; background: rgb(255 255 255 / 97%); padding: 0 7px 0 20px; box-shadow: 0 10px 40px rgb(0 0 0 / 25%); border: 0; }
.hero .search-field input[type=search] { font-size: 1.05rem; color: #1d1d1f; }
.hero .search-field svg { color: #6e6e73; }
.hero .search-field .btn { height: 42px; }
.hero .quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero .quick a { color: #fff; background: rgb(255 255 255 / 16%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / 22%); padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.hero .quick a:hover { background: rgb(255 255 255 / 26%); text-decoration: none; }
.hero-credit { position: absolute; right: 20px; bottom: 16px; font-size: .78rem; color: rgb(255 255 255 / 78%); }
.hero-credit a { color: inherit; }
.stat-strip { display: flex; gap: 44px; flex-wrap: wrap; padding: 32px 0 0; }
.stat-strip div { color: var(--text-2); font-size: .9rem; }
.stat-strip strong { display: block; font: 700 1.75rem/1.1 var(--font-display); color: var(--text); letter-spacing: -.02em; }

/* ------------------------------------------------------------------ explore */
.explore { display: grid; grid-template-columns: 272px minmax(0, 1fr) minmax(380px, 40%); min-height: calc(100vh - var(--header-h)); }
.explore.map-hidden { grid-template-columns: 272px minmax(0, 1fr); }
.filters { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 18px 20px 40px 24px; border-right: 1px solid var(--hairline); scrollbar-width: thin; }
.filters-head { display: none; }
.fgroup { padding: 16px 0; border: 0; border-bottom: 1px solid var(--hairline); margin: 0; min-width: 0; }
.fgroup:first-child { padding-top: 4px; }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup > h3, .fgroup > summary { font-size: .76rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2); margin: 0 0 10px; }
.fgroup > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: "+"; font-weight: 400; font-size: 1rem; line-height: 1; }
.fgroup[open] > summary::after { content: "–"; }
.fgroup:not([open]) > summary { margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: .86rem; font-weight: 500; cursor: pointer; user-select: none; margin: 0; transition: background .15s, color .15s, opacity .15s; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:hover { background: var(--fill-2); }
.pill:has(input:checked) { background: var(--text); color: var(--bg); }
.pill:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.pill .count { font-size: .75rem; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.pill:has(input:checked) .count { color: inherit; opacity: .7; }
.pill:has(.count.zero):not(:has(input:checked)) { opacity: .38; }
.checklist { display: grid; gap: 1px; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: var(--radius-s); font-weight: 400; font-size: .92rem; cursor: pointer; }
.check:hover { background: var(--fill); }
.check .label { flex: 1; min-width: 0; }
.check .count { font-size: .8rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.check:has(.count.zero):not(:has(input:checked)) { display: none; }
.filters select { font-size: .9rem; padding: 8px 34px 8px 12px; }
.near-row { display: grid; gap: 8px; }
.near-row .btn { width: 100%; }
.apply-noscript { margin-top: 16px; width: 100%; }

.results { padding: 20px 28px 64px; min-width: 0; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.results-bar h1 { font-size: 1.45rem; margin: 0; flex: 1; min-width: 200px; }
.results-bar h1 .muted { font-weight: 500; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select { width: auto; height: 36px; padding: 0 34px 0 14px; border-radius: 999px; background-color: var(--fill); border-color: transparent; font-size: .88rem; font-weight: 500; }
.segmented { display: inline-flex; background: var(--fill); border-radius: 999px; padding: 3px; }
.segmented a, .segmented button { display: grid; place-items: center; height: 30px; padding: 0 12px; border-radius: 999px; color: var(--text-2); border: 0; background: none; cursor: pointer; font-size: .86rem; font-weight: 500; }
.segmented a:hover, .segmented button:hover { text-decoration: none; color: var(--text); }
.segmented [aria-pressed="true"], .segmented [aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: .85rem; font-weight: 500; }
.chip:hover { text-decoration: none; filter: brightness(.96); }
.chip.clear { background: none; color: var(--text-2); padding-left: 6px; }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--fill); font-size: .92rem; margin-bottom: 20px; }
.empty { text-align: center; padding: 72px 20px; color: var(--text-2); }
.empty h2 { color: var(--text); }
.more { display: flex; justify-content: center; margin-top: 36px; }
#results.htmx-request { opacity: .5; transition: opacity .15s .08s; }

.map-pane { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); border-left: 1px solid var(--hairline); background: var(--fill); }
.explore.map-hidden .map-pane { display: none; }
.map-pane .map { height: 100%; border-radius: 0; }
.map-close { display: none; }
.map-fab { display: none; }

@media (max-width: 1280px) {
  .explore, .explore.map-hidden { grid-template-columns: 260px minmax(0, 1fr); }
  .map-pane, .explore.map-hidden .map-pane { display: none; }
  .explore.map-open .map-pane { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 900; height: auto; border: 0; }
  .explore.map-open .map-close { display: inline-flex; position: absolute; top: 16px; right: 16px; z-index: 1000; box-shadow: var(--shadow-2); }
  .map-toggle-desktop { display: none !important; }
  .map-fab { display: inline-flex; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 950; box-shadow: var(--shadow-2); background: var(--text); color: var(--bg); }
  .map-fab:hover { background: var(--text); opacity: .9; }
  .explore.map-open .map-fab { display: none; }
}
@media (max-width: 900px) {
  .explore, .explore.map-hidden { display: block; }
  .filters { position: fixed; inset: 0; z-index: 1200; height: auto; background: var(--bg); padding: 0 20px 100px; transform: translateY(100%); transition: transform .35s var(--ease), visibility 0s .35s; border: 0; visibility: hidden; }
  .explore.filters-open .filters { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .filters-head { display: flex; position: sticky; top: 0; z-index: 2; background: var(--bg); justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; }
  .filters-head h2 { margin: 0; font-size: 1.2rem; }
  .filters-done { position: fixed; left: 20px; right: 20px; bottom: 20px; }
  .results { padding: 16px; }
  .explore.map-open .map-pane { top: 0; z-index: 1150; }
}
@media (min-width: 901px) { .filters-done, .filters-open-btn { display: none !important; } }

/* Leaflet markers and popups */
.marker { width: 14px; height: 14px; border-radius: 50%; background: var(--pin); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 35%); transition: transform .15s var(--ease); }
.marker.is-origin { background: #1d1d1f; width: 18px; height: 18px; }
.marker.is-muted { background: #8e8e93; }
.marker.is-active { transform: scale(1.6); }
.leaflet-container { font-family: var(--font); background: var(--fill); }
.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 240px !important; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 60%); }
.map-pop { display: block; color: #1d1d1f !important; }
.map-pop:hover { text-decoration: none; }
.map-pop img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.map-pop span { padding: 10px 12px 12px; display: grid; gap: 2px; font-size: .82rem; color: #6e6e73; }
.map-pop strong { color: #1d1d1f; font-size: .95rem; }
.map { height: 320px; border-radius: var(--radius-l); overflow: hidden; z-index: 0; }

/* ------------------------------------------------------------------ trail / trip pages */
.crumbs { font-size: .88rem; color: var(--text-2); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--text-2); }
.crumbs span[aria-hidden] { color: var(--text-3); }
.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.title-row h1 { margin: 0 0 6px; }
.subtitle { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--text-2); }
.subtitle a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--fill-2); text-underline-offset: 3px; }

.mosaic { position: relative; display: grid; gap: 8px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 2.4 / 1; border-radius: var(--radius-l); overflow: hidden; margin-bottom: 32px; }
.mosaic a { position: relative; overflow: hidden; background: var(--fill); }
.mosaic a:first-child { grid-row: 1 / 3; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; }
.mosaic a:hover img { transform: scale(1.03); filter: brightness(.92); }
.mosaic .all { position: absolute; z-index: 1; right: 12px; bottom: 12px; overflow: visible; background: rgb(255 255 255 / 94%); color: #1d1d1f; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.mosaic .all:hover { background: #fff; text-decoration: none; }
.mosaic.n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.mosaic.n1 a:first-child { grid-row: auto; }
.mosaic.n2, .mosaic.n3, .mosaic.n4 { grid-template-columns: 2fr 1fr; }
.mosaic.n2 a:nth-child(2) { grid-row: 1 / 3; }
.mosaic.n4 a:nth-child(4) { display: none; }
@media (max-width: 720px) {
  .mosaic, .mosaic.n2, .mosaic.n3, .mosaic.n4 { grid-template-columns: 1fr; grid-template-rows: none; aspect-ratio: 4 / 3; }
  .mosaic a:not(:first-child) { display: none; }
  .mosaic a:first-child { grid-row: auto; }
  .mosaic a.all { display: block; }
}

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
.layout > aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 20px; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } .layout > aside { position: static; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); border: 1px solid var(--hairline); border-radius: var(--radius-l); overflow: hidden; margin: 0 0 28px; background: var(--surface); }
.facts div { padding: 14px 18px; box-shadow: 1px 0 0 var(--hairline), 0 1px 0 var(--hairline); }
.facts dt { font-size: .76rem; color: var(--text-2); font-weight: 500; }
.facts dd { margin: 2px 0 0; font: 600 1.12rem/1.3 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.facts dd small { font-size: .8rem; font-weight: 500; color: var(--text-2); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 24px; list-style: none; }
.tag { padding: 5px 12px; border-radius: 999px; font-size: .85rem; background: var(--accent-tint); color: var(--accent); font-weight: 500; }
.tag.hazard { background: var(--warn-tint); color: var(--warn); }
a.tag:hover { text-decoration: none; filter: brightness(.96); }

.prose { max-width: 70ch; font-size: 1.02rem; line-height: 1.65; }
.prose p { margin-bottom: 1.1em; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.side-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-l); padding: 18px; }
.side-card > h3 { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.side-card > h3 a { font-size: .84rem; font-weight: 500; }
.side-card .map { height: 230px; border-radius: var(--radius); margin-bottom: 12px; }
.side-card .btn { width: 100%; }
.links-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }

.reviews { display: grid; }
.review { padding: 20px 0; border-top: 1px solid var(--hairline); }
.review:first-child { border-top: 0; padding-top: 4px; }
.review-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.review h3 { margin: 0 0 4px; }
.review .prose { font-size: .96rem; margin-top: 8px; }

/* Trip reports (sections of the trail page) */
.trip { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.trip:first-of-type { border-top: 0; padding-top: 8px; }
.trip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.trip-head h2 { margin: 0 0 4px; }
.trip-index { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; }
.trip-photos { margin-top: 28px; }
.hikers { display: inline-flex; align-items: center; gap: 10px; }
.hikers a { color: var(--text); font-weight: 500; }
.avatars { display: inline-flex; }
.avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); background: var(--fill-2); flex-shrink: 0; }
.avatars .avatar-img + .avatar-img { margin-left: -10px; }
.avatar-img.initials { display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--accent); background: var(--accent-tint); }
.trip-photos .section-head h3 { margin: 0; font-size: 1.15rem; }
.photo-card.is-hidden img { opacity: .4; }

/* Gallery */
.gallery { display: grid; gap: 14px 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--fill); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: .8rem; color: var(--text-2); padding: 6px 2px 0; line-height: 1.4; }
/* About */
.about { max-width: 820px; margin: 0 auto; }
.about-head { margin-bottom: 24px; }
.about-lead { font-size: 1.2rem; color: var(--text-2); margin: 0; }
.about .prose { max-width: none; }
.about .prose h2 { margin-top: 1.6em; }
.about-photo + h2 { margin-top: 0; }
.about-photo { float: right; width: 340px; margin: 4px 0 16px 28px; }
.about-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--fill); }
.about-photo figcaption { font-size: .82rem; color: var(--text-2); margin-top: 6px; }
@media (max-width: 640px) { .about-photo { float: none; width: auto; margin: 0 0 20px; } }
.quotes { display: grid; gap: 16px; margin: 8px 0 28px; }
.quote { margin: 0; padding: 18px 22px; background: var(--surface); border: 1px solid var(--hairline); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.quote blockquote { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.6; }
.quote figcaption { font-size: .86rem; color: var(--text-2); }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 8px; }
.lead-photo { margin: 0 0 28px; }
.lead-photo img { width: 100%; max-height: 560px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-l); background: var(--fill); }
.lead-photo figcaption { font-size: .86rem; color: var(--text-2); margin-top: 8px; }

/* Voting */
.vote { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.vote form { display: flex; margin: 0; }
.vote button, .vote-stars span { background: none; border: 0; padding: 0 2px; font-size: 1.6rem; line-height: 1; color: var(--star-off); }
.vote button { cursor: pointer; transition: transform .1s; }
.vote button:active { transform: scale(.88); }
.vote .on { color: var(--star); }
.vote .half { background: linear-gradient(90deg, var(--star) 50%, var(--star-off) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vote form:hover button { background: none; color: var(--star); }
.vote form button:hover ~ button { color: var(--star-off); }
.vote strong { color: var(--text); }

/* Photo viewer */
.viewer-page { background: #000; }
.viewer-page .site-header { background: rgb(0 0 0 / 70%); border-color: rgb(255 255 255 / 10%); }
.viewer-page .site-header, .viewer-page .site-header a, .viewer-page .site-header summary { color: #f5f5f7; }
.viewer-page .nav .primary { background: #f5f5f7; color: #1d1d1f; }
.viewer-page .nav a:hover, .viewer-page .menu summary:hover { background: rgb(255 255 255 / 12%); }
.viewer-page .nav .primary:hover { background: #fff; color: #1d1d1f; }
.viewer-page .menu-panel, .viewer-page .menu-panel a, .viewer-page .menu-panel button { color: var(--text); }
.viewer-page .search-field { background: rgb(255 255 255 / 12%); }
.viewer-page .search-field input[type=search] { color: #f5f5f7; }
.viewer { color: #f5f5f7; }
/* Way back to where the photo lives: a back button plus breadcrumbs. */
.viewer-bar .wrap { display: flex; align-items: center; gap: 14px; height: 44px; padding-top: 8px; min-width: 0; }
.viewer-back { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: min(100%, 440px); height: 34px; padding: 0 14px 0 10px; border-radius: 999px; background: rgb(255 255 255 / 12%); color: #f5f5f7; font-size: .9rem; font-weight: 500; white-space: nowrap; transition: background .2s; }
.viewer-back:hover { background: rgb(255 255 255 / 24%); text-decoration: none; }
.viewer-back span { overflow: hidden; text-overflow: ellipsis; }
.viewer-bar .crumbs { margin: 0; color: #a1a1a6; flex-wrap: nowrap; min-width: 0; overflow: hidden; white-space: nowrap; }
.viewer-bar .crumbs a { color: #a1a1a6; }
.viewer-bar .crumbs a:hover { color: #f5f5f7; }
.viewer-bar .crumbs span[aria-hidden] { color: #636366; }
@media (max-width: 720px) { .viewer-bar .crumbs { display: none; } }
/* Fit mode: the whole photo is always visible (flex makes the % max-height resolve against the stage). */
.viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; height: calc(100vh - var(--header-h) - 194px); height: calc(100dvh - var(--header-h) - 194px); min-height: 300px; padding: 16px 24px 0; overflow: hidden; }
.viewer-photo { display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; cursor: zoom-in; }
/* Sized against the viewport directly: percentage heights don't resolve through the link wrapper. */
.viewer-photo img { max-width: calc(100vw - 48px); max-height: calc(100vh - var(--header-h) - 210px); max-height: calc(100dvh - var(--header-h) - 210px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
/* Zoom mode: full resolution, scroll/drag around it. */
.viewer-stage.zoomed { display: block; overflow: auto; padding: 0; cursor: zoom-out; overscroll-behavior: contain; }
.viewer-stage.zoomed .viewer-photo { display: block; max-width: none; max-height: none; width: max-content; margin: 0 auto; cursor: zoom-out; }
.viewer-stage.zoomed .viewer-photo img { max-width: none; max-height: none; border-radius: 0; }
.viewer-stage.no-zoom .viewer-photo { cursor: default; }
.viewer-stage.zoomed .viewer-nav { position: fixed; top: 50%; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 56px; height: 56px; touch-action: manipulation; user-select: none; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 12%); color: #fff; backdrop-filter: blur(10px); transition: background .2s; }
.viewer-nav:hover { background: rgb(255 255 255 / 24%); text-decoration: none; }
.viewer-nav.prev { left: 20px; }
.viewer-nav.next { right: 20px; }
.viewer-info { padding: 20px 0 32px; }
.viewer-info .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.viewer-info a { color: #f5f5f7; }
.viewer-info .muted { color: #a1a1a6; }
.viewer .vote { margin: 0; --star-off: #48484a; }
.viewer .vote strong { color: #f5f5f7; }
.viewer-page .site-footer { border-color: rgb(255 255 255 / 10%); color: #8e8e93; }

/* Tables (best trips, my hikes) */
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-l); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.list th { font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list td.thumb { width: 88px; padding-right: 0; }
table.list td.thumb img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-s); }

/* Uploads */
.dropzone { border: 2px dashed var(--fill-2); border-radius: var(--radius-l); padding: 36px 24px; text-align: center; background: var(--surface); transition: border-color .2s, background .2s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-tint); }
.dropzone input[type=file] { margin: 14px auto 0; }
.progress { list-style: none; padding: 0; margin: 14px 0 0; font-size: .86rem; text-align: left; }
.progress progress { width: 160px; vertical-align: middle; margin-left: 8px; accent-color: var(--accent); }
.photo-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 16px 0 24px; }
.photo-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-card .card-body { padding: 10px; gap: 8px; }
.photo-card form { margin: 0; }
.photo-card .is-cover { font-size: .78rem; font-weight: 600; color: var(--accent); }

.pagination { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 32px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 28px 0 40px; color: var(--text-2); font-size: .84rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }
.explore-page .site-footer { display: none; }

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

/* LAN test copy (SITE_ENV=test) */
.env-banner { background: #b45309; color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 4px 12px; }
