/* one deliberate world: candlelit dark, terminal-meets-storybook. the tokens are
   the workshop's own, carried over exactly, so the public site and the private
   index read as the same room. each page sets --wax to its mod's colour. */
:root {
  --ground: #17141a;
  --surface: #201c26;
  --edge: #322c3a;
  --ink: #e8e2d6;
  --muted: #9b93a6;
  --flame: #f0b45c;
  --flame-dim: #a87f45;
  --wax: var(--flame);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --body: "Iowan Old Style", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; padding: 1.4rem 1.25rem 4rem;
  background:
    radial-gradient(60rem 30rem at 50% -6rem, rgba(240, 180, 92, 0.05), transparent 70%),
    var(--ground);
  color: var(--ink);
  font-family: var(--body); font-size: 1.04rem; line-height: 1.6;
}
main { max-width: 46rem; margin: 0 auto; display: flex; flex-direction: column; gap: 2rem; }
.mono { font-family: var(--mono); }

/* every render is pixel art; scaling must never soften it */
img { image-rendering: pixelated; max-width: 100%; height: auto; }

nav.crumbline {
  max-width: 46rem; margin: 0 auto 2rem; font-family: var(--mono); font-size: 0.9rem;
  display: flex; gap: 0.6rem; align-items: baseline;
}
nav.crumbline a { color: var(--ink); text-decoration: none; }
nav.crumbline a:hover .amp, nav.crumbline a:focus-visible .amp { text-shadow: 0 0 8px var(--flame); }
nav.crumbline .here { color: var(--muted); }
.amp { color: var(--flame); }

.flame-glyph { filter: drop-shadow(0 0 5px rgba(240, 180, 92, 0.5)); }
@media (prefers-reduced-motion: no-preference) {
  .flame-glyph { display: inline-block; animation: flicker 3.4s ease-in-out infinite; }
  @keyframes flicker {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(240, 180, 92, 0.45)); }
    38% { filter: drop-shadow(0 0 9px rgba(240, 180, 92, 0.7)); }
    61% { filter: drop-shadow(0 0 4px rgba(240, 180, 92, 0.4)); }
  }
}

/* -- headers -------------------------------------------------------------- */
.hearthhead h1, .modhead h1 {
  font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em; margin: 0;
}
.hearthhead { text-align: center; }
.hearthhead h1 { font-size: 2rem; }
.hearthhead .sub { color: var(--muted); margin: 0.3rem 0 0; font-size: 0.95rem; }

.modhead { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.modhead h1 { font-size: 1.7rem; border-bottom: 3px solid var(--wax); padding-bottom: 0.1rem; }
.modhead .tag { width: 100%; margin: 0.35rem 0 0; color: var(--muted); font-style: italic; }
.ver {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ground);
  background: var(--wax); padding: 0.12rem 0.5rem; border-radius: 999px; white-space: nowrap;
}

h2 {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; color: var(--flame-dim); margin: 0 0 0.9rem;
}
h2::before { content: "· "; color: var(--edge); }

/* -- the pictures --------------------------------------------------------- */
figure.hero {
  margin: 0; text-align: center; padding: 0.5rem 0 0;
  background: radial-gradient(24rem 16rem at 50% 42%, color-mix(in srgb, var(--wax) 9%, transparent), transparent 72%);
}
figure.hero img { max-height: 26rem; }
figcaption { color: var(--muted); font-size: 0.85rem; font-family: var(--mono); margin-top: 0.4rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1rem; }
.gallery figure {
  margin: 0; background: var(--surface); border: 1px solid var(--edge);
  border-radius: 4px; padding: 0.7rem; text-align: center;
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.4rem;
}
.gallery img { max-height: 13rem; object-fit: contain; margin: auto; }

.palette { display: flex; height: 3.2rem; border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; }
.palette span { flex: 1; }

/* -- prose and tables ----------------------------------------------------- */
.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }
.intro { margin: 0; color: var(--ink); }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.tablewrap { overflow-x: auto; }
th, td { text-align: left; padding: 0.45rem 0.9rem 0.45rem 0; border-bottom: 1px solid var(--edge); vertical-align: top; }
th { font-family: var(--mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }

/* -- the shelf ------------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.card {
  display: flex; flex-direction: column; gap: 0.3rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--edge); border-left: 3px solid var(--wax);
  border-radius: 4px; padding: 0.85rem 0.95rem;
  transition: transform 120ms ease, border-color 120ms ease;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); border-color: var(--wax); outline: none; }
.card .thumb, .card img.thumb { height: 8.5rem; object-fit: contain; margin: 0 auto 0.4rem; }
.card .palette-thumb { display: flex; width: 100%; border-radius: 3px; overflow: hidden; }
.card .palette-thumb span { flex: 1; }
.card .name { font-family: var(--mono); font-weight: 700; }
.card .ver { align-self: flex-start; }
.card .tag { color: var(--muted); font-size: 0.88rem; font-style: italic; }

/* -- walking the shelf ---------------------------------------------------- */
nav.walk {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: 0.86rem; border-top: 1px solid var(--edge); padding-top: 1rem;
}
nav.walk a { color: var(--muted); text-decoration: none; }
nav.walk a:hover, nav.walk a:focus-visible { color: var(--flame); }

footer {
  max-width: 46rem; margin: 3rem auto 0; color: var(--muted); font-family: var(--mono);
  font-size: 0.76rem; border-top: 1px solid var(--edge); padding-top: 1rem; text-align: center;
}
