/* ==========================================================================
   OneGoal (onegoal.fit) - Apple Fluid Interface & Optical Typography System
   Built on Apple WWDC "Designing Fluid Interfaces" & "The Details of UI Typography"
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Core Dark Obsidian Material Palette (tonal steps, no 1px box outlines) */
  --ground: #0D0E13;
  --surface-1: #151720;
  --surface-2: #1E212E;
  --surface-3: #282C3D;

  /* Translucent Apple Chrome */
  --material-chrome: rgba(21, 23, 32, 0.76);
  --material-sheet: rgba(22, 24, 33, 0.94);

  /* Ink & Vibrancy (AA+ contrast across all surfaces) */
  --ink: #F5F5F7;
  --ink-secondary: #A9AEBF;

  /* Semantic Accents */
  --coral: #FF5625;
  --mint: #00E599;
  --cyan: #7BD0FF;

  /* Apple Platform System Font Stack (optical sizing & tracking tables) */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;

  /* Strict 5-Step Optical Type Scale */
  --step-1: clamp(2.35rem, 4.5vw, 4rem);
  --step-2: clamp(1.75rem, 2.8vw, 2.5rem);
  --step-3: 1.375rem;   /* 22px */
  --step-4: 1.0625rem;  /* 17px body */
  --step-5: 0.875rem;   /* 14px caption */

  /* Radii & Shared Outer Margins */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --margin: clamp(1.25rem, 4vw, 3.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font: 100%/1.5 var(--font-system);
  background-color: var(--ground);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background-color: var(--ground);
  color: var(--ink);
  font-size: var(--step-4);
  line-height: 1.5;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.sheet-open {
  overflow: hidden;
}

/* ==========================================================================
   §15. Typography - Size-Specific Tracking & Inverse Leading
   ========================================================================== */
.display-hero {
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.032em;
  font-optical-sizing: auto;
  color: var(--ink);
}

.display-section {
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.024em;
  font-optical-sizing: auto;
  color: var(--ink);
}

h3,
.surface-title {
  font-size: var(--step-3);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.lead-copy {
  font-size: var(--step-4);
  line-height: 1.5;
  color: var(--ink-secondary);
  max-width: 44ch;
}

.text-mint {
  color: var(--mint);
}

.text-coral {
  color: var(--coral);
}

.text-muted {
  color: var(--ink-secondary);
}

/* ==========================================================================
   §1. Response - Instant Pointer-Down Feedback & Focus Rings
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--margin);
  z-index: 200;
  background: var(--coral);
  color: var(--ground);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: var(--step-5);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

button,
a,
input,
label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.35rem;
  border-radius: var(--radius-pill);
  border: none;
  font-family: inherit;
  font-size: var(--step-5);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 100ms ease-out, background-color 140ms ease;
}

.btn-pill:active,
.icon-circle-btn:active,
.amount-chip:active,
.sheet-close-btn:active {
  transform: scale(0.96);
}

.btn-block {
  width: 100%;
  min-height: 50px;
  font-size: var(--step-4);
}

.btn-coral {
  background-color: var(--coral);
  color: #0D0E13;
  font-weight: 700;
}

.btn-coral:hover {
  background-color: #FF693D;
}

.btn-surface {
  background-color: var(--surface-3);
  color: var(--ink);
}

.btn-surface:hover {
  background-color: #34394E;
}

/* ==========================================================================
   §12. Materials & Depth - Single Translucent Sticky Toolbar
   ========================================================================== */
.apple-toolbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--material-chrome);
  backdrop-filter: blur(20px) saturate(180%); /* taste-skill-ignore */
  -webkit-backdrop-filter: blur(20px) saturate(180%); /* taste-skill-ignore */
  padding: env(safe-area-inset-top, 0) var(--margin) 0;
}

.toolbar-inner {
  position: relative;
  min-height: 68px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  padding-block: 0.65rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--coral);
}

.brand-coral {
  color: var(--coral);
}

.toolbar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.toolbar-link {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: var(--step-5);
  font-weight: 600;
  min-height: 44px;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  transition: color 140ms ease, background-color 140ms ease;
}

.toolbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: transform 100ms ease-out, background-color 140ms ease;
}

.toolbar-menu-btn:active {
  transform: scale(0.96);
}

.toolbar-link:hover {
  color: var(--ink);
  background-color: var(--surface-2);
}

.toolbar-link.is-active {
  color: var(--ink);
  background-color: var(--surface-2);
}

/* ==========================================================================
   1. HERO STAGE & FLUID TELEMETRY SURFACE
   ========================================================================== */
.hero-stage {
  padding: clamp(2rem, 5vw, 4rem) var(--margin) clamp(2.5rem, 5vw, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-photo-pill {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 440px;
  background-color: var(--surface-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
}

.hero-photo-pill img {
  width: 110px;
  height: 84px;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-photo-pill figcaption {
  padding: 0.75rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: var(--step-5);
}

/* Fluid Telemetry Card */
.fluid-surface {
  background-color: var(--surface-1);
  border-radius: var(--radius-xl);
  padding: clamp(1.35rem, 2.8vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* Hero live fundraiser carousel */
.hero-carousel {
  min-width: 0;
}

.hero-carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  border-radius: var(--radius-lg);
  scrollbar-width: none;
}

.hero-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.hero-carousel-viewport.is-enhanced {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.hero-carousel-viewport:active {
  cursor: grabbing;
}

.hero-carousel-track {
  display: flex;
  will-change: transform;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.hero-slide-media {
  position: relative;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--surface-2);
}

.hero-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  pointer-events: none;
}

.hero-live-pill {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.hero-slide-media .media-badge {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  left: auto;
}

.hero-slide-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.15rem;
}

.hero-slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.hero-slide-actions .btn-pill {
  flex: 1 1 auto;
}

.hero-carousel-directory-link {
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--mint);
  text-decoration: none;
  text-align: center;
  padding-top: 0.25rem;
}

.hero-carousel-directory-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  background-color: var(--surface-2);
  color: var(--mint);
  font-size: var(--step-5);
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--mint);
}

/* Apple Segmented Control with Spring Sliding Pill */
.segmented-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background-color: var(--ground);
  padding: 4px;
  border-radius: var(--radius-pill);
  min-width: 0;
}

#give-mode-segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented-pill-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  background-color: var(--surface-3);
  border-radius: var(--radius-pill);
  pointer-events: none;
  will-change: transform;
}

