/* Rules share the library's forest, ivory, typography and card treatment. */
:root {
  color-scheme: light;
  --ink: #243d36;
  --muted: #53635d;
  --paper: #f6f5ee;
  --forest: #142d28;
  --line: #d5dacd;
  --gold: #8a641d;
  --gold-light: #d9b968;
  --sage: #e9ecdf;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 system-ui, sans-serif; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible { outline: 3px solid #b58c36; outline-offset: 4px; }
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.2; text-wrap: balance; }
p { margin: .75rem 0; }
.skip-link { position: fixed; z-index: 30; top: -6rem; left: 1rem; padding: .75rem 1rem; color: var(--forest); background: #fff; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

/* The canonical logo stays small, intact and on its dark brand background. */
.masthead { display: flex; justify-content: center; padding: 12px 20px 16px; background: var(--forest); color: #faf5e8; }
.brand-mark { display: grid; justify-items: center; text-decoration: none; }
.brand-mark picture { display: block; width: 210px; }
.brand-mark img { width: 100%; height: auto; }
.brand-mark span { font-size: .65rem; letter-spacing: .16em; text-transform: uppercase; color: #d5dccf; }
.asterra-nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #3d5145; }
.asterra-nav a[aria-current="page"] { color: var(--gold-light); text-decoration: underline; text-underline-offset: 6px; }

/* Compact introduction, with the approved small poster beside the text. */
.hero { border-bottom: 1px solid var(--line); }
.hero-content { display: grid; grid-template-columns: minmax(0, 1fr) 168px; align-items: center; gap: 24px 40px; max-width: 960px; margin: auto; padding: 36px 24px 28px; }
.hero-copy { min-width: 0; }
.eyebrow, .status-kicker, .index-label { color: var(--gold); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { margin: 0 0 16px; }
.campaign-heading { display: grid; gap: 6px; margin: 0; }
.rules-prefix { font: 600 .9rem/1.4 system-ui, sans-serif; color: var(--muted); }
.campaign-title { font-size: clamp(2.1rem, 4vw, 3.4rem); letter-spacing: -.035em; }
.hero-lede { max-width: 60ch; margin: 16px 0; color: var(--muted); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .75rem; color: var(--muted); }
.hero-tags span { padding-left: 12px; position: relative; }
.hero-tags span::before { content: ""; position: absolute; width: 4px; height: 4px; left: 0; top: .65em; border-radius: 50%; background: var(--gold); }
.hero-action { margin: 20px 0 0; }
.hero-action a, .primary-link, .registration-cta a, .secondary-link { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600; }
.hero-action a:hover, .primary-link:hover, .registration-cta a:hover { background: var(--forest); }
.secondary-link { color: var(--ink); background: transparent; border-color: #a6b29f; }
.secondary-link:hover { background: #dce2d4; }
.poster-frame { width: 168px; margin: 0; padding: 5px; border: 1px solid #b9bfae; border-radius: 10px; background: #fff; }
.poster-frame img { width: 100%; border-radius: 6px; }
.destiny-seal { display: flex; grid-column: 1 / -1; align-items: center; justify-content: center; gap: 18px; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .8rem; }
.destiny-seal p { margin: 0; }
.destiny-seal span { color: var(--gold); font-size: .6rem; }
.destiny-seal strong { color: var(--ink); font-weight: 600; }

main { max-width: 960px; margin: auto; padding: 28px 24px 48px; }
.campaign-status { padding: 24px; border: 1px solid #b8c2ad; border-radius: 12px; background: var(--sage); margin-bottom: 20px; }
.status-kicker { margin: 0 0 8px; }
.campaign-status h2 { margin: 0 0 12px; font-size: clamp(1.45rem, 3vw, 1.85rem); }
.campaign-status p:not(.status-kicker) { max-width: 78ch; color: var(--muted); font-size: .95rem; }
.campaign-status strong { color: var(--ink); }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* A single collapsible index keeps the reading column free of empty space. */
.desktop-index { display: none; }
.mobile-index { margin: 0 0 20px; padding: 0 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mobile-index summary { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 12px; font-weight: 650; cursor: pointer; list-style: none; }
.mobile-index summary::-webkit-details-marker { display: none; }
.mobile-index summary span { color: var(--gold); font-size: 1.15rem; }
.mobile-index[open] summary span { transform: rotate(45deg); }
.mobile-index ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; padding: 8px 0 18px; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.mobile-index a { display: flex; align-items: center; min-height: 44px; padding: 6px 8px; border-radius: 6px; font-size: .875rem; line-height: 1.45; text-decoration: none; }
.mobile-index a:hover { background: var(--sage); text-decoration: underline; }
.rules-content { min-width: 0; }
.rule-section { margin: 0 0 14px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.section-heading { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.rule-section h2 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.65rem); }
.section-number, .section-glyph { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--sage); color: var(--gold); font: 600 .75rem/1 system-ui, sans-serif; }
.collapsible { padding: 0 24px; }
.collapsible > .section-heading { grid-template-columns: 32px minmax(0, 1fr) 28px; margin: 0; min-height: 76px; padding: 18px 0; border-bottom: 0; cursor: pointer; list-style: none; }
.collapsible > .section-heading::-webkit-details-marker { display: none; }
.collapsible > .section-heading:hover h2 { color: var(--gold); }
.collapsible[open] { padding-bottom: 20px; }
.collapsible[open] > .section-heading { border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.collapse-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sage); color: var(--ink); font: 1.2rem/1 system-ui, sans-serif; }
.collapsible[open] .collapse-icon { transform: rotate(45deg); }
.rule-section h3 { color: var(--ink); margin: 24px 0 8px; font-size: 1.15rem; }
.rule-section p, .rule-section li { color: var(--muted); }
.rule-section strong { color: var(--ink); }
.rule-section a:not(.registration-cta a) { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.rule-section em { color: var(--gold); }
.rule-section ul, .rule-section ol { margin: 16px 0; padding-left: 24px; }
.rule-section li { padding-left: 4px; margin: 8px 0; }
.rule-section li::marker { color: var(--gold); font-weight: 600; }
.rule-section > :last-child { margin-bottom: 0; }
.rule-section blockquote { margin: 20px 0; padding: 12px 18px; border-left: 3px solid var(--gold-light); background: var(--paper); border-radius: 0 8px 8px 0; }
.rule-section blockquote p { color: var(--ink); }
.registration-format { white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0; padding: 18px; background: var(--sage); border: 1px solid var(--line); border-radius: 8px; font: .875rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.registration-cta { margin: 16px 0; }
.page-footer { display: flex; justify-content: center; align-items: center; gap: 14px; max-width: 912px; margin: auto; padding: 24px 20px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.page-footer img { width: 44px; height: 44px; border-radius: 50%; }
.page-footer strong { color: var(--ink); font-family: Georgia, serif; }
.page-footer p { margin: 4px 0 0; }

@media (max-width: 620px) {
  html { scroll-padding-top: 8.5rem; }
  .masthead { padding: 8px 16px 12px; }
  .brand-mark picture { width: 180px; }
  .hero-content { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 26px 18px 22px; gap: 22px; text-align: center; }
  .hero-tags { justify-content: center; }
  .hero .eyebrow { font-size: .68rem; }
  .hero-lede { font-size: .95rem; }
  .poster-frame { width: 136px; }
  .destiny-seal { width: 100%; padding-top: 16px; gap: 12px; }
  main { padding: 20px 16px 32px; }
  .campaign-status { padding: 20px; }
  .status-actions { display: grid; grid-template-columns: 1fr; }
  .mobile-index { padding: 0 16px; }
  .mobile-index ol { grid-template-columns: 1fr; }
  .rule-section { padding: 20px 16px; }
  .collapsible { padding: 0 16px; }
  .section-heading { gap: 10px; }
  .collapsible > .section-heading { gap: 10px; }
  .rule-section p, .rule-section li { line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
