/* HackHopper v3 — "human-made & fun"
   Ported from docs/mockup-v3/styles.css (approved mockup) + additions for
   My hackathons / season card / states, per docs/site-design-v3.md and
   docs/site-design-v2.md §4-8. Vanilla CSS, no build step, no framework.
   Light only (see spec §1.2). */

/* ---------------------------------------------------------------------
   0. Fonts + tokens
   ------------------------------------------------------------------ */

:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-00: 0.875rem;
  --fs-0:  1rem;
  --fs-1:  1.125rem;
  --fs-2:  1.5rem;
  --fs-3:  2.125rem;
  --fs-4:  3rem;
  --fs-5:  4rem;
  --fs-6:  5.5rem;

  --lh-tight: 1.05;
  --lh-body: 1.5;

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

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --dur-fast: 120ms;
  --dur-base: 220ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  --content-max: 1180px;
  --touch-min: 48px;

  --bg: #fff8ec;
  --surface: #ffffff;
  --ink: #241c15;
  --ink-sub: #5b5142;
  --border: rgba(36,28,21,0.12);
  --border-strong: rgba(36,28,21,0.22);

  --coral: #c23a22;
  --coral-fill: #ff6b4a;
  --coral-bg: #fbdcd3;

  --gold: #8a5a00;
  --gold-fill: #ffc93c;
  --gold-bg: #f7e7c4;

  --teal: #0e6b4f;
  --teal-fill: #3dd9a4;
  --teal-bg: #d3ece1;

  --focus-ring: var(--ink);
  --border-warm: rgba(120,88,54,0.16);
  --border-warm-soft: rgba(120,88,54,0.10);
  --shadow-card: 0 1px 2px rgba(36,28,21,.05), 0 8px 24px rgba(36,28,21,.06);
  --shadow-card-hover: 0 1px 2px rgba(36,28,21,.05), 0 16px 32px rgba(36,28,21,.10);
  --shadow-sticker: 0 3px 8px rgba(36,28,21,0.18);
  --shadow-hero: 0 16px 40px rgba(194,58,34,0.16);
  --shadow-inset-field: inset 0 1px 3px rgba(36,28,21,.07);

  --shadow-btn-primary: 0 1px 0 rgba(255,255,255,.10) inset, 0 2px 0 rgba(0,0,0,.28), 0 1px 2px rgba(36,28,21,.12);
  --shadow-btn-primary-hover: 0 1px 0 rgba(255,255,255,.10) inset, 0 3px 0 rgba(0,0,0,.28), 0 6px 14px rgba(36,28,21,.18);
  --shadow-btn-primary-active: 0 1px 0 rgba(255,255,255,.10) inset, 0 0 0 rgba(0,0,0,.28);
  --shadow-btn-secondary: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 0 var(--border-strong), 0 1px 2px rgba(36,28,21,.06);
  --shadow-btn-secondary-hover: 0 1px 0 rgba(255,255,255,.6) inset, 0 3px 0 var(--border-strong), 0 6px 14px rgba(36,28,21,.10);
  --shadow-btn-secondary-active: 0 1px 0 rgba(255,255,255,.6) inset, 0 0 0 var(--border-strong);
  --shadow-chip: 0 1px 0 rgba(255,255,255,.5) inset, 0 1px 0 var(--border-strong);
  --shadow-chip-hover: 0 1px 0 rgba(255,255,255,.5) inset, 0 2px 6px rgba(36,28,21,.10);

  color-scheme: light;
}

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

/* ---------------------------------------------------------------------
   1. Reset / base
   ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-0);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
body.has-tabbar { padding-bottom: 76px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.visually-hidden {
  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; top: -100%; left: var(--sp-4);
  background: var(--ink); color: var(--bg);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  font-weight: 700; z-index: 200; transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

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

.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--sp-4); }
@media (min-width: 900px) { .wrap { padding-inline: var(--sp-7); } }

/* ---------------------------------------------------------------------
   2. Header
   ------------------------------------------------------------------ */