#give-mode-segmented .segmented-pill-indicator {
  width: calc((100% - 8px) / 2);
}

.seg-btn {
  position: relative;
  z-index: 1;
  min-height: 38px;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: clamp(0.72rem, 2.4vw, var(--step-5));
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 140ms ease;
  padding: 0 0.15rem;
}

.seg-btn[aria-selected="true"] {
  color: var(--ink);
}

/* 1:1 Direct Manipulation Scrubber */
.scrubber-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.scrubber-readout-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.scrubber-caption {
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.scrubber-big-value {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fluid-scrubber {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.fluid-scrubber:active {
  cursor: grabbing;
}

.scrubber-track {
  width: 100%;
  height: 12px;
  background-color: var(--ground);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.scrubber-fill {
  width: 100%;
  height: 100%;
  background-color: var(--mint);
  transform-origin: left center;
  transform: scaleX(0.16);
  will-change: transform;
}

.scrubber-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--ink);
  border: 3px solid var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform: translate3d(0, -50%, 0);
}

.knob-grip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--coral);
}

/* Three Tabular Readouts */
.metric-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  background-color: var(--ground);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
}

.metric-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.metric-label {
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.metric-number {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   2. MOMENTUM CAROUSEL - 1:1 Drag & Flick Expeditions
   ========================================================================== */
.stage-section {
  padding: clamp(2.5rem, 5vw, 4.25rem) var(--margin);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.carousel-controls {
  display: flex;
  gap: 0.5rem;
}

.icon-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: var(--surface-2);
  color: var(--ink);
  font-size: var(--step-4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 100ms ease-out, background-color 140ms ease;
}

.icon-circle-btn:hover {
  background-color: var(--surface-3);
}

.carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-inline: var(--margin);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-viewport.is-enhanced {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.carousel-viewport:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: 1.25rem;
  will-change: transform;
}

.expedition-card {
  flex: 0 0 calc((100% - 2.5rem) / 3);
  scroll-snap-align: start;
  background-color: var(--surface-1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.expedition-media {
  position: relative;
  height: 210px;
  overflow: hidden;
  background-color: var(--surface-2);
}

.expedition-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  pointer-events: none;
}

.media-badge {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--ground);
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--ink);
}

.expedition-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.expedition-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.expedition-raised {
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.expedition-sub {
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.mini-progress {
  height: 6px;
  background-color: var(--ground);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.mini-progress span {
  display: block;
  height: 100%;
  background-color: var(--mint);
  border-radius: var(--radius-pill);
}

.expedition-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.code-chip {
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   3. BENTO ARCHITECTURE - Clean, Visual, Scannable
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.bento-card {
  background-color: var(--surface-1);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bento-card p {
  color: var(--ink-secondary);
  font-size: var(--step-4);
  max-width: 48ch;
}

.bento-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: center;
}

.bento-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.route-pill-bar {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background-color: var(--ground);
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  font-size: var(--step-5);
  max-width: fit-content;
}

.route-domain {
  color: var(--ink);
  font-weight: 600;
}

.route-badge {
  color: var(--mint);
  font-weight: 600;
  font-size: var(--step-5);
}

.bento-video-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--ground);
  height: 230px;
}

.bento-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Comparison Bars */
.comparison-bars {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.comp-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.comp-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--step-5);
  font-variant-numeric: tabular-nums;
}

.comp-bar {
  height: 8px;
  background-color: var(--ground);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.comp-bar span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
}

.fill-mint,
.comp-bar-fill-mint {
  background-color: var(--mint);
}

.fill-muted {
  background-color: var(--surface-3);
}

.comp-bar-fill-coral {
  background-color: var(--coral);
}

.comp-bar-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Public fundraiser page (/g/{slug})
   ========================================================================== */
.layout-goal {
  --ink: #12131a;
  --ink-secondary: #58606e;
  --ground: #eceef2;
  --surface-1: #ffffff;
  --surface-2: #f3f4f7;
  --surface-3: #e2e4ea;
  background-color: var(--ground);
  color: var(--ink);
  color-scheme: light;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.layout-goal .apple-toolbar.goal-toolbar {
  position: sticky;
  top: 0;
  z-index: 95;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--surface-3);
  backdrop-filter: blur(16px) saturate(160%); /* taste-skill-ignore */
  -webkit-backdrop-filter: blur(16px) saturate(160%); /* taste-skill-ignore */
  --ink: #12131a;
  --ink-secondary: #58606e;
  --surface-2: #f3f4f7;
}

/* Fundraiser page — home-style dark hero + flowing header */
body.layout-goal.layout-goal-marketing {
  --ground: #f4f4f6;
  background-color: var(--ground);
  position: relative;
}

body.layout-goal.layout-goal-marketing .apple-toolbar.goal-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  --ink: #ffffff;
  --ink-secondary: rgba(255, 255, 255, 0.88);
  --surface-2: rgba(255, 255, 255, 0.14);
  --surface-3: rgba(255, 255, 255, 0.2);
}

body.layout-goal.layout-goal-marketing .goal-toolbar .btn-surface {
  background-color: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

body.layout-goal.layout-goal-marketing .goal-toolbar .btn-surface:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

body.layout-goal.layout-goal-marketing .goal-back-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.goal-main-marketing {
  position: relative;
  z-index: 1;
}

.goal-page-root {
  min-height: 40vh;
}

body.layout-goal-marketing .goal-page-root:not(:has(.goal-page)) {
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 86, 37, 0.2) 0%, rgba(255, 86, 37, 0.06) 50%, transparent 78%),
    linear-gradient(180deg, #0e0f14 0%, #0b0c10 55%, #f4f4f6 100%);
}

body.layout-goal-marketing .goal-page-root:has(.goal-page) {
  min-height: 0;
}

.goal-hero-saas {
  --ground: #0b0c10;
  --surface-1: #13151d;
  --surface-2: #1b1e29;
  --surface-3: #252938;
  --ink: #f5f5f7;
  --ink-secondary: #b4b9c8;
  padding: calc(68px + env(safe-area-inset-top, 0)) 0 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 86, 37, 0.2) 0%, rgba(255, 86, 37, 0.06) 50%, transparent 78%),
    linear-gradient(180deg, #0e0f14 0%, #0b0c10 72%, #f4f4f6 100%);
  color: var(--ink);
}

.goal-hero-inner {
  container-type: inline-size;
  max-width: min(1120px, 100%);
  margin-inline: auto;
  padding: clamp(1rem, 2.5vw, 1.5rem) var(--margin) clamp(1rem, 2.5vw, 1.5rem);
}

.goal-page-below {
  padding-top: 0;
  padding-bottom: clamp(3rem, 8vw, 4.5rem);
}

.goal-page-below.section-light {
  --ink: #12131a;
  --ink-secondary: #58606e;
  --ground: #f4f4f6;
  --surface-1: #ffffff;
  --surface-2: #f3f4f7;
  --surface-3: #e2e4ea;
  padding-inline: 0;
}

.goal-hero-saas .goal-summary-card,
.goal-hero-saas .goal-media-wrap {
  --ink: #12131a;
  --ink-secondary: #58606e;
  --surface-1: #ffffff;
  --surface-2: #f3f4f7;
  --surface-3: #e2e4ea;
  color: var(--ink);
}

.goal-hero-saas .goal-summary-card .text-mint {
  color: #0c6b58;
}

.goal-page-inner {
  max-width: min(1120px, 100%);
  margin-inline: auto;
  padding: clamp(1.15rem, 2.5vw, 1.65rem) var(--margin) clamp(4.5rem, 12vw, 5.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.goal-page-below .goal-page {
  gap: 1.25rem;
}

.goal-loading-hero {
  text-align: center;
  padding: calc(76px + 3rem) var(--margin) 3rem;
  color: rgba(255, 255, 255, 0.72);
}

.goal-hero-saas--minimal {
  min-height: 0;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.goal-page--single-photo .goal-hero-inner {
  padding-bottom: clamp(0.35rem, 1.5vw, 0.65rem);
}

.goal-page--single-photo .goal-hero-saas {
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 86, 37, 0.2) 0%, rgba(255, 86, 37, 0.06) 50%, transparent 78%),
    linear-gradient(180deg, #0e0f14 0%, #0b0c10 82%, #f4f4f6 100%);
}

.goal-page--single-photo .goal-page-inner {
  padding-top: 0.15rem;
}

.goal-photo-thumbs {
  background-color: #f4f4f6;
  padding: 0.2rem var(--margin) 0;
  margin-top: -0.15rem;
  margin-bottom: -1.25rem;
}

.goal-photo-thumbs + .goal-page-below .goal-page-inner {
  padding-top: 0.15rem;
}

.goal-photo-thumbs-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  max-width: min(1120px, 100%);
  margin-inline: auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 0.1rem 0 0.15rem;
}

.goal-photo-thumb {
  flex: 0 0 auto;
  width: 4.25rem;
  height: 4.25rem;
  padding: 0;
  border: 2px solid rgba(18, 19, 26, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  opacity: 0.82;
  scroll-snap-align: start;
  transition: border-color 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.goal-photo-thumb:hover {
  opacity: 1;
  border-color: rgba(18, 19, 26, 0.18);
}

.goal-photo-thumb.is-active {
  opacity: 1;
  border-color: var(--coral);
  box-shadow: 0 0 0 2px rgba(255, 86, 37, 0.22);
}

.goal-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.layout-goal .text-mint {
  color: #0c6b58;
}

.layout-goal .text-coral {
  color: var(--coral);
}

.goal-toolbar .toolbar-inner {
  justify-content: flex-start;
  gap: 0.75rem;
}

.goal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.65rem;
  margin-left: -0.35rem;
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: var(--step-5);
  font-weight: 600;
  border-radius: var(--radius-pill);
}

.goal-back-link:hover {
  color: var(--ink);
  background-color: var(--surface-2);
}

.brand-lockup-compact {
  margin-right: auto;
}

.goal-toolbar-donate {
  margin-left: auto;
}

.layout-goal main {
  position: relative;
}

.goal-page-shell {
  max-width: min(1120px, 100%);
  margin-inline: auto;
  padding: clamp(1rem, 2.5vw, 1.5rem) var(--margin) clamp(4.5rem, 12vw, 5.5rem);
}

.layout-goal-marketing .goal-page-shell {
  padding-top: 0;
}

.goal-loading {
  text-align: center;
  padding: 3rem 0;
}

.goal-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.goal-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(1rem, 2.5vw, 1.35rem);
  align-items: start;
}

.goal-top-grid-leading {
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 2vw, 1rem);
  min-width: 0;
}

.goal-media-col {
  min-width: 0;
}

.goal-media-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #1a1d28;
  box-shadow: 0 12px 36px rgba(18, 19, 26, 0.1);
}

