@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Barlow+Condensed:wght@300;400;500;600;700&family=Barlow:wght@300;400;500&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  --stone: #181817;
  --rock: #242422;
  --slate: #48484230;
  --slate-solid: #484842;
  --mist: #9a9c94;
  --snow: #f0ede8;
  --glacier: #c4d8d4;
  --alpine: #3a6458;
  --summit: #e6c240;
  --sky: #5a84a0;
  --danger: #c44c38;
  --success: #6aaa70;
  --warning: #e0884a;

  --col-ski: #5a84a0;
  --col-ski-bg: rgba(90,132,160,0.12);
  --col-climb: #b85a3a;
  --col-climb-bg: rgba(184,90,58,0.12);
  --col-hike: #5a8a60;
  --col-hike-bg: rgba(90,138,96,0.12);
  --col-social: #8a6aaa;
  --col-social-bg: rgba(138,106,170,0.12);
  --col-course: #b87a30;
  --col-course-bg: rgba(184,122,48,0.12);
  --col-nordic: #3a8888;
  --col-nordic-bg: rgba(58,136,136,0.12);
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--stone);
  color: var(--snow);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 80px;
  background: var(--rock);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--snow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.nav-logo-title { display: block; line-height: 1; }
.nav-logo-title span { color: var(--summit); }
.nav-logo-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.20em;
  color: var(--mist);
  margin-top: 5px;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--snow);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--glacier); }
.nav-links a.active {
  color: var(--summit);
  border-bottom: 1px solid var(--summit);
  padding-bottom: 1px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-login {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-login:hover { color: var(--snow); }
.nav-join {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  background: var(--summit);
  padding: 8px 18px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-join:hover { opacity: 0.88; }

/* Nav avatar link + image (generated by app.js) */
.nav-avatar-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-avatar-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.nav-avatar-placeholder {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--alpine);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--snow);
}

/* Nav avatar / dropdown */
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--alpine);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--snow);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
/* Notification badge on avatar */
.nav-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  background: var(--danger);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
.menu-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  background: var(--danger);
  color: #fff;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
}

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--rock);
  border: 1px solid rgba(255,255,255,0.1);
  min-width: 180px;
  padding: 8px 0;
  z-index: 300;
  display: none;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown-menu a:hover { color: var(--snow); background: rgba(255,255,255,0.04); }
.nav-dropdown-menu hr { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 6px 0; }
.nav-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ── FOOTER ── */
footer {
  background: var(--rock);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 40px 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-brand .nav-logo { font-size: 22px; display: inline-block; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; color: var(--mist); line-height: 1.7; max-width: 260px; }
.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mist); margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 14px; color: var(--mist); text-decoration: none; transition: color 0.15s; }
.footer-col ul a:hover { color: var(--snow); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.08em; color: var(--mist);
}

/* ── BUTTONS ── */
.btn {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 28px;
  border: none; cursor: pointer;
  text-decoration: none; display: inline-block;
  transition: opacity 0.15s, background 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--summit); color: var(--stone); }
