/*
 * Wubarrk's Valheim mods: the forge.
 *
 * Dark iron for the ground, ember for the heat, gold leaf for the trim and a thin cold rune-light
 * where something can be used. The same family as the Raven Iron Realms site (Cinzel, Alegreya,
 * carved panels, grain over everything), but a catalogue, not a dashboard.
 *
 *   .stone    a carved-stone plaque: grain, a chiselled edge, gold corner marks
 *   .beam     the iron beam the header hangs from
 *   .btn      the three buttons: ember (do it), iron (go there), ghost (quiet)
 *   .rune-rule the divider: a thread of gold either side of the name in runes
 *
 * Fonts are loaded by index.html (<link>, not @import). No script lives in the HTML (the site's CSP
 * forbids it); styles may be inline.
 */

:root {
  --iron-950: #09090b;
  --iron-900: #0f1013;
  --iron-850: #14161a;
  --iron-800: #1a1d22;
  --iron-700: #262a31;
  --iron-600: #363b44;
  --iron-500: #4d535e;

  --ember: #e0662a;
  --ember-bright: #f2914f;
  --ember-deep: #8d3413;
  --gold-200: #f6e4a6;
  --gold-300: #f0d07a;
  --gold-400: #e8c25a;
  --gold-500: #cfa545;
  --gold-700: #8a6a24;
  --rune: #4cc9e0;
  --rune-bright: #9be8f3;
  --banner: #9b2a22;

  --text: #efe6cf;
  --text-2: #c9bd9c;
  --text-muted: #9a917a;

  --line: rgba(207, 165, 69, 0.26);
  --line-soft: rgba(239, 230, 207, 0.09);

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-deco: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-body: 'Alegreya', Georgia, 'Times New Roman', serif;
  --font-ui: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --font-rune: 'Noto Sans Runic', 'Segoe UI Historic', 'Cinzel', serif;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .82 0 0 0 0 .78 0 0 0 0 .7 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --gutter: clamp(1rem, 4vw, 2rem);
  --maxw: 1180px;
  --header-h: 64px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, .brand-name, .stat-n { font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'clig' 0, 'dlig' 0, 'calt' 0; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
  background-color: var(--iron-950);
  background-image:
    radial-gradient(ellipse 80% 42% at 50% -6%, rgba(224, 102, 42, 0.2), transparent 64%),
    radial-gradient(ellipse 40% 36% at 100% 40%, rgba(76, 201, 224, 0.05), transparent 70%),
    radial-gradient(ellipse 50% 34% at 0% 78%, rgba(155, 42, 34, 0.1), transparent 70%),
    var(--grain),
    linear-gradient(180deg, #0c0b0d 0%, #111114 55%, #08080a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--rune);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgba(224, 102, 42, 0.4); color: #fff; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--gold-400);
  color: #1a1206;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ the beam (header) */

.beam {
  position: sticky;
  top: 0;
  z-index: 60;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 9px),
    var(--grain),
    linear-gradient(180deg, #2a2d34 0%, #17191d 60%, #0f1013 100%);
  border-bottom: 1px solid #000;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.beam::after {
  content: '';
  position: absolute;
  inset: auto 0 -3px 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ember-deep) 12%, var(--ember) 50%, var(--ember-deep) 88%, transparent);
  pointer-events: none;
}

.beam-in {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  box-shadow: 0 0 0 1px #000, 0 0 14px rgba(224, 102, 42, 0.35);
  object-fit: cover;
}
.brand-name {
  display: block;
  font-family: var(--font-deco);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--gold-200);
  text-shadow: 0 1px 0 #000;
}
.brand-sub {
  display: block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}
.nav a {
  padding: 0.42rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-2);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav a:hover { color: var(--gold-200); border-color: var(--gold-700); background: rgba(0, 0, 0, 0.35); }
.nav a.nav-out { color: var(--gold-400); border-color: #4a3b1c; background: linear-gradient(180deg, #2a2216, #17120b); }
.nav a.nav-out:hover { border-color: var(--gold-500); color: var(--gold-200); }

/* ------------------------------------------------------------------ type and ornaments */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember-bright);
}
.kicker .r { font-family: var(--font-rune); font-size: 1.2em; letter-spacing: 0; color: var(--rune); }

.h2 {
  margin: 0;
  font-family: var(--font-deco);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--gold-200);
  text-shadow: 0 2px 0 #000, 0 0 24px rgba(232, 194, 90, 0.2);
}

.rune-rule {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.9rem 0 0;
  max-width: 26rem;
  color: var(--gold-700);
  font-family: var(--font-rune);
  font-size: 1.25rem;
  letter-spacing: 0.35em;
}
.rune-rule::before,
.rune-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-700));
}
.rune-rule::after { background: linear-gradient(270deg, transparent, var(--gold-700)); }