.site-header {
  padding-block: var(--sp-5) var(--sp-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; }
.brand .blip {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(from 210deg, var(--coral-fill), var(--gold-fill), var(--teal-fill), var(--coral-fill));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sticker);
}
.brand .blip::after {
  content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--surface);
}
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  margin: 0; letter-spacing: -0.01em;
}
.tagline { display: none; }
@media (min-width: 640px) {
  .tagline {
    display: block; margin: 0; font-size: var(--fs-1); color: var(--ink-sub); font-weight: 500;
  }
}
.header-nav { display: none; gap: var(--sp-2); }
@media (min-width: 768px) {
  .header-nav { display: flex; }
}
.header-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--sp-4);
  border-radius: var(--radius-pill); text-decoration: none; font-weight: 700; font-size: var(--fs-00);
  color: var(--ink-sub);
}
.header-nav a:hover { background: var(--surface); color: var(--ink); }
.header-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------------
   3. Filter row (desktop inline) / filter button (mobile)
   ------------------------------------------------------------------ */

.filter-row { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); flex-wrap: wrap; }

.search-field { position: relative; flex: 1 1 240px; min-width: 0; }
.search-field svg { position: absolute; left: var(--sp-4); top: 50%; translate: 0 -50%; color: var(--ink-sub); }
.search-field input {
  width: 100%; min-height: var(--touch-min);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-warm); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-inset-field);
  padding-inline: var(--sp-8) var(--sp-5); font-size: var(--fs-1); font-family: var(--font-ui);
  font-weight: 500;
  transition: box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.search-field input::placeholder { color: var(--ink-sub); }
.search-field input:focus-visible { outline-offset: 2px; border-color: var(--coral); }

.filters-inline { display: none; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
@media (min-width: 860px) { .filters-inline { display: flex; } }

.filters-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--touch-min); padding-inline: var(--sp-5);
  background: var(--surface); border: 1px solid var(--border-warm); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-chip);
  font-weight: 700; font-size: var(--fs-1); cursor: pointer;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.filters-btn:hover { box-shadow: var(--shadow-chip-hover); transform: translateY(-1px); }
.filters-btn:active { box-shadow: var(--shadow-chip); transform: translateY(0); }
.filters-btn:focus-visible { outline-color: var(--coral); }
@media (min-width: 860px) { .filters-btn { display: none; } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding-inline: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border-warm);
  border-radius: var(--radius-pill); color: var(--ink); font-weight: 600; font-size: var(--fs-00);
  cursor: pointer; box-shadow: var(--shadow-chip);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-chip-hover); }
.chip:active { transform: translateY(0); box-shadow: var(--shadow-chip); }
.chip:focus-visible { outline-color: var(--coral); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.chip.urgency-chip[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.2); }

.state-select {
  min-height: var(--touch-min); background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-warm); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-chip);
  padding-inline: var(--sp-4); font-size: var(--fs-00); font-weight: 700; font-family: var(--font-ui);
}
.state-select:focus-visible { outline-color: var(--coral); }

.result-line { width: 100%; margin: 0; font-size: var(--fs-00); color: var(--ink-sub); font-weight: 600; }

/* ---------------------------------------------------------------------
   4. Filter sheet (mobile bottom sheet, native <dialog>)
   ------------------------------------------------------------------ */

dialog.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%;
  max-height: 85vh; overflow-y: auto;
  border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--sp-5);
  background: var(--bg);
  box-shadow: 0 -12px 32px rgba(36,28,21,0.18);
}
dialog.sheet::backdrop { background: rgba(36,28,21,0.35); }
.sheet-handle { width: 44px; height: 5px; border-radius: var(--radius-pill); background: var(--border-strong); margin: 0 auto var(--sp-5); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.sheet-header h2 { font-family: var(--font-display); font-size: var(--fs-2); margin: 0; }
.sheet-section { margin-bottom: var(--sp-5); }
.sheet-label { font-weight: 800; font-size: var(--fs-00); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-sub); margin: 0 0 var(--sp-2); }
.sheet-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.sheet-apply {
  position: sticky; bottom: 0; width: 100%; min-height: var(--touch-min);
  background: var(--coral); color: #fff; border: 0; border-radius: var(--radius-pill);
  font-weight: 800; font-size: var(--fs-1); cursor: pointer; margin-top: var(--sp-3);
}

