/* ==========================================================================
   AEA/MTI Hackathon 2 — Shared Styles
   Imports brand.css for all custom properties. Do NOT hardcode colors or fonts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Extended design tokens (supplements brand.css)
   -------------------------------------------------------------------------- */
:root {
  /* Path color tints for backgrounds */
  --color-critique-tint: rgba(252, 98, 79, 0.08);
  --color-create-tint:   rgba(115, 220, 138, 0.08);
  --color-collab-tint:   rgba(123, 49, 246, 0.08);
  --color-yellow-tint:   rgba(247, 207, 70, 0.15);

  /* Dark hero background */
  --color-dark: #111111;

  /* Spacing scale */
  --space-xs:  0.25rem;   /* 4px */
  --space-sm:  0.5rem;    /* 8px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2.5rem;    /* 40px */
  --space-2xl: 4rem;      /* 64px */
  --space-3xl: 6rem;      /* 96px */

  /* Typography scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.75rem;
  --text-5xl:  3.75rem;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;

  /* Header height for offset */
  --header-height: 64px;
}

/* --------------------------------------------------------------------------
   Base reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-coral);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

a:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

@media (min-width: 480px) {
  .container {
    padding-inline: var(--space-lg);
  }
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-xl);
  }
}

.section {
  padding-block: var(--space-2xl);
}

.section--light {
  background: var(--color-white);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-white);
}

.section--tinted {
  background: var(--color-light);
}

.section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.section-subheading {
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 60ch;
  margin-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-link img {
  height: 36px;
  width: auto;
}

/* Co-brand logo lockup */
.cobrand-logos {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.cobrand-logos .logo-link img {
  height: 32px; /* slightly shorter so both logos sit comfortably */
}

/* AEA logo is wider, cap it so it doesn't dominate */
.cobrand-logos .logo-link--aea img {
  height: 28px;
  max-width: 140px;
  object-fit: contain;
  object-position: left center;
}

.cobrand-divider {
  width: 1px;
  height: 28px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* Footer co-brand logos — both inverted white */
.site-footer__cobrand {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.site-footer__cobrand img {
  height: 28px;
  width: auto;
  opacity: 0.85;
}

/* AEA logo has a white background (no transparent version) —
   show in a small white pill so it reads cleanly on the dark footer */
.site-footer__cobrand img:not(.logo-mti) {
  background: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* MTI white logo is already white — no filter, just height cap */
.site-footer__cobrand .logo-mti {
  height: 24px;
  max-width: 180px;
}

.site-footer__cobrand-divider {
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* Nav toggle (hamburger — mobile only) */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius);
  transition: background var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--color-light);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top:  7px; }

/* Hamburger → X when open */
.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg) translate(4px, 5px);
}
.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* Site nav links */
.site-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
  gap: var(--space-xs);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--color-light);
  color: var(--color-coral);
  outline: none;
}

.site-nav a.active {
  color: var(--color-coral);
  font-weight: 600;
}

.site-nav a.nav-cta {
  background: var(--color-coral);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
}

.site-nav a.nav-cta:hover {
  opacity: 0.9;
  background: var(--color-coral);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    padding: 0;
    background: transparent;
    align-items: center;
    gap: var(--space-xs);
  }

  .site-nav a {
    font-size: var(--text-sm);
    padding: var(--space-xs) var(--space-sm);
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-coral);
  color: var(--color-white);
  border-color: var(--color-coral);
}

.btn--primary:hover {
  filter: brightness(1.1);
  opacity: 1;
}

.btn--outline {
  background: transparent;
  color: var(--color-coral);
  border-color: var(--color-coral);
}

.btn--outline:hover {
  background: var(--color-coral);
  color: var(--color-white);
  opacity: 1;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-light);
  opacity: 1;
}

/* Path-specific button colors */
.btn--critique {
  background: var(--color-critique);
  color: var(--color-white);
  border-color: var(--color-critique);
}

