/* ============================================================
   Sam's Trip - Crisp White, Indigo & Mint Green
   Mobile-first. No framework: one stylesheet, one request.
   ============================================================ */

:root {
  /* Brand */
  --indigo-50:  #EEF2FF;
  --indigo-100: #E0E7FF;
  --indigo-200: #C7D2FE;
  --indigo-300: #A5B4FC;
  --indigo-400: #818CF8;
  --indigo-500: #6366F1;
  --indigo-600: #4F46E5;
  --indigo-700: #4338CA;
  --indigo-800: #3730A3;
  --indigo-900: #312E81;

  --mint-50:  #ECFDF5;
  --mint-100: #D1FAE5;
  --mint-200: #A7F3D0;
  --mint-300: #6EE7B7;
  --mint-400: #34D399;
  --mint-500: #10B981;
  --mint-600: #059669;
  --mint-700: #047857;

  /* Neutrals */
  --white: #FFFFFF;
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  --amber-100: #FEF3C7;
  --amber-500: #F59E0B;
  --amber-700: #B45309;
  --rose-100:  #FFE4E6;
  --rose-500:  #F43F5E;
  --rose-700:  #BE123C;

  /* Semantic */
  --bg:          var(--white);
  --bg-subtle:   var(--slate-50);
  --bg-muted:    var(--slate-100);
  --text:        var(--slate-800);
  --text-muted:  var(--slate-500);
  --text-faint:  var(--slate-400);
  --border:      var(--slate-200);
  --border-soft: var(--slate-100);
  --primary:     var(--indigo-600);
  --primary-dark:var(--indigo-700);
  --primary-soft:var(--indigo-50);
  --accent:      var(--mint-500);
  --accent-soft: var(--mint-50);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow:    0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

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

  --header-h: 64px;
  --container: 1200px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  line-height: 1.25;
  font-weight: 650;
  color: var(--slate-900);
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

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

/* --- Layout primitives -------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.stack > * + * { margin-top: 1rem; }
.section { padding: 2.5rem 0; }
.section--tight { padding: 1.5rem 0; }
.section--subtle { background: var(--bg-subtle); }

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.layout-sidebar { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 960px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
  .layout-sidebar--left { grid-template-columns: 260px minmax(0, 1fr); }
}

.flex { display: flex; gap: .75rem; align-items: center; }
.flex-between { display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* --- Typography helpers ------------------------------------- */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }
.strong { font-weight: 650; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .35rem;
}

/* --- Header ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 750;
  font-size: 1.1rem;
  color: var(--slate-900);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo__mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--indigo-600), var(--mint-500));
  display: grid; place-items: center;
  color: #fff; font-size: .95rem; font-weight: 800;
}

.nav { display: none; gap: .25rem; align-items: center; }
@media (min-width: 1024px) { .nav { display: flex; } }

.nav a {
  padding: .5rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  font-size: .925rem;
  font-weight: 550;
}
.nav a:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }
.nav a.is-active { color: var(--primary-dark); background: var(--primary-soft); }

.header-actions { display: flex; gap: .5rem; align-items: center; margin-left: auto; }

.nav-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: .5rem 0 1rem;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: .7rem .5rem;
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  font-weight: 550;
}
.mobile-nav a:hover { background: var(--bg-muted); text-decoration: none; }

/* --- Search box --------------------------------------------- */
.searchbar { position: relative; flex: 1 1 auto; max-width: 520px; display: none; }
@media (min-width: 768px) { .searchbar { display: block; } }

.searchbar input {
  width: 100%;
  height: 40px;
  padding: 0 .9rem 0 2.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--slate-50);
  font-size: .9rem;
  color: var(--text);
}
.searchbar input:focus { background: var(--white); border-color: var(--indigo-300); outline: none; box-shadow: 0 0 0 3px var(--indigo-50); }
.searchbar__icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); }

.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 60; display: none;
}
.suggest.is-open { display: block; }
.suggest a { display: block; padding: .6rem .8rem; color: var(--slate-700); font-size: .9rem; }
.suggest a:hover { background: var(--primary-soft); text-decoration: none; }
.suggest__type { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }

