/* Inner pages: a dark title band, then content. Keeps the class names the page scripts rely on. */
body { display: flex; flex-direction: column; min-height: 100svh; }
main { flex: 1 0 auto; }

.page-top { position: relative; padding: clamp(116px, 13vw, 190px) 0 clamp(26px, 3.6vw, 52px); overflow: clip; }
.page-top::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 90% at 78% 0%, rgba(180, 246, 93, .13), transparent 70%); pointer-events: none; }
.page-title { position: relative; width: min(var(--wrap), calc(100% - var(--gutter) * 2)); margin-inline: auto; font-size: clamp(42px, 7.4vw, 120px); }
.page-sub { position: relative; width: min(var(--wrap), calc(100% - var(--gutter) * 2)); margin: clamp(12px, 1.6vw, 22px) auto 0; font-weight: 500; font-size: clamp(19px, 1.7vw, 25px); line-height: 1.3; color: var(--muted); }
.page-body { padding: clamp(14px, 2vw, 28px) 0 clamp(64px, 9vw, 130px); }
.page-grid { display: grid; gap: clamp(28px, 4vw, 52px); }
.page-note { max-width: 70ch; color: var(--muted); }

/* Status lines. */
.draft-banner, .notice { max-width: 80ch; padding: 14px 18px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-m); background: rgba(244, 245, 239, .03); line-height: 1.45; }
.draft-banner.is-open { background: var(--lime); border-color: var(--lime); color: #11150e; font-weight: 600; }
.challenge-capacity { font-weight: 600; }
.placeholder-legal { max-width: 72ch; font-size: 15.5px; color: var(--muted); }

/* Sections on a content page. */
.panel { display: grid; align-content: start; gap: 14px; padding: clamp(22px, 2.6vw, 38px); border: 1px solid var(--hairline); border-radius: var(--radius-l); background: linear-gradient(180deg, rgba(244, 245, 239, .05), rgba(244, 245, 239, .018)); }
.panel h2 { font-size: clamp(24px, 2.4vw, 36px); font-weight: 750; font-stretch: 118%; letter-spacing: -.015em; }
.panel h3 { margin-top: 8px; }
.panel p { max-width: 72ch; color: var(--muted); }
.panel p strong { color: var(--bone); font-weight: 600; }
.panel-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.placeholder-task-list { display: grid; gap: 10px; max-width: 72ch; }
@media (max-width: 760px) { .panel-pair { grid-template-columns: 1fr; } }

.challenge-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.challenge-facts article { padding: clamp(18px, 2vw, 28px); border: 1px solid var(--hairline); border-radius: 18px; background: rgba(244, 245, 239, .03); }
.challenge-facts span { display: block; font-size: 15px; color: var(--muted); }
.challenge-facts strong { display: block; margin-top: 8px; font-weight: 750; font-stretch: 112%; font-size: clamp(20px, 2vw, 30px); line-height: 1.12; letter-spacing: -.015em; overflow-wrap: anywhere; }
@media (max-width: 760px) { .challenge-facts { grid-template-columns: 1fr 1fr; } }
.challenge-dates { display: grid; }
.challenge-dates > div { display: grid; grid-template-columns: minmax(120px, .6fr) 1fr; gap: 16px; padding: 11px 0; border-top: 1px solid var(--hairline); }
.challenge-dates dt { color: var(--muted); }
.criteria-list { display: grid; }
.criteria-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.criteria-row strong { font-weight: 500; }
.criteria-row span { font-weight: 700; white-space: nowrap; color: var(--lime); }
.challenge-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 8px; }
.admin-data-note { color: var(--muted); font-size: 15.5px; }