.btn--create {
  background: var(--color-create);
  color: var(--color-white);
  border-color: var(--color-create);
}

.btn--collab {
  background: var(--color-collab);
  color: var(--color-white);
  border-color: var(--color-collab);
}

.btn--critique:hover,
.btn--create:hover,
.btn--collab:hover {
  filter: brightness(1.1);
  opacity: 1;
}

.btn--sm {
  font-size: var(--text-sm);
  padding: 0.5rem 1rem;
}

.btn--lg {
  font-size: var(--text-lg);
  padding: 1rem 2rem;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: var(--space-3xl);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative gradient blob */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 98, 79, 0.12) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 49, 246, 0.1) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-yellow);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.hero__paths {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero__path-tag {
  font-size: 2.25rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
}

.hero__path-tag--critique { color: var(--color-critique); }
.hero__path-tag--create   { color: var(--color-create); }
.hero__path-tag--collab   { color: var(--color-collab); }

.hero__separator {
  color: var(--color-muted);
  font-size: 2.5rem;
}

.hero__description {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.75);
  max-width: 55ch;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.hero__date-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: rgba(247, 207, 70, 0.15);
  border: 1px solid rgba(247, 207, 70, 0.4);
  color: var(--color-yellow);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: 100px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: var(--text-5xl);
  }
}

/* --------------------------------------------------------------------------
   "What is this?" / Prose sections
   -------------------------------------------------------------------------- */
.prose-section {
  padding-block: var(--space-2xl);
  background: var(--color-white);
}

.prose-section__content {
  max-width: 70ch;
}

.prose-section p + p {
  margin-top: var(--space-md);
}

/* --------------------------------------------------------------------------
   How It Works
   -------------------------------------------------------------------------- */
.how-it-works {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: var(--space-2xl);
}

.how-it-works .section-heading {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  position: relative;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
  }
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step__number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-coral);
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--text-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  flex-shrink: 0;
}

.step__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.step__label {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-xs);
  color: var(--color-white);
}

.step__desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* Connector line between steps (desktop) */
@media (min-width: 768px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 26px;
    left: calc(50% + 26px);
    width: calc(100% - 52px);
    height: 2px;
    background: rgba(255,255,255,0.1);
  }
}

/* --------------------------------------------------------------------------
   Path Cards (Landing Page)
   -------------------------------------------------------------------------- */
.path-cards-section {
  background: var(--color-light);
  padding-block: var(--space-2xl);
}

.path-cards-section .section-heading {
  text-align: center;
  margin-bottom: var(--space-xs);
}

.path-cards-section .section-subheading {
  text-align: center;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.path-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .path-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.path-card {
  background: var(--color-white);
  border-radius: calc(var(--radius) * 2);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid var(--color-border);
}

.path-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.path-card__header {
  padding: var(--space-lg);
  color: var(--color-white);
  position: relative;
}

.path-card--critique .path-card__header { background: var(--color-critique); }
.path-card--create   .path-card__header { background: var(--color-create); color: var(--color-dark); }
.path-card--collab   .path-card__header { background: var(--color-collab); }

.path-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.path-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.path-card__tagline {
  font-size: var(--text-sm);
  opacity: 0.85;
}

.path-card__body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.path-card__options {
  list-style: none;
  margin-bottom: var(--space-lg);
  flex: 1;
}

.path-card__options li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}

.path-card__options li:last-child {
  border-bottom: none;
}

