/* ==========================================================================
   The Honest Miles V2: inner page styles
   about, runs, results, teams, gallery, honesty wall, sponsors, sponsor signup,
   volunteer, contact, privacy, refund, unsubscribe, 404.
   Builds on tokens in styles.css and the kit in components.css.
   Markup helpers: app/page_ui.php. Behavior: js/pages.js.
   ========================================================================== */

/* ---- 1. Page hero + shared shells ------------------------------------- */
.page-hero .page-hero__title { font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5.6rem); max-width: 16ch; }
.page-hero .lede { margin-bottom: 0; }
.page-hero .hero-mesh__media img { object-position: center 45%; }
.page-hero__pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.page-hero .hero-mesh__meta { margin-top: 26px; }

.page-section { padding: clamp(56px, 7vw, 104px) 0; }
.page-section--tight { padding: clamp(40px, 5vw, 72px) 0; }
.page-section + .page-section:not([class*="section--"]) { padding-top: 0; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--sm { width: 16px; height: 16px; }

/* Closing CTA band */
.page-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: clamp(80px, 10vw, 140px) 0;
}
.page-cta .hero-mesh__blob { opacity: 0.4; }
.page-cta__inner { position: relative; z-index: 3; }
.page-cta .headline { color: var(--hm-cream); max-width: 16ch; }
.page-cta .headline em { color: var(--hm-sand); }
.page-cta__text { margin: 0 auto 32px; text-align: center; }
.page-cta__buttons { justify-content: center; }
.page-cta .btn:not(.btn--sun):not(.btn--light) { background: transparent; color: var(--hm-cream); border: 1.5px solid rgba(245, 239, 224, 0.55); }
.page-cta .btn:not(.btn--sun):not(.btn--light):hover { background: rgba(245, 239, 224, 0.1); border-color: var(--hm-cream); }

/* Empty state */
.empty-state {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 48px);
  text-align: center;
  background: var(--hm-paper);
  border: 1px dashed var(--hm-line-strong);
  border-radius: var(--radius-lg);
}
.empty-state__icon { margin: 0 auto 18px; }
.empty-state__title { margin: 0 0 10px; font-size: var(--fs-h3); }
.empty-state__text { margin: 0 auto; color: var(--hm-ink-soft); max-width: 44ch; }
.empty-state__actions { justify-content: center; margin-top: 24px; }

/* Small section intro used above grids */
.page-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 44px); }
.page-intro .headline { margin-bottom: 0; }
.page-intro .lede { margin: 0; max-width: 46ch; }

/* ---- 2. Forms ---------------------------------------------------------- */
.form-card {
  position: relative;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.form-card__title { margin: 0 0 6px; font-size: var(--fs-h3); }
.form-card__sub { margin: 0 0 26px; color: var(--hm-ink-soft); }
.hm-form { display: grid; gap: 20px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field > label, .field > .field-label, .field legend {
  display: block;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--hm-ink);
  letter-spacing: 0;
  text-transform: none;
}
.field .optional { font-weight: 600; color: var(--hm-ink-soft); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"],
.field input[type="number"], .field input[type="search"], .field select, .field textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field-help { margin: 8px 0 0; font-size: 0.86rem; color: var(--hm-ink-soft); line-height: 1.45; }
.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--hm-danger);
  line-height: 1.4;
}
.field-error::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field-error[hidden] { display: none; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--hm-danger); }
.field.is-invalid input:focus, .field.is-invalid select:focus, .field.is-invalid textarea:focus { box-shadow: 0 0 0 4px rgba(168, 54, 47, 0.18); }
.field-row { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-counter { margin-left: auto; font-size: 0.8rem; font-weight: 700; color: var(--hm-ink-soft); font-variant-numeric: tabular-nums; }
.field-counter.is-near { color: var(--hm-sun-deep); }
.field-foot { display: flex; align-items: flex-start; gap: 12px; }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--hm-sage-tint);
  font-size: 0.94rem;
  color: var(--hm-ink);
  cursor: pointer;
  line-height: 1.45;
}
.check-row input { margin-top: 2px; flex: none; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form-actions .btn { min-width: 200px; }
.form-note { margin: 0; font-size: 0.86rem; color: var(--hm-ink-soft); display: flex; align-items: center; gap: 8px; }
.form-note .icon { width: 16px; height: 16px; color: var(--hm-sage); }
.form-msg:empty { display: none; }
.form-msg.is-error {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(168, 54, 47, 0.08);
  border: 1px solid rgba(168, 54, 47, 0.25);
  font-weight: 700;
}
.form-msg.is-success { font-weight: 700; }
.cf-turnstile { min-height: 0; }

/* Loading button */
.btn.is-loading { cursor: progress; opacity: 0.92; }
.btn[disabled] { cursor: not-allowed; }
.btn.is-loading[disabled] { cursor: progress; }
.btn-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  animation: hm-spin 0.8s linear infinite;
  flex: none;
}
@keyframes hm-spin { to { transform: rotate(360deg); } }