/* ---------------------------------------------------------------------
   5. Hero — "Next up"
   ------------------------------------------------------------------ */

.hero {
  position: relative; margin-bottom: var(--sp-8);
  background: var(--coral-fill);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
}
.hero-dots {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.5) 2px, transparent 2px);
  background-size: 22px 22px; opacity: 0.5;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; gap: var(--sp-4);
  grid-template-areas: "art" "content";
  padding: var(--sp-5);
}
.hero-content { grid-area: content; display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.hero-art-wrap { grid-area: art; display: flex; justify-content: center; }

@media (min-width: 760px) {
  .hero-inner {
    grid-template-columns: 1.35fr 1fr;
    grid-template-areas: "content art";
    align-items: center;
    padding: var(--sp-6) var(--sp-7);
    min-height: 300px;
  }
  .hero-content { justify-content: center; gap: var(--sp-3); }
  .hero-art-wrap { justify-content: flex-end; overflow: visible; }
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 0;
  font-weight: 800; font-size: var(--fs-00); text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink); background: var(--surface); padding: 4px var(--sp-3); border-radius: var(--radius-pill);
  transform: rotate(-2deg); box-shadow: var(--shadow-sticker);
}
.hero h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 2.25rem;
  margin: 0; line-height: var(--lh-tight); color: var(--ink);
}
@media (min-width: 760px) { .hero h2 { font-size: 2.75rem; } }
.hero-sub { margin: 0; font-size: var(--fs-1); font-weight: 600; color: var(--ink); }

.hero-countdown-row {
  display: flex; align-items: baseline; gap: var(--sp-3); margin: var(--sp-1) 0;
}
.hero-stat {
  font-family: var(--font-display); font-weight: 800; line-height: 0.9;
  font-size: 3rem; color: var(--ink); flex-shrink: 0;
}
@media (min-width: 760px) { .hero-stat { font-size: 3.5rem; } }
.hero-stat-copy { font-weight: 700; font-size: var(--fs-1); color: var(--ink); line-height: 1.25; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-2); }

.hero-cover-frame {
  position: relative; width: 156px; height: 156px; flex-shrink: 0;
  border-radius: var(--radius-md); overflow: hidden;
  border: 5px solid var(--surface); box-shadow: var(--shadow-sticker);
  transform: rotate(4deg);
  background: var(--gold-bg);
}
@media (min-width: 760px) {
  .hero-cover-frame {
    width: 220px; height: 220px;
    margin-right: -34px; margin-bottom: -18px;
  }
}
.hero-cover-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-cover-frame::after {
  content: ""; position: absolute; inset: 0; background: var(--coral); mix-blend-mode: multiply; opacity: 0.16;
}
.hero-cover-frame .cover-fallback svg { width: 60%; height: 60%; }

/* ---------------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding-inline: var(--sp-5);
  text-decoration: none;
  border-radius: var(--radius-pill); font-weight: 600; font-size: var(--fs-0);
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:focus-visible { outline-color: var(--coral); }
.btn-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-btn-primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-btn-primary-hover); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-btn-primary-active); }

.btn-secondary {
  background: var(--surface); border-color: var(--border-warm); color: var(--ink);
  box-shadow: var(--shadow-btn-secondary);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-btn-secondary-hover); }
.btn-secondary:active { transform: translateY(0); box-shadow: var(--shadow-btn-secondary-active); }

.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ---------------------------------------------------------------------
   7. Timeline / group headers
   ------------------------------------------------------------------ */

.group-header {
  display: flex; align-items: baseline; gap: var(--sp-3); margin: 0 0 var(--sp-5);
  padding-bottom: var(--sp-3); border-bottom: 3px solid var(--ink);
}
.group-header h3 {
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-3); margin: 0;
}
.group-header .count {
  font-weight: 800; font-size: var(--fs-00); color: var(--bg); background: var(--ink);
  padding: 2px var(--sp-3); border-radius: var(--radius-pill);
}
.timeline-group { margin-bottom: var(--sp-8); }