.goal-media-wrap--single img,
.goal-media-wrap--gallery .goal-gallery-viewport {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
}

.goal-media-wrap--single img {
  object-position: center 35%;
}

.goal-media-wrap--gallery .goal-gallery-viewport {
  position: relative;
  min-height: 320px;
  max-height: none;
}

.goal-media-wrap .goal-gallery-slide img {
  min-height: 320px;
  height: 100%;
}

.goal-host-line {
  font-size: var(--step-5);
  color: var(--ink-secondary);
  max-width: 52ch;
}

.goal-host-line strong {
  color: var(--ink);
  font-weight: 650;
}

.goal-host-line--dark {
  margin-bottom: 0.75rem;
}

.goal-story-block,
.goal-feed-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.goal-story-block .goal-section-title,
.goal-feed-block-head .goal-section-title {
  margin-bottom: 0;
}

.goal-feed-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.goal-feeds-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 901px) {
  .goal-feeds-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1rem, 2vw, 1.35rem);
    align-items: start;
  }

  .goal-feeds-row .goal-feed-block {
    min-width: 0;
  }

  .goal-feeds-row .goal-panel {
    height: 100%;
  }
}

.goal-intro {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.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;
}

.goal-story-badge-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.goal-story-badge-block--story {
  margin-bottom: -0.35rem;
}