/* Success panel that replaces a form */
.form-success {
  text-align: center;
  padding: clamp(24px, 4vw, 40px) clamp(8px, 2vw, 24px);
}
.form-success:focus { outline: none; }
.form-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--hm-sage-deep);
  color: var(--hm-cream);
  box-shadow: 0 0 0 10px var(--hm-sage-tint);
  animation: hm-pop 520ms var(--ease-out) both;
}
.form-success__icon svg { width: 34px; height: 34px; }
.form-success h3 { margin: 0 0 10px; font-size: var(--fs-h3); }
.form-success p { margin: 0 auto; max-width: 42ch; color: var(--hm-ink-soft); }
.form-success .btn-row { justify-content: center; margin-top: 24px; }
@keyframes hm-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* Honeypot (also global) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* File drop zone */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  padding: 24px;
  text-align: center;
  border: 2px dashed var(--hm-line-strong);
  border-radius: var(--radius);
  background: var(--hm-white);
  color: var(--hm-ink-soft);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--hm-sage); background: var(--hm-paper); }
.dropzone:focus-within { border-color: var(--hm-sage-deep); box-shadow: 0 0 0 4px rgba(110, 130, 87, 0.24); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; background: var(--hm-sage-tint); color: var(--hm-sage-deep); }
.dropzone__title { font-weight: 800; color: var(--hm-ink); }
.dropzone__title u { text-decoration-color: var(--hm-sun); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.dropzone__hint { font-size: 0.86rem; }
.dropzone__preview { display: none; align-items: center; gap: 14px; width: 100%; text-align: left; }
.dropzone.has-file .dropzone__empty { display: none; }
.dropzone.has-file .dropzone__preview { display: flex; }
.dropzone__preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; background: var(--hm-sand); }
.dropzone__name { font-weight: 800; color: var(--hm-ink); word-break: break-all; }
.dropzone__meta { font-size: 0.85rem; }
.field.is-invalid .dropzone { border-color: var(--hm-danger); }

/* ---- 3. Modal (honesty wall) ------------------------------------------ */
html.hm-modal-open { overflow: hidden; }
.hm-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 30, 18, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.hm-modal[hidden] { display: none; }
.hm-modal.is-open { opacity: 1; }
.hm-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--hm-cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4vw, 40px);
  transform: translate3d(0, 24px, 0) scale(0.98);
  transition: transform var(--dur-slow) var(--ease-out);
}
.hm-modal.is-open .hm-modal__dialog { transform: none; }
.hm-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--hm-paper);
  color: var(--hm-ink);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.hm-modal__close:hover { background: var(--hm-sand); }
.hm-modal__close svg { width: 20px; height: 20px; }
.hm-modal__title { margin: 0 44px 8px 0; font-size: var(--fs-h3); }
.hm-modal__sub { margin: 0 0 22px; color: var(--hm-ink-soft); }

