/* Wayfarer Isles website (D-456, D-457; the user's D-461 and D-462): a sea-blue top bar over warm parchment, brass and
   sunset tones, the key art as a large hero; Cinzel (the HUD's engraved caps, D-458) for the small titles, Cormorant
   Garamond for the large ones and Inter for the text, all light (D-461). Our own design. */
:root {
  --bar: #0e2a3f;
  --bar-2: #15395a;
  --bar-text: #efe5cf;
  --parchment: #f3e9d4;
  --parchment-2: #ebdec2;
  --vellum: #fbf6ea;
  --ink: #2c2219;
  --ink-soft: #54443a;
  --muted: #86735f;
  --brass: #b38b46;
  --brass-bright: #d8b36a;
  --brass-deep: #8b6831;
  --amber: #e5a052;
  --sunset: #cf6d3c;
  --ember: #a8492c;
  --sea: #1d5873;
  --walnut: #271d16;
  --hair: rgba(139, 104, 49, 0.3);
  --hair-soft: rgba(139, 104, 49, 0.16);
  --grid: rgba(139, 104, 49, 0.075);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 20px 40px -28px rgba(74, 46, 20, 0.5);
  --radius: 6px;
  --wrap: 1140px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --caps: "Cinzel", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  /* The key art (D-452): build.py writes session C's picture here when src/assets/key-art/ holds it (README); until
     then our drawn placeholder. The tall crop is the phones'; the focus keeps the picture's subject in view. */
  /* key-art:start */
  --key-art: url("hero.svg");
  --key-art-tall: var(--key-art);
  --key-art-focus: center 56%;
  --key-art-tall-focus: var(--key-art-focus);
  /* key-art:end */
  /* Paper: a fine grain drawn with SVG noise (a small tile: no visible seams). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.13 0.5 0 0 0 -0.19'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23g)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.7 var(--sans);
  color: var(--ink-soft);
  background-color: var(--parchment);
  background-image: var(--grain),
    radial-gradient(1400px 900px at 12% 0%, rgba(255, 250, 236, 0.6), transparent 62%),
    radial-gradient(1200px 900px at 100% 55%, rgba(205, 170, 112, 0.16), transparent 64%),
    radial-gradient(1400px 900px at 0% 100%, rgba(205, 170, 112, 0.14), transparent 60%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--sea); text-decoration: underline; text-decoration-color: rgba(29, 88, 115, 0.3); text-underline-offset: 3px; }
a:hover { color: var(--ember); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.12; margin: 0 0 0.45em; letter-spacing: 0.003em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: var(--caps); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--brass-deep); margin: 0 0 1rem;
}
.rule { width: 180px; max-width: 60%; height: 14px; margin: 1rem auto 1.5rem; background: url("ornament.svg") center / contain no-repeat; }
.lead {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.5;
  color: var(--ink-soft); max-width: 36em; margin: 0 auto 1.6rem;
}
.center { text-align: center; }

/* ---- The top bar: sea-blue (D-462), a brass hairline under it. ---- */
header.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1.1rem;
  padding: 0.6rem var(--gutter);
  background: linear-gradient(180deg, var(--bar-2), var(--bar));
  color: var(--bar-text);
  border-bottom: 1px solid rgba(216, 179, 106, 0.5);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 12px 30px -22px rgba(7, 20, 32, 0.9);
}
.brand {
  display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0;
  color: var(--bar-text); text-decoration: none;
  font-family: var(--caps); font-weight: 500; font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
}
.brand:hover { color: #fff; }
header nav { display: flex; align-items: center; gap: 0.1rem; margin-left: auto; }
header nav a {
  position: relative; padding: 0.45rem 0.62rem; color: rgba(239, 229, 207, 0.78); text-decoration: none;
  font-size: 0.88rem; letter-spacing: 0.03em; white-space: nowrap;
}
header nav a:hover, header nav a.active { color: #fff; }
header nav a.active::after { content: ""; position: absolute; left: 0.62rem; right: 0.62rem; bottom: 0.18rem; height: 1px; background: var(--brass-bright); }
header nav a.cta {
  margin-left: 0.5rem; padding: 0.45rem 1.05rem; border-radius: 999px; color: #26190b; font-weight: 500;
  background: linear-gradient(180deg, #e9c47c, #c9974a); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}
header nav a.cta:hover { color: #26190b; filter: brightness(1.06); }
header nav a.cta::after { display: none; }

/* The world's lantern (D-711): the players online on every page, a link to the list; hidden while unknown. */
.world-pill {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-left: 0.9rem; padding: 0.28rem 0.75rem; flex-shrink: 0;
  border: 1px solid rgba(216, 179, 106, 0.35); border-radius: 999px; color: rgba(239, 229, 207, 0.85); text-decoration: none;
  font-size: 0.78rem; letter-spacing: 0.04em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.world-pill[hidden] { display: none; }
.world-pill:hover { color: #fff; border-color: var(--brass-bright); }
.world-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #b9a88f; }
.world-pill.up .dot { background: #6fc28a; box-shadow: 0 0 0 3px rgba(111, 194, 138, 0.18); }
.world-pill.down .dot { background: var(--amber); }

/* The language flags (D-461): both shown, the current one ringed in brass. */
.langs { display: flex; align-items: center; gap: 0.45rem; padding-left: 1rem; border-left: 1px solid rgba(216, 179, 106, 0.3); }
.flag { display: block; line-height: 0; border-radius: 3px; opacity: 0.5; filter: saturate(0.55); transition: opacity 0.15s, filter 0.15s; }
.flag img { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.flag:hover { opacity: 0.95; filter: none; }
.flag[aria-current] { opacity: 1; filter: none; }
.flag[aria-current] img { box-shadow: 0 0 0 1px var(--bar), 0 0 0 2.5px var(--brass-bright); }

.menu {
  display: none; margin-left: 0.2rem; width: 2.5rem; height: 2.3rem; padding: 0; border-radius: 8px; cursor: pointer;
  background: none; border: 1px solid rgba(216, 179, 106, 0.4); flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.menu span { display: block; width: 18px; height: 1.5px; background: var(--bar-text); transition: transform 0.2s, opacity 0.2s; }
header.top.open .menu span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
header.top.open .menu span:nth-child(2) { opacity: 0; }
header.top.open .menu span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---- Layout ---- */
main > section { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
main > section.full { max-width: none; padding-inline: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- The hero: the key art, large, with a title plate like a chart's cartouche. ---- */
.hero { position: relative; padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero-art {
  position: relative; height: clamp(440px, 74vh, 860px); background: var(--key-art) var(--key-art-focus) / cover no-repeat, #6e5079;
  /* the art itself fades out, so the paper below shows through without a seam */
  -webkit-mask-image: linear-gradient(180deg, #000 56%, rgba(0, 0, 0, 0.55) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 56%, rgba(0, 0, 0, 0.55) 78%, transparent 100%);
}
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 42, 63, 0.35) 0%, rgba(14, 42, 63, 0) 16%); }
.plate {
  position: relative; z-index: 1;
  width: min(800px, calc(100% - 2 * var(--gutter)));
  margin: clamp(-240px, -17vw, -120px) auto 0;
  padding: clamp(2rem, 4.5vw, 3.4rem) clamp(1.3rem, 4.5vw, 3.8rem) clamp(1.8rem, 3.5vw, 2.8rem);
  text-align: center;
  background-color: var(--vellum); background-image: var(--grain);
  border: 1px solid var(--hair); border-radius: 2px;
  box-shadow: var(--shadow), 0 44px 80px -44px rgba(60, 32, 12, 0.6);
}
.plate::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--hair-soft); pointer-events: none; }
.plate::after {
  content: ""; position: absolute; inset: 3px; pointer-events: none;
  background:
    linear-gradient(var(--brass), var(--brass)) left top / 18px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) left top / 1px 18px no-repeat,
    linear-gradient(var(--brass), var(--brass)) right top / 18px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) right top / 1px 18px no-repeat,
    linear-gradient(var(--brass), var(--brass)) left bottom / 18px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) left bottom / 1px 18px no-repeat,
    linear-gradient(var(--brass), var(--brass)) right bottom / 18px 1px no-repeat,
    linear-gradient(var(--brass), var(--brass)) right bottom / 1px 18px no-repeat;
}
.plate h1 { margin-bottom: 0; }
.plate .lead { margin-bottom: 1.8rem; }
.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.status {
  display: inline-flex; align-items: center; gap: 0.6rem; margin: 1.5rem 0 0; font-size: 0.86rem; color: var(--muted);
}
.status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #b9a88f; box-shadow: 0 0 0 3px rgba(185, 168, 143, 0.2); }
.status.up::before { background: #4f9d66; box-shadow: 0 0 0 3px rgba(79, 157, 102, 0.18); }
.status.down::before { background: var(--sunset); box-shadow: 0 0 0 3px rgba(207, 109, 60, 0.18); }

/* ---- Buttons ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.86rem 1.6rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: 500 0.8rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s, border-color 0.15s;
}
.button.primary {
  color: #fff8ec; background: linear-gradient(180deg, #d9803f, #b85a2e); border-color: #a24d26;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 12px 22px -14px rgba(168, 73, 44, 0.9);
}
.button.primary:hover { color: #fff8ec; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 16px 26px -14px rgba(168, 73, 44, 0.95); }
.button.ghost { color: var(--ink); border-color: rgba(139, 104, 49, 0.45); background: transparent; }
.button.ghost:hover { color: var(--ink); border-color: var(--brass); background: rgba(179, 139, 70, 0.08); }
.button.light { color: #3b1e10; background: #fbf1dd; box-shadow: 0 10px 20px -14px rgba(60, 20, 5, 0.8); }
.button.light:hover { color: #3b1e10; transform: translateY(-1px); }
.button.outline-light { color: #fff6e6; border-color: rgba(255, 246, 230, 0.55); }
.button.outline-light:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---- Home: the three pillars ---- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: clamp(3.5rem, 8vw, 6.5rem); }
.pillar { padding: 0.4rem clamp(1.2rem, 3vw, 2.6rem); text-align: center; }
.pillar + .pillar { border-left: 1px solid var(--hair-soft); }
.pillar img { display: block; margin: 0 auto 1rem; }
.pillar h2 { font-size: 1.55rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.95rem; margin: 0 auto; max-width: 22em; }

/* ---- A chart's background: a faint grid and a compass rose ---- */
.chart { position: relative; isolation: isolate; overflow: hidden; overflow: clip; }
.chart::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 96px 96px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 25%, transparent 78%);
}
.chart::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 620px; height: 620px; right: -170px; top: -120px;
  background: url("rose.svg") center / contain no-repeat; opacity: 0.4;
}
.band { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--hair-soft); border-bottom: 1px solid var(--hair-soft);
  background-color: rgba(235, 222, 194, 0.45); }

.section-head { text-align: center; margin: 0 auto clamp(2rem, 4.5vw, 3rem); max-width: 44rem; }
.section-head .rule { margin-bottom: 0; }
.section-head h2 { margin-bottom: 0; }

/* ---- Vocations ---- */
.vocations { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.vocations.two { grid-template-columns: repeat(2, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); }
.vocation {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem;
  padding: 2.1rem 1.4rem 1.7rem; color: inherit; text-decoration: none;
  background-color: var(--vellum); background-image: var(--grain);
  border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
a.vocation:hover {
  color: inherit; transform: translateY(-3px); border-color: rgba(179, 139, 70, 0.6);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 28px 46px -30px rgba(74, 46, 20, 0.6);
}
.medal {
  width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 0.7rem; flex: none;
  background: radial-gradient(circle at 50% 32%, #fffbf1, #f0e2c4 72%);
  border: 1px solid rgba(179, 139, 70, 0.65);
  box-shadow: 0 0 0 5px rgba(179, 139, 70, 0.1), 0 0 0 6px rgba(179, 139, 70, 0.35);
}
.vocation strong, .vocation h2 {
  font-family: var(--caps); font-weight: 500; font-size: 0.98rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); margin: 0;
}
.vocation p, .voc-text { font-size: 0.92rem; line-height: 1.65; color: var(--ink-soft); margin: 0.2rem 0 0; }
.vocation .voc-promo { margin: auto 0 0; padding-top: 1rem; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--muted); }
.voc-promo em, .voc-promo strong {
  display: block; margin-top: 0.1rem; font-style: normal; font-family: var(--caps); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ember);
}
.vocations.two .vocation { padding: 2.4rem 2rem 2rem; }
.vocations.two .vocation p { font-size: 0.98rem; max-width: 30em; }

/* ---- Home: news and the download card ---- */
.closing { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 6rem); }
.news-teaser .date, .news .date { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); margin: 0 0 0.3rem; }
.news-teaser h2 { margin-bottom: 0.8rem; }
.fade { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.fade p { margin-bottom: 0.8em; }
.more {
  display: inline-block; margin-top: 0.8rem; font-family: var(--caps); font-size: 0.76rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ember); text-decoration: none;
}
.more:hover { color: var(--sunset); }
.download-card {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(2rem, 4vw, 2.8rem); border-radius: 10px; color: #fff4e2;
  background: linear-gradient(160deg, #e7a95c 0%, #d0703e 50%, #9c4331 100%);
  box-shadow: 0 34px 60px -36px rgba(120, 48, 24, 0.85);
}
.download-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: 0.8; mix-blend-mode: multiply; }
.download-card::after {
  content: ""; position: absolute; z-index: -1; right: -40px; bottom: -34px; width: 300px; height: 188px;
  background: url("sun.svg") center / contain no-repeat; opacity: 0.35;
}
.download-card h2 { color: #fffaf0; }
.download-card p { color: rgba(255, 244, 226, 0.9); max-width: 26em; }
.download-card .actions { justify-content: flex-start; margin-top: 1.4rem; }

/* ---- Inner pages ---- */
.page-art {
  position: relative; height: clamp(130px, 19vw, 230px); background: var(--key-art) var(--key-art-focus) / cover no-repeat, #6e5079;
  -webkit-mask-image: linear-gradient(180deg, #000 35%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 35%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
}
.page-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 42, 63, 0.3) 0%, rgba(14, 42, 63, 0) 30%); }
.page { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.page-head { position: relative; text-align: center; max-width: 46rem; margin: clamp(0.4rem, 1.5vw, 1.2rem) auto clamp(2.2rem, 5vw, 3.5rem); }
.page-head h1 { margin-bottom: 0; }
.page-head .lead { margin-bottom: 0; }
.page-head .rule { margin-bottom: 1.3rem; }
.page .section-head { margin-top: clamp(3rem, 7vw, 5rem); }

.prose { max-width: 40rem; margin-inline: auto; font-size: 1.04rem; line-height: 1.85; }
.prose p { margin-bottom: 1.1em; }
.chapter { margin: 0 0 clamp(2.8rem, 6vw, 4rem); }
.numeral { text-align: center; font-family: var(--caps); font-size: 0.82rem; letter-spacing: 0.34em; color: var(--brass); margin: 0 0 0.4rem; }
.chapter h2 { text-align: center; margin-bottom: 1.1rem; }
.chapter:first-child h2 + p::first-letter {
  float: left; font-family: var(--serif); font-weight: 500; font-size: 4.4em; line-height: 0.8; padding: 0.08em 0.12em 0 0; color: var(--ember);
}
.chapter:last-child p:last-child { font-family: var(--serif); font-style: italic; font-size: 1.3rem; text-align: center; color: var(--ink); }

.places { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 3rem; }
.places li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; align-items: start; padding-bottom: 1.4rem; border-bottom: 1px solid var(--hair-soft); }
.places h3 { margin: 0.05rem 0 0.25rem; font-size: 1.3rem; }
.places p { margin: 0; font-size: 0.95rem; }
.pin {
  width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--caps); font-weight: 500; font-size: 0.86rem; color: #fff6e8;
  background: radial-gradient(circle at 38% 32%, #de8a4f, #a8492c 75%);
  box-shadow: 0 0 0 3px rgba(168, 73, 44, 0.14), 0 6px 12px -6px rgba(120, 40, 20, 0.7);
}

