/* Terminal of Tinsel: a Christmas annual from a television station.
   Fir-dark paper, cream ink, antique gold and cranberry. Mountains of
   Christmas letters the titles by hand, Fraunces sets the other headings,
   Inter the reading text and JetBrains Mono the terminal. Each
   creature's colours come from themes.css, which the site builder writes. */

:root {
  --bg: #0D1B18;
  --panel: #142823;
  --raised: #1A322C;
  --line: #2A453E;
  --line-soft: rgba(245, 239, 224, 0.09);
  --text: #F5EFE0;
  --muted: #A9BAB2;
  --gold: #E3BF6A;
  --gold-soft: #F3DFA6;
  --cranberry: #B8232F;
  --cranberry-deep: #7C1620;
  --fir: #2F7D5B;
  --pine: #1C4A3C;
  --red: #E63946;
  --green: #52B788;
  --primary: var(--gold);
  --accent: var(--green);

  --title: "Mountains of Christmas", "Fraunces", Georgia, serif;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.83rem, 0.8rem + 0.12vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.55rem, 1.36rem + 0.9vw, 2.05rem);
  --step-3: clamp(2rem, 1.6rem + 1.9vw, 3rem);
  --step-4: clamp(2.7rem, 1.7rem + 4.6vw, 5.4rem);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --page: min(100% - 2.5rem, 70rem);
  --measure: 42rem;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(227, 191, 106, 0.13), transparent 70%),
    radial-gradient(ellipse 45% 35% at 100% 30%, rgba(47, 125, 91, 0.16), transparent 70%),
    radial-gradient(ellipse 45% 35% at 0% 55%, rgba(184, 35, 47, 0.1), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.7;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Snow, falling quietly at three depths behind everything. */
.snow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1.6px, transparent 2.4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 0 1.1px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 0 0.8px, transparent 1.6px);
  background-size: 340px 340px, 230px 230px, 140px 140px;
  background-position: 40px 0, 120px 80px, 20px 40px;
  animation: snowfall 36s linear infinite;
}
@keyframes snowfall {
  to { background-position: 110px 680px, 70px 770px, 60px 600px; }
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--gold-soft); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--bg); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 20;
  background: var(--gold);
  color: var(--bg);
  padding: 0.6rem 1rem;
  font-weight: 600;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- The top bar ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: 0.7rem max(1.25rem, (100% - 70rem) / 2);
  background: rgba(11, 21, 18, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}