.path-card__options li::before {
  content: '→';
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.path-card--critique .path-card__options li::before { color: var(--color-critique); }
.path-card--create   .path-card__options li::before { color: var(--color-create); }
.path-card--collab   .path-card__options li::before { color: var(--color-collab); }

.path-card__time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

/* --------------------------------------------------------------------------
   Hot Take Wall Callout
   -------------------------------------------------------------------------- */
.hot-take-wall {
  background: var(--color-yellow-tint);
  border: 2px solid var(--color-yellow);
  border-radius: calc(var(--radius) * 2);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hot-take-wall__title {
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hot-take-wall__desc {
  color: var(--color-muted);
  font-size: var(--text-base);
  max-width: 60ch;
}

@media (min-width: 768px) {
  .hot-take-wall {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hot-take-wall__content {
    flex: 1;
  }
}

.callout-section {
  background: var(--color-white);
  padding-block: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: var(--space-2xl);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
  }
}

.site-footer__brand img {
  height: 32px;
  width: auto;
}

.site-footer__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  max-width: 40ch;
  line-height: 1.6;
}

.site-footer__heading {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-md);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.site-footer__links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.site-footer__links a:hover {
  color: var(--color-white);
  opacity: 1;
}

.site-footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
}

/* --------------------------------------------------------------------------
   Path Page — Path Header
   -------------------------------------------------------------------------- */
.path-hero {
  padding-block: var(--space-xl) var(--space-2xl);
  color: var(--color-white);
}

.path-hero--critique { background: var(--color-critique); }
.path-hero--create   { background: var(--color-create);   color: var(--color-dark); }
.path-hero--collab   { background: var(--color-collab); }

.path-hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: var(--space-sm);
}

.path-hero__icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.path-hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.path-hero__tagline {
  font-size: var(--text-xl);
  opacity: 0.85;
  margin-bottom: var(--space-md);
}

.path-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Option Cards (Path Pages)
   -------------------------------------------------------------------------- */
.options-section {
  background: var(--color-white);
  padding-block: var(--space-2xl);
}

.options-section .section-heading {
  margin-bottom: var(--space-xl);
}

.option-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 1024px) {
  .option-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.option-card {
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: calc(var(--radius) * 2);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.option-card:hover {
  box-shadow: var(--shadow);
}

.option-card--critique { border-top: 4px solid var(--color-critique); }
.option-card--create   { border-top: 4px solid var(--color-create); }
.option-card--collab   { border-top: 4px solid var(--color-collab); }

.option-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
}

.option-card__time {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-light);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.option-card__desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.6;
}

.option-card__steps {
  list-style: decimal;
  list-style-position: inside;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.option-card__steps li {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
  padding-left: var(--space-xs);
}

.option-card__include {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.option-card__include-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.option-card__include ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.option-card__include li {
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}

.option-card__include li::before {
  content: '✓';
  font-weight: 700;
  color: var(--color-green);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Prompt Lab Challenges
   -------------------------------------------------------------------------- */
.prompt-lab-section {
  background: var(--color-light);
  padding-block: var(--space-2xl);
}

.prompt-lab-section .section-heading {
  margin-bottom: var(--space-sm);
}

.prompt-lab-intro {
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
  max-width: 65ch;
}

.challenge-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.challenge-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-create);
  border-radius: var(--radius);
  padding: var(--space-lg);
  display: grid;
  gap: var(--space-sm);
}

.challenge-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.challenge-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
}

.challenge-card__time {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-create);
  background: var(--color-create-tint);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.challenge-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.65;
}

.challenge-card__intent {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-style: italic;
}

.challenge-card__intent strong {
  font-style: normal;
  color: var(--color-text);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Submission Checklist
   -------------------------------------------------------------------------- */
.checklist-section {
  background: var(--color-light);
  padding-block: var(--space-xl);
}

.checklist-section--critique { background: var(--color-critique-tint); }
.checklist-section--create   { background: var(--color-create-tint); }
.checklist-section--collab   { background: var(--color-collab-tint); }

.checklist-box {
  max-width: 640px;
}

.checklist-box__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-base);
}

.checklist-item__check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: var(--text-xs);
}

/* --------------------------------------------------------------------------
   Template Links (Collab)
   -------------------------------------------------------------------------- */
.template-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.template-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.template-link:hover {
  border-color: var(--color-collab);
  background: var(--color-collab-tint);
  color: var(--color-collab);
  opacity: 1;
}

.template-link__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.template-link__name {
  font-weight: 600;
  font-size: var(--text-base);
}