.btn-secondary { background: rgba(255,255,255,0.08); color: var(--snow); border: 1px solid rgba(255,255,255,0.15); }
.btn-ghost { background: transparent; color: var(--mist); border: 1px solid rgba(255,255,255,0.15); }
.btn-danger { background: var(--danger); color: var(--snow); }
.btn-sm { padding: 7px 16px; font-size: 11px; }
.btn-lg { padding: 16px 36px; font-size: 14px; }
.btn-full { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── FORMS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mist); margin-bottom: 8px;
}
.form-required { color: var(--summit); margin-left: 2px; }
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: 'Barlow', sans-serif;
  font-size: 15px; font-weight: 300;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--snow);
  padding: 12px 16px;
  transition: border-color 0.2s;
}
.form-input::placeholder { color: var(--mist); opacity: 0.6; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus { outline: none; border-color: var(--summit); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a9c94' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: rgba(255,255,255,0.05);
  cursor: pointer; padding-right: 36px;
}
.form-select option { background: var(--rock); }
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.form-hint { font-size: 12px; color: var(--mist); margin-top: 5px; }
.form-error { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; color: var(--danger); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input { accent-color: var(--summit); width: 16px; height: 16px; cursor: pointer; }
.form-check-label { font-size: 14px; color: var(--mist); }

/* Alerts */
.alert {
  padding: 14px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: 0.05em;
  border-left: 3px solid; margin-bottom: 20px;
}
.alert-error { background: rgba(196,76,56,0.1); border-color: var(--danger); color: #e07060; }
.alert-success { background: rgba(106,170,112,0.1); border-color: var(--success); color: #6aaa70; }
.alert-info { background: rgba(90,132,160,0.1); border-color: var(--sky); color: var(--sky); }
.alert-warn { background: rgba(224,136,74,0.1); border-color: var(--warning); color: var(--warning); }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(to bottom, var(--rock), var(--stone));
  padding: 48px 40px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.breadcrumb {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mist); margin-bottom: 16px;
}
.breadcrumb a { color: var(--mist); text-decoration: none; }
.breadcrumb a:hover { color: var(--snow); }
.breadcrumb span { color: var(--summit); }
.page-title-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 44px; font-weight: 700;
  line-height: 1; letter-spacing: -0.01em;
}
.page-title em { font-style: italic; color: var(--glacier); }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 580px;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(160deg, #1a2a35 0%, #0f1c22 30%, #181817 65%, #1a1a18 100%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 500px 300px at 80% 30%, rgba(90,132,160,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 300px 200px at 20% 60%, rgba(58,100,88,0.06) 0%, transparent 70%);
}
/* Silhouette peaks — lighter so the image shines through */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 240px;
  clip-path: polygon(0 100%, 6% 68%, 12% 82%, 20% 48%, 28% 70%, 36% 28%, 44% 58%, 52% 32%, 60% 60%, 68% 38%, 76% 62%, 84% 44%, 92% 58%, 100% 46%, 100% 100%);
  background: rgba(15,18,20,0.25);
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 65%, rgba(24,24,23,0.50) 100%);
}
/* Triangle overlay layer */
.hero-tri-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-tri-layer svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.tri-dk { fill: rgba(0,0,0,0.25); }
html.light .tri-dk { fill: rgba(0,0,0,0.18); }
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 80px;
  max-width: 680px;
}
.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--summit); margin-bottom: 16px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 64px; font-weight: 700;
  line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-title em { font-style: italic; color: var(--glacier); }
.hero-sub {
  font-size: 17px; font-weight: 300;
  color: rgba(240,237,232,0.75);
  line-height: 1.65; max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── SECTION ── */
.section { padding: 64px 40px; }
.section-sm { padding: 40px 40px; }
.section-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--summit); margin-bottom: 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 700; line-height: 1.1;
}
.section-title em { font-style: italic; color: var(--glacier); }
.section-sub { font-size: 15px; color: var(--mist); margin-top: 8px; max-width: 520px; }
.section-header { margin-bottom: 32px; }
.section-header-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }

/* ── TRIP CARD (HOME/SUMMARY) ── */
.trip-card-sm {
  background: var(--rock);
  border-left: 3px solid transparent;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.15s, border-color 0.15s;
}
.trip-card-sm:hover { background: #2a2a28; border-left-color: var(--summit); }
.tc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.tc-date {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist);
}
.tc-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--snow); line-height: 1.2; margin-bottom: 5px;
}
.tc-leader { font-size: 13px; color: var(--mist); margin-bottom: 14px; }
.tc-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px;
}

/* ── CATEGORY PILLS & DOTS ── */
.cat-pill {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; white-space: nowrap;
}
.cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

.cat-backcountry-skiing { background: var(--col-ski-bg); color: var(--col-ski); }
.cat-indoor-climbing  { background: var(--col-climb-bg); color: var(--col-climb); }
.cat-hiking           { background: var(--col-hike-bg);  color: var(--col-hike); }
.cat-mountaineering   { background: var(--col-hike-bg);  color: var(--col-hike); }
.cat-social           { background: var(--col-social-bg);color: var(--col-social); }
.cat-course           { background: var(--col-course-bg);color: var(--col-course); }
.cat-nordic-skiing    { background: var(--col-nordic-bg);color: var(--col-nordic); }
.cat-rock-climbing    { background: var(--col-climb-bg); color: var(--col-climb); }

