/*
 * Elsewhere, the public website: a herald's broadsheet in velvet and gold.
 *
 * No inline style anywhere, by the Content-Security-Policy in _headers: every
 * rule lives here, and the scripts change classes, never styles as text.
 */

@font-face {
  font-family: "Cinzel Decorative";
  src: url("fonts/CinzelDecorative-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Uncial Antiqua";
  src: url("fonts/UncialAntiqua-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("fonts/IMFellEnglish-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IM Fell English";
  src: url("fonts/IMFellEnglish-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --crimson: #7d1a1f;
  --forest: #1f4d2b;
  --gold: #c9a227;
  --pale-gold: #f1d78a;
  --silver: #c9ced6;
  --purple: #4b1e6b;
  --parchment: #f3e9d2;
  --ink: #1a1410;
  --velvet: #160b12;
  --ink-soft: #3d2d1d;
  --faint: #bfb39a;
  --title: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --heading: "Uncial Antiqua", "MedievalSharp", Georgia, serif;
  --body: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --plain: "Times New Roman", Times, Georgia, serif;
  /* The system's own Times, for the bold words at the top of the Realm's cards. */
  --times: "Times New Roman", Times, serif;
  --read: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--velvet); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment);
  font: 1.08rem/1.6 var(--body);
  background-color: var(--velvet);
  background-image:
    radial-gradient(ellipse at 50% -12%, rgba(125, 26, 31, 0.5), transparent 58%),
    radial-gradient(rgba(201, 162, 39, 0.08) 1px, transparent 1.6px);
  background-size: 100% 100%, 22px 22px;
}
a { color: var(--pale-gold); text-underline-offset: 0.18em; }
a:hover { color: #fff3c4; }
:focus-visible { outline: 3px solid var(--pale-gold); outline-offset: 3px; }
code, pre, kbd { font-family: var(--mono); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--parchment); color: var(--ink); padding: 0.4rem 0.8rem; }

/* ---- The agent's plaque: first on every page, above everything ------------- */

.plaque {
  position: relative;
  z-index: 60;
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 1.3rem 0.9rem;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(160deg, #fbeeb8 0%, #e6c860 30%, #c9a227 52%, #a07e1c 61%, #efd98e 100%);
  border: 3px double #7a5c10;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 6px rgba(90, 60, 10, 0.45), 0 8px 24px rgba(0, 0, 0, 0.55);
}
.plaque p { margin: 0.12rem 0; }
.plaque-address {
  /* The body face, not the title's capitals: an address is read, and copied, as written. */
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1.15rem, 4.6vw, 2.05rem);
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: #2a1c06;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 244, 200, 0.7);
}
.plaque-lines { font-size: 1.04rem; color: #2a1c06; }
.plaque-actions {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.5rem 1rem; margin-top: 0.55rem;
}
.plaque a { color: #3a1a05; font-weight: 600; }
.plaque code {
  font-size: 0.88em; background: rgba(255, 248, 220, 0.6); padding: 0.05em 0.35em;
  border-radius: 4px; overflow-wrap: anywhere;
}

/* A test world's notice (docs/ALPHA.md): silver, hung just under the gold plaque, and above
   the gate's doors with it. Hidden unless the world's status says it is a test world. */
.test-world {
  position: relative;
  z-index: 59;
  width: calc(100% - 2rem);
  max-width: 900px;
  margin: 0 auto;
  padding: 0.45rem 1.1rem 0.5rem;
  font: 1.02rem/1.4 var(--body);
  color: #1d2229;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  background: linear-gradient(160deg, #fbfcfd 0%, #dfe3e8 30%, var(--silver) 52%, #8d95a3 61%, #e9ecf1 100%);
  border: 3px double #5e6672;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 5px rgba(40, 46, 56, 0.4), 0 6px 18px rgba(0, 0, 0, 0.5);
}
.test-world strong { font: 400 1em var(--heading); letter-spacing: 0.04em; color: #111418; }
.plaque-compact + .test-world { padding: 0.3rem 1rem 0.35rem; font-size: 0.9rem; }
.copy {
  font: 1rem var(--heading);
  color: var(--parchment);
  background: linear-gradient(180deg, #9a2228, var(--crimson));
  border: 1px solid #5a1216;
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
  cursor: pointer;
  box-shadow: 0 2px 0 #3d0c0f;
}
.copy:hover { filter: brightness(1.12); }

/* ---- The masthead ----------------------------------------------------------- */

.masthead { position: relative; max-width: 1080px; margin: 0 auto; padding: 1.3rem 1rem 0.2rem; text-align: center; }
.wordmark {
  display: grid;
  justify-content: center;
  margin: 0.25em 0 0;
  font-family: var(--title);
  font-weight: 700;
  font-size: min(14vw, 120px);
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.wordmark::before, .wordmark-text { grid-area: 1 / 1; }
.wordmark::before {
  content: attr(data-text);
  color: var(--gold);
  -webkit-text-stroke: 3px #c9a227;
  text-shadow: 0 0 2px #7a5c10, 0 2px 0 #7a5c10, 0 0 22px rgba(201, 162, 39, 0.35);
}
.wordmark-text {
  background: linear-gradient(180deg, #f6f7f9 0%, #c9ced6 45%, #8d95a3 55%, #e9ecf1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark-svg { display: none; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark::before, .wordmark-text { display: none; }
  .wordmark-svg { display: block; width: min(92vw, 760px); height: auto; margin: 0 auto; }
}
.rule { display: flex; align-items: center; justify-content: center; gap: 0.8rem; max-width: 560px; margin: 0.55rem auto 0.1rem; }
.rule-line { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--pale-gold) 50%, var(--gold) 80%, transparent); }
.benny { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
/* The gold gate: slighter than the coin it replaced, so it stands a little larger; and on the
   Gate and Operators pages 30% larger again (the administrator's request of 2026-09-17), and 30%
   more on 2026-09-18. The Realm's compact header keeps its own, below, in the same proportion
   to its smaller wordmark. */
.emblem { width: 101px; height: 101px; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }
.tagline { max-width: 40em; margin: 0.5rem auto 0; font-size: clamp(1.05rem, 2.6vw, 1.3rem); font-style: italic; color: #efe3c4; }

/* ---- Sound ------------------------------------------------------------------ */

.sound {
  position: absolute; top: 0.7rem; right: 0.8rem; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem;
}
.horn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.75rem 0.25rem 0.5rem;
  font: 0.9rem var(--body);
  color: var(--pale-gold);
  background: rgba(22, 11, 18, 0.75);
  border: 1px solid rgba(201, 162, 39, 0.6);
  border-radius: 999px;
  cursor: pointer;
}
.horn svg { width: 22px; height: 22px; }
.horn[aria-pressed="false"] { color: #a99a86; border-color: rgba(201, 162, 39, 0.3); }
.sound input[type="range"] { width: 112px; accent-color: var(--gold); }
@media (max-width: 640px) {
  .sound { position: static; align-items: center; margin-bottom: 0.3rem; }
}

/* ---- The banners that are the tabs -------------------------------------------- */

.banners {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: clamp(0.45rem, 2vw, 1.2rem);
  margin: 1.5rem auto 0; padding: 0 0.5rem;
}
.banners::before {
  content: "";
  position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  width: min(600px, 96%); height: 7px; border-radius: 4px;
  background: linear-gradient(180deg, var(--pale-gold), var(--gold) 60%, #7a5c10);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.banner {
  --banner: var(--crimson);
  position: relative;
  display: block;
  min-width: 7.6rem;
  padding: 0.85rem 1.05rem 1.5rem;
  font: 1.06rem var(--heading);
  color: var(--parchment);
  text-align: center;
  text-decoration: none;
  background:
    repeating-linear-gradient(90deg, var(--gold) 0 2px, transparent 2px 5px) bottom / 100% 11px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.28)),
    var(--banner);
  border-left: 2px solid rgba(201, 162, 39, 0.75);
  border-right: 2px solid rgba(201, 162, 39, 0.75);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  /* A ribbon hangs from its rod: it lengthens downward and never leaves it. The
     negative margin gives back what the padding takes, so nothing below moves. */
  transition: padding-bottom 0.2s ease, margin-bottom 0.2s ease;
}
.banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 11px; height: 2px; background: var(--gold); }
.banner:hover { color: #fff; padding-bottom: 1.8rem; margin-bottom: -0.3rem; }
.banner[aria-current="page"] { padding-bottom: 2.05rem; margin-bottom: -0.55rem; color: #fff; box-shadow: 0 10px 18px rgba(0, 0, 0, 0.55); }
.banner.crimson { --banner: var(--crimson); }
.banner.forest { --banner: var(--forest); }
.banner.purple { --banner: var(--purple); }

/* ---- Pages and cards ---------------------------------------------------------- */

main { max-width: 1080px; margin: 0 auto; padding: 1.4rem 1rem 3rem; }
.cards, .ledger {
  display: grid; gap: 1.5rem; margin-top: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.card {
  position: relative;
  padding: 1.7rem 1.55rem 1.4rem;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 18% 8%, rgba(255, 255, 255, 0.55), transparent 58%),
    radial-gradient(ellipse at 85% 100%, rgba(160, 120, 60, 0.28), transparent 62%);
  border: 1px solid #b08d3a;
  border-radius: 6px;
  outline: 1px solid rgba(201, 162, 39, 0.55);
  outline-offset: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.card h2 { margin: 0 0 0.55rem; font: 400 1.55rem/1.2 var(--heading); color: var(--crimson); }
.card h3 { margin: 0.9rem 0 0.15rem; font: 400 1.08rem/1.3 var(--heading); color: #5a1216; }
.card p, .card li { margin: 0.35rem 0; }
.card a { color: #6b1418; }
.card .lead { font-style: italic; color: var(--ink-soft); }
.steps { padding-left: 1.3rem; }
.flourish { position: absolute; width: 34px; height: 34px; pointer-events: none; }
.flourish.tl { top: 5px; left: 5px; }
.flourish.tr { top: 5px; right: 5px; transform: scaleX(-1); }
.flourish.bl { bottom: 5px; left: 5px; transform: scaleY(-1); }
.flourish.br { bottom: 5px; right: 5px; transform: scale(-1, -1); }
.button {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.55rem 1.15rem;
  font: 1.02rem var(--heading);
  color: var(--parchment) !important;
  text-decoration: none;
  background: linear-gradient(180deg, #9a2228, var(--crimson));
  border: 1px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 3px 0 #3d0c0f, 0 6px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.button:hover { filter: brightness(1.12); }
.button.quiet { background: linear-gradient(180deg, #5a4632, #3d2d1d); }
.button[disabled] { opacity: 0.55; cursor: default; filter: none; }
.notice { text-align: center; font-style: italic; color: #efe3c4; }

.strip {
  margin: 2rem auto 0; padding: 0.9rem 1.2rem;
  border-top: 1px solid rgba(201, 162, 39, 0.5);
  border-bottom: 1px solid rgba(201, 162, 39, 0.5);
  background: rgba(75, 30, 107, 0.2);
}
.strip dl { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.4rem; margin: 0; }
.strip dt { font: 0.85rem var(--heading); letter-spacing: 0.04em; color: var(--pale-gold); text-align: center; }
.strip dd { margin: 0; font-size: 1.28rem; color: #fff; text-align: center; }

/* ---- The Gate's light: is the world running? --------------------------------------------- */

.lamp {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  max-width: 46rem; margin: 2rem auto 0; padding: 0.8rem 1.3rem;
  border: 1px solid rgba(201, 162, 39, 0.5); border-radius: 999px;
  background: rgba(22, 11, 18, 0.6);
}
.lamp-light {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d8d2c6, #7d776d 60%, #3e3a34);
}
.lamp.on .lamp-light { background: radial-gradient(circle at 35% 30%, #d4ffd9, #3ccf5a 55%, #16702a); box-shadow: 0 0 14px rgba(60, 207, 90, 0.8); }
.lamp.off .lamp-light { background: radial-gradient(circle at 35% 30%, #ffd0d0, #e0343d 55%, #7a1016); box-shadow: 0 0 14px rgba(224, 52, 61, 0.8); }
.lamp-words { margin: 0; color: #efe3c4; }
.lamp-words strong { font: 400 1.1rem var(--heading); color: #fff; }
.lamp-note { margin-left: 0.6rem; font-style: italic; color: var(--faint); }
@media (prefers-reduced-motion: no-preference) {
  .lamp.on .lamp-light { animation: glow 2.4s ease-in-out infinite; }
}
@keyframes glow { 50% { box-shadow: 0 0 22px rgba(60, 207, 90, 0.95); } }

.colophon {
  max-width: 1080px; margin: 0 auto; padding: 1.2rem 1rem 2.4rem;
  text-align: center; font-size: 0.92rem; color: var(--faint);
  border-top: 1px solid rgba(201, 162, 39, 0.35);
}
.colophon p { margin: 0.3rem 0; }
.colophon a { color: #d9c47a; }

/* ---- The gate ------------------------------------------------------------------ */

html.gate-shut { overflow: hidden; }
.gate {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: end center;
  padding: 0 1rem max(9vh, 2.5rem);
  perspective: 1400px;
}
.doors { position: absolute; inset: 0; display: flex; }
.door {
  position: relative;
  flex: 1;
  background:
    linear-gradient(180deg,
      transparent 11%, #c9a227 11%, #f1d78a 11.6%, #9a7a1a 12.4%, transparent 12.4%,
      transparent 49%, #c9a227 49%, #f1d78a 49.6%, #9a7a1a 50.4%, transparent 50.4%,
      transparent 86%, #c9a227 86%, #f1d78a 86.6%, #9a7a1a 87.4%, transparent 87.4%),
    repeating-linear-gradient(90deg, #4a2c14 0 46px, #3b2210 46px 49px, #52321a 49px 50px),
    #3b2210;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.7);
  transition: transform 1.3s cubic-bezier(0.55, 0.05, 0.35, 1), opacity 1.3s ease;
}
.door.left { transform-origin: left center; border-right: 3px solid #1d1008; }
.door.right { transform-origin: right center; border-left: 3px solid #1d1008; }
.door .ring { position: absolute; top: 47%; width: 46px; height: 46px; }
.door.left .ring { right: 18px; }
.door.right .ring { left: 18px; }
.gate.opening .door.left { transform: rotateY(-100deg); opacity: 0; }
.gate.opening .door.right { transform: rotateY(100deg); opacity: 0; }
.gate.opening .gate-call { opacity: 0; transition: opacity 0.4s ease; }
.gate-call {
  position: relative;
  padding: 1.1rem 1.6rem 0.9rem;
  text-align: center;
  background: rgba(22, 11, 18, 0.78);
  border: 1px solid rgba(201, 162, 39, 0.6);
  border-radius: 10px;
  box-shadow: 0 0 44px rgba(0, 0, 0, 0.65);
}
.gate-legend { margin: 0 0 0.5rem; font: 1.1rem var(--heading); color: var(--pale-gold); }
.gate-note { margin: 0.6rem 0 0; font-size: 0.9rem; font-style: italic; color: var(--faint); }
.enter {
  padding: 0.75rem 2rem;
  font: clamp(1.3rem, 5vw, 1.9rem) var(--heading);
  color: #2a1c06;
  background: linear-gradient(180deg, #fbeeb8, #c9a227 60%, #9a7a1a);
  border: 2px solid #7a5c10;
  border-radius: 8px;
  box-shadow: 0 4px 0 #5a4210, 0 10px 24px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.enter:hover { filter: brightness(1.08); }

/* ---- The Realm: the herald's proclamation --------------------------------------- */

.proclamation { position: relative; margin: 1.6rem auto 2.4rem; padding: 26px; }
.vine { position: absolute; pointer-events: none; overflow: visible; }
.vine-top, .vine-bottom { left: 24px; right: 24px; height: 22px; width: calc(100% - 48px); }
.vine-top { top: 2px; }
.vine-bottom { bottom: 2px; transform: scaleY(-1); }
.vine-left, .vine-right { top: 24px; bottom: 24px; width: 22px; height: calc(100% - 48px); }
.vine-left { left: 2px; }
.vine-right { right: 2px; transform: scaleX(-1); }
.acanthus { position: absolute; width: 54px; height: 54px; pointer-events: none; }
.acanthus.tl { top: -4px; left: -4px; }
.acanthus.tr { top: -4px; right: -4px; transform: scaleX(-1); }
.acanthus.bl { bottom: -4px; left: -4px; transform: scaleY(-1); }
.acanthus.br { bottom: -4px; right: -4px; transform: scale(-1, -1); }
.crest { position: absolute; top: -30px; left: 50%; width: 68px; height: 68px; transform: translateX(-50%); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.parchment {
  position: relative;
  padding: 1.7rem 1.8rem 1.3rem;
  color: var(--ink);
  text-align: center;
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(150, 105, 40, 0.3), transparent 65%);
  border-radius: 4px;
  box-shadow: inset 0 0 34px rgba(120, 80, 20, 0.38);
}
.herald { margin: 0; font: 0.95rem var(--heading); letter-spacing: 0.08em; color: #7a5c10; }
.headline { margin: 0.35rem 0 0.2rem; font: 400 clamp(1.3rem, 3.4vw, 2.05rem)/1.3 var(--plain); color: #3b0d10; }
.proclaimed { margin: 0.15rem 0 0.7rem; font-style: italic; color: #5a4632; }
.earlier { margin: 0.6rem auto 0; padding: 0; max-width: 46em; list-style: none; font: 1.05rem/1.4 var(--plain); color: var(--ink-soft); border-top: 1px solid rgba(122, 92, 16, 0.35); }
.earlier li { padding: 0.35rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); }
.earlier .when { margin-left: 0.45rem; font: italic 0.88rem var(--body); color: #6b5a44; }
/* In Times New Roman, as the cards' own bold words are (the administrator's request of 2026-09-17). */
.herald-more {
  margin: 0.85rem auto 0; padding: 0.35rem 1.1rem;
  font: 700 1.02rem var(--times); letter-spacing: 0.02em; color: #3b0d10;
  background: #f7efdc; border: 1px solid #b8872b; border-radius: 4px;
  box-shadow: 0 2px 6px rgba(120, 80, 20, 0.35); cursor: pointer;
}
.herald-more:hover, .herald-more:focus-visible { background: #fffaf0; outline: 2px solid var(--gold); outline-offset: 1px; }
.proclamation.shimmer .vine, .proclamation.shimmer .acanthus, .proclamation.shimmer .crest { animation: shimmer 1.6s ease-in-out 3; }
@keyframes shimmer {
  0%, 100% { filter: none; }
  50% { filter: brightness(1.75) drop-shadow(0 0 6px #f1d78a); }
}

/* ---- The Realm: the map --------------------------------------------------------- */

.chart h2, .ledger-title { margin: 0 0 0.6rem; font: 400 clamp(1.3rem, 3vw, 1.8rem) var(--heading); color: var(--pale-gold); text-align: center; }
.map-frame {
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: #d9c7a0;
  border: 3px double var(--gold);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
/* A window on the world, its own shape read from the box it is drawn into (map.js measures
   it): landscape once there is room, a taller box on a narrow phone. Dragged to look around,
   zoomed with the wheel. */
.map { position: relative; aspect-ratio: 1 / 1; }
@media (min-width: 560px) { .map { aspect-ratio: 4 / 3; } }
@media (min-width: 900px) { .map { aspect-ratio: 16 / 10; } }
/* The ground is painted on a canvas beneath the chart (map.js: paint), the chart over it. */
.map .map-ground { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.map svg { position: relative; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
.map svg.dragging { cursor: grabbing; }
.map svg:focus-visible { outline: 2px solid var(--pale-gold); outline-offset: -3px; }
.map-waiting { margin: 0; padding: 3rem 1rem; text-align: center; font-style: italic; color: #3d2d1d; }
.map-hover { min-height: 1.6em; margin: 0.5rem 0; text-align: center; font-style: italic; color: #efe3c4; }
.map-zoom { position: absolute; top: 0.5rem; left: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.map-zoom button {
  min-width: 2.1rem; height: 2.1rem; padding: 0 0.5rem;
  font: 700 0.95rem/1 var(--plain); color: #2b2016; background: #f7efdc;
  border: 1px solid #8a6a3a; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); cursor: pointer;
}
.map-zoom button.map-zoom-word { font-size: 0.82rem; white-space: nowrap; }
.map-zoom button:hover, .map-zoom button:focus-visible { background: #fffaf0; outline: 2px solid var(--gold); outline-offset: 1px; }
.hint { margin: 0 0 0.5rem; text-align: center; font-style: italic; color: var(--faint); }
.map-selected {
  max-width: 826px; margin: 0.6rem auto; padding: 0.8rem 1.1rem;
  color: var(--ink); background: var(--parchment);
  border: 1px solid #b08d3a; border-radius: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.map-selected-title { display: block; font: 700 1.05rem/1.3 var(--plain); color: #5a1216; }
.map-selected-detail { margin: 0.35rem 0 0; font: 1rem/1.4 var(--plain); }
.map-selected-clear {
  margin-top: 0.6rem; padding: 0.3rem 0.8rem; font: 600 0.88rem/1 var(--plain); color: #2b2016;
  background: #f7efdc; border: 1px solid #8a6a3a; border-radius: 4px; cursor: pointer;
}
.map-selected-clear:hover, .map-selected-clear:focus-visible { background: #fffaf0; outline: 2px solid var(--gold); outline-offset: 1px; }
.selection-ring { fill: none; stroke: #8b2420; stroke-width: 2.4; }
.selection-dot { fill: #8b2420; }
.pennant-pole { stroke: #2b2016; stroke-width: 1; }
.pennant-flag { fill: #6a2c96; stroke: #2b2016; stroke-width: 0.5; }
.story-mark { cursor: pointer; }
.story-mark:focus-visible { outline: 2px solid var(--pale-gold); outline-offset: 2px; }
.story-mark:hover .pennant-flag, .story-mark:focus-visible .pennant-flag { fill: #8b3fc9; }
.heard, .features {
  max-width: 826px; margin: 0.6rem auto 1.2rem; padding: 1rem 1.3rem;
  color: var(--ink); background: var(--parchment);
  border: 1px solid #b08d3a; border-radius: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.heard-title, .features-title { margin: 0 0 0.5rem; font: 700 1.2rem/1.3 var(--plain); color: #5a1216; }
/* The Features card: what the record holds of the place chosen, directly under what was heard. */
.features-body { font: 1.02rem/1.45 var(--plain); }
.features-facts { margin: 0; }
.features-facts div { display: grid; grid-template-columns: minmax(7.5rem, max-content) 1fr; gap: 0 1rem; padding: 0.4rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); }
.features-facts dt { font-weight: 700; color: #2a1f14; }
.features-facts dd { margin: 0; }
@media (max-width: 480px) {
  .features-facts div { grid-template-columns: 1fr; }
}
.features-undiscovered { margin: 0.2rem 0; font-style: italic; font-size: 1.1rem; }
.features-lately-title { margin: 0.8rem 0 0.2rem; font: 700 1rem/1.3 var(--plain); color: #5a1216; }
.features-lately { margin: 0; padding: 0; list-style: none; }
.features-lately li { padding: 0.35rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); }
.features-body .quiet { font-style: italic; color: #5a4632; }
.features-note { margin: 0.7rem 0 0; font-size: 0.9rem; font-style: italic; color: #5a4632; }
.heard-lines { margin: 0; padding: 0; list-style: none; font: 1.02rem/1.45 var(--plain); }
.heard-lines li { padding: 0.45rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); }
.heard-lines .who { font-weight: 700; }
.heard-lines .when { margin-left: 0.5rem; font-size: 0.88rem; font-style: italic; color: #6b5a44; }
.heard-lines q { display: block; margin-top: 0.2rem; quotes: "“" "”"; }
.heard-lines .quiet { font-style: italic; color: #5a4632; }
.heard-note { margin: 0.6rem 0 0; font-size: 0.9rem; font-style: italic; color: #5a4632; }
.voices .voice, .legend .voice { fill: #fffaf0; stroke: #3b0d10; stroke-width: 0.8; }
.legend { margin: 0.4rem 0; font: 0.98rem/1.35 var(--plain); color: #f3e9d2; }
.legend-short, .legend-full { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1.1rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend svg { width: 14px; height: 14px; }
.map-key-full { margin-top: 0.5rem; text-align: center; }
.map-key-full summary { color: var(--pale-gold); font-family: var(--plain); font-size: 0.9rem; }
.map-key-full .legend-full { margin-top: 0.5rem; }
.fine { margin: 0.5rem 0 0; text-align: center; font-size: 0.9rem; font-style: italic; color: var(--faint); }
.pulse { fill: none; stroke-width: 2.2; transform-box: fill-box; transform-origin: center; animation: ripple 2.6s ease-out infinite; pointer-events: none; }
.pulse.arrival { stroke: #9fb7d9; }
.pulse.discovery { stroke: #c9a227; }
.pulse.building { stroke: #2f7a3e; }
.pulse.ruin { stroke: #b87333; }
.pulse.loss, .pulse.strife { stroke: #9e1b22; }
.pulse.civic { stroke: #6a2c96; }
.pulse.learning { stroke: #eef1f5; }
.pulse.trade { stroke: #f1d78a; }
.pulse.frontier { stroke: #e0b43c; }
.pulse.other { stroke: #e8dcc0; }
@keyframes ripple {
  from { transform: scale(0.35); opacity: 0.95; }
  to { transform: scale(1.7); opacity: 0; }
}
/* The mist over unwalked ground (site/assets/map.js: drawMist). Its cloud is the one thing
   that moves, one layer however many squares lie under it, a tile a lap (MIST_TILE there).
   Squares walked since the last reading clear together, and a ring just opened is lit
   along its edge once. */
.mist-drift { animation: mist-drift 180s steps(2160) infinite; }
/* Held still where a moving cloud would be larger than the browser paints (map.js: stillMist). */
.mist-drift.mist-still { animation: none; }
@keyframes mist-drift { to { transform: translate(-256px, -256px); } }
.mist-lift { animation: mist-lift 1.8s ease-in-out forwards; }
@keyframes mist-lift { to { opacity: 0; } }
.frontier-light { opacity: 0; animation: frontier-light 3.5s ease-out; }
@keyframes frontier-light { from { opacity: 1; } to { opacity: 0; } }

/* ---- The Realm: the ledger ------------------------------------------------------ */

/* A figure keeps to its label's line while both fit, and drops beneath it, still to the right, when not. */
.figures { margin: 0.4rem 0 0; }
.figures > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1rem; padding: 0.1rem 0; }
.figures dt { color: var(--ink-soft); }
.figures dd { margin: 0 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar { display: flex; height: 10px; margin: 0.1rem 0 0.5rem; overflow: hidden; background: #e8dbb9; border: 1px solid #b08d3a; border-radius: 5px; }
.bar > span { display: block; height: 100%; }
.bar .held { background: #2f6b3a; }
.bar .share { background: linear-gradient(90deg, var(--purple), #7b3fa8); }
.district { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.98rem; }
.card .note { font-size: 0.9rem; font-style: italic; color: #5a4632; }
/* The ledger is for reading: a plain face throughout, larger, with bold titles. */
.ledger-title { font: 700 clamp(1.5rem, 3.2vw, 2.05rem)/1.2 var(--plain); letter-spacing: 0.03em; }
.ledger .card { font-family: var(--plain); font-size: 1.1rem; }
.ledger .card h2 { font: 700 1.5rem/1.25 var(--plain); color: #5a1216; }
.ledger .card h3 { font: 700 1.15rem/1.3 var(--plain); color: #3b0d10; }
.ledger .figures dt { color: #2a1f14; }
.ledger .card .note { font-size: 0.98rem; }

/* ---- Operators ------------------------------------------------------------------- */

.operators .card { margin-bottom: 1.6rem; }
form.row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 0.8rem 0 0.3rem; }
form.stack { display: grid; gap: 0.5rem; margin: 0.8rem 0 0.3rem; }
form label { display: block; font: 0.98rem var(--heading); color: #5a1216; }
.field { flex: 1 1 16rem; }
input[type="text"], textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font: 1rem/1.4 var(--mono);
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid #b08d3a;
  border-radius: 4px;
}
textarea { min-height: 5.5rem; resize: vertical; }
.status { min-height: 1.5em; margin: 0.4rem 0; font-style: italic; color: #5a4632; }
.status.bad { color: var(--crimson); font-style: normal; }
.patent {
  position: relative;
  margin-top: 1rem;
  padding: 1.2rem 1.3rem 1rem;
  background: #fbf4e0;
  border: 2px solid #b08d3a;
  border-radius: 4px;
  box-shadow: inset 0 0 26px rgba(150, 110, 40, 0.28);
}
.patent h3 { margin-top: 0; }
.writ { position: relative; margin: 0.9rem 0; padding-left: 3.6rem; }
.seal {
  position: absolute; left: 0; top: 0.1rem;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d9464e, #7d1a1f 60%, #4a0d10);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.seal.green { background: radial-gradient(circle at 35% 30%, #4fa566, #1f4d2b 60%, #0f2a16); }
.secret {
  display: block; margin: 0.3rem 0; padding: 0.45rem 0.6rem;
  font: 0.98rem/1.35 var(--mono); overflow-wrap: anywhere;
  color: var(--ink); background: #fff; border: 1px dashed #b08d3a; border-radius: 4px;
}
.warning { color: var(--crimson); font-weight: 600; }
.agents { display: grid; gap: 1rem; margin-top: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.shield {
  position: relative;
  padding: 1rem 1.1rem 1.9rem;
  color: var(--parchment);
  text-align: center;
  background: linear-gradient(180deg, #5a2680, var(--purple) 55%, #2a0f3c);
  border: 2px solid var(--gold);
  border-radius: 8px 8px 50% 50% / 8px 8px 24% 24%;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}
.shield .handle { margin: 0 0 0.2rem; font: 1.08rem var(--heading); color: var(--pale-gold); overflow-wrap: anywhere; }
.shield p { margin: 0.2rem 0; font-size: 0.96rem; }
.shield .state { font-style: italic; color: #e8dcc0; }
.shield .state.away { color: #c9b8a0; }
.shield .state.stopped { color: #ffb4b4; }
.shield .pin { margin-top: 0.5rem; font: 0.9rem var(--heading); color: var(--ink); background: var(--pale-gold); border: 1px solid #7a5c10; border-radius: 999px; padding: 0.2rem 0.8rem; cursor: pointer; }
.shield .pin[aria-pressed="true"] { background: var(--gold); box-shadow: inset 0 0 0 2px #7a5c10; }
.range { display: inline-flex; gap: 0.4rem; margin: 0.4rem 0.6rem 0.4rem 0; }
.range button { font: 0.95rem var(--heading); padding: 0.3rem 0.8rem; border: 1px solid #b08d3a; border-radius: 999px; background: #fffaf0; color: var(--ink); cursor: pointer; }
.range button[aria-pressed="true"] { background: var(--forest); color: var(--parchment); border-color: var(--gold); }
.scroll {
  position: relative;
  margin: 1.2rem 0;
  padding: 1.3rem 1.4rem 1.1rem;
  background: #fbf4e0;
  border-left: 10px solid #d9c49a;
  border-right: 10px solid #d9c49a;
  border-radius: 2px;
  box-shadow: inset 0 0 22px rgba(150, 110, 40, 0.3), 0 4px 10px rgba(0, 0, 0, 0.3);
}
.scroll h3 { margin-top: 0; }
.scroll ul { padding-left: 1.2rem; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.ledger-table th { text-align: left; font-weight: 400; color: var(--ink-soft); padding: 0.15rem 0.4rem 0.15rem 0; }
.ledger-table td { text-align: right; font-variant-numeric: tabular-nums; padding: 0.15rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); }
details { margin-top: 1rem; }
summary { cursor: pointer; font-family: var(--heading); color: #5a1216; }
/* A long command wraps where it is shown and still copies as one line. */
pre { overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 0.6rem 0.8rem; background: #fffaf0; border: 1px solid #b08d3a; border-radius: 4px; font-size: 0.88rem; }

/* ---- The Realm's compact header: room for activity, sooner ------------------------- */

.plaque-compact { padding: 0.6rem 1.1rem 0.55rem; }
.plaque-compact .plaque-address { font-size: clamp(0.92rem, 3.2vw, 1.2rem); }
.plaque-compact .plaque-lines { font-size: 0.86rem; }
.plaque-compact .plaque-actions { margin-top: 0.35rem; gap: 0.4rem 0.9rem; }
.plaque-compact .copy { padding: 0.22rem 0.75rem; font-size: 0.92rem; min-height: 40px; }
.plaque-compact .read { display: inline-flex; align-items: center; min-height: 40px; }
html[data-page="realm"] .masthead { padding: 0.55rem 1rem 0.1rem; }
html[data-page="realm"] .wordmark { font-size: min(8vw, 56px); margin-top: 0; }
html[data-page="realm"] .rule { margin: 0.3rem auto 0.05rem; max-width: 360px; }
html[data-page="realm"] .benny { width: 28px; height: 28px; }
/* 101px beside a 120px wordmark on the other pages; the Realm's is 56px. */
html[data-page="realm"] .emblem { width: 47px; height: 47px; }
html[data-page="realm"] .tagline { display: none; }
html[data-page="realm"] .banners { margin-top: 0.7rem; }

/* ---- Freshness: what the world last said, and when this page last heard it --------- */

.freshness {
  max-width: 826px; margin: 1.1rem auto 0; padding: 0 0.5rem;
  text-align: center; font: 0.94rem/1.4 var(--read); color: #e7d9b8;
}
.freshness-line { margin: 0.15rem 0; }
.freshness-warn { color: #ffcf9e; }
.freshness-stale { color: var(--pale-gold); }

/* ---- The Realm: the herald's extra state ------------------------------------------- */

.headline-tag {
  margin: 0 0 0.2rem; font: 700 0.8rem var(--heading); letter-spacing: 0.06em;
  text-transform: uppercase; color: #8a1418;
}
.headline-tag:empty { display: none; }
.headline-actions {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.4rem 0.9rem; margin: 0.1rem 0 0.4rem; font: 1rem var(--read);
}
.headline-actions:empty { display: none; }
.headline-extra {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem;
  margin-left: 0.6rem; font: 0.9rem var(--read); color: #6b5a44;
}
.earlier time { font-style: normal; }
.map-action, .map-unavailable {
  display: inline-flex; align-items: center; font: 0.92rem var(--read); padding: 0.35rem 0.9rem; min-height: 40px;
  color: #2b2016; background: #f7efdc; border: 1px solid #8a6a3a; border-radius: 4px; cursor: pointer;
}
.map-unavailable { color: #6b5a44; font-style: italic; background: none; border: none; padding: 0; cursor: default; }
.map-action:hover, .map-action:focus-visible { background: #fffaf0; outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---- Life in the Realm: readable situations, not a wall of numbers ----------------- */

.situations-section, .residents-section { margin-top: 2.2rem; }
.situations { align-items: start; }
.situation { font-family: var(--read); font-size: 1.05rem; }
/* The bold words at the top of each card, and the figures' toggle, are set in Times New Roman
   (the administrator's request of 2026-09-17): the system's own face, nothing downloaded. */
.situation-subject { margin: 0 0 0.15rem; font: 700 0.88rem var(--times); letter-spacing: 0.05em; text-transform: uppercase; color: var(--crimson); }
.situation h3 { margin: 0 0 0.5rem; font: 700 1.35rem/1.25 var(--times); color: #3b0d10; }
.situation-text { margin: 0.35rem 0; font: 1.05rem/1.5 var(--read); color: var(--ink); }
.situation .figures { margin-top: 0.6rem; font: 1rem var(--read); }
.situation .figures dt { color: #2a1f14; }
.progress-line { margin: 0.5rem 0 0.15rem; font: 700 1rem var(--read); color: #2a1f14; }
.deadline { margin: 0.2rem 0 0.4rem; font: 700 0.98rem var(--read); color: #5a1216; }
.map-action-row { margin: 0.5rem 0; }
.situation .all-figures { font-size: 0.98rem; }
.situation .all-figures > summary { font-family: var(--times); font-weight: 700; }
.situation.unavailable { color: var(--ink-soft); font-style: italic; }
/* The older figure cards' rules are more specific than these; the stories read first. */
.ledger.situations .situation h3 { margin: 0.1rem 0 0.5rem; font: 700 1.4rem/1.25 var(--times); color: #3b0d10; }
.ledger.situations .situation .note { font: 0.95rem/1.45 var(--read); color: #4a3826; }
/* Links on parchment are ink, not the gold that reads on the burgundy. */
.proclamation a, .resident a, .story-view a { color: #6b1418; }
.proclamation a:hover, .resident a:hover, .story-view a:hover { color: #3b0d10; }
/* The site's gold focus ring vanishes on parchment: there it is drawn in ink. */
.card :focus-visible, .proclamation :focus-visible, .resident :focus-visible, .story-view :focus-visible, .map-selected :focus-visible { outline-color: #6b1418; }
/* Links to a record and the figures' toggles are touch targets too, not only words. */
.realm a[data-view] { display: inline-block; padding: 0.6rem 0; }
.realm summary { padding: 0.55rem 0; }
/* Times are essential: upright, in the reading face. */
.realm .proclaimed, .realm .earlier .when, .realm .hint, .realm .map-hover { font-family: var(--read); font-style: normal; }
/* A story under way takes two columns, but only where three fit: never a lone card beside a gap. */
@media (min-width: 1000px) {
  .situation-active { grid-column: span 2; }
}

/* ---- Around the Realm: agents people can recognize --------------------------------- */

.resident-list { display: grid; gap: 1.1rem; margin: 1.6rem 0 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.resident {
  padding: 1.1rem 1.25rem; color: var(--ink); background: var(--parchment);
  border: 1px solid #b08d3a; border-radius: 6px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  font-family: var(--read);
}
.resident-handle { margin: 0 0 0.25rem; font: 700 1.2rem var(--times); color: #5a1216; overflow-wrap: anywhere; }
.resident-phrase { margin: 0.15rem 0; font: 1.02rem/1.4 var(--read); }
.resident-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: 0.3rem 0; font: 0.9rem var(--read); color: #6b5a44; }
.resident-list > .quiet { grid-column: 1 / -1; text-align: center; font: 1.02rem/1.45 var(--read); color: #efe3c4; list-style: none; }
.realm .chart { margin-top: 2.4rem; }

/* ---- A story, or an agent's public chronicle -------------------------------------- */

.story-view {
  max-width: 760px; margin: 1.6rem auto 0; padding: 1.5rem 1.6rem;
  color: var(--ink); background: var(--parchment); font-family: var(--read);
  border: 1px solid #b08d3a; border-radius: 6px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}
.story-view h2 { margin: 0.4rem 0 0.3rem; font: 700 1.7rem/1.25 var(--read); color: #3b0d10; }
.story-status {
  display: inline-block; margin: 0 0 0.7rem; padding: 0.15rem 0.7rem;
  font: 700 0.88rem var(--heading); letter-spacing: 0.04em; color: #fff;
  background: var(--forest); border-radius: 999px;
}
.story-goal, .story-outcome { margin: 0.5rem 0; font: 1.08rem/1.5 var(--read); }
.story-outcome { font-weight: 700; }
.story-view .figures { margin: 0.8rem 0; }
.story-note { margin: 0.6rem 0 0; font-size: 0.92rem; color: #5a4632; }
.milestones { margin: 0.4rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(122, 92, 16, 0.35); }
.milestones li { display: flex; flex-wrap: wrap; gap: 0.15rem 0.7rem; padding: 0.5rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); font: 1rem/1.4 var(--read); }
.milestones time { flex: none; min-width: 6.5rem; color: #6b5a44; font-size: 0.92rem; }
/* Who is standing for office, each with its campaign statement in its own words. */
.standing { margin: 0.4rem 0 0; padding: 0; list-style: none; font: 1rem/1.45 var(--read); }
.standing li { padding: 0.45rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); overflow-wrap: anywhere; }
.standing .who { font-weight: 700; }
.standing q { display: block; margin-top: 0.2rem; quotes: "“" "”"; }
.standing .quiet, .standing-details .quiet { display: block; font-style: italic; color: #5a4632; }
.standing-details > summary { font-family: var(--times); font-weight: 700; cursor: pointer; }
.resident-events { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.resident-events li { padding: 0.6rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); }

/* ---- Stillness for those who ask for it -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .door, .banner { transition: none !important; }
  .pulse { animation: none; opacity: 0.85; }
  .proclamation.shimmer .vine, .proclamation.shimmer .acanthus, .proclamation.shimmer .crest { animation: none; }
  .mist-drift { animation: none; }
  .mist-lift, .frontier-light { animation: none; opacity: 0; }
}