.template-link__desc {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: 2px;
}

.template-link__arrow {
  margin-left: auto;
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.template-link:hover .template-link__arrow {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-page {
  background: var(--color-light);
  padding-block: var(--space-2xl);
  min-height: calc(100vh - var(--header-height));
}

.form-header {
  padding-block: var(--space-xl);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
}

.form-header__eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.form-header__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.form-header__subtitle {
  color: var(--color-muted);
  max-width: 55ch;
}

.form-wrapper {
  max-width: 720px;
}

.submission-form {
  background: var(--color-white);
  border-radius: calc(var(--radius) * 2);
  border: 1px solid var(--color-border);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

label .required {
  color: var(--color-critique);
  margin-left: 2px;
}

label .optional {
  color: var(--color-muted);
  font-weight: 400;
  font-size: var(--text-xs);
  margin-left: var(--space-xs);
}

input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.6875rem 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="url"]:hover,
select:hover,
textarea:hover {
  border-color: var(--color-muted);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-coral);
  box-shadow: 0 0 0 3px rgba(252, 98, 79, 0.15);
}

input[type="text"]:invalid:not(:placeholder-shown),
input[type="email"]:invalid:not(:placeholder-shown),
input[type="url"]:invalid:not(:placeholder-shown) {
  border-color: var(--color-critique);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.4;
}

.char-counter {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: right;
  transition: color var(--transition-fast);
}

.char-counter.warning { color: var(--color-yellow); }
.char-counter.danger  { color: var(--color-critique); }

.field-notice {
  font-size: var(--text-sm);
  line-height: 1.5;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  margin-top: var(--space-sm);
}
.field-notice--warning {
  background: #fff8e1;
  border: 1.5px solid #f0c040;
  color: #5a4300;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--color-coral);
}

.checkbox-group input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--color-coral);
  outline-offset: 2px;
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  line-height: 1.5;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--color-border);
}

.form-submit-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 480px) {
  .form-submit-row {
    flex-direction: row;
    align-items: center;
  }
}

/* Form messages */
.form-message {
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  display: none;
}

.form-message.is-visible {
  display: block;
}

.form-message--success {
  background: var(--color-create-tint);
  border: 1px solid var(--color-create);
  color: #1a5e2e;
}

.form-message--error {
  background: var(--color-critique-tint);
  border: 1px solid var(--color-critique);
  color: #7a2016;
}

.form-message__title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

