/* Trollscantsing Archive: tokens + components. Generated from the design system (night is the default theme; add data-theme="vellum" on <html> for parchment). */

/* Self-hosted fonts (latin subset) with metric-matched fallbacks to avoid layout shift. */
@font-face{font-family:"Cinzel";font-style:normal;font-weight:500 700;font-display:swap;src:url(/fonts/cinzel-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Spectral";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/spectral-400-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Spectral";font-style:normal;font-weight:600;font-display:swap;src:url(/fonts/spectral-600-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Spectral";font-style:italic;font-weight:400;font-display:swap;src:url(/fonts/spectral-400i-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/plex-mono-400-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/plex-mono-500-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Cinzel Fallback";src:local("Georgia Bold"),local("Georgia-Bold"),local("Georgia");font-weight:500 700;size-adjust:104.31%;ascent-override:93.57%;descent-override:35.66%;line-gap-override:0%;}
@font-face{font-family:"Spectral Fallback";src:local("Georgia"),local("Georgia-Regular");font-weight:400 600;size-adjust:100.38%;ascent-override:105.50%;descent-override:46.12%;line-gap-override:0%;}
@font-face{font-family:"Spectral Fallback";font-style:italic;src:local("Georgia Italic"),local("Georgia-Italic");size-adjust:90.37%;ascent-override:117.19%;descent-override:51.24%;line-gap-override:0%;}
:root, [data-theme="night"]{--surface-000:#0e0c0a;--surface-100:#17130f;--surface-200:#211b14;--line:#3d3328;--gold:#c9a45c;--gold-bright:#e8cb8a;--ink:#efe6d4;--ink-muted:#a99a88;--ember:#a8361c;--ember-hover:#bf4224;--on-ember:#fff3e2;--faction-light:#9cc3e0;--faction-damned:#e07a6c;--shadow-bevel:inset 0 1px 0 rgba(255,236,200,0.18), inset 0 -2px 0 rgba(0,0,0,0.35);--shadow-panel:0 1px 0 rgba(255,236,200,0.04), 0 12px 32px rgba(0,0,0,0.45);}
[data-theme="vellum"]{--surface-000:#f3ead8;--surface-100:#fbf6ea;--surface-200:#e9dcc1;--line:#c2ad86;--gold:#7a571a;--gold-bright:#5f430f;--ink:#231a10;--ink-muted:#5e4f3d;--ember:#a3311a;--ember-hover:#b83b20;--on-ember:#fff3e2;--faction-light:#1f5a86;--faction-damned:#9a2c22;--shadow-bevel:inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 0 rgba(60,30,10,0.25);--shadow-panel:0 1px 0 rgba(255,255,255,0.6), 0 10px 24px rgba(80,50,20,0.12);}
:root{--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--space-12:48px;--space-16:64px;--radius-none:0;--radius-sm:2px;--measure-text:68ch;--measure-page:960px;--font-display:"Cinzel", "Cinzel Fallback", Georgia, serif;--font-serif:"Spectral", "Spectral Fallback", Georgia, "Times New Roman", serif;--font-mono:"IBM Plex Mono", ui-monospace, Menlo, monospace;}
html{background:var(--surface-000);color-scheme:dark}html[data-theme="vellum"]{color-scheme:light}body{margin:0}

/* Trollscantsing Archive components. Values come from tokens.css (generated from tokens.json). */

/* ---------- base ---------- */
.tcs-page {
  background: var(--surface-000);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 30px;
  -webkit-font-smoothing: antialiased;
}
.tcs-page a { color: var(--gold-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tcs-page a:hover { text-decoration-thickness: 2px; }
.tcs-page :focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.tcs-wrap { max-width: var(--measure-page); margin: 0 auto; padding: 0 var(--space-4); }
.tcs-prose { max-width: var(--measure-text); }

.tcs-h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 6vw, 52px); line-height: 1.1; letter-spacing: .02em; margin: 0; }
.tcs-h1 em { font-style: normal; color: var(--gold-bright); }
.tcs-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 4vw, 30px); line-height: 1.25; letter-spacing: .04em; margin: 0 0 var(--space-8); }
.tcs-h3 { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 28px; letter-spacing: .03em; margin: 0 0 var(--space-2); }
.tcs-lede { font-style: italic; font-size: 21px; line-height: 33px; color: var(--ink); margin: 0; }
.tcs-muted { color: var(--ink-muted); }
.tcs-eyebrow { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.tcs-section { padding: var(--space-12) 0; scroll-margin-top: var(--space-6); }
@media (min-width: 720px) { .tcs-section { padding: var(--space-16) 0; } }

/* ---------- Button ---------- */
.tcs-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: .12em; text-transform: uppercase;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--gold); border-radius: var(--radius-sm);
  background: var(--surface-200); color: var(--gold-bright);
  box-shadow: var(--shadow-bevel);
  text-decoration: none; cursor: pointer;
  transition: background-color .12s ease, transform .06s ease;
}
.tcs-btn:hover { background: var(--surface-100); text-decoration: none; }
.tcs-btn:active { transform: translateY(1px); box-shadow: none; }
.tcs-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.tcs-btn--primary { background: var(--ember); color: var(--on-ember); border-color: var(--gold); }
.tcs-btn--primary:hover { background: var(--ember-hover); color: var(--on-ember); }
.tcs-btn--lg { font-size: 16px; padding: 14px var(--space-8); }
.tcs-btn .tcs-btn__glyph { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }
.tcs-page a.tcs-btn, a.tcs-btn { text-decoration: none; }
.tcs-page a.tcs-btn--primary, a.tcs-btn--primary { color: var(--on-ember); }

/* ---------- Badge ---------- */
.tcs-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--gold); border-radius: var(--radius-sm);
  color: var(--gold); background: transparent;
}
.tcs-badge--solid { background: var(--surface-200); }
.tcs-badge--light { color: var(--faction-light); border-color: var(--faction-light); }
.tcs-badge--damned { color: var(--faction-damned); border-color: var(--faction-damned); }
.tcs-badge__dot { width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }

/* ---------- Panel: square frame with gold corner brackets ---------- */
.tcs-panel {
  position: relative;
  background: var(--surface-100);
  border: 1px solid var(--line);
  padding: var(--space-6);
  box-shadow: var(--shadow-panel);
}
.tcs-panel::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  --c: var(--gold); --l: 14px; --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}
.tcs-panel__title { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 28px; letter-spacing: .03em; margin: 0 0 var(--space-2); }
.tcs-panel > :last-child { margin-bottom: 0; }
.tcs-panel--call { text-align: center; padding: var(--space-8) var(--space-6); }
.tcs-panel--call p { margin: 0 auto var(--space-6); max-width: 52ch; }

/* ---------- Divider: hairline with a gold diamond ---------- */
.tcs-divider { display: flex; align-items: center; gap: var(--space-3); color: var(--gold); margin: 0; border: 0; }
.tcs-divider::before, .tcs-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tcs-divider__gem { width: 8px; height: 8px; border: 1px solid var(--gold); transform: rotate(45deg); flex: none; }
.tcs-divider__gem + .tcs-divider__gem { background: var(--gold); }

/* ---------- DataTable: the ledger ---------- */
.tcs-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface-100); }
.tcs-table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 27px; }
.tcs-table th {
  text-align: left; vertical-align: bottom;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); background: var(--surface-200);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--gold);
}
.tcs-table td { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); vertical-align: top; }
.tcs-table tr:first-child td { border-top: 0; }
.tcs-table tbody tr:hover td { background: var(--surface-200); }
.tcs-table td:first-child { font-weight: 600; white-space: nowrap; }
.tcs-table .tcs-data { font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 400; color: var(--gold-bright); }

/* ---------- QuestLog: the table of contents ---------- */
.tcs-quest { counter-reset: q; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 640px) { .tcs-quest { grid-template-columns: 1fr 1fr; column-gap: var(--space-8); } }
.tcs-quest li { counter-increment: q; border-bottom: 1px solid var(--line); }
.tcs-quest a {
  display: flex; align-items: baseline; gap: var(--space-3);
  padding: 10px 0; color: var(--ink); text-decoration: none;
}
.tcs-quest a::before {
  content: counter(q, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--gold);
}
.tcs-quest a:hover { color: var(--gold-bright); }
.tcs-quest a:hover::after { content: "\25B8"; margin-left: auto; color: var(--gold); font-size: 14px; }

/* ---------- FAQ ---------- */
.tcs-faq { border-top: 1px solid var(--line); }
.tcs-faq details { border-bottom: 1px solid var(--line); }
.tcs-faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) 0;
  font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 27px; letter-spacing: .03em;
}
.tcs-faq summary::-webkit-details-marker { display: none; }
.tcs-faq summary::before {
  content: "+"; flex: none; width: 22px; height: 22px; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 14px; color: var(--gold);
  border: 1px solid var(--gold); border-radius: var(--radius-sm);
}
.tcs-faq details[open] summary::before { content: "\2212"; background: var(--surface-200); }
.tcs-faq summary:hover { color: var(--gold-bright); }
.tcs-faq .tcs-faq__a { padding: 0 0 var(--space-6) 34px; max-width: var(--measure-text); }
.tcs-faq .tcs-faq__a p { margin: 0; }

/* ---------- Masthead ---------- */
.tcs-mast { position: relative; padding: var(--space-16) 0 var(--space-12); border-bottom: 1px solid var(--line); }
.tcs-mast__badges { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.tcs-mast__rule { margin: var(--space-6) 0; max-width: 320px; }
.tcs-mast__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-8); }
.tcs-mast__note { font-size: 15px; line-height: 24px; color: var(--ink-muted); }

/* ---------- Footer, sources ---------- */
.tcs-sources { font-size: 15px; line-height: 24px; color: var(--ink-muted); padding-left: var(--space-6); }
.tcs-sources li { margin-bottom: var(--space-1); }
.tcs-footer { border-top: 1px solid var(--line); padding: var(--space-8) 0 var(--space-12); font-size: 15px; line-height: 24px; color: var(--ink-muted); }

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

/* ---------- Site additions: inline code, figures ---------- */
.tcs-page *, .tcs-page *::before, .tcs-page *::after { box-sizing: border-box; }
.tcs-page code { font-family: var(--font-mono); font-size: .85em; color: var(--gold-bright); overflow-wrap: anywhere; }
.tcs-figure { margin: var(--space-8) 0; padding: var(--space-2); background: var(--surface-100); border: 1px solid var(--line); box-shadow: var(--shadow-panel); }
.tcs-figure img { display: block; width: 100%; height: auto; }
.tcs-panel--call .tcs-figure { margin: 0 auto var(--space-6); }