/* --- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .925rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; }

.btn--accent { background: var(--mint-600); color: #fff; }
.btn--accent:hover { background: var(--mint-700); color: #fff; }

.btn--outline { background: #fff; border-color: var(--border); color: var(--slate-700); }
.btn--outline:hover { border-color: var(--indigo-300); color: var(--primary-dark); background: var(--indigo-50); }

.btn--ghost { background: transparent; color: var(--slate-600); }
.btn--ghost:hover { background: var(--bg-muted); }

.btn--danger { background: var(--rose-500); color: #fff; }
.btn--danger:hover { background: var(--rose-700); color: #fff; }

.btn--sm { padding: .38rem .7rem; font-size: .82rem; }
.btn--lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* --- Cards --------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card--pad { padding: 1.25rem; }
.card--hover { transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease; }
.card--hover:hover { box-shadow: var(--shadow); border-color: var(--indigo-200); transform: translateY(-2px); }

.card__media { aspect-ratio: 16 / 10; background: var(--bg-muted); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1rem; }
.card__title { font-size: 1rem; font-weight: 650; margin: 0 0 .25rem; color: var(--slate-900); }
.card__title a { color: inherit; }
.card__meta { font-size: .82rem; color: var(--text-muted); }
.card__footer { padding: .75rem 1rem; border-top: 1px solid var(--border-soft); background: var(--slate-50); }

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin: -1.25rem -1.25rem 1rem; padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border-soft); background: var(--slate-50);
}
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1rem; }

/* --- Badges -------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .01em;
  line-height: 1.5;
  white-space: nowrap;
}
.badge--slate  { background: var(--slate-100); color: var(--slate-600); }
.badge--indigo { background: var(--indigo-50); color: var(--indigo-700); }
.badge--mint   { background: var(--mint-50); color: var(--mint-700); }
.badge--amber  { background: var(--amber-100); color: var(--amber-700); }
.badge--rose   { background: var(--rose-100); color: var(--rose-700); }

.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.pill {
  display: inline-block;
  padding: .25rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--slate-600);
  background: #fff;
}
.pill:hover { border-color: var(--indigo-300); color: var(--primary-dark); text-decoration: none; }
.pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --- Stars --------------------------------------------------- */
.stars { display: inline-flex; gap: 1px; color: var(--slate-300); font-size: .95rem; }
.star--on { color: var(--amber-500); }

/* --- Forms --------------------------------------------------- */
.field { margin-bottom: 1rem; }
.label {
  display: block;
  margin-bottom: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--slate-700);
}
.label .req { color: var(--rose-500); }

.input, .select, .textarea {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--indigo-400);
  box-shadow: 0 0 0 3px var(--indigo-50);
}
.input.has-error, .select.has-error, .textarea.has-error { border-color: var(--rose-500); }
.textarea { min-height: 140px; resize: vertical; }

.hint { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }
.error-text { font-size: .8rem; color: var(--rose-700); margin-top: .3rem; }

.checkbox { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; }
.checkbox input { margin-top: .25rem; flex-shrink: 0; }

.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(2, 1fr); } }