.dot-backcountry-skiing { background: var(--col-ski); }
.dot-indoor-climbing    { background: var(--col-climb); }
.dot-hiking             { background: var(--col-hike); }
.dot-mountaineering     { background: var(--col-hike); }
.dot-social             { background: var(--col-social); }
.dot-course             { background: var(--col-course); }
.dot-nordic-skiing      { background: var(--col-nordic); }
.dot-rock-climbing      { background: var(--col-climb); }

/* ── GRADE BADGE ── */
.grade-badge {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  padding: 4px 10px;
  background: rgba(230,194,64,0.1);
  color: var(--summit);
  border: 1px solid rgba(230,194,64,0.2);
}

/* ── SPOTS ── */
.spots-full { color: var(--danger); font-weight: 600; }
.spots-low  { color: var(--warning); font-weight: 600; }
.spots-open { color: var(--success); font-weight: 600; }

/* ── INFO TILES ── */
.info-tile {
  background: var(--rock);
  padding: 24px 28px;
  border-top: 2px solid var(--summit);
}
.info-tile-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px; font-weight: 700; color: var(--snow);
  line-height: 1;
}
.info-tile-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mist); margin-top: 6px;
}

/* ── DIVIDER ── */
.divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 0; }

/* ── TAG (filter active) ── */
.active-filter-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(230,194,64,0.1);
  border: 1px solid rgba(230,194,64,0.2);
  color: var(--summit);
  padding: 2px 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
}
.active-filter-tag button {
  background: none; border: none; color: var(--summit);
  cursor: pointer; font-size: 13px; line-height: 1; padding: 0; opacity: 0.7;
}
.active-filter-tag button:hover { opacity: 1; }

/* ── MEMBER CARD ── */
.member-card {
  background: var(--rock);
  padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px;
}
.member-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--alpine);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 700; color: var(--snow);
}
.member-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: 0.05em; color: var(--snow);
}
.member-role { font-size: 13px; color: var(--mist); }

/* ── SPINNER ── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--summit);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── UTILS ── */
.hidden { display: none !important; }
.text-mist { color: var(--mist); }
.text-summit { color: var(--summit); }
.text-glacier { color: var(--glacier); }
.text-snow { color: var(--snow); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-2 { display: flex; flex-direction: column; gap: 2px; }

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--mist);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--snow); border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.05); }

/* ── LIGHT MODE ── */
html.light {
  --stone:   #f0ede7;
  --rock:    #e3dfd7;
  --slate:   rgba(120,118,112,0.2);
  --slate-solid: #b0ada6;
  --mist:    #6b6c65;
  --snow:    #1a1918;
  --glacier: #2d5449;
  /* Darken gold so it's readable on cream backgrounds */
  --summit:  #7a5c00;
}