/* ---- 4. About ---------------------------------------------------------- */
.about-manifesto { display: grid; gap: clamp(28px, 5vw, 72px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .about-manifesto { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.about-manifesto__body p { margin: 0 0 18px; font-size: var(--fs-lg); line-height: 1.65; color: var(--hm-ink); }
.about-manifesto__body p:last-child { margin-bottom: 0; }
.about-question {
  margin: 28px 0 0;
  padding: 22px 26px;
  border-left: 3px solid var(--hm-sun);
  background: var(--hm-paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.35;
}
.bento-tile h3 { margin: 0 0 8px; }
.bento-tile--photo::before { background: linear-gradient(180deg, rgba(38, 48, 29, 0.3) 0%, rgba(38, 48, 29, 0.6) 40%, rgba(38, 48, 29, 0.92) 100%) !important; }
.bento-tile--photo { justify-content: flex-end; }
.bento-tile--sage .icon-badge, .bento-tile--ink .icon-badge { background: rgba(245, 239, 224, 0.12); color: var(--hm-sand); }
.bento-tile--sun .icon-badge { background: rgba(44, 42, 36, 0.1); color: var(--hm-ink); }
.bento-tile--sand .icon-badge { background: rgba(63, 77, 49, 0.12); }
.bento-tile p { margin: 0; }
.story-card { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 800px) { .story-card { grid-template-columns: auto 1fr; } }
.story-card .icon-badge { margin: 0; }

/* ---- 5. Weekly runs ---------------------------------------------------- */
.runs-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.run-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
}
.run-card.cancelled { background: var(--hm-cream); box-shadow: none; }
.run-card.cancelled .run-card__title { text-decoration: line-through; text-decoration-color: var(--hm-danger); text-decoration-thickness: 2px; }
.run-card__head { display: flex; align-items: flex-start; gap: 18px; }
.run-date {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 84px;
  border-radius: 18px;
  background: var(--hm-sage-ink);
  color: var(--hm-cream);
  line-height: 1;
  text-align: center;
}
.run-date__dow { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hm-sand); }
.run-date__day { font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; margin: 4px 0 2px; }
.run-date__mon { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hm-on-dark-soft); }
.run-card.cancelled .run-date { background: var(--hm-ink-soft); }
.run-card__kicker { margin: 0 0 4px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hm-sage-deep); }
.run-card__title { margin: 0; font-size: var(--fs-h4); line-height: 1.2; }
.run-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--hm-ink-soft); font-size: 0.95rem; }
.run-meta li { display: flex; align-items: flex-start; gap: 10px; }
.run-meta .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--hm-sage); }
.run-card__desc { margin: 0; color: var(--hm-ink-soft); }
.run-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--hm-line); }
.run-count { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--hm-sage-deep); font-size: 0.95rem; }
.run-count .icon { width: 18px; height: 18px; }
.rsvp-toggle[aria-expanded="true"] { background: var(--hm-sage-deep); color: var(--hm-cream); border-color: var(--hm-sage-deep); }
.rsvp-form { display: none; }
.rsvp-form.open { display: grid; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--hm-white); border: 1px solid var(--hm-line); animation: hm-drop var(--dur) var(--ease-out); }
.rsvp-form .field input[type="number"] { max-width: 140px; }
.rsvp-form .btn { width: 100%; }
@keyframes hm-drop { from { opacity: 0; transform: translate3d(0, -8px, 0); } to { opacity: 1; transform: none; } }
.rsvp-msg:empty { display: none; }
.rsvp-msg { font-size: 0.95rem; font-weight: 700; }
.rsvp-msg.is-success { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--hm-sage-tint); color: var(--hm-success); }
.rsvp-msg.is-error { color: var(--hm-danger); }
.cancelled-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(168, 54, 47, 0.07); color: #7a2a24; font-weight: 700; font-size: 0.95rem; }
.cancelled-note .icon { color: var(--hm-danger); margin-top: 2px; }

.expect-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* ---- 6. Results -------------------------------------------------------- */
.podium { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: clamp(36px, 5vw, 56px); align-items: end; }
@media (min-width: 760px) {
  .podium { grid-template-columns: 1fr 1.12fr 1fr; }
  .podium__item--1 { order: 2; }
  .podium__item--2 { order: 1; }
  .podium__item--3 { order: 3; }
}
.podium__item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  box-shadow: var(--shadow-sm);
}
.podium__item--1 { background: var(--hm-sage-ink); color: var(--hm-cream); border-color: transparent; box-shadow: var(--shadow); padding-top: 34px; padding-bottom: 32px; }
.podium__place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hm-sage-deep);
}
.podium__place .icon { width: 18px; height: 18px; color: var(--hm-sun); }
.podium__item--1 .podium__place { color: var(--hm-sand); }
.podium__name { margin: 12px 0 4px; font-family: var(--font-display); font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.8rem); font-weight: 600; line-height: 1.15; }
.podium__time { font-family: var(--font-display); font-size: clamp(2rem, 1.6rem + 1.6vw, 2.8rem); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.podium__sub { margin-top: 10px; font-size: 0.9rem; color: var(--hm-ink-soft); }
.podium__item--1 .podium__sub { color: var(--hm-on-dark-soft); }
.podium__big {
  position: absolute;
  right: -6px;
  bottom: -34px;
  z-index: -1;
  font-family: var(--font-display);
  font-size: 9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--hm-sage-tint);
}
.podium__item--1 .podium__big { color: rgba(245, 239, 224, 0.08); }

