/* Mythos Forge — shared parchment theme (light = parchment, dark = candlelit leather).
   Loaded by every page. Switching is done with <html data-theme="light|dark"> by theme.js. */

:root {
  color-scheme: light;
  --bg: #ebdec1; --bg2: #e2d2ae; --panel: #f6eed9; --panel2: #efe3c6;
  --line: #d6c49d; --line2: #a88e5c;
  --ink: #2b2013; --muted: #5a4830; --dim: #7a6748;
  --brass: #86581a; --brass2: #5d3a0c; --gold: #b58a2f;
  --ember: #9a2c1b; --arcane: #1b645e; --arcane2: #a9c7bb;
  --ok: #3a6a27; --warn: #8a5700; --bad: #9a2c1b;
  --accent: #8b2918; --accent-hi: #a33826; --accent-lo: #5f1a0e; --on-accent: #fbf0d3;
  --on-gold: #2b2013; --on-ember: #fbf0d3; --on-arcane: #fbf0d3; --on-ink: #f6eed9;
  --shade: rgba(74, 46, 8, .30);
  --paper-a: #f4e9d0; --paper-b: #d9c69a;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .3 0 0 0 0 .12 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --head: 'IM Fell English SC', 'Cinzel', Georgia, 'Times New Roman', serif;
  --body: 'Alegreya', Georgia, 'Times New Roman', serif;
  --label: 'Alegreya Sans SC', 'Alegreya Sans', 'Trebuchet MS', sans-serif;
  --r: 4px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17130f; --bg2: #1e1913; --panel: #241e17; --panel2: #2d261d;
  --line: #40362a; --line2: #66553d;
  --ink: #efe5d0; --muted: #bcad93; --dim: #8e7f6a;
  --brass: #d2a24d; --brass2: #efce85; --gold: #c9a24e;
  --ember: #e0794a; --arcane: #6dcfc0; --arcane2: #2c5b55;
  --ok: #93cf7c; --warn: #f0b455; --bad: #ef7b72;
  --accent: #a53f29; --accent-hi: #bd4f36; --accent-lo: #6b2616; --on-accent: #fbf0d3;
  --on-gold: #1c1408; --on-ember: #1c0e06; --on-arcane: #08231f; --on-ink: #1c1610;
  --shade: rgba(0, 0, 0, .55);
  --paper-a: #231d16; --paper-b: #120f0c;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .66 0 0 0 0 .42 0 0 0 .45 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; font-synthesis-weight: none; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); font: 18px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image: var(--noise), radial-gradient(ellipse 120% 90% at 50% 0%, var(--paper-a) 0%, var(--bg) 58%, var(--paper-b) 130%);
}
h1, h2, h3, h4, h5 { font-family: var(--head); font-weight: 400; letter-spacing: .02em; margin: 0; line-height: 1.15; color: var(--brass2); }
::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 2px solid var(--arcane); outline-offset: 2px; }

/* ---------- shared pieces ---------- */
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line2); border-radius: 50%; background: var(--panel); color: var(--brass2); cursor: pointer; padding: 0; transition: background .15s, border-color .15s; }
.theme-toggle:hover { background: var(--panel2); border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }

.orn { display: flex; align-items: center; gap: 14px; color: var(--line2); margin: 0 auto; max-width: 520px; }
.orn::before, .orn::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line2)); }
.orn::after { background: linear-gradient(270deg, transparent, var(--line2)); }
.orn i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--gold); }

.wax { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent) 55%, var(--accent-lo)); color: var(--on-accent); font: 400 .7rem/1.1 var(--head); text-align: center; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 2px 4px var(--shade), inset 0 0 0 4px rgba(0, 0, 0, .12), inset 0 0 0 5px rgba(255, 255, 255, .18); transform: rotate(-8deg); }

@media print {
  :root, :root[data-theme] { --bg: #fff; --bg2: #fff; --panel: #fff; --panel2: #fff; --line: #bbb; --line2: #888; --ink: #111; --muted: #444; --dim: #666; --brass: #6a470d; --brass2: #3d2605; --ember: #8a2a18; --arcane: #0b5d55; --ok: #2c6b17; --noise: none; --paper-a: #fff; --paper-b: #fff; }
  body { background: #fff; }
}

/* Tip jar link at the bottom of every page (added by theme.js). Kept here, not injected, because the site's security policy only allows stylesheet files. */
p.tipjar { display: block; margin: 28px auto 18px !important; padding: 0 16px; max-width: none; text-align: center !important; font: 12.5px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; font-style: normal !important; opacity: .7; }
p.tipjar a { color: inherit; font: inherit !important; text-decoration: underline; text-underline-offset: 2px; letter-spacing: 0; text-transform: none; }
p.tipjar a:hover, p.tipjar a:focus-visible { opacity: 1; }
@media print { p.tipjar { display: none !important; } }