/* --- Alerts -------------------------------------------------- */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.alert--success { background: var(--mint-50); border-color: var(--mint-200); color: var(--mint-700); }
.alert--error   { background: var(--rose-100); border-color: #FECDD3; color: var(--rose-700); }
.alert--info    { background: var(--indigo-50); border-color: var(--indigo-200); color: var(--indigo-700); }
.alert--warning { background: var(--amber-100); border-color: #FDE68A; color: var(--amber-700); }

/* --- Hero ---------------------------------------------------- */
.hero {
  background: linear-gradient(140deg, var(--indigo-900) 0%, var(--indigo-700) 45%, var(--mint-600) 130%);
  color: #fff;
  padding: 3rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 18% 22%, rgba(255,255,255,.14), transparent 42%),
                    radial-gradient(circle at 82% 78%, rgba(52,211,153,.22), transparent 46%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: .6rem; font-size: clamp(1.75rem, 5vw, 2.75rem); }
.hero p { color: rgba(255,255,255,.88); font-size: 1.05rem; margin-bottom: 1.5rem; }

.hero-search { background: #fff; border-radius: var(--radius); padding: .4rem; display: flex; gap: .4rem; box-shadow: var(--shadow-lg); }
.hero-search input { flex: 1; border: 0; padding: .7rem .9rem; font-size: .95rem; border-radius: var(--radius-sm); min-width: 0; }
.hero-search input:focus { outline: none; }

.hero-stats { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-stat__value { font-size: 1.5rem; font-weight: 750; color: #fff; line-height: 1.1; }
.hero-stat__label { font-size: .78rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .06em; }

/* --- Section headers ---------------------------------------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head a { font-size: .875rem; font-weight: 600; }

/* --- Business card ------------------------------------------ */
.biz-card { display: flex; gap: .9rem; padding: 1rem; }
.biz-card__logo {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  display: grid; place-items: center;
  font-weight: 700; color: var(--primary);
  overflow: hidden;
}
.biz-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.biz-card__name { font-weight: 650; color: var(--slate-900); margin: 0 0 .1rem; font-size: .975rem; }
.biz-card__name a { color: inherit; }
.biz-card__loc { font-size: .84rem; color: var(--text-muted); }
.biz-card__foot { margin-top: .5rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }

/* Unclaimed listings render deliberately sparse: name, city, state,
   and a claim prompt. Nothing else is available to show. */
.biz-card--unclaimed .biz-card__logo { background: var(--slate-100); color: var(--slate-400); }
.claim-prompt {
  margin-top: .6rem; padding-top: .6rem;
  border-top: 1px dashed var(--border);
  font-size: .82rem; color: var(--text-muted);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap;
}

/* --- Profile header ----------------------------------------- */
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--indigo-700), var(--mint-600));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }

.profile-head { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: -40px; padding: 0 1.25rem; flex-wrap: wrap; }
.profile-logo {
  width: 96px; height: 96px; flex-shrink: 0;
  border-radius: var(--radius);
  background: #fff; border: 3px solid #fff;
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  font-size: 1.75rem; font-weight: 750; color: var(--primary);
  overflow: hidden;
}
.profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-title { padding-top: 48px; flex: 1 1 260px; min-width: 0; }
.profile-title h1 { margin-bottom: .25rem; font-size: clamp(1.4rem, 3.5vw, 2rem); }

.profile-tabs {
  display: flex; gap: .25rem; overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}
.profile-tabs a {
  padding: .65rem .9rem;
  font-size: .9rem; font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.profile-tabs a:hover { color: var(--primary); text-decoration: none; }
.profile-tabs a.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }

/* --- Locked / claim notice ---------------------------------- */
.locked-notice {
  background: var(--slate-50);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius);
  padding: 2rem 1.25rem;
  text-align: center;
}
.locked-notice__icon {
  width: 48px; height: 48px; margin: 0 auto .75rem;
  border-radius: 50%;
  background: var(--slate-200);
  display: grid; place-items: center;
  color: var(--slate-500); font-size: 1.25rem;
}

/* --- Data list ---------------------------------------------- */
.datalist { display: grid; gap: .65rem; }
.datalist__row { display: grid; grid-template-columns: 130px 1fr; gap: .75rem; font-size: .9rem; }
.datalist__key { color: var(--text-muted); }
@media (max-width: 520px) { .datalist__row { grid-template-columns: 1fr; gap: .15rem; } }

/* --- Tables -------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
.table th { background: var(--slate-50); font-weight: 650; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-500); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--slate-50); }

/* --- Pagination ---------------------------------------------- */
.pagination { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; margin: 2rem 0 0; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px;
  padding: 0 .6rem;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--slate-600); background: #fff;
}
.pagination a:hover { border-color: var(--indigo-300); color: var(--primary-dark); text-decoration: none; }
.pagination .is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* --- Breadcrumbs --------------------------------------------- */
.breadcrumbs { font-size: .82rem; color: var(--text-muted); padding: .9rem 0; display: flex; gap: .4rem; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs__sep { color: var(--slate-300); }

/* --- Filters ------------------------------------------------- */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.filter-bar {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 1.25rem;
}

/* --- Forum --------------------------------------------------- */
.thread-row { display: flex; gap: .9rem; padding: 1rem; border-bottom: 1px solid var(--border-soft); }
.thread-row:last-child { border-bottom: 0; }
.thread-row__votes {
  width: 50px; flex-shrink: 0; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
}
.vote-btn {
  border: 0; background: transparent; cursor: pointer;
  color: var(--slate-400); font-size: 1rem; line-height: 1; padding: .15rem;
}
.vote-btn:hover { color: var(--primary); }
.vote-count { font-weight: 700; font-size: .95rem; color: var(--slate-700); }
.thread-row__title { font-weight: 600; color: var(--slate-900); margin: 0 0 .2rem; font-size: .975rem; }
.thread-row__title a { color: inherit; }
.thread-row__meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: .5rem; flex-wrap: wrap; }