.results-toolbar {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  align-items: end;
  margin-bottom: 18px;
}
@media (min-width: 820px) { .results-toolbar { grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto; } }
.results-toolbar .field { margin: 0; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--hm-ink-soft); pointer-events: none; }
.search-input input { padding-left: 46px !important; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: var(--radius-pill); background: var(--hm-paper); border: 1px solid var(--hm-line); }
.seg button {
  min-height: 38px;
  padding: 6px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--hm-ink-soft);
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--hm-sage-deep); color: var(--hm-cream); }
.results-count { margin: 0 0 12px; font-size: 0.92rem; color: var(--hm-ink-soft); font-weight: 700; }
.results-table-wrap {
  overflow-x: auto;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.results-table-wrap:focus-visible { outline-offset: 2px; }
table.results-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.results-table caption { text-align: left; }
.results-table th {
  position: sticky;
  top: 0;
  background: var(--hm-paper);
  text-align: left;
  padding: 0;
  border-bottom: 1px solid var(--hm-line-strong);
  white-space: nowrap;
}
.results-table th button, .results-table th span.th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  background: none;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hm-sage-deep);
  cursor: pointer;
  text-align: left;
}
.results-table th button:hover { color: var(--hm-ink); }
.results-table th .icon { width: 14px; height: 14px; opacity: 0.45; }
.results-table th[aria-sort] .icon { opacity: 1; color: var(--hm-sun-deep); }
.results-table td { padding: 14px 16px; border-bottom: 1px solid var(--hm-line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.results-table tbody tr:last-child td { border-bottom: 0; }
.results-table tbody tr:hover td { background: rgba(110, 130, 87, 0.06); }
.results-table td.name { font-weight: 800; }
.results-table td.time { font-weight: 800; font-family: var(--font-display); font-size: 1.05rem; }
.results-table tr.highlight td { background: var(--hm-sun-soft); }
.results-table .place-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--hm-sage-tint); font-weight: 800; color: var(--hm-sage-deep); }
.results-table tr.is-top .place-badge { background: var(--hm-sun); color: var(--hm-ink); }
.results-table .na { color: var(--hm-ink-soft); }
.results-none { padding: 32px 20px; text-align: center; color: var(--hm-ink-soft); }
.results-none[hidden] { display: none; }

/* ---- 7. Teams ---------------------------------------------------------- */
.team-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); align-items: start; }
.team-card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.team-card__count { flex: none; font-family: var(--font-body); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hm-sage-deep); }
.team-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.team-members li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--hm-sand);
  color: var(--hm-sage-ink);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.team-card:nth-child(3n+2) .avatar { background: var(--hm-sage-tint); }
.team-card:nth-child(3n) .avatar { background: var(--hm-sun-soft); }

/* ---- 8. Gallery -------------------------------------------------------- */
.gallery-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.gallery-toolbar .field { min-width: min(100%, 280px); }
.gallery-meta { display: inline-flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-weight: 800; color: var(--hm-sage-deep); font-size: 0.92rem; }
.gallery-meta span { display: inline-flex; align-items: center; gap: 8px; }
.masonry { columns: 3 260px; column-gap: 16px; }
.masonry__item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--hm-sand);
  cursor: zoom-in;
  break-inside: avoid;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.masonry__item img { width: 100%; height: auto; transition: transform 700ms var(--ease-out); }
.masonry__item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.masonry__item:hover img { transform: scale(1.04); }
.masonry__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 16px 14px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--hm-cream);
  background: linear-gradient(180deg, transparent, rgba(38, 48, 29, 0.85));
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.masonry__item:hover .masonry__cap, .masonry__item:focus-visible .masonry__cap { opacity: 1; transform: none; }
@media (hover: none) { .masonry__cap { opacity: 1; transform: none; } }
.masonry__zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(251, 248, 241, 0.9);
  color: var(--hm-ink);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.masonry__zoom .icon { width: 18px; height: 18px; }
.masonry__item:hover .masonry__zoom, .masonry__item:focus-visible .masonry__zoom { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 64px 16px 24px;
  background: rgba(18, 22, 13, 0.94);
  color: var(--hm-cream);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(1200px, 100%); min-height: 0; }