.event-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--sp-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------------
   8. Event card — imagery first
   ------------------------------------------------------------------ */

.event-card { position: relative; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-warm); border-radius: var(--radius-md);
  overflow: visible; height: 100%;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  isolation: isolate;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
}
.card:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.cover-frame {
  position: relative; border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--border);
  box-shadow: inset 0 0 0 1px rgba(36,28,21,.07);
}
.cover-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-base) var(--ease);
}
@media (hover: hover) {
  .card:hover .cover-frame img { transform: rotate(-1deg) scale(1.04); }
}

.urgency-flag {
  position: absolute; top: 0; left: var(--sp-4); z-index: 2;
  padding: 6px var(--sp-3) 10px; font-weight: 800; font-size: var(--fs-00);
  color: #fff; clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  box-shadow: 0 3px 6px rgba(0,0,0,.18);
}
.urgency-flag.tier-danger { background: var(--coral); }
.urgency-flag.tier-warn   { background: var(--gold); }
.urgency-flag.tier-ok     { background: var(--teal); }
.urgency-flag.tier-unknown{ background: var(--ink-sub); }

.logo-sticker {
  position: absolute; left: var(--sp-4); bottom: -22px; z-index: 3;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--surface);
  box-shadow: var(--shadow-sticker);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-6deg); overflow: hidden;
}
.logo-sticker img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.cover-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cover-fallback svg { width: 42%; height: 42%; }

.card-body { padding: var(--sp-5) var(--sp-4) var(--sp-4); flex: 1; display: flex; flex-direction: column; }
.card-body.has-sticker { padding-top: calc(var(--sp-5) + 14px); }

.card-title {
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2);
  margin: 0 0 6px; line-height: var(--lh-tight);
  text-wrap: balance;
}
.card-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: var(--fs-00); color: var(--ink-sub); font-weight: 600; margin: 0 0 var(--sp-3);
}
.card-meta svg { color: var(--ink-sub); flex-shrink: 0; }
.card-meta .sep { opacity: .5; }

.trust-disclosure {
  margin: 0 0 var(--sp-4);
}
.trust-disclosure summary { list-style: none; cursor: pointer; }
.trust-disclosure summary::-webkit-details-marker { display: none; }
.trust-disclosure summary::marker { content: ""; }
.trust-toggle {
  background: none; border: 0; padding: 0; color: var(--ink-sub); font-size: var(--fs-00);
  font-weight: 600; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer;
  position: relative; z-index: 2;
}
.trust-body { margin: var(--sp-2) 0 0; font-size: var(--fs-00); color: var(--ink-sub); }

.card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }

.status-sticker {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding-inline: var(--sp-3);
  border-radius: var(--radius-pill); font-weight: 800; font-size: var(--fs-00);
  border: 2px solid var(--ink); cursor: pointer; white-space: nowrap;
  transform: rotate(var(--tilt, -2deg));
  box-shadow: var(--shadow-sticker);
  position: relative; z-index: 2;
}
.status-sticker.is-unlogged  { background: var(--surface); color: var(--ink-sub); border-color: var(--border-strong); }
.status-sticker.is-saved     { background: var(--gold-bg); color: var(--gold); }
.status-sticker.is-registered{ background: var(--coral-fill); color: var(--ink); }
.status-sticker.is-attending { background: var(--teal-fill); color: var(--ink); }
.status-sticker.is-attending .pulse-dot { animation: pulse 1.6s infinite; }
.status-sticker.is-attended  { background: var(--surface); color: var(--ink); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.cta-link {
  position: relative; font-weight: 800; font-size: var(--fs-00);
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral-fill);
  text-underline-offset: 3px; text-decoration-thickness: 2.5px;
}
.cta-link::after { content: ""; position: absolute; inset: 0; }
.card-footer { position: relative; z-index: 0; }

/* ---------------------------------------------------------------------
   9. Footer
   ------------------------------------------------------------------ */