.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section-head { margin-bottom: 1.75rem; max-width: 46rem; }
.section-head p { margin: 0.9rem 0 0; color: var(--text-2); }

/* A carved-stone plaque. */
.stone {
  position: relative;
  background:
    var(--grain),
    linear-gradient(180deg, rgba(34, 37, 44, 0.96), rgba(18, 20, 24, 0.98));
  border: 1px solid #323741;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 12px 26px -12px rgba(0, 0, 0, 0.85);
}
.stone::before {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  --m: rgba(207, 165, 69, 0.5);
  background:
    linear-gradient(var(--m), var(--m)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 100% 100% / 1px 14px no-repeat;
}

/* ------------------------------------------------------------------ buttons and badges */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.5rem 1.05rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}
.btn-ember {
  color: #fff3df;
  background: linear-gradient(180deg, #f0803c 0%, #d15a22 45%, #98380f 100%);
  border-color: #3a1405;
  text-shadow: 0 1px 0 rgba(60, 20, 0, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, 0.5), inset 0 -2px 0 rgba(70, 20, 0, 0.45), 0 0 0 1px rgba(242, 145, 79, 0.3), 0 4px 10px rgba(0, 0, 0, 0.6);
}
.btn-ember:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 220, 170, 0.6), inset 0 -2px 0 rgba(70, 20, 0, 0.45), 0 0 18px rgba(224, 102, 42, 0.5), 0 6px 14px rgba(0, 0, 0, 0.6); }
.btn-iron {
  color: var(--text);
  background: linear-gradient(180deg, #343841, #1d2025);
  border-color: #4b505b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 5px rgba(0, 0, 0, 0.55);
}
.btn-iron:hover { color: var(--gold-200); border-color: var(--gold-500); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 14px rgba(207, 165, 69, 0.25); }
.btn-ghost { color: var(--gold-400); border-color: var(--line); background: rgba(0, 0, 0, 0.25); }
.btn-ghost:hover { color: var(--gold-200); border-color: var(--gold-500); }
.btn-sm { min-height: 2.2rem; padding: 0.35rem 0.8rem; font-size: 0.7rem; }
.btn .arrow { font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--text-2);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #3f4550;
  border-radius: 3px;
}
.badge-ember { color: var(--ember-bright); border-color: rgba(224, 102, 42, 0.55); background: rgba(224, 102, 42, 0.14); }
.badge-gold { color: var(--gold-400); border-color: rgba(207, 165, 69, 0.55); background: rgba(207, 165, 69, 0.12); }
.badge-rune { color: var(--rune); border-color: rgba(76, 201, 224, 0.45); background: rgba(76, 201, 224, 0.1); }

/* ------------------------------------------------------------------ hero */

.hero { position: relative; padding-block: clamp(2rem, 6vw, 3.5rem) clamp(2.5rem, 6vw, 4rem); text-align: center; }
.hero-banner {
  display: block;
  width: min(100%, 760px);
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(168, 129, 47, 0.55), 0 0 0 4px #000, 0 22px 40px -12px rgba(0, 0, 0, 0.9), 0 0 60px rgba(155, 42, 34, 0.25);
  -webkit-mask-image: none;
}
.hero h1 {
  margin: 1.6rem 0 0;
  font-family: var(--font-deco);
  font-weight: 900;
  font-size: clamp(2rem, 7.4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 3px 0 #000, 0 0 34px rgba(224, 102, 42, 0.35);
}
.hero h1 em { font-style: normal; color: var(--ember-bright); }
.hero-lede {
  max-width: 42rem;
  margin: 1rem auto 0;
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  color: var(--text-2);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.hero-lede strong { color: var(--gold-300); font-weight: 700; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.hero .rune-rule { margin-inline: auto; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 44rem;
  margin: 2.2rem auto 0;
  padding: 0;
  list-style: none;
}
.stat { padding: 1rem 0.6rem 0.9rem; text-align: center; }
.stat-n {
  display: block;
  font-family: var(--font-deco);
  font-weight: 700;
  font-size: clamp(1.35rem, 5vw, 2.2rem);
  line-height: 1.1;
  color: var(--gold-300);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(232, 194, 90, 0.3);
  font-variant-numeric: tabular-nums;
}
.stat-l {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stats-note { max-width: 44rem; margin: 0.8rem auto 0; font-size: 0.95rem; color: var(--text-muted); }

/* ------------------------------------------------------------------ highlights */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.feature { display: flex; flex-direction: column; padding: 1.4rem 1.4rem 1.25rem; }
.feature-wide { grid-column: 1 / -1; }
.feature-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.9rem; }
.feature-icon {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 4px;
  background: var(--iron-950);
  border: 2px solid var(--gold-700);
  box-shadow: 0 0 0 1px #000, 0 6px 14px rgba(0, 0, 0, 0.7);
  object-fit: cover;
}
.feature-icon[hidden] { display: none; }
.eyebrow {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember-bright);
}
.feature h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 3.4vw, 1.6rem);
  line-height: 1.2;
  color: var(--gold-200);
}
.live { margin: 0.25rem 0 0; font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tagline { margin: 0 0 0.8rem; font-style: italic; color: var(--text-2); }
.facts { margin: 0 0 1.1rem; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.facts li { position: relative; padding-left: 1.5rem; font-size: 1.04rem; line-height: 1.5; }
.facts li::before {
  content: 'ᚦ';
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-rune);
  color: var(--ember);
  font-size: 1.05em;
}
.facts code, .note code { font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 0.86em; padding: 0.05em 0.35em; background: rgba(0, 0, 0, 0.4); border: 1px solid #353a43; border-radius: 3px; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: auto; }

.credit {
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem;
  font-size: 1.02rem;
  color: var(--text);
  background: linear-gradient(180deg, rgba(155, 42, 34, 0.2), rgba(90, 20, 14, 0.14));
  border: 1px solid rgba(155, 42, 34, 0.55);
  border-left: 4px solid var(--banner);
  border-radius: 3px;
}
.credit strong { color: var(--gold-300); }
.credit .credit-title { display: block; margin-bottom: 0.3rem; font-family: var(--font-display); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember-bright); }
.feature-wide .feature-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.5rem; }
.note { margin: 0 0 1rem; font-size: 0.98rem; color: var(--text-2); }
.note-warn { padding: 0.6rem 0.8rem; border-left: 3px solid var(--gold-500); background: rgba(207, 165, 69, 0.08); border-radius: 0 3px 3px 0; }