.goal-story-badge-block--hero {
  display: none;
}

.goal-hero-saas .goal-story-badge-block--hero .goal-story-badge-card {
  --surface-1: #ffffff;
  --ink: #12131a;
  --ink-secondary: #58606e;
}

.goal-story-badge {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.1rem;
}

.goal-story-badge-cell {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.goal-story-badge-card {
  padding: 0.8rem 0.85rem;
  background: var(--surface-1);
  border: 1px solid rgba(18, 19, 26, 0.07);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(18, 19, 26, 0.05);
}

a.goal-story-badge-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

a.goal-story-badge-card--link:hover {
  border-color: rgba(12, 107, 88, 0.28);
  box-shadow: 0 6px 22px rgba(12, 107, 88, 0.12);
}

a.goal-story-badge-card--link:focus-visible {
  outline: 2px solid #0c6b58;
  outline-offset: 2px;
}

.goal-story-badge-kicker {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  padding-inline: 0.15rem;
}

.goal-hero-saas .goal-story-badge-block--hero .goal-story-badge-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.goal-story-badge-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.goal-story-badge-name {
  font-size: var(--step-4);
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
  min-width: 0;
}

.goal-story-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
}

.goal-story-avatar--organiser,
.goal-story-avatar--charity {
  border-radius: 0.45rem;
  box-shadow: 0 0 0 1px rgba(18, 19, 26, 0.08);
}

.goal-story-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: #fff;
}

