/* ==================================================================
   Run for the Mind - information pages (About, Contact, Terms, Privacy,
   Refunds, Shipping, FAQ, Race day, 404). Loads after theme.css and
   styles.css; tokens and primitives (page opening, numbered rows, FAQ
   accordions, buttons, arrow links) come from there. This file only
   lays these pages out.
   ================================================================== */

/* ---------- Shell: reading column, article beside the side navigation ---------- */
.policy-main { padding-block: 0 clamp(2rem, 5vw, 4rem); }
.policy-layout { display: grid; gap: 2.5rem; }
@media (min-width: 64rem) {
  .policy-layout { grid-template-columns: minmax(0, 1fr) 15rem; gap: 4rem; align-items: start; }
  .policy-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.policy-layout.has-rule { border-top: 1px solid var(--hair); padding-top: clamp(2rem, 4vw, 3rem); }

/* An eyebrow that carries a config value (the race-day date) stays on one line; the rule gives way */
.page-open .eyebrow > span { white-space: nowrap; }

/* "Last updated" under the title, and the "In short:" lead-in inside the lede */
.policy-meta { margin: 1.5rem 0 0; font-family: var(--font-body); font-size: var(--fs-micro); font-weight: 500; color: var(--stone); }
.policy-meta span { color: var(--champagne); }
.lede strong { color: var(--ink); font-weight: 500; }

/* ---------- Article ---------- */
.policy-body { min-width: 0; max-width: 68ch; }
.policy-body h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.65rem; line-height: 1.15; color: var(--ink); max-width: none; margin: 2.75rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid var(--hair); scroll-margin-top: 6rem; }
.policy-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.policy-body h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.2rem; line-height: 1.25; color: var(--ink); margin: 1.5rem 0 .4rem; }
.policy-body p, .policy-body li { font-size: 1rem; line-height: 1.65; color: var(--ink-2); }
.policy-body strong { color: var(--ink); font-weight: 600; }
.policy-body a { color: var(--gold); font-weight: 500; text-decoration: underline; text-underline-offset: .18em; text-decoration-color: rgb(17 17 17 / .45); }
.policy-body a:hover { color: var(--champagne); text-decoration-color: currentColor; }
.policy-body ul { list-style: none; margin: .5rem 0 1.25rem; padding: 0; }
.policy-body ul > li { position: relative; padding-left: 1.4rem; }
.policy-body ul > li::before { content: ""; position: absolute; left: .15rem; top: .62em; width: 6px; height: 6px; border: 1px solid var(--champagne); transform: rotate(45deg); opacity: .7; }
.policy-body ol { margin: .5rem 0 1.25rem; padding-left: 1.4rem; }
.policy-body li + li { margin-top: .45rem; }
/* The registration form links to /terms#waiver; land it clear of the fixed header */
#waiver { scroll-margin-top: 6rem; }

/* ---------- Side navigation across the information pages ---------- */
.policy-nav h2 { margin: 0 0 .5rem; font-family: var(--font-body); font-size: var(--fs-micro); font-weight: 500; color: var(--stone); max-width: none; }
.policy-nav ul { list-style: none; margin: 0; padding: 0; }
.policy-nav li { border-top: 1px solid var(--hair); }
.policy-nav li:last-child { border-bottom: 1px solid var(--hair); }
.policy-nav a { position: relative; display: block; padding: .75rem 0; color: var(--ink-2); text-decoration: none; font-size: .92rem; transition: color .3s var(--ease), padding-left .3s var(--ease); }
.policy-nav a:hover, .policy-nav a:focus-visible { color: var(--champagne); }
.policy-nav a[aria-current="page"] { color: var(--gold); padding-left: 1.1rem; }
.policy-nav a[aria-current="page"]::before { content: ""; position: absolute; left: .1rem; top: 50%; width: 6px; height: 6px; margin-top: -4px; background: var(--gold); transform: rotate(45deg); }

/* ---------- Contact: numbered rows beside the form ---------- */
.contact-layout { display: grid; gap: 2.5rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
@media (min-width: 64rem) {
  .contact-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
}
.contact-rows .value > span[data-requires] { display: block; }
.contact-rows .value > a, .contact-rows .value > span a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hair-hover); transition: color .3s var(--ease), border-color .3s var(--ease); }
.contact-rows .value > a:hover, .contact-rows .value > span a:hover { color: var(--champagne); border-color: var(--champagne); }
.contact-rows .value > a.is-placeholder { border-bottom: 0; }
.contact-rows .value p { margin-top: .4rem; }
.contact-form .h3 { margin-bottom: .5rem; }
.contact-form .form-intro { margin: 0 0 1.5rem; color: var(--ink-2); font-size: .95rem; }
.contact-form .field + .field { margin-top: 1.1rem; }
.contact-form textarea { min-height: 9rem; }
.contact-form .form-footer { align-items: flex-start; flex-direction: column; gap: .75rem; }
.contact-form .form-status:empty { display: none; }
.contact-unavailable { margin-top: 0; }
.contact-unavailable p:last-child { margin: 0; }

/* ---------- FAQ page ---------- */
.faq-page .faq { max-width: 60rem; }
.faq-page .faq summary { font-size: 1.4rem; padding: 1.3rem 0; }
.faq-more { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Race day: each heading beside its numbered rows ---------- */
.rd-section { padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--hair); }
.rd-section:first-of-type { border-top: 0; padding-top: 0; }
.rd-section .h2 { margin-bottom: 1.5rem; font-size: clamp(1.75rem, 3vw, 2.4rem); }
@media (min-width: 64rem) {
  .rd-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 2rem 4rem; align-items: start; }
  .rd-section .h2 { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 1.5rem); }
}
.rd-section .rows .value .link-arrow { min-height: 0; padding-block: .2rem; }
.rd-section .rows .value a:not(.link-arrow) { color: var(--gold); }
.rd-note { margin: 1rem 0 0; font-size: .95rem; color: var(--ink-2); max-width: 60ch; }
.rd-cta { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; margin-top: clamp(2rem, 4vw, 3rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--hair); }

/* ---------- 404 ---------- */
.nf-main { padding-block: 0 clamp(3rem, 6vw, 5rem); min-height: 60vh; }
.nf-code { font-family: var(--font-serif); font-weight: 400; font-size: clamp(6rem, 24vw, 15rem); line-height: .8; color: var(--ink); font-variant-numeric: lining-nums; }
.nf-actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.nf-links { display: flex; flex-wrap: wrap; gap: 0 2.5rem; margin-top: 1.5rem; }
.nf-note { margin: 2rem 0 0; max-width: 60ch; color: var(--ink-2); }