.route { list-style: none; margin: 0 auto; padding: 0; max-width: 44rem; position: relative; }
.route::before { content: ""; position: absolute; left: 1.1rem; top: 1.4rem; bottom: 2.2rem; border-left: 2px dotted rgba(168, 73, 44, 0.4); }
.route li { position: relative; display: grid; grid-template-columns: 2.3rem 1fr; gap: 1.3rem; padding-bottom: 1.9rem; }
.route li:last-child { padding-bottom: 0; }
.route h3 { margin: 0.1rem 0 0.25rem; }
.route p { margin: 0; }
.route li > p { padding-top: 0.25rem; }

.card {
  position: relative; background-color: var(--vellum); background-image: var(--grain);
  border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
}
.card.download { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: 52rem; margin: 0 auto; }
.card.download h2 { font-family: var(--caps); font-size: 1.1rem; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 0.4rem; }
.card.download p { margin: 0; }
.card.news { max-width: 44rem; margin: 0 auto; }
.note {
  max-width: 44rem; margin: 2rem auto 0; padding: 0.95rem 1.2rem; font-size: 0.92rem; color: var(--ink-soft);
  background: rgba(229, 160, 82, 0.1); border-left: 2px solid var(--amber); border-radius: 0 var(--radius) var(--radius) 0;
}
.note.center { text-align: center; border-left: 0; border-radius: var(--radius); }
.note.warning { margin-top: 0; margin-bottom: 1.5rem; color: var(--ink); font-weight: 500; background: rgba(207, 109, 60, 0.12); border-left-color: var(--sunset); }