.goal-story-avatar--fallback.goal-story-avatar--organiser {
  background: linear-gradient(145deg, #fff5f0, #ffe8de);
  font-size: var(--step-5);
}

.goal-story-avatar--fallback.goal-story-avatar--charity {
  background: linear-gradient(145deg, #f0faf7, #e2f5ef);
  color: #0c6b58;
}

@media (max-width: 520px) {
  .goal-story-badge {
    grid-template-columns: 1fr;
  }
}

.goal-page-title {
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 28ch;
}

.goal-page-title--hero {
  --ink: #f5f5f7;
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  margin-bottom: clamp(0.85rem, 2vw, 1.15rem);
  white-space: nowrap;
  font-size: clamp(1rem, 100cqw / 21, 2.35rem);
}

.goal-charity-pill--light {
  background-color: var(--surface-2);
  color: #0c6b58;
}

.goal-summary-card {
  height: auto;
  align-self: start;
  padding: 1.35rem 1.25rem 1.15rem;
  background:
    linear-gradient(165deg, rgba(255, 86, 37, 0.07) 0%, rgba(255, 255, 255, 0) 42%),
    var(--surface-1);
  border: 1px solid rgba(18, 19, 26, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 36px rgba(18, 19, 26, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.goal-stats-dual-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.goal-stats-hero {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.goal-stats-hero--distance {
  padding-top: 1rem;
  border-top: 1px solid var(--surface-3);
}

.goal-stats-ring {
  --ring-size: 5.65rem;
  position: relative;
  flex-shrink: 0;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    var(--coral) 0deg,
    var(--coral) calc(var(--goal-pct, 0) * 3.6deg),
    var(--surface-3) calc(var(--goal-pct, 0) * 3.6deg),
    var(--surface-3) 360deg
  );
  box-shadow: inset 0 0 0 1px rgba(255, 86, 37, 0.12);
}

.goal-stats-ring--distance {
  background: conic-gradient(
    from -90deg,
    #0c6b58 0deg,
    #12a88a calc(var(--goal-distance-pct, 0) * 3.6deg),
    var(--surface-3) calc(var(--goal-distance-pct, 0) * 3.6deg),
    var(--surface-3) 360deg
  );
  box-shadow: inset 0 0 0 1px rgba(12, 107, 88, 0.14);
}

.goal-stats-ring-inner {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 0 rgba(18, 19, 26, 0.04);
}

.goal-stats-ring-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.goal-stats-ring-suffix {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--coral);
}

.goal-stats-ring-suffix--mint {
  color: #0c6b58;
}

.goal-stats-ring-caption {
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.goal-stats-raised-block {
  min-width: 0;
  flex: 1;
}

.goal-stats-raised {
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.goal-stats-distance {
  font-size: clamp(1.5rem, 3.6vw, 1.85rem);
}

.goal-stats-raised-block--solo {
  flex: 1;
}

.goal-stats-target-line {
  margin-top: 0.2rem;
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.goal-stats-target-line strong {
  color: var(--ink);
  font-weight: 650;
}

.goal-stats-meters {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.goal-stat-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.goal-stat-meter-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.goal-stat-meter-value {
  font-size: var(--step-5);
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.goal-stat-meter-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(18, 19, 26, 0.08);
  overflow: hidden;
}

.goal-stat-meter-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 200ms ease;
}

.goal-stat-meter-fill-coral {
  background: linear-gradient(90deg, #ff693d, var(--coral));
}

.goal-stat-meter-fill-mint {
  background: linear-gradient(90deg, #12a88a, #0c6b58);
}

.goal-stat-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0.65rem 0;
  border-top: 1px solid var(--surface-3);
  border-bottom: 1px solid var(--surface-3);
}

.goal-stat-fact {
  text-align: center;
  padding: 0.15rem 0.35rem;
}

.goal-stat-fact:not(:last-child) {
  border-right: 1px solid var(--surface-3);
}

.goal-stat-fact dt {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.goal-stat-fact dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.goal-action-row-stack {
  grid-template-columns: 1fr;
  margin-top: auto;
}

.goal-action-row-stack .goal-donate-btn {
  min-height: 52px;
  font-size: var(--step-4);
}

.goal-panel {
  padding: 1.2rem 1.15rem;
  background: var(--surface-1);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 0 rgba(18, 19, 26, 0.06);
}

.goal-section-title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.goal-progress-head-inline {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.goal-progress-mini-label {
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--ink-secondary);
}

.goal-progress-mini-value {
  font-size: var(--step-5);
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.goal-comp-bar {
  height: 10px;
  background-color: var(--surface-2);
}

.goal-comp-bar .comp-bar-fill-mint {
  background-color: #0c6b58;
}

.goal-gallery-viewport {
  position: relative;
  width: 100%;
  min-height: 220px;
  max-height: 42vh;
}

.goal-hero-wrap .goal-gallery-viewport {
  min-height: 100%;
  max-height: none;
  height: 100%;
}

.goal-gallery-slide {
  position: absolute;
  inset: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.goal-gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.goal-gallery-slide img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.goal-gallery-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.goal-gallery-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  z-index: 2;
}

.goal-gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.goal-gallery-dot.is-active {
  background: var(--ink);
  transform: scale(1.15);
}

.goal-hero-text-below {
  position: static;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.goal-hero-compact img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.goal-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 14, 19, 0.08) 0%, rgba(13, 14, 19, 0.55) 48%, rgba(13, 14, 19, 0.92) 100%);
  pointer-events: none;
}

.goal-hero-compact .goal-hero-text {
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.goal-charity-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.goal-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.goal-progress-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.goal-progress-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.goal-progress-stat {
  font-size: var(--step-4);
  font-variant-numeric: tabular-nums;
}

.goal-progress-stat strong {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.goal-meta-line {
  font-size: var(--step-5);
  color: var(--ink-secondary);
  text-align: center;
}

.goal-donor-social {
  margin-top: 0.35rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--coral);
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.goal-action-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.65rem;
}

.goal-action-row .goal-donate-btn,
.goal-action-row .goal-join-btn {
  min-height: 52px;
  font-size: var(--step-4);
}

.goal-toolbar-join {
  margin-left: auto;
  margin-right: 0.35rem;
}

.goal-story {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.goal-story-body {
  font-size: var(--step-4);
  line-height: 1.58;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.goal-story-body.is-collapsed {
  max-height: 5.5rem;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}

.goal-read-more {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: var(--step-5);
  font-weight: 650;
  color: var(--coral);
  cursor: pointer;
}

.donation-feed-count {
  color: var(--ink);
  font-weight: 700;
}

.donation-feed-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.goal-text-btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--coral);
  cursor: pointer;
}

.donation-feed-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mint);
  vertical-align: middle;
}

.donation-feed-list:not(.is-expanded) .donation-feed-item:nth-child(n + 6) {
  display: none;
}

.donation-feed.is-highlight {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
  border-radius: var(--radius-xl);
}

.distance-feed.is-highlight-distance {
  outline: 2px solid #0c6b58;
  outline-offset: 2px;
  border-radius: var(--radius-xl);
}

.goal-text-btn--mint {
  color: #0c6b58;
}

.distance-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.distance-leaderboard-head,
.distance-leaderboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.25rem 6.75rem;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.distance-leaderboard-head {
  padding: 0 0 0.45rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid var(--surface-3);
}

.distance-leaderboard-head-cell {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.distance-leaderboard-head-cell--logs,
.distance-leaderboard-head-cell--total,
.distance-leaderboard-logs,
.distance-leaderboard-total {
  text-align: right;
}

.distance-leaderboard-list {
  max-height: min(360px, 46vh);
}

.distance-leaderboard-list:not(.is-expanded) .distance-leaderboard-row:nth-child(n + 6) {
  display: none;
}

.logged-impact-list {
  max-height: min(360px, 46vh);
}

.logged-impact-list:not(.is-expanded) .logged-impact-item:nth-child(n + 6) {
  display: none;
}

.logged-impact-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-2);
  list-style: none;
}

.logged-impact-item:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

.logged-impact-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 107, 88, 0.12);
  color: #0c6b58;
  font-size: 0.85rem;
  font-weight: 700;
}

.logged-impact-body {
  flex: 1;
  min-width: 0;
}

.logged-impact-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
}

.logged-impact-label {
  font-weight: 650;
}

.logged-impact-distance {
  font-weight: 700;
  white-space: nowrap;
}

.logged-impact-meta {
  margin: 0.2rem 0 0;
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.distance-leaderboard-row {
  list-style: none;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--surface-2);
}

.distance-leaderboard-row:last-child {
  border-bottom: none;
  padding-bottom: 0.1rem;
}

.distance-leaderboard-name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.distance-leaderboard-avatar {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-2);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.distance-leaderboard-name-text {
  font-size: var(--step-4);
  font-weight: 650;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distance-leaderboard-logs {
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.distance-leaderboard-total {
  font-size: var(--step-4);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .distance-leaderboard-head,
  .distance-leaderboard-row {
    grid-template-columns: minmax(0, 1fr) 4.25rem 5.5rem;
    gap: 0.35rem 0.45rem;
  }

  .distance-leaderboard-avatar {
    display: none;
  }
}

.goal-organizers-block {
  gap: 0.75rem;
  padding: 1rem 1.1rem;
}

.goal-organizer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.goal-organizer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.goal-message-btn {
  margin-top: 0.25rem;
}

.goal-trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: center;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--surface-2);
}

.goal-trust-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.goal-trust-ok {
  color: var(--mint);
}

.goal-trust-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.goal-giftaid-hint {
  text-align: center;
  margin-top: -0.35rem;
}

.goal-blurb {
  font-size: var(--step-4);
  line-height: 1.5;
  color: var(--ink-secondary);
}

.donation-feed {
  gap: 0.75rem;
  padding: 1rem 1.1rem;
}

.donation-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.donation-feed-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mint);
}

.donation-feed-list {
  list-style: none;
  max-height: min(320px, 42vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 -0.35rem;
  padding: 0 0.35rem;
}

.donation-feed-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-2);
}

