/* QuestLock's site: privacy, terms and the field guide. Lantern's paper and ink (QuestLock/DesignSystem/Tokens.swift,
   V3Parchment.swift), Alegreya from the app's bundled fonts (SIL Open Font License, fonts/OFL-*.txt). No build step. */
@font-face { font-family: "Alegreya"; src: url("fonts/Alegreya-Variable.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/AlegreyaSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("fonts/AlegreyaSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya SC"; src: url("fonts/AlegreyaSC-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --night: #17110E; --surface: #211812; --edge: #3D2E24; --bone: #F1E3CC; --muted: #A8927A;
  --paper: #EFE2C8; --paper-deep: #E3D0AE; --ink: #33200F; --label: #6B4A2E; --wax: #9B2D24; --brass: #B98A45;
}
* { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 1.125rem/1.6 "Alegreya Sans", system-ui, sans-serif;
  background: radial-gradient(ellipse 80% 40% at 50% 0, #5A3D26 0, var(--night) 70%) no-repeat, var(--night);
  min-height: 100vh; padding: 0 1rem 4rem;
}
header.top { max-width: 46rem; margin: 0 auto; padding: 2rem 0 1.25rem; display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
header.top a.home { font: 700 1.6rem/1 "Alegreya", Georgia, serif; color: var(--bone); text-decoration: none; letter-spacing: .01em; }
header.top nav { display: flex; gap: 1rem; flex-wrap: wrap; }
header.top nav a { font: 500 1rem/1 "Alegreya SC", Georgia, serif; color: var(--muted); text-decoration: none; letter-spacing: .04em; }
header.top nav a:hover, header.top nav a[aria-current] { color: var(--bone); }
main {
  max-width: 46rem; margin: 0 auto; padding: 2.25rem clamp(1.25rem, 5vw, 3rem) 2.5rem;
  background: linear-gradient(var(--paper), var(--paper-deep)); border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 18px 50px rgba(0,0,0,.55);
}
h1, h2, h3 { font-family: "Alegreya", Georgia, serif; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 800; margin: 0 0 .35rem; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 2.25rem 0 .5rem; padding-top: 1rem; border-top: 1px solid rgba(107,74,46,.3); }
h3 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 .35rem; }
p, ul, ol, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: .25rem 0; }
a { color: var(--wax); text-underline-offset: .15em; }
strong { font-weight: 700; }
.meta { font: 500 .95rem/1.4 "Alegreya SC", Georgia, serif; color: var(--label); letter-spacing: .03em; margin-bottom: 1.5rem; }
.lede { font-size: 1.25rem; }
.short { background: rgba(255,255,255,.35); border-left: 3px solid var(--brass); padding: 1rem 1.25rem .25rem; border-radius: 0 4px 4px 0; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid rgba(107,74,46,.25); }
th { font: 500 .95rem/1.3 "Alegreya SC", Georgia, serif; color: var(--label); letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }
details { border-bottom: 1px solid rgba(107,74,46,.25); padding: .6rem 0; }
details > summary { cursor: pointer; font: 700 1.15rem/1.35 "Alegreya", Georgia, serif; list-style-position: outside; }
details[open] > summary { margin-bottom: .5rem; }
.toc { columns: 2 14rem; font-size: 1rem; }
code { font-size: .95em; }
footer { max-width: 46rem; margin: 1.5rem auto 0; color: var(--muted); font-size: .95rem; text-align: center; }
footer a { color: var(--muted); }
@media (prefers-color-scheme: dark) { main { box-shadow: 0 18px 50px rgba(0,0,0,.7); } }
@media print { body { background: none; padding: 0; } header.top, footer { display: none; } main { box-shadow: none; background: none; } }

/* Shared accessibility and navigation additions. */
:focus-visible { outline: 3px solid #DB7A3E; outline-offset: 4px; }
.skip { position: absolute; top: -5rem; left: 1rem; padding: .8rem; background: var(--paper); color: var(--ink); z-index: 10; }
.skip:focus { top: 1rem; }
header.top nav a, footer a { display: inline-block; padding-block: .5rem; }
header.top nav a { color: #C0AD95; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