.site-footer {
  margin-top: var(--sp-8); padding-block: var(--sp-6) var(--sp-8);
  border-top: 3px solid var(--ink);
  font-size: var(--fs-00); color: var(--ink-sub);
}
.site-footer h4 { font-family: var(--font-display); font-size: var(--fs-1); color: var(--ink); margin: 0 0 var(--sp-2); }
.footer-grid { display: grid; gap: var(--sp-5); margin-bottom: var(--sp-5); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-grid p { margin: 0; }
.footer-grid a { color: var(--coral); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-weight: 600; align-items: center; }
.footer-links a, .footer-links button.link-btn { color: var(--ink-sub); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------------
   10. Mobile bottom tab bar
   ------------------------------------------------------------------ */

.tab-bar { display: none; }
@media (max-width: 767px) {
  .tab-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--surface); border-top: 2px solid var(--ink);
    padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
}
.tab-bar a, .tab-bar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 64px; min-height: 48px; justify-content: center;
  background: none; border: 0; font-weight: 700; font-size: 0.7rem; color: var(--ink-sub);
  text-decoration: none; border-radius: var(--radius-sm); cursor: pointer;
}
.tab-bar a[aria-current="page"] { color: var(--coral); }
.tab-bar svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------------
   11. Dialog (log entry)
   ------------------------------------------------------------------ */

dialog.log-dialog {
  width: min(560px, calc(100vw - var(--sp-6)));
  max-height: min(700px, calc(100vh - var(--sp-6)));
  overflow-y: auto; border: 1px solid var(--border-warm); border-radius: var(--radius-lg);
  padding: 0; background: var(--bg); color: var(--ink);
  box-shadow: 0 1px 2px rgba(36,28,21,.05), 0 24px 60px rgba(36,28,21,.20);
}
dialog.log-dialog::backdrop { background: rgba(36,28,21,0.4); }
.dialog-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-4); border-bottom: 2px solid var(--border);
}
.dialog-header h2 { font-family: var(--font-display); font-size: var(--fs-2); margin: 0 0 4px; }
.dialog-header p { margin: 0; color: var(--ink-sub); font-weight: 600; font-size: var(--fs-00); }
.dialog-close {
  min-width: 40px; min-height: 40px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dialog-body { padding: var(--sp-5); display: grid; gap: var(--sp-5); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: var(--sp-2); font-weight: 800; font-size: var(--fs-1); }
.status-radio-group { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.status-radio { position: relative; }
.status-radio input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.status-radio label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-inline: var(--sp-4);
  border: 1px solid var(--border-warm); border-radius: var(--radius-pill); box-shadow: var(--shadow-chip);
  font-weight: 800; font-size: var(--fs-00); color: var(--ink-sub); cursor: pointer;
}
.status-radio input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.status-radio input:focus-visible + label { outline: 2px solid var(--coral); outline-offset: 2px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-00); font-weight: 800; }
.field .hint { font-size: var(--fs-00); color: var(--ink-sub); font-weight: 500; }
.field input, .field textarea, .field select {
  min-height: var(--touch-min); background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-warm); border-radius: var(--radius-sm); box-shadow: var(--shadow-inset-field);
  padding-inline: var(--sp-3); font-size: var(--fs-0); font-family: var(--font-ui);
}
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline-color: var(--coral); }
.field textarea { min-height: 72px; padding-block: var(--sp-2); resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-0); font-weight: 600; }
.checkbox-row input { width: 20px; height: 20px; accent-color: var(--coral); }
.two-col { display: grid; gap: var(--sp-4); }
@media (min-width: 480px) { .two-col { grid-template-columns: 1fr 1fr; } }
.dialog-footer {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5) var(--sp-5); border-top: 2px solid var(--border);
  flex-wrap: wrap;
}
.draft-note { font-size: var(--fs-00); color: var(--ink-sub); max-width: 260px; }
.dialog-actions { display: flex; gap: var(--sp-3); }

/* ---------------------------------------------------------------------
   12. States: loading / empty / error
   ------------------------------------------------------------------ */