.donation-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

.donation-feed-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-2);
  color: var(--ink);
  font-size: var(--step-5);
  font-weight: 700;
}

.donation-feed-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.donation-feed-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: var(--step-4);
  line-height: 1.35;
}

.donation-feed-donor {
  min-width: 0;
}

.donation-feed-donor strong {
  font-weight: 650;
}

.donation-feed-amount {
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.donation-feed-message {
  font-size: var(--step-5);
  color: var(--ink-secondary);
  line-height: 1.4;
}

.donation-feed-meta {
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.goal-footnote {
  font-size: var(--step-5);
  color: var(--ink-secondary);
  text-align: center;
  line-height: 1.45;
}

.goal-footnote a {
  color: var(--coral);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.35rem;
}

.goal-footnote a:hover {
  text-decoration: underline;
}

.goal-footnote.is-highlight {
  color: var(--ink);
  outline: 2px solid rgba(255, 86, 37, 0.35);
  outline-offset: 6px;
  border-radius: var(--radius-md);
  transition: color 200ms ease, outline-color 200ms ease;
}

.goal-not-found {
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.goal-sticky-donate {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 0.75rem var(--margin) max(0.75rem, env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, transparent, rgba(236, 238, 242, 0.92) 28%);
  pointer-events: none;
}

.goal-sticky-donate .btn-pill {
  pointer-events: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 900px) {
  .goal-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-story-badge-block--hero {
    display: flex;
  }

  .goal-story-badge-block--story {
    display: none;
  }

  .goal-media-wrap--single {
    aspect-ratio: 16 / 9;
    min-height: 0;
    height: auto !important;
  }

  .goal-media-wrap--single img {
    min-height: 0;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
  }

  .goal-media-wrap--gallery {
    min-height: 260px;
    height: auto !important;
  }

  .goal-media-wrap--gallery .goal-gallery-viewport,
  .goal-media-wrap .goal-gallery-slide img {
    min-height: 260px;
  }

  .goal-page-title,
  .goal-page-title--hero {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .goal-toolbar-donate {
    display: none;
  }
}

@media (min-width: 721px) {
  .goal-sticky-donate {
    display: none !important;
  }
}

/* Squad Code Input */
.code-launch-form {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.6rem;
}

[data-ui] .apple-input {
  flex: 1;
  min-height: 44px;
  background-color: var(--ground);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-pill);
  padding: 0 1rem;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step-5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.apple-input::placeholder {
  color: var(--ink-secondary);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.form-hint {
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

/* ==========================================================================
   APPLE FLUID BOTTOM SHEET (Modal Dialog with 1:1 Drag & Spring Handoff)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: rgba(5, 6, 9, 0.76);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  will-change: opacity;
  transition: opacity 280ms ease;
}

.sheet-backdrop[hidden] {
  display: none !important;
  visibility: hidden;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-backdrop:not(.is-open) {
  pointer-events: none;
}

.rollup-stack {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.rollup-row {
  background-color: var(--ground);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: var(--step-5);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rollup-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.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;
}

.fluid-sheet {
  width: 100%;
  max-width: 500px;
  background: var(--material-sheet);
  border-radius: var(--radius-xl);
  padding: 0.5rem 1.5rem max(1.65rem, env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  transform: translate3d(0, 100%, 0);
  will-change: transform;
  touch-action: none;
}

.sheet-drag-zone {
  padding: 0.5rem 0 0.25rem;
  display: flex;
  justify-content: center;
  cursor: grab;
}

.sheet-grabber {
  width: 40px;
  height: 5px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.28);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.sheet-url-pill {
  display: inline-block;
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--mint);
  background-color: var(--surface-2);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.35rem;
}

.sheet-title {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sheet-sub {
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.sheet-close-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.85rem;
  border-radius: var(--radius-pill);
  border: none;
  background-color: var(--surface-2);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: var(--step-5);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.amount-chip {
  min-height: 44px;
  border-radius: var(--radius-md);
  border: none;
  background-color: var(--ground);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--step-4);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 100ms ease-out, background-color 140ms ease;
}

.amount-chip[aria-pressed="true"] {
  background-color: var(--coral);
  color: var(--ground);
}

.giftaid-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: var(--ground);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.giftaid-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--mint);
}

.giftaid-row div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.giftaid-row strong {
  font-size: var(--step-5);
  color: var(--ink);
}

.giftaid-row span {
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.receipt-card {
  background-color: var(--ground);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: var(--step-5);
  font-variant-numeric: tabular-nums;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.receipt-total {
  padding-top: 0.45rem;
  margin-top: 0.2rem;
  font-size: var(--step-4);
}

.sheet-confirm {
  font-size: var(--step-5);
  color: var(--mint);
  font-weight: 600;
  text-align: center;
  min-height: 1.25rem;
}

/* ==========================================================================
   MINIMAL FOOTER (Separated by tonal surface, no 1px rule)
   ========================================================================== */
.apple-footer {
  margin-top: 2rem;
  background-color: var(--surface-1);
  padding: 2.5rem var(--margin) 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: var(--step-5);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a,
.footer-credits a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-credits {
  font-size: var(--step-5);
  color: var(--ink-secondary);
  line-height: 1.5;
  max-width: 68ch;
}

/* ==========================================================================
   Saas Interface–inspired marketing layout (home)
   ========================================================================== */
.site-shell {
  max-width: 1120px;
  margin-inline: auto;
  width: 100%;
}

body.layout-saas,
.layout-saas {
  background-color: #f4f4f6;
  color: #12131a;
  color-scheme: light;
}

/* Light marketing surfaces: remap dark-theme ink tokens so components stay readable */
.section-light,
.footer-light,
body.layout-saas .section-light,
body.layout-saas .footer-light {
  --ink: #12131a;
  --ink-secondary: #4a5160;
  --ground: #dfe1e8;
  --surface-1: #ffffff;
  --surface-2: #f0f1f5;
  --surface-3: #e4e5ec;
  color: var(--ink);
}

.section-light .expedition-raised,
.section-light .text-mint,
body.layout-saas .section-light .expedition-raised,
body.layout-saas .section-light .text-mint {
  color: #0c6b58;
}

.layout-saas .apple-toolbar,
body.layout-saas .apple-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  --ink: #ffffff;
  --ink-secondary: rgba(255, 255, 255, 0.88);
  --surface-2: rgba(255, 255, 255, 0.16);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--coral), #ff8a5c);
  color: #0d0e13;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark-sm {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.62rem;
  border-radius: 8px;
}

.brand-logo {
  display: block;
  width: 2.75rem;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-logo-sm {
  width: 2.35rem;
}

.hero-saas {
  --ground: #0B0C10;
  --surface-1: #13151D;
  --surface-2: #1B1E29;
  --surface-3: #252938;
  --ink: #F5F5F7;
  --ink-secondary: #B4B9C8;
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 86, 37, 0.2) 0%, rgba(255, 86, 37, 0.06) 50%, transparent 78%),
    linear-gradient(180deg, #0E0F14 0%, #0B0C10 100%);
  color: var(--ink);
  padding: calc(76px + clamp(2rem, 5vw, 4rem)) var(--margin) clamp(2.75rem, 5vw, 4rem);
  text-align: center;
}

.hero-saas-inner {
  max-width: 46rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.hero-eyebrow {
  font-size: var(--step-5);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.hero-saas-title {
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(2.35rem, 5.2vw, 4.1rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-saas-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 42ch;
}

.hero-saas-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.btn-surface-hero {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.btn-surface-hero:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.section-light {
  background-color: #f4f4f6;
  padding: clamp(2.75rem, 5.5vw, 4.5rem) var(--margin);
}

.section-intro {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 52rem;
}

.section-intro-icon {
  flex-shrink: 0;
  color: var(--ink-secondary);
  margin-top: 0.35rem;
}

.section-serif-title {
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.section-intro-lead {
  margin-top: 0.45rem;
  font-size: var(--step-4);
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 52ch;
}

.section-intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.gallery-section {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.gallery-marquee {
  overflow: hidden;
  margin-inline: calc(-1 * var(--margin));
  padding: 0.5rem var(--margin) 1.25rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.gallery-marquee.is-static {
  overflow-x: auto;
  -webkit-mask-image: none;
  mask-image: none;
  padding-inline: var(--margin);
  scroll-snap-type: x mandatory;
}

.gallery-marquee-track {
  display: flex;
  width: max-content;
  gap: 1.35rem;
  animation: gallery-marquee 55s linear infinite;
  will-change: transform;
}

.gallery-marquee-set {
  display: flex;
  gap: 1.35rem;
  flex-shrink: 0;
}

.gallery-tile:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

.gallery-marquee:hover .gallery-marquee-track,
.gallery-marquee:focus-within .gallery-marquee-track {
  animation-play-state: paused;
}

.gallery-marquee.is-static .gallery-marquee-track {
  animation: none;
}

@keyframes gallery-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-1 * var(--marquee-shift, 50%)), 0, 0);
  }
}

.gallery-tile {
  flex: 0 0 auto;
  width: 320px;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}

.gallery-frame {
  position: relative;
  background: #1a1d28;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 22px 50px rgba(18, 19, 26, 0.14);
}

.gallery-frame img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-frame-live {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(13, 14, 19, 0.72);
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-tile-title {
  margin-top: 0.85rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.gallery-tile-meta {
  margin-top: 0.2rem;
  font-size: var(--step-5);
  color: var(--ink-secondary);
}

.gallery-marquee-hint {
  margin-top: 0.5rem;
  font-size: var(--step-5);
}

.gallery-marquee-hint a {
  color: var(--coral);
  font-weight: 600;
  text-decoration: none;
}

.gallery-marquee-hint a:hover {
  text-decoration: underline;
}

.steps-grid-light {
  gap: 1rem;
}

.fundraiser-types-section {
  padding-bottom: clamp(1rem, 2.5vw, 2rem);
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.type-card {
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.type-card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.15rem;
}

.type-card-top .step-title {
  margin: 0;
}

.type-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background-color: rgba(255, 86, 37, 0.12);
  color: var(--coral);
  flex-shrink: 0;
}

.type-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background-color: var(--surface-2);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.type-card-audience {
  font-size: var(--step-5);
  font-weight: 650;
  color: var(--coral) !important;
  line-height: 1.35;
}

.type-card-body {
  font-size: var(--step-4);
  line-height: 1.5;
  color: var(--ink-secondary);
}

.step-card-light {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 rgba(18, 19, 26, 0.06);
}

.step-card-light p {
  color: var(--ink-secondary);
}

.step-title {
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--ink);
}

.directory-grid-light .expedition-card {
  flex: unset;
  background: #fff;
  box-shadow: 0 1px 0 rgba(18, 19, 26, 0.06);
}

.section-directory-preview {
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.footer-light {
  background: #ebebef;
  margin-top: 0;
}

.footer-light .footer-credits,
.footer-light .footer-links a {
  color: var(--ink-secondary);
}

.text-muted-light {
  color: var(--ink-secondary);
}

.layout-saas .contact-intro,
body.layout-saas .contact-intro {
  margin-bottom: 0.75rem;
}

.layout-saas .contact-form.panel-surface,
body.layout-saas .contact-form.panel-surface {
  background: #fff;
  box-shadow: 0 1px 0 rgba(18, 19, 26, 0.06);
}

.layout-saas .filter-chip,
body.layout-saas .filter-chip {
  background: var(--surface-1);
  color: var(--ink-secondary);
  border: 1px solid var(--surface-3);
}

.layout-saas .filter-chip[aria-pressed='true'],
body.layout-saas .filter-chip[aria-pressed='true'] {
  background: #12131a;
  color: #f5f5f7;
}

.section-light .apple-input.form-control,
.section-light .search-input,
[data-ui] .section-light .apple-input.form-control,
[data-ui] .section-light .search-input {
  background-color: var(--surface-1);
  border-color: var(--surface-3);
  color: var(--ink);
}

.section-light .apple-input.form-control::placeholder,
.section-light .search-input::placeholder,
[data-ui] .section-light .apple-input.form-control::placeholder,
[data-ui] .section-light .search-input::placeholder {
  color: var(--ink-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-marquee-track {
    animation: none;
  }
}

/* ==========================================================================
   Multi-page: How it works, directory, contact
   ========================================================================== */
.page-top {
  padding-top: calc(76px + clamp(2rem, 4vw, 3rem));
  background:
    radial-gradient(ellipse 85% 180px at 50% 0%, rgba(255, 86, 37, 0.16) 0%, transparent 80%),
    linear-gradient(180deg, #0B0C10 0px, #0E0F14 76px, #f4f4f6 76px);
}

.page-intro {
  margin-bottom: 1.75rem;
}

.page-lead {
  max-width: 58ch;
}

.how-it-works-page {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.how-it-works-cta {
  margin-top: 2rem;
  text-align: center;
}

.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.step-card {
  background-color: var(--surface-1);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.step-card p {
  color: var(--ink-secondary);
  font-size: var(--step-4);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: var(--coral);
  color: var(--ground);
  font-size: var(--step-5);
  font-weight: 700;
}

.layout-charity main {
  padding: 0;
}

.charity-hero-saas.goal-hero-saas {
  padding-bottom: clamp(1.35rem, 3.5vw, 2rem);
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 86, 37, 0.2) 0%, rgba(255, 86, 37, 0.06) 50%, transparent 78%),
    linear-gradient(180deg, #0e0f14 0%, #0b0c10 82%, #f4f4f6 100%);
}

.charity-hero-saas--loading,
.charity-hero-saas--minimal {
  min-height: 12rem;
}

.charity-loading {
  color: rgba(255, 255, 255, 0.72);
  margin: 2rem 0;
}

.charity-hero-inner {
  padding-bottom: 0.35rem;
}

.charity-breadcrumb {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.charity-breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.charity-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.charity-hero-head {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.15rem);
}

.charity-hero-logo {
  flex-shrink: 0;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: var(--radius-lg);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.charity-hero-logo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.charity-hero-copy {
  min-width: 0;
}

.charity-verified-pill {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mint);
}

.charity-page-title {
  margin: 0;
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.85rem, 4.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #f5f5f7;
}

.charity-page-inner {
  padding-top: 0.35rem;
}

.charity-impact-card {
  margin-top: -0.15rem;
}

.charity-impact-card .goal-stat-facts {
  border-top: none;
  border-bottom: none;
  padding: 0.25rem 0;
}

.charity-details-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 901px) {
  .charity-details-row:has(.charity-detail-block + .charity-detail-block) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: start;
  }
}

.charity-connect-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.charity-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.charity-fundraiser-panel {
  padding: 1rem 1rem 1.1rem;
}

.charity-fundraiser-grid {
  margin: 0;
}

.charity-fundraisers-block {
  margin-top: 0.15rem;
}

.charity-empty {
  margin: 0;
}

.charity-trust-strip {
  margin-top: 0.25rem;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.directory-card {
  height: 100%;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.search-field {
  flex: 1 1 280px;
}

.search-input {
  width: 100%;
  min-height: 44px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  border: none;
  background-color: var(--surface-2);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: var(--step-5);
  font-weight: 600;
  cursor: pointer;
  transition: transform 100ms ease-out, background-color 140ms ease;
}

.filter-chip[aria-pressed="true"] {
  background-color: var(--coral);
  color: var(--ground);
}

.filter-chip:active {
  transform: scale(0.96);
}

.directory-count {
  font-size: var(--step-5);
  color: var(--ink-secondary);
  margin-bottom: 1.25rem;
}

.panel-surface {
  margin-top: 2.5rem;
  background-color: var(--surface-1);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}

.directory-join {
  max-width: 640px;
}

.contact-page .contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-points {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--ink-secondary);
  font-size: var(--step-4);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: var(--step-5);
  font-weight: 600;
  color: var(--ink-secondary);
}

.form-control {
  width: 100%;
  min-height: 44px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.contact-feedback.is-error {
  color: var(--coral);
}

[data-ui] .apple-input.form-control,
[data-ui] .search-input {
  background-color: var(--ground);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-md);
  padding: 0 1rem;
  color: var(--ink);
}

/* ==========================================================================
   §14. Reduced Motion, Reduced Transparency & High Contrast
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .apple-toolbar {
    backdrop-filter: none !important; /* taste-skill-ignore */
    -webkit-backdrop-filter: none !important; /* taste-skill-ignore */
    background-color: var(--surface-1) !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-secondary: #D5D8E6;
  }

  body.layout-saas {
    --section-muted: #3d4250;
  }

  body.layout-saas .section-intro-lead,
  body.layout-saas .gallery-tile-meta,
  body.layout-saas .lead-copy {
    color: var(--section-muted, #3d4250);
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid,
  .bento-wide,
  .bento-grid,
  .types-grid,
  .steps-grid,
  .directory-grid,
  .contact-page .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .expedition-card {
    flex: 0 0 calc((100% - 1.25rem) / 2);
  }
}

@media (max-width: 820px) {
  .toolbar-menu-btn {
    display: inline-flex;
  }

  .toolbar-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.65rem;
    --ink: #f5f5f7;
    --ink-secondary: #a9aebf;
    --surface-2: #282c3d;
    background: #151720;
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }

  .toolbar-nav.is-open {
    display: flex;
  }

  .toolbar-nav .toolbar-link {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .metric-trio {
    grid-template-columns: 1fr;
  }
  .code-launch-form {
    flex-direction: column;
  }
  .code-launch-form .btn-pill {
    width: 100%;
  }
  .expedition-card {
    flex: 0 0 100%;
  }
  .sheet-backdrop {
    padding: 0;
  }
  .fluid-sheet {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
