/* CNY Ski Swap: "alpine race day" design system.
   Navy night sky, snow white, and the red/blue of slalom gates. No external fonts or frameworks. */

:root {
  --navy-950: #071528;
  --navy-900: #0b1f3a;
  --navy-800: #102a4d;
  --navy-700: #17396a;
  --blue: #1d63d6;        /* gate blue: links, primary buttons */
  --blue-dark: #164fae;
  --blue-50: #ecf3fe;
  --blue-100: #d6e5fc;
  --red: #e0383e;         /* gate red: the main call to action */
  --red-dark: #bf2a30;
  --red-50: #fdeced;
  --snow: #f5f8fc;
  --ink: #132238;
  --muted: #5a6a80;
  --border: #dde5ef;
  --card: #fff;
  --warn-bg: #fff6dc;
  --warn-border: #f0d68a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, .06), 0 1px 3px rgba(11, 31, 58, .06);
  --shadow: 0 4px 14px rgba(11, 31, 58, .08), 0 1px 3px rgba(11, 31, 58, .06);
  --shadow-lg: 0 14px 34px rgba(11, 31, 58, .14);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* aliases used by older rules and inline styles */
  --bg: var(--snow); --fg: var(--ink); --brand: var(--blue); --brand-dark: var(--navy-800);
  --error: #c62828; --notice: var(--warn-bg);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--snow);
  min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid rgba(29, 99, 214, .45); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; color: var(--navy-900); }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); font-weight: 800; margin: .2em 0 .5em; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); font-weight: 800; margin: 1.6em 0 .6em; }
h3 { font-size: 1.05rem; font-weight: 700; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.prewrap { white-space: pre-wrap; }
.clip { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 60vw; }
.sr, .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead { font-size: 1.15rem; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > label { flex: 1 1 150px; }
.row.between { justify-content: space-between; align-items: center; }
.wrap { align-items: flex-start; }
.grow { flex: 1; min-width: 160px; }
.stack > * + * { margin-top: 12px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.wide { max-width: 760px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 2.2em 0 .8em; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head a::after { content: " \2192"; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 10px max(16px, calc((100% - 1160px) / 2 + 16px)); background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border); }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--navy-900);
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; white-space: nowrap; }
.logo svg { width: 38px; height: 30px; flex: 0 0 auto; }
.logo span { font-weight: 500; color: var(--muted); }
.logo:hover { color: var(--navy-900); }
.header-search { flex: 1 1 240px; max-width: 460px; order: 2; position: relative; }
.site-header .header-search input { width: 100%; margin: 0; padding: 9px 14px 9px 38px; font: inherit; font-size: .95rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--snow); transition: border-color .15s, background .15s; }
.site-header .header-search input:focus { background: #fff; border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-100); }
.header-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.site-header nav { order: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; justify-content: flex-end; margin-left: auto; }
.site-header nav a, .site-header nav button.link { white-space: nowrap; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.site-header nav a:hover, .site-header nav button.link:hover { color: var(--blue); }
.site-header .name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.site-header nav .button { color: #fff; }
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .site-header { gap: 8px 12px; position: static; }
  .header-search { order: 4; flex-basis: 100%; max-width: none; }
  .site-header nav { gap: 6px 12px; }
  .site-header nav .button { padding: 8px 13px; }
}

/* ---------- buttons ---------- */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; font: inherit;
  font-weight: 650; line-height: 1.2; color: #fff; background: var(--blue); border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; }
button:hover, .button:hover { background: var(--blue-dark); color: #fff; }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: wait; }
.button.cta, button.cta { background: var(--red); box-shadow: 0 4px 12px rgba(224, 56, 62, .28); }
.button.cta:hover, button.cta:hover { background: var(--red-dark); }
button.secondary, .secondary-button, .button.secondary { background: #fff; color: var(--blue); border-color: var(--blue-100); }
button.secondary:hover, .secondary-button:hover, .button.secondary:hover { background: var(--blue-50); color: var(--blue-dark); }
button.link { background: none; color: var(--blue); padding: 0; font-weight: 500; border: 0; border-radius: 0; text-decoration: underline; box-shadow: none; }
button.link:hover { background: none; color: var(--blue-dark); }
button.danger, .danger { color: var(--error) !important; }
.danger-button { background: var(--error); }
.danger-button:hover { background: #a11f1f; }
form.inline { display: inline; }
.button svg, button svg { width: 18px; height: 18px; }

/* ---------- forms ---------- */
label { display: block; margin: 0 0 14px; font-weight: 600; font-size: .95rem; }
label small, fieldset small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=date],
input[type=time], input[type=number], select, textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--ink); background: #fff;
  border: 1px solid #cdd8e5; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
input[type=file] { margin-top: 6px; max-width: 100%; font: inherit; font-size: .9rem; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); width: 17px; height: 17px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 600; margin-bottom: 6px; }
.choice { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; flex: 0 0 auto; }
.choice.block { display: flex; margin-bottom: 6px; }
.error { color: var(--error); font-weight: 600; }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-border); padding: 12px 16px; border-radius: var(--radius-sm); margin: 12px 0; }
.notice p { margin: 0 0 8px; } .notice p:last-child { margin: 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 14px; }
.card h1:first-child, .card h2:first-child { margin-top: 0; }
.prose { max-width: 780px; margin: 0 auto; line-height: 1.65; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose li { margin-bottom: 7px; }
.crumbs { color: var(--muted); font-size: .875rem; margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.tag { color: var(--blue); font-weight: 700; margin: 0; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; }

/* chips + badges */
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-50); color: var(--blue-dark); border-radius: 999px;
  padding: 1px 9px; font-size: .75rem; font-weight: 600; line-height: 1.6; }