/* ---- Forms and tables ---- */
.search { max-width: 40rem; margin: 0 auto; }
.search label, .filters label {
  display: block; font-family: var(--caps); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--brass-deep); margin-bottom: 0.6rem;
}
.search .row { display: flex; gap: 0.7rem; }
input, select {
  font: 400 1rem var(--sans); color: var(--ink); background: #fffdf7; border: 1px solid rgba(139, 104, 49, 0.35); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input { flex: 1; min-width: 0; padding: 0.82rem 1.25rem; border-radius: 999px; }
select {
  appearance: none; -webkit-appearance: none; padding: 0.72rem 2.6rem 0.72rem 1rem; border-radius: 10px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238b6831' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.95rem center;
}
input:focus, select:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(179, 139, 70, 0.18); }
.filters { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; margin: 0 auto 2rem; }
.filters select { display: block; min-width: 14rem; }
.table-wrap { max-width: 900px; margin: 0 auto; overflow-x: auto; }
.table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums;
  background-color: var(--vellum); background-image: var(--grain);
  border: 1px solid var(--hair); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.table th {
  font-family: var(--caps); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass-deep);
  text-align: left; padding: 1rem 1.15rem 0.85rem; border-bottom: 1px solid var(--hair); background: rgba(235, 222, 194, 0.55);
}
.table td { padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--hair-soft); color: var(--ink-soft); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(229, 160, 82, 0.07); }
.table td a { color: var(--ink); font-weight: 500; text-decoration: none; }
.table td a:hover { color: var(--ember); }
.table .empty { text-align: center; color: var(--muted); padding: 1.8rem; font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
[aria-busy="true"] { opacity: 0.62; transition: opacity 0.2s; }
.loading { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
.count { text-align: center; }
.result { max-width: 40rem; margin: 2.2rem auto 0; }
.character h2 { margin-bottom: 0.2rem; }
.character dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.8rem; margin: 1.2rem 0 1.6rem; }
.character dt { font-family: var(--caps); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); padding-top: 0.28rem; }
.character dd { margin: 0; color: var(--ink); }
.character h3 { font-size: 1.25rem; }
.deaths { margin: 0; padding-left: 1.1rem; }
.badge {
  display: inline-block; font-family: var(--caps); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid rgba(207, 109, 60, 0.4); color: var(--ember);
  background: rgba(229, 160, 82, 0.1); margin-bottom: 1rem;
}
.online-dot { color: #4f9d66; }

/* ---- Footer: walnut, brass ---- */
footer { background-color: var(--walnut); color: rgba(239, 229, 207, 0.72); border-top: 1px solid rgba(216, 179, 106, 0.35); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 3rem var(--gutter) 3.4rem; text-align: center; }
.footer-name { font-family: var(--caps); font-size: 0.86rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--brass-bright); margin: 0.9rem 0 0.5rem; }
footer p { margin: 0.25rem 0; font-size: 0.9rem; }
footer .small { font-family: var(--serif); font-style: italic; font-size: 1.02rem; opacity: 0.8; }