.brand-name {
  font-family: var(--title);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1;
}
.brand-name em { font-style: normal; color: #FF6B76; }
/* The home page opens with the title at full size, so the bar above it
   keeps the name for screen readers only. */
.section-home .brand-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.onair {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.14);
  color: #FF9AA2;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }

.topnav { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.topnav a {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.topnav a:hover { color: var(--text); background: var(--line-soft); }
/* Marked with a rule, not filled: the only gold button on a page is its
   call to action. */
.topnav a[aria-current="page"] {
  color: var(--gold);
  background: none;
  box-shadow: inset 0 -2px 0 var(--gold);
  border-radius: 0;
}

/* A string of fairy lights under the bar: a wire and small bulbs in four
   colours, with a second set that glows in turn. */
.lights {
  position: relative;
  height: 22px;
  background-image:
    radial-gradient(ellipse 3.5px 5px at 24px 12px, #E63946 98%, transparent),
    radial-gradient(ellipse 3.5px 5px at 72px 16px, #E3BF6A 98%, transparent),
    radial-gradient(ellipse 3.5px 5px at 120px 12px, #52B788 98%, transparent),
    radial-gradient(ellipse 3.5px 5px at 168px 16px, #8ECAE6 98%, transparent),
    radial-gradient(ellipse 96px 12px at 48px 0, transparent 97%, rgba(169, 186, 178, 0.35) 98% 100%, transparent 101%),
    radial-gradient(ellipse 96px 12px at 144px 0, transparent 97%, rgba(169, 186, 178, 0.35) 98% 100%, transparent 101%);
  background-size: 192px 22px;
  background-repeat: repeat-x;
  background-position: center top;
}
.lights::before, .lights::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 192px 22px;
  background-repeat: repeat-x;
  background-position: center top;
  animation: twinkle 3.2s ease-in-out infinite;
}
.lights::before {
  background-image:
    radial-gradient(circle 11px at 24px 12px, rgba(230, 57, 70, 0.5), transparent),
    radial-gradient(circle 11px at 120px 12px, rgba(82, 183, 136, 0.5), transparent);
}
.lights::after {
  background-image:
    radial-gradient(circle 11px at 72px 16px, rgba(227, 191, 106, 0.55), transparent),
    radial-gradient(circle 11px at 168px 16px, rgba(142, 202, 230, 0.5), transparent);
  animation-delay: 1.6s;
}
@keyframes twinkle { 0%, 100% { opacity: 0.1; } 50% { opacity: 1; } }

/* ---- Layout ---- */

main {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 4rem;
}
main > section, main > article, main > ol, main > figure { margin-block: 0 clamp(3.5rem, 7vw, 6rem); }

.prose { max-width: var(--measure); }
.creature { max-width: 50rem; margin-inline: auto; }
article.prose { margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  margin: 0.15em 0 0.35em;
  font-family: var(--title);
  font-weight: 700;
  font-size: calc(var(--step-3) * 1.15);
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--primary);
}
h2 {
  margin: 0 0 0.9em;
  font-size: var(--step-2);
  font-variation-settings: "opsz" 72;
  color: var(--text);
}
h3 {
  margin: 1.8em 0 0.5em;
  font-size: var(--step-1);
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1.1em; }
strong { font-weight: 600; }

/* A small label in the terminal's own type. */
.kicker, .eyebrow {
  display: block;
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kicker a { color: inherit; }

.small { font-size: var(--step--1); color: var(--muted); }
.section-head { max-width: var(--measure); margin-bottom: 2rem; }
.section-head p { color: var(--muted); margin: 0; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(0.5rem, 3vw, 2rem);
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}
.hero h1 {
  margin: 0 0 0.25em;
  font-size: calc(var(--step-4) * 1.12);
  line-height: 0.95;
  color: var(--text);
}
.hero h1 em { font-style: normal; color: #FF6B76; }
.tagline {
  max-width: 30rem;
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.45;
}

.host-line {
  position: relative;
  max-width: 36rem;
  margin: 0 0 1.8rem;
  padding: 0 0 0 1.3rem;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-style: italic;
  font-size: var(--step-1);
  font-variation-settings: "opsz" 17;
  line-height: 1.45;
  color: var(--text);
}
.host-line em { font-style: inherit; }
.host-line cite, .host-line .by {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted);
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--gold);
  color: #17130A;
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--gold-soft); color: #17130A; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-soft); background: transparent; }

/* The recording, in a television set. */
.screen { margin: 0; }
.tv {
  position: relative;
  padding: 0.7rem 0.7rem 0;
  border-radius: 22px;
  background: linear-gradient(165deg, #3A2018, #20110C 55%, #140A07);
  box-shadow: 0 0 0 1px rgba(227, 191, 106, 0.28), 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 90px -30px rgba(227, 191, 106, 0.35);
}
.tv img, .tv video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
}
.tv figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.5rem 0.7rem;
  color: rgba(243, 223, 166, 0.75);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tv figcaption span { display: inline-flex; align-items: center; gap: 0.5rem; }
.tv-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 2.4s ease-in-out infinite; }

/* The numbers, in a row under the hero. */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--line-soft);
  overflow: hidden;
}
.figures li { padding: 1.3rem 1.5rem; background: rgba(13, 27, 24, 0.85); }
.figures b {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--step-3);
  font-variation-settings: "opsz" 144;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
}
.figures span { display: block; margin-top: 0.4rem; color: var(--muted); font-size: var(--step--1); line-height: 1.4; }

.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 4rem; }
@media (min-width: 62rem) { .intro { grid-template-columns: 1fr 1fr; align-items: start; } }
.intro p { margin: 0 0 1em; }
.intro .lead {
  font-family: var(--display);
  font-size: var(--step-2);
  font-variation-settings: "opsz" 72;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.intro .lead em { color: var(--gold); }

/* ---- Terminal text ---- */

code { font-family: var(--mono); font-size: 0.88em; font-variant-ligatures: none; }
:not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: rgba(245, 239, 224, 0.08);
  color: var(--gold-soft);
}