.lightbox__figure img { max-width: 100%; max-height: calc(100svh - 190px); width: auto; border-radius: var(--radius-sm); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); transition: opacity var(--dur-fast) var(--ease-out); }
.lightbox.is-loading .lightbox__figure img { opacity: 0.35; }
.lightbox__cap { margin: 0; text-align: center; max-width: 60ch; color: var(--hm-cream); font-size: 1rem; }
.lightbox__count { position: absolute; top: 22px; left: 22px; margin: 0; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hm-on-dark-soft); }
.lightbox__btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(245, 239, 224, 0.25);
  border-radius: 50%;
  background: rgba(245, 239, 224, 0.08);
  color: var(--hm-cream);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.lightbox__btn:hover { background: rgba(245, 239, 224, 0.2); }
.lightbox__btn svg { width: 24px; height: 24px; }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 18px; transform: none; }
  .lightbox { padding-bottom: 90px; }
  .lightbox__figure img { max-height: calc(100svh - 230px); }
}

.submit-layout { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .submit-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.submit-layout__intro { position: relative; }
@media (min-width: 900px) { .submit-layout__intro { position: sticky; top: calc(var(--header-h) + 32px); } }
.tick-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; }
.tick-list .icon { color: var(--hm-sage); margin-top: 3px; }
.on-dark .tick-list .icon, .section--sage .tick-list .icon { color: var(--hm-sand); }

/* ---- 9. Honesty wall --------------------------------------------------- */
.wall-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.wall-lede-quote { font-family: var(--font-display); font-style: italic; }
.wall-count { display: inline-flex; align-items: center; gap: 10px; }
.quote-wall .quote-card:nth-child(7n+3) { transform: rotate(-0.6deg); }
.quote-wall .quote-card:nth-child(7n+5) { transform: rotate(0.5deg); }
.quote-card__meta .icon { width: 14px; height: 14px; }

.words-board { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .words-board { grid-template-columns: 1fr auto 1fr; align-items: stretch; } }
.words-col { border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); }
.words-col--arrived { background: rgba(245, 239, 224, 0.06); border: 1px solid rgba(245, 239, 224, 0.14); }
.words-col--left { background: var(--hm-cream); color: var(--hm-ink); }
.words-col h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-family: var(--font-body); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.words-col--arrived h3 { color: var(--hm-sand); }
.words-col--left h3 { color: var(--hm-sage-deep); }
.words-arrow { display: none; align-items: center; justify-content: center; color: var(--hm-sun); }
.words-arrow svg { width: 40px; height: 40px; }
@media (min-width: 820px) { .words-arrow { display: flex; } }
.word-cloud { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.word-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.4;
}
.words-col--arrived .word-pill { background: rgba(245, 239, 224, 0.08); color: var(--hm-on-dark-soft); }
.words-col--left .word-pill { background: var(--hm-paper); color: var(--hm-sage-deep); font-weight: 600; box-shadow: var(--shadow-sm); }
.word-pill--2 { font-size: 1.3rem; }
.word-pill--3 { font-size: 1.6rem; }
.words-empty { margin: 0; font-style: italic; opacity: 0.8; }

/* Composer: the modal card looks like a real Honest Card */
.composer {
  position: relative;
  padding: 26px 24px 18px;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(180deg, transparent 0 35px, rgba(63, 77, 49, 0.1) 35px 36px),
    var(--hm-paper);
  border: 1px solid var(--hm-line);
  box-shadow: var(--shadow-sm);
}
.composer::before { content: '\201C'; position: absolute; top: 2px; left: 14px; font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: var(--hm-sun); }
.composer textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px 4px 4px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem !important;
  line-height: 36px;
  resize: vertical;
}
.composer textarea:focus { outline: none; }
.composer:focus-within { border-color: var(--hm-sage-deep); box-shadow: 0 0 0 4px rgba(110, 130, 87, 0.24); }
.field.is-invalid .composer { border-color: var(--hm-danger); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.prompt-chip {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hm-line-strong);
  background: var(--hm-paper);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--hm-sage-deep);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.prompt-chip:hover { background: var(--hm-white); border-color: var(--hm-sage); }
