:root {
  --ink: #2a2118;
  --paper: #f3e6d4;
  --cream: #fff6ea;
  --olive: #3a4a41;
  --olive-2: #2c3932;
  --brick: #8a3d2f;
  --rust: #a34e2e;
  --rust-2: #8d4126;
  --rule: #d4c4b0;
  --gold: #b8944a;
  --mute: #6e6256;
  --parchment: #f3e6d4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Source Sans 3", system-ui, sans-serif; }
html { overflow-x: hidden; }
body {
  min-height: 100vh; display: flex; flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--olive); }
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .85rem 1.4rem; padding-top: max(.85rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; background: color-mix(in srgb, var(--paper) 88%, white);
  backdrop-filter: blur(10px); z-index: 10;
}
.brand {
  display: flex; align-items: center; min-width: 0; flex: 0 1 auto;
  text-decoration: none; line-height: 0;
}
.brand:focus-visible {
  outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 8px;
}
.brand img {
  display: block; height: auto; width: auto;
  max-height: 52px; max-width: min(12rem, 48vw);
  object-fit: contain; object-position: left center;
  border-radius: 6px;
}
@media (min-width: 721px) {
  .brand img { max-height: 68px; max-width: 15rem; }
}
nav { display: flex; gap: .85rem; align-items: center; font-size: .9rem; flex: 0 0 auto; }
nav a { text-decoration: none; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
nav a.who { color: var(--mute); }
main { width: min(920px, 92vw); margin: 2.2rem auto 3rem; flex: 1; }
footer { border-top: 1px solid var(--rule); padding: 1.4rem; text-align: center; color: var(--mute); font-size: .82rem; }
h1, h2, h3 { font-family: Fraunces, serif; font-weight: 600; letter-spacing: -.03em; }
h1 { font-size: clamp(1.85rem, 7vw, 3.5rem); line-height: 1.08; margin: 0 0 .55rem; overflow-wrap: anywhere; }
h2 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
.lede { font-size: 1.12rem; max-width: 36rem; color: #433e37; line-height: 1.45; }
.hero { padding: .4rem 0 1.6rem; }
.stats { display: flex; gap: .8rem; margin: 1.4rem 0 0; flex-wrap: wrap; }
.stat { border: 1px solid var(--rule); padding: .7rem .95rem; min-width: 6.5rem; background: var(--cream); }
.stat b { display: block; font-family: Fraunces, serif; font-size: 1.45rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--olive); color: var(--paper); text-decoration: none;
  padding: .72rem 1.15rem; border: 0; font: inherit; cursor: pointer; border-radius: 2px;
  min-height: 44px;
}
.btn:hover { background: var(--olive-2); }
.btn-block { width: 100%; text-align: center; margin-left: 0; }
.btn-sm { padding: .38rem .75rem; font-size: .88rem; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); margin-left: .35rem; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem; }
.card {
  border: 1px solid var(--rule); padding: 1rem 1.05rem; background: var(--cream);
  text-decoration: none; color: inherit; display: block;
}
.card h3 { margin: .15rem 0 .25rem; font-size: 1.2rem; }
.meta { font-size: .78rem; color: var(--mute); text-transform: uppercase; letter-spacing: .1em; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-bottom: 1px solid var(--rule); }
form.stack { display: flex; flex-direction: column; gap: .55rem; }
input, textarea, select {
  font: inherit; padding: .72rem .8rem; border: 1px solid var(--rule); background: var(--cream); color: var(--ink);
}
label { font-size: .8rem; color: var(--mute); letter-spacing: .04em; }
.hint { font-size: .8rem; color: var(--mute); margin: .2rem 0 0; }
.choices { display: flex; flex-direction: column; gap: .55rem; margin: 1.1rem 0; }
.choices button {
  text-align: left; background: var(--cream); border: 1px solid var(--rule);
  padding: .9rem 1rem; font: inherit; cursor: pointer; min-height: 44px; width: 100%;
  color: var(--ink);
}
.choices button:hover, .choices button:focus { border-color: var(--olive); background: #fff; }
.quiz-page { max-width: 36rem; }
.quiz-page h1 { font-size: clamp(1.45rem, 5.6vw, 2.1rem); margin: 0 0 .35rem; }
.quiz-progress { margin: .35rem 0 1.05rem; }
.quiz-page .choices { gap: .65rem; }
.quiz-page .choices button {
  padding: 1rem 1.1rem; min-height: 52px; border-radius: 10px;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent);
}
.quiz-next, .join-next { margin-top: 1.3rem; }
.join-page { max-width: 28rem; }
.join-page h1 { font-size: clamp(1.5rem, 6vw, 2.2rem); }
.join-form { margin-top: 1rem; }
.join-page input {
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  border-radius: 0; padding-left: 0;
}
.join-success .meta.ok { letter-spacing: .1em; }
.ok { color: #2c5a3c; }
.no { color: var(--brick); }
.check {
  display: flex; gap: .55rem; align-items: flex-start;
  color: var(--ink); text-transform: none; letter-spacing: 0; font-size: .95rem;
}
.check input { width: 1.15rem; height: 1.15rem; min-width: 1.15rem; min-height: 1.15rem; margin-top: .15rem; }
.progress-label { font-size: .88rem; color: var(--mute); letter-spacing: .02em; margin: 0; font-weight: 600; }
.identity { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .8rem; }
.avatar, .avatar-fallback {
  width: 6.15rem; height: 6.15rem; border-radius: 50%; flex-shrink: 0;
  object-fit: cover;
  box-shadow:
    0 0 0 2px var(--cream),
    0 0 0 3.5px color-mix(in srgb, var(--gold) 55%, var(--olive) 18%),
    0 8px 18px color-mix(in srgb, var(--ink) 12%, transparent);
}
.avatar-fallback {
  display: grid; place-items: center;
  background: linear-gradient(165deg, color-mix(in srgb, var(--olive) 18%, var(--cream)), color-mix(in srgb, var(--gold) 14%, var(--cream)));
  color: var(--olive-2);
  font-family: Fraunces, serif; font-size: 1.55rem; font-weight: 700;
}
.identity-meta {
  margin: 0 0 .2rem;
  font-size: .9rem;
  color: var(--mute);
  line-height: 1.35;
}
.crumb { margin: 0 0 .4rem; font-size: .9rem; }
.crumb a { text-decoration: none; }
.name-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem;
  margin: 0 0 .15rem;
}
.tagline { margin: .35rem 0 0; }
.hometown { margin: .15rem 0 0; }
.cta-primary { margin: .15rem 0 1.05rem; }
.cta-primary .hint { margin-top: .5rem; }
.btn-hero {
  font-weight: 600; font-size: 1.05rem; min-height: 48px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--olive) 18%, transparent);
}
.cta-join { margin: 1.15rem 0 0; }
.verse {
  background: var(--cream); border-left: 3px solid var(--gold);
  padding: .85rem 1rem; margin: 0 0 .9rem;
}
.verse blockquote {
  margin: .3rem 0 0; font-family: Fraunces, serif; font-size: 1.12rem; line-height: 1.4; color: var(--ink);
}
.testimony .lede { margin: 0 0 .95rem; line-height: 1.55; }
.testimony .lede:last-of-type { margin-bottom: 0; }
.athlete-socials {
  margin: .7rem 0 0;
  font-size: .88rem;
  color: var(--mute);
  letter-spacing: .01em;
}
.athlete-socials a {
  color: var(--mute);
  text-decoration: none;
}
.athlete-socials a:hover, .athlete-socials a:focus {
  color: var(--olive);
  text-decoration: underline;
}
.cause { margin-top: .15rem; }
.athlete-page { max-width: 36rem; }
.athlete-page h1 {
  font-size: clamp(1.65rem, 6vw, 2.35rem);
  margin: 0;
  line-height: 1.1;
}
.athlete-page h2 {
  font-size: 1.18rem;
  margin: 1.35rem 0 .55rem;
}
.verified-badge {
  display: inline-flex; align-items: center; gap: .28rem;
  margin: 0; padding: .14rem .52rem .14rem .36rem;
  font-size: .68rem; font-weight: 600; line-height: 1;
  color: var(--olive-2);
  background: color-mix(in srgb, var(--olive) 12%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--olive) 22%, var(--rule));
  border-radius: 999px;
  text-transform: none; letter-spacing: .03em;
}
.verified-mark {
  display: grid; place-items: center;
  width: .9rem; height: .9rem; border-radius: 50%;
  background: var(--olive); color: var(--paper);
  font-size: .58rem; font-weight: 700; line-height: 1;
}
.status-pill { display: inline-block; margin-left: .35rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.kind-badge {
  display: inline-block; margin-left: .4rem; padding: .12rem .45rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--olive-2);
  background: color-mix(in srgb, var(--olive) 12%, var(--cream));
  border: 1px solid color-mix(in srgb, var(--olive) 22%, var(--rule));
  border-radius: 999px;
}
.claim-banner {
  margin: 0 0 .9rem; padding: .7rem .85rem;
  background: var(--cream); border: 1px solid var(--rule);
  font-size: .95rem;
}
.claim-banner a { font-weight: 600; }
.me-empty { max-width: 28rem; }
.me-cta-secondary { margin-top: .85rem; }
.claim-results { margin-top: 1.2rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.2rem 0; }
.admin-nav {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  margin: 0 0 1.1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--rule);
  font-size: .9rem;
}
.admin-nav a { text-decoration: none; color: var(--mute); min-height: 44px; display: inline-flex; align-items: center; }
.admin-nav a.on, .admin-nav a:hover { color: var(--ink); }
.admin-search {
  display: flex; flex-wrap: wrap; gap: .55rem; align-items: stretch;
  margin: 0 0 1.2rem; max-width: 40rem;
}
.admin-search input, .admin-search select { flex: 1; min-width: 10rem; }
.stats a.stat { text-decoration: none; color: inherit; }
.preview-page { max-width: 36rem; border: 1px solid var(--rule); padding: 1.1rem 1.2rem; background: var(--cream); margin: 1rem 0 1.4rem; }
.quiz-q { border: 1px solid var(--rule); padding: 1rem; margin: 0 0 1rem; background: var(--cream); }
.flash { background: #efe3c6; padding: .65rem 1.4rem; text-align: center; font-size: .92rem; }
.meter { height: 8px; background: var(--rule); margin: .45rem 0 1rem; border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 8px; background: var(--gold); border-radius: 99px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.me-nav { margin: 0 0 1rem; }
.me-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  align-items: start;
}
.me-form { max-width: 36rem; }
.phone-preview {
  position: sticky;
  top: 5.6rem;
  border: 8px solid var(--ink);
  border-radius: 1.7rem;
  width: 260px;
  background: var(--paper);
  padding: .75rem .7rem 1rem;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--ink) 12%, transparent);
}
.phone-preview-label { margin: 0 0 .55rem; text-align: center; }
.phone-preview-inner { max-width: none; font-size: .82rem; }
.phone-preview-inner h1 { font-size: 1.15rem; }
.phone-preview-inner h2 { font-size: 1rem; margin: 1rem 0 .45rem; }
.phone-preview-inner .avatar,
.phone-preview-inner .avatar-fallback { width: 2.8rem; height: 2.8rem; font-size: .9rem; }
.phone-preview-inner .athlete-socials { font-size: .78rem; margin-top: .45rem; }
.phone-preview-inner .lede { font-size: .92rem; }
.phone-preview-inner .verified-badge { font-size: .58rem; padding: .1rem .4rem .1rem .28rem; }
.cause-head {
  font-family: Fraunces, serif; font-weight: 500;
  font-size: 1rem; color: var(--mute);
  letter-spacing: 0; margin: .85rem 0 .35rem;
}
.cause-edit { opacity: .92; }
.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .35rem 0 1rem; }
.chip {
  background: var(--cream);
  border: 1px solid var(--rule);
  color: var(--ink);
  font: inherit;
  font-size: .85rem;
  padding: .45rem .7rem;
  min-height: 44px;
  cursor: pointer;
  border-radius: 999px;
}
.chip:hover, .chip:focus { border-color: var(--olive); }
.empty-teach {
  border: 1px solid var(--rule);
  background: var(--cream);
  padding: 1rem 1.05rem;
  margin: 0 0 1.1rem;
}
.share-hero { margin: 1.2rem 0 2rem; }
.share-row { display: flex; gap: .5rem; margin: 1rem 0; }
.share-row input { flex: 1; min-width: 0; }
.me-next { margin: 1.4rem 0 0; }
.me-next .btn-ghost { margin-top: .45rem; }
.team-people { margin-top: 2rem; }
@media (max-width: 800px) {
  .me-layout { grid-template-columns: 1fr; }
  .phone-preview { position: static; width: min(280px, 100%); }
}
.btn-rust {
  background: var(--rust); color: #f7efe3; gap: .4rem;
  font-weight: 600; letter-spacing: .04em;
}
.btn-rust:hover { background: var(--rust-2); }
body.home-page {
  background-color: var(--parchment);
  background-image:
    radial-gradient(120% 70% at 100% 0%, #e7c392 0%, transparent 42%),
    radial-gradient(70% 45% at 90% 18%, rgba(196, 122, 72, .2), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.62  0 0 0 0 0.54  0 0 0 0 0.4  0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-blend-mode: multiply, normal, multiply;
}
body.home-page .nav {
  background: color-mix(in srgb, var(--parchment) 88%, white);
  border-bottom-color: #e0d2bb;
}
body.home-page main {
  width: 100%;
  max-width: none;
  margin: 0;
}
.home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 0 1.8rem;
}
.home-sky { order: -1; }
.home-copy { min-width: 0; padding: 1.05rem 1.1rem 0; }
.home-line {
  font-family: Fraunces, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.02rem;
  color: #5c5348;
  margin: 0 0 1.35rem;
  line-height: 1.35;
}
.home-line:after {
  content: "";
  display: block;
  width: 4.6rem;
  height: 1px;
  margin-top: .55rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.home-hero { padding: 0 0 .35rem; }
.home-hero h1 { max-width: 11ch; }
.home-cta { margin: 1.15rem 0 0; }
.home-values { margin: 1.15rem 0 0; }
.home-values ul {
  list-style: none; padding: 0; margin: 0;
  border: 1px solid color-mix(in srgb, var(--rule) 80%, #cbb99a);
  background: color-mix(in srgb, var(--cream) 82%, white);
}
.home-values li {
  display: flex; gap: .75rem; align-items: center;
  padding: .55rem .8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 78%, #4a4036);
}
.home-values li:last-child { border-bottom: 0; }
.home-value-icon {
  width: 2.05rem; height: 2.05rem; flex: 0 0 auto;
  color: var(--rust);
}
.home-value-icon svg { display: block; width: 100%; height: 100%; }
.home-value-copy { min-width: 0; }
.home-values strong {
  display: block;
  font-family: Fraunces, serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.02em;
}
.home-value-copy > span {
  display: block;
  color: var(--mute);
  font-size: .9rem;
  line-height: 1.3;
  margin-top: .04rem;
}
.home-roster { margin: 1.4rem 0 0; }
.home-roster h2 {
  margin: 0 0 .55rem;
  display: flex; align-items: center; gap: .75rem;
}
.home-roster h2:after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 55%, var(--rule));
}
.home-roster ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .42rem; }
.home-roster a {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; color: inherit;
  min-height: 52px;
  padding: .55rem .7rem .55rem .6rem;
  background: color-mix(in srgb, var(--cream) 88%, white);
  border: 1px solid color-mix(in srgb, var(--rule) 70%, #d2c3a8);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent);
}
.home-roster a:hover, .home-roster a:focus-visible {
  border-color: color-mix(in srgb, var(--rust) 35%, var(--rule));
  background: #fffaf2;
}
.home-roster a:focus-visible {
  outline: 2px solid var(--olive); outline-offset: 2px;
}
.home-roster-mark {
  width: 2.05rem; height: 2.05rem; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  font-family: Fraunces, serif; font-weight: 700; font-size: .92rem;
  color: var(--cream);
  background: var(--rust);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cream) 80%, white);
}
.home-roster li:nth-child(5n+2) .home-roster-mark { background: #5b6a4e; }
.home-roster li:nth-child(5n+3) .home-roster-mark { background: #4e5d6e; }
.home-roster li:nth-child(5n+4) .home-roster-mark { background: #a07a3a; }
.home-roster li:nth-child(5n+5) .home-roster-mark { background: #6b5c70; }
.home-roster-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .08rem; }
.home-roster-copy strong {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600;
}
.home-roster-copy span {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mute);
}
.home-roster-go { color: var(--mute); font-size: 1.35rem; line-height: 1; padding-bottom: .1rem; }
.home-roster-more { margin: .7rem 0 0; font-size: .92rem; }
.home-roster-more a { color: var(--ink); }
.home-sky {
  position: relative;
  min-height: 12.5rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f3e6d4 0%, #e6a66a 42%, #7a6a8c 78%, #4a4f5e 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.home-sky img {
  display: block; width: 100%; height: 100%;
  min-height: 12.5rem;
  object-fit: cover; object-position: 58% 42%;
}
@media (min-width: 840px) {
  .home {
    grid-template-columns: minmax(22rem, 34rem) minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    min-height: calc(100vh - 5.4rem);
  }
  .home-copy { order: 0; padding: 1.7rem clamp(1.2rem, 4vw, 3.2rem) 2.4rem; }
  .home-sky {
    order: 0; min-height: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 16%);
  }
  .home-sky img { min-height: 100%; object-position: 46% 46%; }
  .home-hero h1 { max-width: 10ch; }
}
@media (max-width: 720px) {
  body.home-page main { width: 100%; margin: 0; }
}
.auth-wrap { min-height: 58vh; display: grid; place-items: start center; padding-top: 1.2rem; }
.auth { width: min(420px, 100%); background: var(--cream); border: 1px solid var(--rule); padding: 1.6rem 1.45rem 1.4rem; }
.auth h1 { font-size: 1.85rem; }
.tabs { display: flex; margin: 0 0 1.15rem; border-bottom: 1px solid var(--rule); }
.tabs a { flex: 1; text-align: center; text-decoration: none; color: var(--mute); padding: .55rem 0 .65rem; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--olive); font-weight: 600; }
.auth .btn { margin-top: .45rem; }
.auth-foot { margin: 1rem 0 0; font-size: .88rem; color: var(--mute); text-align: center; }
.social { display: flex; flex-direction: column; gap: .45rem; margin: 0 0 .9rem; }
.social-btn { margin: 0 !important; }
.or { text-align: center; color: var(--mute); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .85rem; position: relative; }
.or span { background: var(--cream); padding: 0 .55rem; position: relative; z-index: 1; }
.or:before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--rule); }
@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; }
  nav { gap: .45rem; font-size: .84rem; }
  .nav { padding-left: 1rem; padding-right: 1rem; }
  main { width: min(920px, calc(100% - 1.6rem)); margin: 1.25rem auto 2.2rem; }
  .btn-ghost { margin-left: 0; }
  .btn-block.btn-ghost { margin-top: .45rem; }
  footer { padding: 1.2rem 1rem; }
  .identity { gap: .85rem; }
  .avatar, .avatar-fallback { width: 5.6rem; height: 5.6rem; }
  .athlete-page h1 { font-size: clamp(1.65rem, 6vw, 2.35rem); }
}