.skeleton-grid { list-style: none; margin: 0 0 var(--sp-8); padding: 0; display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .skeleton-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
.skeleton-card { border-radius: var(--radius-md); overflow: hidden; background: var(--surface); border: 1px solid var(--border-warm); }
.skeleton-cover { aspect-ratio: 4/3; background: var(--border); animation: skeleton-pulse 1.6s ease-in-out infinite; }
.skeleton-lines { padding: var(--sp-5) var(--sp-4); display: grid; gap: var(--sp-2); }
.skeleton-line { height: 14px; border-radius: 7px; background: var(--border); animation: skeleton-pulse 1.6s ease-in-out infinite; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .skeleton-cover, .skeleton-line { animation: none; opacity: 0.75; }
}

.empty-state, .error-state {
  text-align: center; padding: var(--sp-8) var(--sp-4); max-width: 480px; margin-inline: auto;
}
.empty-state h3, .error-state h3 { font-family: var(--font-display); font-size: var(--fs-2); margin: 0 0 var(--sp-2); }
.empty-state p, .error-state p { margin: 0 0 var(--sp-4); color: var(--ink-sub); }

/* ---------------------------------------------------------------------
   13. Banner (Safari eviction / add-to-home-screen nudge)
   ------------------------------------------------------------------ */

.nudge-banner {
  display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  background: var(--gold-bg); border: 1px solid var(--border-warm); border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-6); color: var(--ink);
}
.nudge-banner p { margin: 0; flex: 1 1 220px; font-weight: 600; }
.nudge-actions { display: flex; gap: var(--sp-2); align-items: center; }
.nudge-dismiss {
  background: none; border: 0; min-width: 40px; min-height: 40px; border-radius: 50%;
  cursor: pointer; font-weight: 800; font-size: 1rem;
}

/* ---------------------------------------------------------------------
   14. My hackathons page
   ------------------------------------------------------------------ */

.page-title {
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-4);
  margin: 0 0 var(--sp-2);
}
.page-sub { margin: 0 0 var(--sp-6); color: var(--ink-sub); font-weight: 600; }

.stats-strip {
  display: flex; flex-wrap: wrap; gap: var(--sp-6);
  background: var(--surface); border: 1px solid var(--border-warm); border-radius: var(--radius-md);
  padding: var(--sp-5); margin-bottom: var(--sp-7); box-shadow: var(--shadow-card);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-3); line-height: 1; }
.stat-label { font-size: var(--fs-00); color: var(--ink-sub); font-weight: 700; }

.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.history-row {
  display: flex; align-items: center; gap: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border-warm); border-radius: var(--radius-md);
  padding: var(--sp-4); box-shadow: var(--shadow-card);
}
.leaf-tile {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: var(--teal-bg); color: var(--teal); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 800; line-height: 1.1;
}
.leaf-tile .leaf-month { font-size: var(--fs-00); text-transform: uppercase; }
.leaf-tile .leaf-day { font-size: var(--fs-2); font-family: var(--font-display); }
.history-body { flex: 1; min-width: 0; }
.history-body h4 { margin: 0 0 2px; font-family: var(--font-display); font-size: var(--fs-1); }
.history-body p { margin: 0; color: var(--ink-sub); font-size: var(--fs-00); font-weight: 600; }
.outcome-badge {
  flex-shrink: 0; font-size: var(--fs-00); font-weight: 800; padding: 4px var(--sp-3);
  border-radius: var(--radius-pill); background: var(--gold-bg); color: var(--gold);
}

.locked-card {
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
  padding: var(--sp-6); text-align: center; margin-bottom: var(--sp-7);
}
.locked-card p { margin: 0 0 var(--sp-3); font-weight: 700; }

.season-card-wrap { text-align: center; margin-bottom: var(--sp-7); }
#season-canvas {
  width: min(100%, 360px); height: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  margin-bottom: var(--sp-4);
}
.season-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

.import-export-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.import-export-row input[type="file"] { max-width: 220px; }
.import-summary { font-size: var(--fs-00); color: var(--ink-sub); margin: var(--sp-2) 0 0; }
.import-error { font-size: var(--fs-00); color: var(--coral); margin: var(--sp-2) 0 0; font-weight: 700; }
