:root {
  color-scheme: light;
  --stage: #21191b;
  --stage-line: #544047;
  --cream: #faf3e9;
  --paper: #f6eee2;
  --ink: #271a1c;
  --muted: #62504d;
  --soft: #dacac6;
  --accent: #f6a189;
  --rust: #8b3325;
  --rule: #d2bfb2;
  --display: Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--body);
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
  touch-action: manipulation;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

.dark {
  color: var(--cream);
  background: var(--stage);
}

.dark :focus-visible { outline-color: var(--accent); }

.shell {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 1;
  top: .5rem;
  left: .5rem;
  padding: .5rem .75rem;
  color: var(--ink);
  background: var(--cream);
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--stage-line); }

.header-inner {
  min-height: 4.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.wordmark {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  font-size: 1.25rem;
  font-weight: 780;
  letter-spacing: -.065em;
  text-decoration: none;
}

.wordmark span { color: var(--accent); }

.site-nav, .languages {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 3vw, 2.4rem);
  font-size: .875rem;
}

.site-nav a, .languages a, .languages span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--soft);
}

.site-nav a:hover, .languages a:hover {
  color: var(--cream);
  text-decoration: underline;
}

.languages {
  justify-self: end;
  gap: 0;
}

.languages a {
  min-width: 44px;
  justify-content: center;
}

.languages [aria-current] {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.25rem);
  padding-block: clamp(3rem, 6vw, 5.25rem);
}

.hero h1, .document-header h1, .section-title, .support h2 {
  font: 400 clamp(3.9rem, 6.5vw, 6.2rem)/.99 var(--display);
  letter-spacing: -.075em;
}

.hero h1 em {
  display: block;
  color: var(--accent);
  font-weight: 400;
}

.hero p {
  max-width: 35ch;
  margin-top: 1.5rem;
  color: var(--soft);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 1.75rem;
  padding: .65rem 1.2rem;
  background: var(--accent);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease;
}

.action:hover { background: #ffc1ae; }

.projection {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.53;
  border: 1px solid #744b4f;
  background:
    radial-gradient(ellipse at 72% 33%, #8d3936, transparent 58%),
    radial-gradient(ellipse at 6% 90%, #6a3038, transparent 53%),
    linear-gradient(119deg, #321823 5%, #4f252c 49%, #1b131a 94%);
}

.projection::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(ellipse at 67% 34%, #ffe1ac 0%, #ffb77f 16%, #db654f 39%, #952a39 63%, transparent 81%),
    linear-gradient(145deg, #722837, #b94d44 42%, #3d2029 91%);
  clip-path: polygon(0 90%, 48% 19%, 88% 12%, 97% 61%, 25% 100%, 0 100%);
}

.projection::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(103deg, transparent 0 5px, #1e071426 6px 7px, transparent 9px 15px),
    repeating-linear-gradient(0deg, transparent 0 2px, #2c172d24 3px 4px),
    radial-gradient(ellipse at 61% 38%, transparent 20%, #1d0b1b7a 100%);
}

.projection-frame {
  position: absolute;
  z-index: 1;
  inset: .75rem;
  border: 1px solid #ffccb35c;
}

.directory {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(3.25rem, 6vw, 5.5rem);
}

.section-title, .support h2 {
  font-size: clamp(2.7rem, 4.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.065em;
}

.document-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.document-list li { border-bottom: 1px solid var(--rule); }

.document-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .25rem 1.25rem;
  padding-block: 1.1rem 1.2rem;
  text-decoration: none;
}

.document-link h3 {
  font: 400 clamp(1.45rem, 2.2vw, 1.9rem)/1.15 var(--display);
  letter-spacing: -.035em;
}

.document-link p {
  grid-column: 1;
  color: var(--muted);
  font-size: .925rem;
}

.read-link {
  grid-column: 2;
  grid-row: 1 / 3;
  color: var(--rust);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: underline;
}

.document-link:hover h3 { color: var(--rust); }
.document-link:hover .read-link { text-decoration-thickness: 2px; }

.support {
  border-top: 1px solid var(--rule);
  background: #eedccd;
}

.support-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.support h2 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
.support p { margin-top: .55rem; color: var(--muted); }

.support a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--rust);
  font-size: clamp(1rem, 2.25vw, 1.4rem);
  font-weight: 700;
}

.footer-inner {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  padding-block: 1rem;
  color: var(--soft);
  font-size: .825rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
}

.footer-inner nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.document-header {
  padding-block: clamp(2.5rem, 6vw, 5.4rem);
}

.document-header h1 {
  max-width: 20ch;
  margin-block: 1rem;
  font-size: clamp(3.2rem, 6.2vw, 5.8rem);
  overflow-wrap: anywhere;
}

.back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 700;
}

.document-intro {
  max-width: 62ch;
  color: var(--soft);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.document-date {
  margin-top: 1rem;
  color: var(--soft);
  font-size: .875rem;
}

.document-layout {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 43rem);
  gap: clamp(2rem, 7.5vw, 8rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.contents {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font-size: .875rem;
}

.contents h2 {
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
}

.contents ul {
  list-style: none;
  padding: .4rem 0 0;
}

.contents a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--rust);
}

.document-body section {
  padding-block: 1.9rem;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}

.document-body section:first-child { padding-top: 0; }
.document-body section:last-child { padding-bottom: 0; border: 0; }

.document-body h2 {
  margin-bottom: .65rem;
  font: 400 clamp(1.75rem, 3vw, 2.5rem)/1.14 var(--display);
  letter-spacing: -.045em;
}

.document-body p + p, .document-body ul {
  margin-top: .8rem;
}

.document-body ul { padding-inline-start: 1.25rem; }
.document-body li + li { margin-top: .4rem; }
.document-body a { color: var(--rust); overflow-wrap: anywhere; }

@media (max-width: 55rem) {
  .hero { gap: 2rem; }
  .hero h1 { font-size: clamp(3.3rem, 8vw, 5rem); }
  .directory { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; }
  .document-layout { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
}

@media (max-width: 42rem) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 0 1rem;
    padding-top: .35rem;
  }

  .wordmark {
    grid-column: 1 / -1;
  }

  .hero, .directory, .document-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 2.7rem; }
  .hero h1 { font-size: clamp(3rem, 11vw, 4.6rem); }
  .hero p { margin-top: 1rem; }
  .projection { max-height: 19rem; }
  .directory { padding-block: 2.75rem; }
  .contents { position: static; }
  .document-body section:first-child { padding-top: 1.9rem; border-top: 1px solid var(--rule); }
  .footer-inner { padding-block: 1.25rem; }
}

@media (max-width: 24rem) {
  .shell { width: calc(100% - 2rem); }
  .document-link { grid-template-columns: minmax(0, 1fr); }
  .read-link { grid-column: 1; grid-row: auto; }
  .document-header h1 { font-size: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .action { transition: none; }
}