.code {
  position: relative;
  margin: 0.75rem 0 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #07110F;
  box-shadow: var(--shadow);
}
.code::before {
  content: "";
  display: block;
  height: 1.9rem;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle 4.5px at 1rem 50%, #E63946 98%, transparent),
    radial-gradient(circle 4.5px at 1.9rem 50%, #E3BF6A 98%, transparent),
    radial-gradient(circle 4.5px at 2.8rem 50%, #52B788 98%, transparent);
}
.code pre { margin: 0; padding: 1rem 1.15rem; overflow-x: auto; }
.code code { font-size: 0.84rem; line-height: 1.7; color: #DCE7E1; }

.copy {
  position: absolute;
  top: 0.3rem;
  right: 0.4rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 0.7rem/1.6 var(--mono);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.copy:hover { color: var(--gold); border-color: var(--gold); }

/* Ways to install, as tabs. Radio buttons do the work, so it needs no script. */
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tabs input { position: absolute; opacity: 0; pointer-events: none; }
.tabs label {
  padding: 0.45rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.tabs label:hover { color: var(--text); border-color: var(--muted); }
.tabs input:checked + label { background: var(--text); border-color: var(--text); color: var(--bg); }
.tabs input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 3px; }
.tab-panel { display: none; flex-basis: 100%; min-width: 0; max-width: 100%; margin-top: 0.6rem; }
.tab-panel p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.tabs input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(1),
.tabs input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(2),
.tabs input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(3),
.tabs input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(4) { display: block; }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 4rem; }
@media (min-width: 62rem) { .split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; } }
.split > div { min-width: 0; }

/* ---- What's on ---- */

.programmes, .cards, .doors { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.programmes { grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); }

.programme {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 50, 44, 0.75), rgba(20, 40, 35, 0.75));
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.programme:hover { transform: translateY(-3px); border-color: rgba(227, 191, 106, 0.4); }
.programme .icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(227, 191, 106, 0.12);
  font-size: 1.35rem;
}
.programme h3 { margin: 0 0 0.5rem; font-size: 1.3rem; color: var(--text); }
.programme p { margin: 0 0 1rem; color: var(--muted); font-size: var(--step--1); line-height: 1.6; }
.programme .run { margin: auto 0 0; }
.programme .run code {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: #07110F;
  color: var(--gold-soft);
  font-size: 0.74rem;
}
.programme .run code::before { content: "$ "; color: var(--fir); }

/* ---- Creature cards ---- */

.cards { grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }

.card a {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 1rem;
  align-content: start;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.card a::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--primary);
  opacity: 0.9;
}
.card a:hover { transform: translateY(-3px); border-color: var(--primary); }
.card-emoji {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(245, 239, 224, 0.06);
  font-size: 1.5rem;
}
.card-name {
  align-self: end;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  font-variation-settings: "opsz" 36;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--primary);
}
.card-origin { color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.card-text { grid-column: 1 / -1; margin-top: 0.8rem; color: var(--muted); font-size: var(--step--1); line-height: 1.55; }

.pack { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.pack-text { max-width: var(--measure); margin: -0.6rem 0 1.5rem; color: var(--muted); }

/* ---- A creature's page ---- */

.creature > header { margin-bottom: 2.5rem; }
.creature h1 { font-size: var(--step-4); line-height: 1; }
.creature h1 span { font-size: 0.7em; }
.creature h2 { margin-top: 3.2rem; color: var(--primary); font-size: var(--step-2); }
.creature section > p, .creature section > ul { max-width: var(--measure); }
.aliases { margin: 0 0 1rem; color: var(--muted); font-style: italic; }
.lede { max-width: 38rem; font-family: var(--display); font-size: var(--step-1); font-variation-settings: "opsz" 30; line-height: 1.4; }

.facts-line, .credits { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 1.5rem 0 0; }
.facts-line dt, .credits dt {
  padding-top: 0.25em;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.facts-line dd, .credits dd { margin: 0; }

.portrait {
  margin: 2.5rem 0;
  padding: clamp(1rem, 4vw, 2.2rem);
  border-radius: var(--radius);
  background: #07110F;
  box-shadow: 0 0 0 1px var(--line-soft), 0 0 0 7px var(--bg), 0 0 0 8px rgba(227, 191, 106, 0.45), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  overflow-x: auto;
}
.portrait pre {
  margin: 0 auto;
  width: max-content;
  color: var(--primary);
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(0.55rem, 2.3vw, 0.95rem);
  line-height: 1.15;
}

.stats { display: grid; grid-template-columns: max-content 1fr max-content; gap: 0.7rem 1.2rem; align-items: center; max-width: 34rem; }
.stats dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stats dd { display: contents; }
.bar-track, .stats dd .bar { display: block; height: 0.5rem; border-radius: 999px; }
.stats dd .bar { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.score { font-family: var(--mono); font-weight: 600; color: var(--text); }
.bar-0 { width: 0; }
.bar-1 { width: 10%; }
.bar-2 { width: 20%; }
.bar-3 { width: 30%; }
.bar-4 { width: 40%; }
.bar-5 { width: 50%; }
.bar-6 { width: 60%; }
.bar-7 { width: 70%; }
.bar-8 { width: 80%; }
.bar-9 { width: 90%; }
.bar-10 { width: 100%; }

.creature ul { padding-left: 1.2rem; }
.creature li { margin: 0.4rem 0; }
.creature li::marker { color: var(--primary); }

.myth {
  margin: 0.6rem 0;
  max-width: var(--measure);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.myth summary { padding: 0.9rem 1.1rem; cursor: pointer; font-weight: 500; }
.myth summary::marker { color: var(--primary); }
.myth[open] { border-color: var(--line); }
.myth p { margin: 0; padding: 0 1.1rem 1rem; color: var(--muted); }
.myth strong { color: var(--primary); }

.quote { margin: 1.6rem 0; max-width: var(--measure); padding-left: 1.3rem; border-left: 2px solid var(--primary); }
.quote blockquote { margin: 0; font-family: var(--display); font-style: italic; font-size: var(--step-1); font-variation-settings: "opsz" 17; line-height: 1.4; }
.quote blockquote p { margin: 0 0 0.5rem; }
.quote figcaption { color: var(--muted); font-size: var(--step--1); }

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--display);
  font-size: var(--step-1);
}
.pager a { text-decoration: none; }

/* The Dickens pack is drawn as an engraving: sepia ink. The selectors
   outrank a creature's own class in themes.css, which loads later. */
body.engraving, .card.engraving { --primary: #D9B98A; --accent: #B89B74; }
.engraving .portrait { box-shadow: 0 0 0 1px var(--line-soft), 0 0 0 7px var(--bg), 0 0 0 8px #B89B74, 0 0 0 11px var(--bg), 0 0 0 12px rgba(184, 155, 116, 0.5), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }

/* ---- The advent calendar ---- */

.doors { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.9rem; align-items: start; }
.door {
  border: 1px solid rgba(243, 223, 166, 0.35);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--cranberry), var(--cranberry-deep));
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.doors li:nth-child(even) .door { background: linear-gradient(160deg, #24634E, var(--pine)); }
.doors li:nth-child(5n + 3) .door { background: linear-gradient(160deg, #1D3A4A, #12242F); }
.door summary {
  display: grid;
  place-items: center;
  min-height: 7.5rem;
  cursor: pointer;
  list-style: none;
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.025) 14px 28px);
}
.door summary::-webkit-details-marker { display: none; }
.door-number {
  font-family: var(--display);
  font-weight: 500;
  font-size: 3.2rem;
  font-variation-settings: "opsz" 144;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold-soft);
}
.door[open] { background: var(--panel); border-color: var(--gold); }
.doors li:nth-child(even) .door[open], .doors li:nth-child(5n + 3) .door[open] { background: var(--panel); }
.door[open] summary { min-height: 3.5rem; background: none; }
.door[open] .door-number { font-size: 1.6rem; color: var(--gold); }
.door p { margin: 0 1rem 0.9rem; color: var(--muted); font-size: var(--step--1); line-height: 1.55; }
.door .door-guest { color: var(--text); font-family: var(--display); font-size: 1.15rem; }
.door.tonight { box-shadow: 0 0 0 2px var(--gold), 0 0 40px rgba(227, 191, 106, 0.55); }

/* ---- Tables ---- */

.commands, .lesson table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.commands th, .commands td, .lesson th, .lesson td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.commands thead th, .lesson thead th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.commands tbody th { font-weight: 400; white-space: nowrap; }
.commands tbody tr:hover, .lesson tbody tr:hover { background: var(--line-soft); }
.commands td { color: var(--muted); }

/* A band that invites you somewhere else. */
.band {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  border: 1px solid rgba(227, 191, 106, 0.3);
  border-radius: calc(var(--radius) * 1.5);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(227, 191, 106, 0.16), transparent 70%),
    linear-gradient(135deg, var(--pine), #11261F);
  box-shadow: var(--shadow);
}
@media (min-width: 50rem) { .band { grid-template-columns: 1fr auto; } }
.band h2 { margin: 0 0 0.5rem; }
.band p { margin: 0; max-width: 36rem; color: #C9D6CF; }

/* ---- Night School lessons, rendered from Markdown ---- */

.lesson { max-width: 46rem; }
.lesson h1 { color: var(--text); }
.lesson h2 { margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line-soft); color: var(--gold); }
.lesson h3 { color: var(--text); }
.lesson pre {
  margin: 1rem 0 1.5rem;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #07110F;
  box-shadow: var(--shadow);
}
.lesson pre code { font-size: 0.82rem; line-height: 1.7; color: #DCE7E1; }
.lesson blockquote {
  margin: 1.8rem 0;
  padding: 0 0 0 1.3rem;
  border-left: 2px solid var(--gold);
  font-family: var(--display);
  font-style: italic;
  font-size: var(--step-1);
  font-variation-settings: "opsz" 17;
  line-height: 1.45;
}
.lesson blockquote p { margin: 0; }
.lesson blockquote em { font-style: inherit; }
.lesson table { display: block; overflow-x: auto; margin: 1rem 0 2rem; }
.lesson li { margin: 0.35rem 0; }
.lesson li::marker { color: var(--gold); }
.lesson hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.5rem 0; }

/* ---- The foot of the page: pines on a snowy hill, then the sign-off ---- */

.treeline {
  height: 110px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 120' preserveAspectRatio='none'%3E%3Cg fill='%23163B30'%3E%3Cpath d='M40 96 62 40 84 96z'/%3E%3Cpath d='M150 100 180 22 210 100z'/%3E%3Cpath d='M260 98 278 52 296 98z'/%3E%3Cpath d='M350 100 384 30 418 100z'/%3E%3C/g%3E%3Cg fill='%23F5EFE0'%3E%3Cpath d='M62 40 54 60 62 55 70 60z'/%3E%3Cpath d='M180 22 169 50 180 43 191 50z'/%3E%3Cpath d='M278 52 271 70 278 66 285 70z'/%3E%3Cpath d='M384 30 372 55 384 48 396 55z'/%3E%3C/g%3E%3Cpath fill='%23F5EFE0' d='M0 120V96c60-18 120-18 180-6s120 16 180 4 90-12 120-2v28z'/%3E%3C/svg%3E");
  background-size: 480px 120px;
  background-repeat: repeat-x;
  background-position: bottom center;
}
.signoff {
  padding: 2.5rem 1.25rem 3.5rem;
  background: var(--text);
  color: #1B2B26;
}
.signoff > * { max-width: 44rem; margin-inline: auto; }
.signoff .host-line { color: #1B2B26; border-color: var(--cranberry); margin-bottom: 1.8rem; }
.signoff .host-line .by { color: #40534C; }
.signoff .small { color: #40534C; line-height: 1.8; }
.signoff a { color: var(--cranberry-deep); font-weight: 500; }
.signoff a:hover { color: #1B2B26; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0 auto 1.2rem; padding: 0; list-style: none; font-size: var(--step--1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .snow, .dot, .tv-dot, .lights::before, .lights::after { animation: none; }
  .programme, .card a, .btn { transition: none; }
}
@media (max-width: 40rem) {
  .topbar { position: static; }
  /* One row that scrolls sideways, in place of two. */
  .topnav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; margin-inline: -0.5rem; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { flex: none; padding-inline: 0.55rem; }
  /* The footer links to the source as well, and four fit where five don't. */
  .topnav a[rel="noopener"] { display: none; }
  .tv { border-radius: 14px; padding: 0.4rem 0.4rem 0; }
  .tv img, .tv video { border-radius: 9px; }
  .tv figcaption span + span { display: none; }
  .code code { font-size: 0.76rem; }
  .stats { grid-template-columns: max-content 1fr max-content; }
}