/* Consent block */
.consent-block {
  background: var(--color-light, #f8f9fa);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.consent-block__license {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* Loading spinner on button */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-xs);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Gallery Page
   -------------------------------------------------------------------------- */
.gallery-header {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: var(--space-xl);
}

.gallery-header__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.gallery-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
}

.gallery-header__count {
  font-weight: 700;
  color: var(--color-yellow);
}

.gallery-section {
  background: var(--color-light);
  padding-block: var(--space-xl);
  min-height: 60vh;
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.filter-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-right: var(--space-xs);
  white-space: nowrap;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.35rem 0.875rem;
  border: 2px solid var(--color-border);
  border-radius: 100px;
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.filter-btn.is-active {
  background: var(--color-coral);
  border-color: var(--color-coral);
  color: var(--color-white);
}

.filter-btn[data-filter="Critique"].is-active {
  background: var(--color-critique);
  border-color: var(--color-critique);
}

.filter-btn[data-filter="Create"].is-active {
  background: var(--color-create);
  border-color: var(--color-create);
  color: var(--color-dark);
}

.filter-btn[data-filter="Collab"].is-active {
  background: var(--color-collab);
  border-color: var(--color-collab);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Gallery card */
.gallery-card {
  background: var(--color-white);
  border-radius: calc(var(--radius) * 2);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card__top {
  height: 5px;
}

.gallery-card--critique .gallery-card__top { background: var(--color-critique); }
.gallery-card--create   .gallery-card__top { background: var(--color-create); }
.gallery-card--collab   .gallery-card__top { background: var(--color-collab); }

.gallery-card__body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.gallery-card__badges {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--critique { background: var(--color-critique-tint); color: var(--color-critique); }
.badge--create   { background: var(--color-create-tint);   color: #1c7a35; }
.badge--collab   { background: var(--color-collab-tint);   color: var(--color-collab); }
.badge--option   { background: var(--color-light); color: var(--color-muted); text-transform: none; font-weight: 500; letter-spacing: 0; }

.gallery-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
}

.gallery-card__claim {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.45;
}

.gallery-card__reflection {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.6;
  flex: 1;
}

.gallery-card__changelog {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
}

.gallery-card__changelog-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.gallery-card__footer {
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.gallery-card__timestamp {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.gallery-card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-coral);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.gallery-card__link:hover {
  opacity: 0.8;
}

.gallery-card--collab .gallery-card__link {
  color: var(--color-collab);
}

/* Evidence truncation on card */
.gallery-card__evidence-wrap {
  position: relative;
  margin-top: var(--space-sm);
}

.gallery-card__evidence {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}

.gallery-card__evidence-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5rem;
  background: linear-gradient(transparent, var(--color-white));
  pointer-events: none;
}

.gallery-card__read-more {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  margin-top: var(--space-xs);
  font-family: var(--font-body);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.gallery-card__read-more:hover {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Gallery card modal
   -------------------------------------------------------------------------- */

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.gallery-modal[hidden] { display: none; }

.gallery-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.gallery-modal__panel {
  position: relative;
  background: var(--color-white);
  border-radius: calc(var(--radius) * 2);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.gallery-modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: var(--space-xs);
  color: var(--color-muted);
  transition: color var(--transition-fast);
  z-index: 2;
}

.gallery-modal__close:hover { color: var(--color-text); }

.gallery-modal__top {
  height: 6px;
  border-radius: calc(var(--radius) * 2) calc(var(--radius) * 2) 0 0;
}

.gallery-modal--critique .gallery-modal__top { background: var(--color-critique); }
.gallery-modal--create   .gallery-modal__top { background: var(--color-create); }
.gallery-modal--collab   .gallery-modal__top { background: var(--color-collab); }

.gallery-modal__content {
  padding: var(--space-xl);
}

.modal-badges {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.modal-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.modal-claim {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  line-height: 1.35;
}

.modal-section {
  margin-bottom: var(--space-lg);
}

.modal-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.modal-text {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.65;
  white-space: pre-wrap;
}

.modal-reflection {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.5;
}

.modal-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.modal-timestamp {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.modal-link {
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.gallery-modal--critique .modal-link { color: var(--color-critique); }
.gallery-modal--create   .modal-link { color: var(--color-create); }
.gallery-modal--collab   .modal-link { color: var(--color-collab); }

.modal-link:hover { opacity: 0.8; }

/* Skeleton loading */
.skeleton-card {
  background: var(--color-white);
  border-radius: calc(var(--radius) * 2);
  border: 1px solid var(--color-border);
  overflow: hidden;
  padding: var(--space-lg);
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-light) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: var(--space-sm);
}

.skeleton-line--short  { width: 40%; }
.skeleton-line--medium { width: 65%; }
.skeleton-line--long   { width: 90%; }
.skeleton-line--full   { width: 100%; }
.skeleton-line--tall   { height: 20px; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--color-muted);
}

.gallery-empty__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.gallery-empty__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

/* Error state */
.gallery-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl);
  color: var(--color-critique);
  background: var(--color-critique-tint);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Breadcrumb / Back nav
   -------------------------------------------------------------------------- */
.back-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  padding: var(--space-sm) 0;
  transition: color var(--transition-fast);
}

.back-nav:hover {
  color: var(--color-text);
  opacity: 1;
}

.back-nav-wrap {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-xs);
}

/* --------------------------------------------------------------------------
   Utility classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--color-muted); }

.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;
}

.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }

.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