/* ------------------------------------------------------------------ catalogue */

.tools { padding: 1.1rem; display: grid; gap: 0.9rem; margin-bottom: 1.25rem; }
.tools-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end; }
.field { display: grid; gap: 0.3rem; flex: 1 1 14rem; min-width: 0; }
.field-small { flex: 0 1 13rem; }
.field label,
.legend {
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--text);
  background: rgba(6, 6, 8, 0.8);
  border: 1px solid #4b505b;
  border-radius: 3px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6);
}
.input:focus { outline: none; border-color: var(--rune); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(76, 201, 224, 0.25); }
select.input { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--gold-500) 50%), linear-gradient(135deg, var(--gold-500) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.input option { background: var(--iron-850); color: var(--text); }

.check { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; font-family: var(--font-ui); font-size: 1rem; color: var(--text-2); cursor: pointer; user-select: none; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ember); }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.chip {
  padding: 0.4rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-2);
  background: linear-gradient(180deg, #2b2f37, #181a1f);
  border: 1px solid #454a55;
  border-radius: 3px;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.chip:hover { color: var(--gold-200); border-color: var(--gold-500); }
.chip[aria-pressed='true'] {
  color: var(--gold-200);
  background: linear-gradient(180deg, #6a3e1a, #3b200c);
  border-color: var(--ember);
  box-shadow: 0 0 12px rgba(224, 102, 42, 0.3);
}
.chip .n { margin-left: 0.35rem; color: var(--text-muted); font-family: var(--font-ui); font-weight: 600; }
.chip[aria-pressed='true'] .n { color: var(--gold-300); }
.chip-more { border-style: dashed; color: var(--gold-400); }

.result-line { margin: 0 0 1rem; font-family: var(--font-ui); font-size: 0.98rem; color: var(--text-muted); min-height: 1.5em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.card { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.15rem 1.15rem 1.05rem; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-3px); border-color: #5b4a26; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.55), 0 16px 30px -12px rgba(0, 0, 0, 0.9), 0 0 22px rgba(224, 102, 42, 0.14); }
.card.is-deprecated { opacity: 0.82; }
.card-head { display: flex; gap: 0.85rem; align-items: center; }
.card-icon { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 4px; background: var(--iron-950); border: 2px solid #5a4620; box-shadow: 0 0 0 1px #000; object-fit: cover; }
.card h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; line-height: 1.25; color: var(--gold-200); overflow-wrap: anywhere; }
.card-pkg { margin: 0.1rem 0 0; font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-muted); overflow-wrap: anywhere; }
.card-ns { margin: 0.1rem 0 0; font-family: var(--font-display); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-400); }
.card-same { margin: 0; font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-2); padding-left: 0.6rem; border-left: 2px solid var(--gold-500); }
.card-meta .via { display: block; margin-top: 0.1rem; font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }
.stale-warning { max-width: 44rem; margin: 0.8rem auto 0; padding: 0.55rem 0.8rem; font-family: var(--font-ui); font-size: 0.92rem; color: var(--ember-bright); border: 1px solid rgba(224, 102, 42, 0.55); background: rgba(224, 102, 42, 0.12); border-radius: 3px; text-align: left; }
.stale-warning[hidden] { display: none; }
.card-desc { margin: 0; font-size: 1.02rem; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.card-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin: 0; padding: 0.65rem 0; border-block: 1px solid var(--line-soft); }
.card-meta div { min-width: 0; }
.card-meta dt { font-family: var(--font-display); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.card-split { margin: 0; font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.card-split:empty { display: none; }
.card-meta dd { margin: 0.1rem 0 0; font-family: var(--font-ui); font-size: 0.98rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }

.empty { padding: 2rem 1.25rem; text-align: center; color: var(--text-2); }
.empty .btn { margin-top: 0.8rem; }

/* ------------------------------------------------------------------ realms */

.realm { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 0; overflow: hidden; }
.realm-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.75rem 1.25rem; text-align: center; background: radial-gradient(ellipse at 50% 40%, rgba(224, 102, 42, 0.2), transparent 70%), rgba(0, 0, 0, 0.3); border-right: 1px solid var(--line-soft); }
.realm-art img { width: min(100%, 300px); border-radius: 4px; box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(168, 129, 47, 0.5), 0 14px 30px -10px rgba(0, 0, 0, 0.9); }
.realm-art p { margin: 0; font-size: 0.98rem; color: var(--text-2); }
.realm-body { padding: 1.6rem 1.6rem 1.4rem; }
.realm-body h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.8rem; margin: 0 0 0.3rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 3.6vw, 1.75rem); color: var(--gold-200); }
.realm-body .tagline { margin-bottom: 1rem; }
.fine {
  margin: 1.1rem 0 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}

