:root {
  --bg: #0f0d0b;
  --surface: #1a1714;
  --line: #2c2620;
  --text: #ece4d6;
  --muted: #a99d8b;
  --road: #e0393e;
  --gold: #d9b26a;
  --max: 720px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--text); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 22px; font-weight: 600;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; image-rendering: pixelated; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

main { padding: 48px 0 64px; }

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(34px, 6vw, 52px); margin: 0 0 12px; }
h2 { font-size: 28px; margin: 44px 0 10px; }
h3 { font-size: 21px; margin: 28px 0 6px; }
p, li { color: var(--text); }
.lead { color: var(--muted); font-size: 19px; margin-top: 0; }
.meta { color: var(--muted); font-size: 14px; }
ul { padding-left: 22px; }
li { margin: 6px 0; }

.hero { text-align: center; padding: 24px 0 8px; }
.hero img.icon {
  width: 132px; height: 132px; border-radius: 28px; image-rendering: pixelated;
  box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0,0,0,.5);
}
.road {
  display: block; width: 100%; max-width: 520px; height: 70px; margin: 28px auto 8px;
}
.road path { fill: none; stroke: var(--road); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 0; }
.quote {
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic;
  color: var(--muted); font-size: 21px; margin: 8px auto 0; max-width: 460px;
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 6px; }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 15px; }

.box { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--road); border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.box p { margin: 6px 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.table-scroll { overflow-x: auto; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { padding-top: 22px; padding-bottom: 32px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--muted); }
footer.site .disclaimer { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); opacity: .85; }

/* ---------- Script easter egg (see /sources for credits) ---------- */
@font-face {
  font-family: "Alcarin Tengwar";
  src: url("https://cdn.jsdelivr.net/gh/Tosche/Alcarin-Tengwar@a4530d430ea01871b0b0a54d1de218d2ffde0ea5/Fonts%20Static/AlcarinTengwar-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Constructium";
  src: url("https://cdn.jsdelivr.net/gh/kreativekorp/open-relay@e4b81241e8c7269a91c0bd865cf5c9e7208fbada/Constructium/Constructium.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+E080-E0FF;
}
.soon { text-align: center; margin-top: 40px; }
.eyebrow { color: var(--gold); margin: 22px 0 0; }
.tw { font-family: "Alcarin Tengwar", serif; font-style: normal; font-weight: 400; font-size: 1.15em; line-height: 1.9; letter-spacing: .01em; }
.cr { font-family: "Constructium", serif; font-style: normal; font-weight: 400; font-size: 1.05em; line-height: 1.8; letter-spacing: .06em; word-spacing: .25em; }
h1 .tw, h1 .cr { font-size: .9em; }
.rom { display: block; font-family: "Inter", system-ui, sans-serif; font-size: 14px; font-style: normal; font-weight: 400; color: var(--muted); letter-spacing: 0; line-height: 1.5; margin-top: 4px; }
.rom i { color: var(--gold); }
[data-script="elv"] .road path, [data-script="dw"] .road path { stroke-dasharray: 2 10; }
[data-k][title] { cursor: help; }

.script-switch { display: inline-flex; align-items: center; gap: 6px; }
.script-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  font: 500 12px/1 "Inter", system-ui, sans-serif; cursor: pointer;
}
.script-switch button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.script-switch button svg.glyph { fill: currentColor; stroke: none; }
.script-switch button:hover { color: var(--text); border-color: var(--muted); }
.script-switch button[aria-pressed="true"] { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.script-switch .src { margin-left: 6px; }
