/* Lantern: generated from tokens.json. Night is the default; add data-theme="parchment" for light mode. */
:root, [data-theme="night"] {
  color-scheme: dark;
  --ground: #15121a;
  --surface: #1d1924;
  --raised: #241f2c;
  --ink: #efe6d6;
  --ink-muted: #a99e8e;
  --line: #3a3242;
  --line-strong: #74688a;
  --bar-ground: #0e0c12;
  --bar-ink: #d9cfbd;
  --bar-muted: #958a7b;
  --bar-line: #2c2633;
  --site-home: #e2b65c;
  --site-translator: #9aa8f5;
  --site-loomwright: #e8849f;
  --site-hearthlight: #da7134;
  --site-adventure: #7fc4a0;
  --site-echowright: #62c0d8;
  --on-site: #15121a;
  --danger: #ff8d8d;
  --success: #8fd19e;
}
[data-theme="parchment"] {
  color-scheme: light;
  --ground: #efe6d4;
  --surface: #f8f2e5;
  --raised: #fffcf5;
  --ink: #241c14;
  --ink-muted: #6b5c49;
  --line: #d8c9ae;
  --line-strong: #94805e;
  --site-home: #8a5a12;
  --site-translator: #3d4fb8;
  --site-loomwright: #a8345a;
  --site-hearthlight: #a8481a;
  --site-adventure: #286b4a;
  --site-echowright: #1d6478;
  --on-site: #fffcf5;
  --danger: #b3261e;
  --success: #2e6b3a;
}
:root {
  --font-display: "Alegreya SC", Georgia, serif;
  --font-sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --font-serif: Alegreya, Georgia, serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 40px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-round: 50%;
}
.display-xl { font-family: var(--font-display); font-size: 52px; line-height: 1; font-weight: 700; letter-spacing: 0.01em; }
.display-l { font-family: var(--font-display); font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: 0.01em; }
.title { font-family: var(--font-display); font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: 0.02em; }
.label-sc { font-family: var(--font-display); font-size: 15px; line-height: 1.3; font-weight: 500; letter-spacing: 0.1em; }
.body { font-family: var(--font-sans); font-size: 16px; line-height: 1.5; font-weight: 400; }
.small { font-family: var(--font-sans); font-size: 14px; line-height: 1.45; font-weight: 400; }
.kicker { font-family: var(--font-sans); font-size: 12px; line-height: 1.2; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.prose { font-family: var(--font-serif); font-size: 18px; line-height: 1.7; font-weight: 400; }

/* Lantern shared pieces. Optional: sites may copy these or write their own, as long as they follow the README. */

/* Which site this is: set data-site on <html> or any wrapper. */
[data-site] { --site: var(--site-home); }
[data-site="translator"] { --site: var(--site-translator); }
[data-site="loomwright"] { --site: var(--site-loomwright); }
[data-site="hearthlight"] { --site: var(--site-hearthlight); }
[data-site="adventure"] { --site: var(--site-adventure); }
[data-site="echowright"] { --site: var(--site-echowright); }

/* Family bar: always night, whatever the page theme (give it data-theme="night"). */
.lantern-bar { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: 7px var(--space-4); background: var(--bar-ground); color: var(--bar-muted); border-bottom: 1px solid var(--bar-line); font: 13px/1.3 var(--font-sans); }
.lantern-bar .lantern-mark { width: 15px; height: 15px; flex: none; color: var(--site); }
.lantern-bar .lantern-word { color: var(--bar-ink); font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-decoration: none; }
.lantern-bar nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--space-4); }
.lantern-bar nav a { color: var(--bar-muted); text-decoration: none; }
.lantern-bar nav a:hover { color: var(--bar-ink); }
.lantern-bar nav a[aria-current="page"] { color: var(--site); }
.lantern-bar nav a[aria-current="page"]::before { content: "\25C6\00a0"; font-size: 9px; vertical-align: 2px; }

/* Family footer */
.lantern-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); padding: 10px var(--space-4); background: var(--bar-ground); color: var(--bar-muted); border-top: 1px solid var(--bar-line); font: 12px/1.4 var(--font-sans); }
.lantern-foot b { color: var(--bar-ink); font-family: var(--font-display); font-weight: 500; letter-spacing: .04em; }
.lantern-foot a { color: var(--bar-muted); }

/* The Lantern rule: a hairline with a diamond in the middle. Set --rule-bg to whatever is behind it. */
.lantern-rule { position: relative; height: 1px; background: var(--line); margin-block: var(--space-3); }
.lantern-rule::after { content: "\25C6"; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); padding: 0 8px; font-size: 11px; line-height: 16px; color: var(--site); background: var(--rule-bg, var(--ground)); }

/* Kicker */
.lantern-kicker { font: 700 12px/1.2 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--site); }

/* Glow: one per screen at most */
.lantern-glow { background-image: radial-gradient(70% 120% at 20% -20%, color-mix(in srgb, var(--site) 14%, transparent), transparent 70%); }

/* Buttons */
.lantern-btn { font: 700 14px/1.2 var(--font-sans); padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.lantern-btn:hover { border-color: var(--site); }
.lantern-btn:focus-visible, .lantern-bar a:focus-visible { outline: 2px solid var(--site); outline-offset: 2px; }
.lantern-btn.is-primary { background: var(--site); border-color: var(--site); color: var(--on-site); }
.lantern-btn.is-danger { color: var(--danger); border-color: var(--danger); }

/* Panel */
.lantern-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-4); color: var(--ink); }
.lantern-panel > h2, .lantern-label { margin: 0 0 var(--space-2); font: 500 15px/1.3 var(--font-display); letter-spacing: .1em; color: var(--ink-muted); }