/* ---- Narrow screens ---- */
@media (max-width: 1080px) {
  header.top { flex-wrap: wrap; gap: 0.8rem; }
  .langs { margin-left: auto; }
  .world-pill { margin-left: auto; }
  .world-pill:not([hidden]) + .langs { margin-left: 0; }
  .menu { display: inline-flex; }
  header nav {
    order: 5; display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0.2rem 0 0.3rem; padding-top: 0.5rem;
    border-top: 1px solid rgba(216, 179, 106, 0.25);
  }
  header.top.open nav { display: flex; }
  header nav a { padding: 0.72rem 0.3rem; font-size: 1rem; }
  header nav a.active::after { left: 0.3rem; right: auto; width: 1.5rem; bottom: 0.45rem; }
  header nav a.cta { margin: 0.5rem 0 0.3rem; text-align: center; }
}
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; gap: 2.2rem; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--hair-soft); padding-top: 2.2rem; }
  .vocations { grid-template-columns: repeat(2, 1fr); }
  .closing { grid-template-columns: 1fr; }
  .places { grid-template-columns: 1fr; }
  .card.download { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  .brand span { letter-spacing: 0.12em; font-size: 0.92rem; }
  .langs { padding-left: 0.7rem; }
  .hero-art { height: 56vh; min-height: 340px; background-image: var(--key-art-tall); background-position: var(--key-art-tall-focus); }
  .world-pill { padding: 0.5rem; }
  .world-pill [data-f="text"] { display: none; } /* the lantern alone; its label says the rest */
  .plate { margin-top: -90px; }
  .vocations, .vocations.two { grid-template-columns: 1fr; }
  .search .row { flex-direction: column; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .chart::after { width: 420px; height: 420px; right: -200px; top: -80px; }
  .download-card .actions .button { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  .world-pill { display: none; } /* a phone's bar has room for the flags and the menu only; the home page and the list tell */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
