:root {
  color-scheme: dark;
  --wood: #211810;
  --text: #d9cdb9;
  --cream: #f5e6c9;
  --gold: #e1b76c;
  --muted: #b9a78a;
  --line: #5a432b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: radial-gradient(ellipse at 84% 6%, #69432140, transparent 34rem), repeating-linear-gradient(91deg, #ffffff02 0, #ffffff02 1px, transparent 1px, transparent 9px), var(--wood); color: var(--text); font: 1.0625rem/1.85 Georgia, 'Times New Roman', serif; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--cream); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 2px; }
.skip-link { position: absolute; top: -100px; left: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--cream); color: var(--wood); }
.skip-link:focus { top: 1rem; }
.masthead, main, footer { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.masthead { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--cream); text-decoration: none; font-size: 1.25rem; letter-spacing: .025em; }
.header-link, .eyebrow, .section-number, .contents, .text-link, .discord-button, footer { font-family: 'Segoe UI', Arial, sans-serif; }
.header-link { color: var(--gold); font-size: .82rem; text-decoration: none; }
.header-link span { margin-left: .5rem; }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 2rem; min-height: 535px; padding: 60px 0 70px; }
.eyebrow { text-transform: uppercase; letter-spacing: .17em; font-size: .68rem; font-weight: 600; color: var(--gold); }
.eyebrow span { margin: 0 .45em; }
h1, h2 { color: var(--cream); font-weight: normal; line-height: 1.18; }
h1 { font-size: clamp(2.8rem, 5.3vw, 4.5rem); letter-spacing: -.04em; margin: 22px 0 10px; }
.hero-line { margin: 0; color: var(--gold); font-size: 1.7rem; font-style: italic; }
.hero-intro { max-width: 410px; margin: 23px 0; color: var(--text); font-size: 1.075rem; }
.text-link { display: inline-block; font-size: .8rem; color: var(--gold); text-decoration: none; border-bottom: 1px solid #ad7e45; padding-bottom: 5px; }
.text-link span { margin-left: 22px; }
.emblem-wrap { position: relative; filter: drop-shadow(0 15px 22px #0008); }
.emblem { display: block; width: 100%; height: auto; clip-path: ellipse(48% 46% at 50% 50%); }
.charter-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 65px; border-top: 1px solid var(--line); padding: 60px 0 75px; align-items: start; }
.contents { position: sticky; top: 36px; font-size: .8rem; line-height: 1.6; }
.contents .eyebrow { margin: 0 0 23px; }
.contents ol { list-style: none; counter-reset: chapter; padding: 0; margin: 0; }
.contents li { counter-increment: chapter; margin: 0 0 5px; }
.contents a { display: flex; align-items: baseline; padding: 7px 0; text-decoration: none; }
.contents a::before { content: '0' counter(chapter); color: var(--gold); font-size: .65rem; min-width: 28px; }
.contents-note { color: var(--muted); border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; font-family: Georgia, serif; font-size: 1rem; font-style: italic; line-height: 1.7; }
.charter section { border-bottom: 1px solid var(--line); margin-bottom: 42px; padding-bottom: 35px; scroll-margin-top: 1rem; }
.section-number { color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-size: .65rem; margin: 0 0 14px; }
h2 { font-size: clamp(1.65rem, 2.6vw, 2.15rem); letter-spacing: -.025em; margin: 0 0 25px; }
.charter p { margin-top: 0; margin-bottom: 19px; }
.charter p:last-child { margin-bottom: 0; }
.charter .joining { border: 1px solid #77552e; background: linear-gradient(135deg, #a66b1f16, #a66b1f04); padding: 35px; margin: 0 -36px; }
.welcome { font-size: 1.4rem; color: var(--cream); padding-top: 10px; }
.discord-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; padding: 12px 23px; margin-top: 9px; background: #dfb46b; color: #291b0d; border: 1px solid #f2cf8d; font-size: .875rem; font-weight: 600; text-decoration: none; box-shadow: 0 4px 18px #0003; }
.discord-button:hover { background: #f0cd8f; color: #291b0d; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding: 26px 0 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
footer a { text-decoration: none; }
.footer-dot { padding: 0 .6rem; color: var(--gold); }
@media (max-width: 900px) {
  .masthead, main, footer { width: calc(100% - 48px); }
  .hero { min-height: auto; gap: 10px; padding-block: 45px; }
  .hero-line { font-size: 1.45rem; }
  .charter-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 30px; }
  .charter .joining { margin-inline: 0; padding: 25px; }
}
@media (max-width: 640px) {
  .masthead, main, footer { width: calc(100% - 40px); }
  .masthead { min-height: 75px; }
  .wordmark { font-size: 1.05rem; }
  .header-link { font-size: .7rem; }
  .hero { display: flex; flex-direction: column-reverse; gap: 16px; text-align: center; padding: 28px 0 42px; }
  .emblem-wrap { width: min(65vw, 280px); }
  .hero-copy { width: 100%; }
  .hero .eyebrow { font-size: .6rem; letter-spacing: .12em; }
  h1 { margin-top: 16px; font-size: clamp(2.6rem, 10vw, 3.5rem); }
  .hero-intro { margin-inline: auto; }
  .charter-layout { display: block; padding-top: 30px; padding-bottom: 40px; }
  .contents { position: static; border-bottom: 1px solid var(--line); padding-bottom: 23px; margin-bottom: 35px; }
  .contents .eyebrow { margin-bottom: 14px; }
  .contents ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .contents a { font-size: .75rem; }
  .contents-note { display: none; }
  .charter section { margin-bottom: 32px; padding-bottom: 25px; }
  .charter .joining { padding: 24px 20px; }
  footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root { color-scheme: light; }
  body { background: white; color: #222; font-size: 11pt; }
  .masthead, .contents, .text-link, footer, .emblem-wrap, .skip-link { display: none; }
  main { width: 100%; }
  .hero { display: block; padding: 0 0 20px; text-align: left; }
  h1, h2, .hero-line, .eyebrow, .section-number, .welcome { color: #4b341b; }
  .hero-intro { max-width: none; }
  .charter-layout { display: block; padding: 20px 0; }
  .charter .joining { margin: 0; padding: 20px; background: none; }
  h2 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .discord-button { background: none; color: #222; box-shadow: none; }
  .discord-button::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}