.word-pair { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: end; }
@media (min-width: 520px) { .word-pair { grid-template-columns: 1fr auto 1fr; } }
.word-pair__arrow { display: none; padding-bottom: 12px; color: var(--hm-sun); }
.word-pair__arrow svg { width: 24px; height: 24px; }
@media (min-width: 520px) { .word-pair__arrow { display: block; } }
.word-pair input { font-family: var(--font-display); font-style: italic; font-size: 1.2rem !important; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--hm-sage-tint); font-size: 0.88rem; color: var(--hm-ink); }
.privacy-note .icon { width: 18px; height: 18px; color: var(--hm-sage-deep); margin-top: 2px; }

/* ---- 10. Sponsors ------------------------------------------------------ */
.tier-group + .tier-group { margin-top: clamp(40px, 5vw, 64px); }
.tier-group__head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.tier-group__head h3 { margin: 0; font-family: var(--font-body); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hm-sage-deep); white-space: nowrap; }
.tier-group__head::after { content: ''; flex: 1; height: 1px; background: var(--hm-line); }
.tier-group--title .logo-cloud__item { min-height: 170px; }
.tier-group--title .logo-cloud__item img { max-height: 90px; max-width: 240px; }
.tier-group--title .logo-cloud__name { font-size: 1.6rem; }
.pitch-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pricing .price-card__amount.is-text { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.15; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.steps li { position: relative; padding: 26px 24px 24px; border-radius: var(--radius-lg); background: var(--hm-paper); border: 1px solid var(--hm-line); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 12px; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--hm-sun); }
.steps h3 { margin: 0 0 8px; font-size: var(--fs-h4); }
.steps p { margin: 0; color: var(--hm-ink-soft); }
.on-dark .steps li { background: rgba(245, 239, 224, 0.06); border-color: rgba(245, 239, 224, 0.14); }
.on-dark .steps p { color: var(--hm-on-dark-soft); }

/* Sponsor signup tier choices */
.tier-options { display: grid; gap: 12px; border: 0; margin: 0; padding: 0; min-width: 0; }
.tier-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 14px;
  align-items: start;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1.5px solid var(--hm-line-strong);
  background: var(--hm-white);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.tier-option:hover { border-color: var(--hm-sage); }
.tier-option:has(input:checked) { border-color: var(--hm-sage-deep); background: var(--hm-paper); box-shadow: 0 0 0 4px rgba(110, 130, 87, 0.2); }
.tier-option:has(input:focus-visible) { outline: 3px solid var(--hm-sun); outline-offset: 2px; }
.tier-option input { margin-top: 4px; }
.tier-option .tier-name { font-weight: 800; font-size: 1.05rem; }
.tier-option .tier-price { font-weight: 800; color: var(--hm-sage-deep); text-align: right; }
.tier-option ul { grid-column: 2 / -1; margin: 6px 0 0; padding-left: 18px; font-size: 0.9rem; color: var(--hm-ink-soft); }
@media (max-width: 520px) {
  .tier-option { grid-template-columns: auto 1fr; }
  .tier-option .tier-price { grid-column: 2; text-align: left; }
}
.readonly-field { background: var(--hm-cream) !important; color: var(--hm-ink-soft) !important; }
#inkind-field { display: none; }

/* ---- 11. Volunteer ----------------------------------------------------- */
.role-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 100%;
  padding: 22px;
  text-align: left;
  border-radius: var(--radius);
  border: 1.5px solid var(--hm-line);
  background: var(--hm-paper);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.role-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--hm-sage); }
.role-card[aria-pressed="true"] { border-color: var(--hm-sage-deep); box-shadow: 0 0 0 4px rgba(110, 130, 87, 0.2); background: var(--hm-white); }
.role-card .icon-badge { margin-bottom: 10px; }
.role-card strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.role-card span.role-card__desc { color: var(--hm-ink-soft); font-size: 0.95rem; }
.role-card__check { position: absolute; top: 16px; right: 16px; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--hm-sage-deep); color: var(--hm-cream); opacity: 0; transform: scale(0.6); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.role-card__check svg { width: 16px; height: 16px; }
.role-card[aria-pressed="true"] .role-card__check { opacity: 1; transform: none; }