.reply { display: flex; gap: .9rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border-soft); }
.reply--nested { margin-left: 1.5rem; padding-left: 1rem; border-left: 2px solid var(--border); }
.reply--accepted { background: var(--mint-50); border-radius: var(--radius); padding: 1.1rem; border-bottom: 0; }

.avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--indigo-100); color: var(--indigo-700);
  display: grid; place-items: center;
  font-weight: 700; font-size: .85rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }

.prose { font-size: .975rem; line-height: 1.7; color: var(--slate-700); }
.prose h2, .prose h3 { margin-top: 1.75rem; }
.prose img { border-radius: var(--radius); margin: 1.25rem 0; }
.prose blockquote {
  margin: 1.25rem 0; padding: .75rem 1.1rem;
  border-left: 3px solid var(--indigo-300);
  background: var(--indigo-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--slate-700);
}
.prose code { background: var(--slate-100); padding: .1rem .35rem; border-radius: 4px; font-family: var(--font-mono); font-size: .875em; }
.prose pre { background: var(--slate-900); color: var(--slate-100); padding: 1rem; border-radius: var(--radius); overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: left; }

/* --- Progress ------------------------------------------------ */
.progress { height: 8px; background: var(--slate-200); border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--indigo-500), var(--mint-500)); border-radius: 999px; transition: width .4s ease; }

/* --- Stat tiles ---------------------------------------------- */
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat-tile__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .2rem; }
.stat-tile__value { font-size: 1.5rem; font-weight: 750; color: var(--slate-900); line-height: 1.2; }
.stat-tile__delta { font-size: .8rem; color: var(--mint-600); }

/* --- Sidebar nav --------------------------------------------- */
.sidenav { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; position: sticky; top: calc(var(--header-h) + 16px); }
.sidenav a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .55rem .7rem; border-radius: var(--radius-sm);
  color: var(--slate-600); font-size: .9rem; font-weight: 550;
}
.sidenav a:hover { background: var(--bg-muted); text-decoration: none; }
.sidenav a.is-active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 650; }
.sidenav__count { font-size: .75rem; background: var(--slate-200); color: var(--slate-600); border-radius: 999px; padding: .05rem .4rem; }
.sidenav a.is-active .sidenav__count { background: var(--indigo-200); color: var(--indigo-800); }
.sidenav__group { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); padding: .75rem .7rem .3rem; font-weight: 700; }

/* --- Ads ----------------------------------------------------- */
.ad-slot { margin: 1.25rem 0; text-align: center; position: relative; }
.ad-slot img { margin: 0 auto; border-radius: var(--radius-sm); }
.ad-slot__label {
  display: block; font-size: .65rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-faint); margin-top: .3rem;
}

/* --- Empty state --------------------------------------------- */
.empty { text-align: center; padding: 3rem 1.25rem; color: var(--text-muted); }
.empty__icon { font-size: 2rem; margin-bottom: .5rem; opacity: .35; }

/* --- Footer -------------------------------------------------- */
.site-footer { background: var(--slate-900); color: var(--slate-400); padding: 3rem 0 1.5rem; margin-top: 3.5rem; }
.site-footer h4 { color: #fff; font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.site-footer a { color: var(--slate-400); font-size: .9rem; display: block; padding: .2rem 0; }
.site-footer a:hover { color: var(--mint-300); text-decoration: none; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--slate-800);
  font-size: .82rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* --- Utilities ----------------------------------------------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

@media print {
  .site-header, .site-footer, .ad-slot, .btn { display: none !important; }
  body { font-size: 12pt; }
}

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