.season-countdown { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: clamp(20px, 2.4vw, 32px); border-radius: var(--radius-l); background: var(--lime); color: #11150e; }
.season-countdown h2 { font-size: clamp(22px, 2.6vw, 36px); }
.season-countdown p { color: inherit; }
.season-countdown strong { font-style: italic; font-weight: 800; font-stretch: 112%; font-size: clamp(38px, 5vw, 72px); line-height: 1; letter-spacing: -.03em; white-space: nowrap; }

/* Results */
.results-list { display: grid; gap: clamp(14px, 1.6vw, 22px); }
.results-card { display: grid; gap: 8px; }
.results-card .results-card { padding: clamp(22px, 2.6vw, 38px); border: 1px solid var(--hairline); border-radius: var(--radius-l); background: rgba(244, 245, 239, .03); }
.panel-overline { display: block; color: var(--muted); }
.results-card h2 { font-size: clamp(22px, 2.4vw, 34px); font-stretch: 118%; }
.results-winner { font-style: italic; font-weight: 800; font-stretch: 112%; font-size: clamp(38px, 6vw, 88px); line-height: 1; letter-spacing: -.03em; color: var(--lime); overflow-wrap: anywhere; }
.challenge-copy { max-width: 72ch; color: var(--muted); }
.results-list > .challenge-copy { padding: clamp(22px, 2.6vw, 38px); border: 1px solid var(--hairline); border-radius: var(--radius-l); background: rgba(244, 245, 239, .03); max-width: none; }

/* Forms */
.auth { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 110px); align-items: start; }
.auth-aside { display: grid; gap: 14px; max-width: 42ch; }
.aside-lede { font-weight: 650; font-stretch: 110%; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.2; letter-spacing: -.012em; }
.auth-aside p:not(.aside-lede) { color: var(--muted); }
.auth-card { display: grid; gap: 14px; width: 100%; max-width: 560px; padding: clamp(22px, 2.8vw, 40px); border: 1px solid var(--hairline); border-radius: var(--radius-l); background: linear-gradient(180deg, rgba(244, 245, 239, .055), rgba(244, 245, 239, .018)); }
.auth-card > p { color: var(--muted); }
.auth-form { display: grid; gap: 8px; }
.auth-form label { margin-top: 10px; font-weight: 500; }
.auth-form input[type='email'], .auth-form input[type='password'], .auth-form input[type='text'] { width: 100%; min-height: 54px; padding: 0 14px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-m); background: rgba(244, 245, 239, .05); color: var(--bone); font-size: 17px; transition: border-color .18s, background-color .18s; }
.auth-form input:hover { border-color: rgba(244, 245, 239, .5); }
.auth-form input:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; background: rgba(244, 245, 239, .08); }
.auth-form input::placeholder { color: #848d79; }
.auth-form input[readonly] { opacity: .7; }
.auth-submit { width: 100%; margin-top: 12px; }
.auth-submit.is-loading { opacity: .7; cursor: progress; }
.quiet-button { justify-self: start; min-height: 40px; padding: 4px 0; border: 0; background: none; color: var(--link); font-weight: 500; font-size: 15.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.field-help { font-size: 15px; color: var(--muted); }
.form-message { min-height: 1.4em; font-weight: 500; }
.form-message:empty { min-height: 0; }
.form-message.is-error { color: var(--alert); }
.form-message.is-success { color: var(--success); }
.invite-notice { padding: 12px 16px; border-radius: var(--radius-m); background: var(--lime); color: #11150e; }
.auth-switch { margin-top: 2px; }
.auth-switch a { color: var(--link); font-weight: 500; text-underline-offset: 3px; }
.auth-admin-note { font-size: 14.5px; color: var(--muted); }
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-card { order: -1; max-width: none; }
}

/* Food log page */
.plain-list { display: grid; }
.plain-list li { padding: 11px 0; border-top: 1px solid var(--hairline); }
.consent-line { display: flex; gap: 10px; align-items: flex-start; max-width: 60ch; }
.consent-line input { flex: none; width: 22px; height: 22px; margin-top: 3px; accent-color: var(--lime); }