.form-layout { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .form-layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.form-layout__aside { display: grid; gap: 18px; }
@media (min-width: 960px) { .form-layout__aside { position: sticky; top: calc(var(--header-h) + 32px); } }
.aside-card { padding: 22px 24px; border-radius: var(--radius); background: var(--hm-paper); border: 1px solid var(--hm-line); }
.aside-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.1rem; }
.aside-card h3 .icon { color: var(--hm-sage); }
.aside-card p { margin: 0; color: var(--hm-ink-soft); font-size: 0.96rem; }
.aside-card a { color: var(--hm-sage-deep); font-weight: 800; }
.aside-card--dark { background: var(--hm-sage-ink); color: var(--hm-cream); border-color: transparent; }
.aside-card--dark p { color: var(--hm-on-dark-soft); }
.aside-card--dark a { color: var(--hm-sand); }
.aside-card--dark h3 .icon { color: var(--hm-sand); }

/* ---- 12. Legal long form ---------------------------------------------- */
.legal-layout { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .legal-layout { grid-template-columns: 240px minmax(0, 70ch); justify-content: center; gap: 72px; } }
.toc { font-size: 0.94rem; }
.toc__title { margin: 0 0 12px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hm-sage-deep); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--hm-line); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 8px 14px;
  border-left: 2px solid transparent;
  color: var(--hm-ink-soft);
  text-decoration: none;
  line-height: 1.35;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.toc a:hover { color: var(--hm-ink); }
.toc a.is-current { color: var(--hm-sage-deep); font-weight: 800; border-left-color: var(--hm-sun); }
@media (min-width: 980px) { .toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
@media (max-width: 979px) {
  .toc { padding: 20px 22px; border-radius: var(--radius); background: var(--hm-paper); border: 1px solid var(--hm-line); }
  .toc ol { border-left: 0; }
  .toc a { padding: 6px 0; border-left: 0; margin-left: 0; }
}
.prose { max-width: 70ch; font-size: 1.06rem; line-height: 1.75; color: var(--hm-ink); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 56px 0 14px; font-size: clamp(1.5rem, 1.25rem + 0.9vw, 2rem); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2:first-of-type { margin-top: 44px; }
.prose p { margin: 0 0 18px; }
.prose ul { margin: 0 0 20px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before { content: ''; position: absolute; left: 4px; top: 0.72em; width: 8px; height: 8px; border-radius: 50%; background: var(--hm-sage); }
.prose a { color: var(--hm-sage-deep); font-weight: 700; }
.prose strong { color: var(--hm-ink); }
.prose .lead { font-size: var(--fs-lg); line-height: 1.65; color: var(--hm-ink); }
.legal-updated { display: inline-flex; align-items: center; gap: 8px; }
.callout { display: flex; gap: 14px; padding: 20px 22px; margin: 28px 0; border-radius: var(--radius); background: var(--hm-paper); border: 1px solid var(--hm-line); }
.callout .icon { color: var(--hm-sun-deep); margin-top: 4px; }
.callout p { margin: 0; }

/* ---- 13. Status pages (unsubscribe, 404, sponsor signup states) ------- */
.status-card {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  background: var(--hm-paper);
  border: 1px solid var(--hm-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.status-card .form-success__icon { animation: hm-pop 520ms var(--ease-out) both; }
.status-card__icon--muted { background: var(--hm-sand); color: var(--hm-sage-ink); box-shadow: 0 0 0 10px rgba(228, 213, 183, 0.4); }
.status-card h2 { margin: 0 0 12px; font-size: var(--fs-h3); }
.status-card p { margin: 0 auto; max-width: 46ch; color: var(--hm-ink-soft); }
.status-card .btn-row { justify-content: center; margin-top: 26px; }

.link-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.link-card .icon-badge { margin-bottom: 12px; }
.link-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; }
.link-card h3 .icon { width: 20px; height: 20px; color: var(--hm-sun-deep); transition: transform var(--dur) var(--ease-out); }
.link-card:hover h3 .icon, .link-card:focus-visible h3 .icon { transform: translateX(4px); }
.link-card:focus-visible { outline: 3px solid var(--hm-sun); outline-offset: 4px; border-radius: var(--radius-lg); }

/* ---- 14. Reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 2.4s; }
  .form-success__icon, .status-card .form-success__icon, .rsvp-form.open { animation: none; }
  .hm-modal, .hm-modal__dialog, .lightbox, .masonry__item, .masonry__item img, .masonry__cap, .role-card, .run-card { transition: none !important; }
  .hm-modal__dialog { transform: none; }
  .masonry__item:hover, .role-card:hover { transform: none; }
  .masonry__item:hover img { transform: none; }
  .quote-wall .quote-card { transform: none !important; }
}