.chip.race { background: var(--red-50); color: var(--red-dark); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.chip.big { padding: 7px 15px; font-size: .9rem; font-weight: 600; text-decoration: none; border: 1px solid var(--border); background: #fff;
  color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s; }
.chip.big:hover { border-color: var(--blue); color: var(--blue); }
.badge { display: inline-block; min-width: 19px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff;
  font-size: .72rem; font-weight: 700; text-align: center; line-height: 19px; vertical-align: 1px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #2b5ea8 0%, var(--navy-800) 45%, var(--navy-950) 100%);
  padding: clamp(44px, 8vw, 84px) 16px clamp(120px, 16vw, 190px); }
.hero .flakes { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 70% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 55%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 40% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 10% 80%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 45%, #fff 50%, transparent 51%);
  background-size: 340px 260px; }
.hero .ridges { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(110px, 16vw, 190px); }
.hero-inner { position: relative; max-width: 780px; margin: 0 auto; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #cfe0ff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  padding: 5px 12px; border-radius: 999px; }
.hero .eyebrow i { width: 8px; height: 8px; border-radius: 2px; background: var(--red); display: inline-block; }
.hero .eyebrow i + i { background: #5c9bff; margin-left: -4px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5.6vw, 3.4rem); margin: 18px 0 10px; letter-spacing: -0.03em; }
.hero .lead { color: #d5e2f5; margin: 0 auto 26px; max-width: 620px; }
.hero-search { display: flex; gap: 6px; max-width: 640px; margin: 0 auto; padding: 6px; background: #fff; border-radius: 999px; box-shadow: var(--shadow-lg); }
.hero-search .field { position: relative; flex: 1; display: flex; align-items: center; }
.hero-search .field svg { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--muted); }
.hero .hero-search input { flex: 1; min-width: 0; margin: 0; border: 0; padding: 12px 12px 12px 44px; font-size: 1.05rem; border-radius: 999px; box-shadow: none; }
.hero .hero-search input:focus { box-shadow: none; }
.hero-search button { padding: 12px 24px; font-size: 1rem; }
.quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.quick a { color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); transition: background .15s; }
.quick a:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.hero .trust { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 18px; color: #b9cbe6; font-size: .88rem; }
.hero .trust span::before { content: "\2713"; color: #7fd6a4; font-weight: 800; margin-right: 6px; }
@media (max-width: 560px) {
  .hero-search { border-radius: 18px; flex-direction: column; }
  .hero-search button { width: 100%; }
}

/* ---------- homepage sections ---------- */
.feature { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(110deg, var(--navy-900) 0%, var(--navy-700) 100%); color: #fff; border-radius: 20px;
  padding: 28px clamp(20px, 4vw, 36px); margin: 28px 0 8px; box-shadow: var(--shadow); }
.feature::after { content: ""; position: absolute; right: -40px; top: -30px; width: 280px; height: 180%;
  background: repeating-linear-gradient(135deg, rgba(224, 56, 62, .5) 0 22px, transparent 22px 44px, rgba(93, 155, 255, .45) 44px 66px, transparent 66px 88px);
  transform: rotate(8deg); opacity: .35; pointer-events: none; }
.feature > * { position: relative; z-index: 1; }
.feature h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.3rem, 3vw, 1.75rem); }
.feature p { margin: 0; color: #d5e2f5; max-width: 520px; }
.feature .tag { color: #ffb3b5; }
.feature .button { background: #fff; color: var(--navy-900); }
.feature .button:hover { background: var(--blue-50); color: var(--navy-900); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 8px; }
.cat { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--navy-900); font-weight: 700; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-100); color: var(--navy-900); }
.cat .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.cat .ic svg { width: 26px; height: 26px; }
.cat.racing .ic { background: var(--red-50); color: var(--red); }
.cat small { font-weight: 500; color: var(--muted); font-size: .8rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; counter-reset: step; }
.steps li { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 18px 66px;
  box-shadow: var(--shadow-sm); margin: 0; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px;
  border-radius: 50%; background: var(--navy-900); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps li:nth-child(2)::before { background: var(--red); }
.steps li:nth-child(3)::before { background: var(--blue); }
.steps strong { display: block; color: var(--navy-900); margin-bottom: 2px; }
.help-links { margin-top: 14px; }

/* ---------- listing cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 24px; }
.lcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-100); color: inherit; }
.thumb { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; color: #8aa1bf;
  background: linear-gradient(160deg, #eef4fb 0%, #dfe9f6 100%); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.lcard:hover .thumb img { transform: scale(1.03); }
.thumb .ph { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.thumb .ph svg { width: 40px; height: 40px; opacity: .8; }
.thumb .kind { position: absolute; left: 10px; top: 10px; background: rgba(11, 31, 58, .82); color: #fff; font-size: .7rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.thumb .kind.wanted { background: var(--red); }
.lbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.lprice { font-weight: 800; font-size: 1.15rem; color: var(--navy-900); letter-spacing: -0.01em; }
.ltitle { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.lmeta { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.lloc { margin-top: auto; padding-top: 4px; display: flex; align-items: center; gap: 4px; }
.lloc svg { width: 14px; height: 14px; }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .lbody { padding: 10px; } .lprice { font-size: 1.02rem; } }

/* ---------- search / browse ---------- */
.filters { margin: 10px 0 16px; padding: 14px 18px; }
.filters summary { cursor: pointer; font-weight: 700; color: var(--navy-900); }
.filters[open] summary { margin-bottom: 12px; }
.filters-inline { padding: 14px 18px; margin-bottom: 14px; }
.results-bar { align-items: flex-start; margin-bottom: 4px; }
.results-bar > p { margin: 6px 0; }
.alert-box summary { cursor: pointer; color: var(--blue); font-weight: 700; list-style: none; padding: 6px 0; }
.alert-box summary::-webkit-details-marker { display: none; }
.alert-box[open] { flex-basis: 100%; }
.alert-box .card { margin-top: 8px; max-width: 460px; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 18px 0; }
.guide-links { margin: -6px 0 14px; }
.guide-list { padding-left: 1.2em; } .guide-list li { margin-bottom: 14px; }

/* ---------- listing detail ---------- */
.price { font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 800; color: var(--navy-900); margin: 4px 0 14px; letter-spacing: -0.02em; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: -22px -22px 18px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--navy-950); }
.gallery .slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; justify-content: center; align-items: center; }
.gallery img { max-width: 100%; max-height: 72vh; height: auto; width: auto; object-fit: contain; }
.contact { margin-top: 22px; padding: 18px; background: var(--blue-50); border-radius: var(--radius-sm); border: 1px solid var(--blue-100); }
.contact h2 { margin-top: 0; font-size: 1.2rem; }
.contact textarea { margin-bottom: 10px; background: #fff; }
.report, .moderate-tools { margin: 14px 0; font-size: .9rem; }
.report summary, .moderate-tools summary, .inline-report summary { cursor: pointer; color: var(--muted); }
.moderate { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 14px; }
.moderate .row { margin-top: 8px; }
.moderate input[type=text] { flex: 1 1 200px; }
.related { margin-top: 28px; }
.related h2 { margin-top: 0; }

/* ---------- dashboard, tabs, rows ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .9rem; }
.tabs a.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.listing-row, .conv-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; padding: 14px 16px; }
.conv-row { text-decoration: none; color: inherit; transition: border-color .15s; }
.conv-row:hover { border-color: var(--blue-100); color: inherit; }
.conv-row.unread { border-left: 4px solid var(--red); }
.row-thumb { width: 84px; height: 63px; object-fit: cover; border-radius: 8px; background: #e7eef7; flex: 0 0 auto; }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { flex: 0 0 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--navy-800)); color: #fff;
  display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; }
.seller-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.seller-head h1 { margin: 0 0 4px; }

/* messaging */
.thread { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 18px; }
.msg { max-width: 85%; }
.msg.mine { align-self: flex-end; text-align: right; }
.bubble { display: inline-block; text-align: left; padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: #fff;
  border: 1px solid var(--border); overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.msg.mine .bubble { background: var(--blue); color: #fff; border-color: var(--blue); border-radius: 18px 18px 6px 18px; }
.inline-report { display: inline-block; margin-left: 8px; }
.inline-report form { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.reply textarea { margin: 4px 0 10px; }
.small-h1 { font-size: 1.3rem; }

/* photos */
.photo-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }
.photo-list figure { margin: 0; width: 160px; }
.photo-list img, .photo-preview img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; }
.photo-list figcaption { display: flex; gap: 10px; align-items: center; font-size: .85rem; margin-top: 4px; }
.photo-preview { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.photo-preview img { width: 96px; height: 72px; }

/* events */
.event-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.event-list .card + .card { margin-top: 0; }
.event-card { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; padding: 14px 18px; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.event-date { flex: 0 0 60px; text-align: center; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); background: #fff; }
.event-date .mon { display: block; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 3px 0; }
.event-date .day { display: block; font-size: 1.5rem; font-weight: 800; color: var(--navy-900); padding: 2px 0 4px; }
.past-events { margin-top: 16px; }
.past-events summary { cursor: pointer; color: var(--muted); }
.past-events .event-card { opacity: .72; }

/* ads */
.ad { position: relative; margin: 16px 0 22px; }
.ad-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.ad > .ad-label { display: block; margin-bottom: 5px; }
.ad-link { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); }
.ad-link:hover { border-color: var(--blue-100); color: inherit; }
.ad-banner .ad-link { padding: 0; overflow: hidden; display: block; }
.ad-banner img { display: block; width: 100%; height: auto; }
.ad-logo { width: 64px; height: 64px; object-fit: contain; flex: 0 0 auto; }
.ad-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ad-text span { color: var(--muted); font-size: .9rem; }
.ad-cta { flex: 0 0 auto; font-weight: 700; color: var(--blue); white-space: nowrap; }
.ad-grid .thumb img { object-fit: contain; background: #fff; }
.ad-grid .thumb span { padding: 12px; text-align: center; font-weight: 700; color: var(--navy-800); }
@media (max-width: 600px) { .ad-link { flex-wrap: wrap; } .ad-cta { width: 100%; } }
.rate-table td:last-child { white-space: nowrap; font-weight: 700; }

/* admin */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 0 14px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.admin-nav a { white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; padding: 6px 12px;
  border-radius: 999px; background: #fff; border: 1px solid var(--border); }
.admin-nav a:hover { border-color: var(--blue); color: var(--blue); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.stat-grid .card + .card { margin-top: 0; }
.stat { padding: 16px; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--navy-900); letter-spacing: -0.02em; }
.goal .bar { height: 10px; background: var(--blue-50); border-radius: 5px; margin-top: 10px; overflow: hidden; }
.goal .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--red)); }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--snow); }
@media (max-width: 600px) { .admin-table thead { display: none; } .admin-table td { display: block; border: 0; padding: 4px 12px; }
  .admin-table tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; } }
.danger-zone { border-color: #f1c0bd; }
.cat-edit { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.cat-edit.child { padding-left: 24px; }
.cat-edit input[type=text] { width: auto; flex: 1 1 180px; margin: 0; }
.cat-edit .narrow-input { flex: 0 0 64px; }
.cat-edit .full { flex-basis: 100%; }
.cat-add { margin-top: 12px; }
.cat-add input { flex: 1 1 200px; }
.saved-row .grow { flex: 2 1 220px; }
.widget-preview { max-width: 660px; border: 1px dashed var(--border); border-radius: var(--radius); padding: 6px; background: #fff; }
textarea.code { font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace; }
code { font: .9em ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.preview-grid { max-width: 260px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: #9fb2cc; padding: 44px 16px 26px; margin-top: 40px; }
.footer-inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer-brand .logo { color: #fff; }
.footer-brand .logo span { color: #9fb2cc; }
.footer-brand p { margin: 12px 0 0; font-size: .92rem; max-width: 360px; }
.site-footer h3 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin: 6px 0 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #cfdbec; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { max-width: 1160px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; color: #7f93ae; }
.gate-stripe { height: 5px; background: repeating-linear-gradient(90deg, var(--red) 0 40px, #5c9bff 40px 80px); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.site-footer .logo svg path:nth-child(1) { fill: #3a6db3; }
.site-footer .logo svg path:nth-child(2) { fill: #2c5694; }

/* Sister sites */
.feature-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.feature-link { color: #d5e2f5; font-weight: 600; font-size: .92rem; }
.feature-link:hover { color: #fff; }
.sister-callout { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px;
  background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: var(--radius-sm); color: var(--navy-800); }
.sister-callout svg { flex: none; width: 20px; height: 20px; color: var(--red); }
.site-footer .ext { opacity: .7; font-size: .85em; }
.site-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 18px; }
.site-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: var(--card); }
.site-item h2 { margin: 2px 0 6px; font-size: 1.15rem; }
.site-item h2 a { color: var(--navy-900); text-decoration: none; }
.site-item p { margin: 0 0 12px; }
.site-item .tag { margin: 0; color: var(--red); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