/* Nav */
html.light nav { border-bottom-color: rgba(0,0,0,0.08); }
html.light .nav-dropdown-menu {
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
html.light .nav-dropdown-menu a:hover { background: rgba(0,0,0,0.05); }
html.light .nav-dropdown-menu hr { border-top-color: rgba(0,0,0,0.08); }
html.light .theme-toggle { border-color: rgba(0,0,0,0.18); }
html.light .theme-toggle:hover { border-color: rgba(0,0,0,0.35); background: rgba(0,0,0,0.05); }

/* Structure */
html.light .page-header { border-bottom-color: rgba(0,0,0,0.08); }
html.light .divider { border-top-color: rgba(0,0,0,0.08); }
html.light footer { border-top-color: rgba(0,0,0,0.08); }
html.light .footer-bottom { border-top-color: rgba(0,0,0,0.08); }

/* Cards / trip cards */
html.light .trip-card-sm:hover { background: #d8d4cc; }
html.light .tc-footer { border-top-color: rgba(0,0,0,0.07); }

/* Forms */
html.light .form-input,
html.light .form-select,
html.light .form-textarea {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: var(--snow);
}
html.light .form-input::placeholder { color: var(--mist); opacity: 0.7; }
html.light .form-select {
  background-color: rgba(0,0,0,0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6c65' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}
html.light .form-select option { background: var(--rock); color: var(--snow); }
html.light .form-input:focus,
html.light .form-select:focus,
html.light .form-textarea:focus { border-color: var(--summit); }

/* Buttons */
html.light .btn-secondary { background: rgba(0,0,0,0.07); border-color: rgba(0,0,0,0.15); color: var(--snow); }
html.light .btn-ghost { border-color: rgba(0,0,0,0.2); }

/* Alerts */
html.light .alert-error   { background: rgba(196,76,56,0.08);  }
html.light .alert-success { background: rgba(106,170,112,0.08); }
html.light .alert-info    { background: rgba(90,132,160,0.08);  }
html.light .alert-warn    { background: rgba(224,136,74,0.08);  }

/* Misc */
html.light .spinner { border-color: rgba(0,0,0,0.1); border-top-color: var(--summit); }
html.light .grade-badge { background: rgba(100,78,0,0.08); border-color: rgba(100,78,0,0.2); }
html.light .active-filter-tag { background: rgba(100,78,0,0.08); border-color: rgba(100,78,0,0.2); }

/* Hero — replace dark gradient with an alpine morning sky */
html.light .hero {
  background: linear-gradient(160deg, #a8c4d4 0%, #bcd4e0 30%, #d4e2e4 65%, #e8ece8 100%);
}
html.light .hero::before {
  background:
    radial-gradient(ellipse 500px 300px at 80% 30%, rgba(90,132,160,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 300px 200px at 20% 60%, rgba(58,100,88,0.15) 0%, transparent 70%);
}
/* Mountain silhouette — lighter in light mode */
html.light .hero::after { background: rgba(110,145,155,0.18); }
/* Fade the bottom to the light page bg */
html.light .hero-gradient {
  background: linear-gradient(to bottom, transparent 65%, rgba(232,236,232,0.75) 100%);
}
/* Hero sub-text was hardcoded light rgba — override to dark */
html.light .hero-sub { color: rgba(26,25,24,0.72); }

/* Hardcoded dark hover backgrounds in page-specific CSS */
html.light .news-card:hover  { background: #d4d0c8; border-left-color: var(--summit); }
html.light .cat-tile:hover   { background: #d4d0c8; }
html.light .hut-card:hover   { background: #d4d0c8; }
html.light .report-card:hover { background: #d4d0c8; border-left-color: var(--summit); }

/* Hardcoded rgba(255,255,255,…) borders in page-specific CSS */
html.light .stats-bar {
  border-top-color:    rgba(0,0,0,0.08);
  border-bottom-color: rgba(0,0,0,0.08);
}
html.light .stat-item  { border-right-color: rgba(0,0,0,0.08); }

/* Hut visual panels — override both class and inline-style backgrounds */
html.light .hut-visual {
  background: linear-gradient(160deg, #b8d0dc 0%, #c8dce4 60%, #d8ddd8 100%) !important;
}
html.light .hut-visual::after { background: rgba(148,182,190,0.5); }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 201;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--snow);
  border-radius: 1px;
  transition: transform 0.28s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile slide-down menu */
.nav-mobile-menu {
  position: fixed;
  top: 80px; left: 0; right: 0;
  background: var(--rock);
  border-bottom: 2px solid var(--summit);
  z-index: 198;
  padding: 8px 0 20px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.nav-mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.nav-mobile-menu a {
  display: block;
  padding: 14px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--snow); text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-mobile-menu a:hover { color: var(--glacier); background: rgba(255,255,255,0.04); }
.nav-mobile-menu a.active { color: var(--summit); border-left-color: var(--summit); }
.nav-mobile-menu hr { border: none; border-top: 1px solid rgba(255,255,255,0.07); margin: 8px 0; }
.nav-mobile-menu .mob-user {
  padding: 12px 28px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 0.1em;
  color: var(--mist); text-transform: uppercase;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-login, .nav-join { display: none; }
  .hero-title { font-size: 40px; }
  .hero-content { padding: 0 20px 56px; }
  .section { padding: 48px 20px; }
  .section-sm { padding: 32px 20px; }
  .page-header { padding: 32px 20px 0; }
  footer { padding: 40px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .page-title { font-size: 34px; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-title-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}