/* ------------------------------------------------------------------ community */

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.link-card { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1.1rem 1.15rem; text-decoration: none; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.link-card:hover { transform: translateY(-3px); border-color: var(--gold-700); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 26px -12px #000, 0 0 20px rgba(224, 102, 42, 0.14); }
.link-card:focus-visible { outline-offset: 4px; }
.link-card .lc-rune { font-family: var(--font-rune); font-size: 1.5rem; line-height: 1; color: var(--ember); }
.link-card .lc-name { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--gold-200); }
.link-card .lc-desc { font-size: 0.98rem; color: var(--text-2); }
.link-card .lc-url { margin-top: auto; padding-top: 0.4rem; font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ footer */

.foot { margin-top: 1rem; padding-block: 2.2rem 2.6rem; border-top: 1px solid #000; box-shadow: inset 0 1px 0 rgba(207, 165, 69, 0.22); background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.6)); text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.4rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.foot-links a { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-400); text-decoration: none; }
.foot-links a:hover { color: var(--gold-200); text-decoration: underline; text-underline-offset: 4px; }
.foot p { margin: 0.45rem auto 0; max-width: 46rem; font-size: 0.96rem; color: var(--text-muted); }
.foot .foot-tm { color: var(--text-2); }

/* The 404 page. */
.lost { min-height: calc(100vh - var(--header-h) - 12rem); display: grid; place-items: center; padding-block: 3rem; text-align: center; }
.lost .big { margin: 0; font-family: var(--font-deco); font-weight: 900; font-size: clamp(4rem, 20vw, 9rem); line-height: 1; color: var(--ember); text-shadow: 0 4px 0 #000, 0 0 50px rgba(224, 102, 42, 0.45); }
.lost .rune-rule { margin-inline: auto; }
.lost p { max-width: 32rem; margin: 0.8rem auto 0; color: var(--text-2); }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 900px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature-wide .feature-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .realm { grid-template-columns: minmax(0, 1fr); }
  .realm-art { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 640px) {
  :root { --header-h: auto; }
  body { font-size: 1.06rem; }
  .beam-in { flex-wrap: wrap; padding-block: 0.55rem; }
  .brand-sub { display: none; }
  .nav { margin-left: 0; width: 100%; gap: 0.25rem; }
  .nav a { padding: 0.4rem 0.55rem; font-size: 0.66rem; letter-spacing: 0.06em; }
  html { scroll-padding-top: 6.5rem; }
  .feature { padding: 1.1rem 1rem 1rem; }
  .feature-icon { width: 64px; height: 64px; }
  .realm-body { padding: 1.2rem 1rem 1.1rem; }
  .stats { gap: 0.5rem; }
  .stat { padding: 0.8rem 0.3rem; }
  .stat-l { font-size: 0.56rem; letter-spacing: 0.08em; }
  .tools { padding: 0.9rem; }
  .field-small { flex: 1 1 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card:hover, .link-card:hover, .btn:hover { transform: none; }
}

@media print {
  .beam, .tools, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
