/* The Underground, an in-character prediction exchange for Elysian.
   Styled like www.elysianmc.world: the shell rules below are copied from the main site's
   revised/styles.css, so change them there first and copy them across. */

/* Fonts are hosted here, nothing loads from other sites. Same files as the main website:
   the Slightly Improved pixel font (MIT), Cormorant Garamond and Sora (SIL OFL), licences in fonts/. */
/* main font: Minecraft-style pixel font from the Slightly Improved Font resource pack
   (MIT, fonts/LICENSE-Slightly-Improved-Font.txt), built by sites/tools/build_pixel_font.py.
   Bold is Minecraft's own bold. Sora fills in for any character it lacks. */
@font-face {
  font-family: "Slightly Improved";
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
  src: url("fonts/slightly-improved-regular-extended.woff2") format("woff2");
  unicode-range: U+0100-0130, U+0132-0151, U+0154-02AF, U+02BB, U+02CC, U+02D9, U+0327, U+037E, U+0386-038A, U+038C, U+038E-03A1, U+03A3-03CE, U+03D3-03D4, U+03DB, U+0400-045F, U+0462-0463, U+0472-0477, U+048A-04CE, U+04D0-0500, U+0502-052F, U+0531-0556, U+0559-0588, U+058A, U+058F, U+05BE, U+05C3, U+05C6, U+05D0-05EA, U+05F0-05F4, U+07C8, U+10A0-10C5, U+10C7, U+10CD, U+10D0-10FF, U+15E1, U+15FA, U+1614, U+16A0-16F8, U+1D00, U+1D02, U+1D04-1D05, U+1D07, U+1D09-1D0B, U+1D0D, U+1D0F, U+1D14, U+1D18, U+1D1A-1D1C, U+1D20-1D22, U+1D6B-1D77, U+1D7A, U+1D80-1D9A, U+1E00-1F15, U+1F18-1F1D, U+1F20-1F45, U+1F48-1F4D, U+1F50-1F57, U+1F59, U+1F5B, U+1F5D, U+1F5F-1F7D, U+1F80-1FB4, U+1FB6-1FBC, U+1FC2-1FC4, U+1FC6-1FCC, U+1FD0-1FD3, U+1FD6-1FDB, U+1FE0-1FEC, U+1FF2-1FF4, U+1FF6-1FFC, U+2070-2071, U+2074-208E, U+20A0-20AB, U+20AD-20BF, U+2116-2117, U+2132, U+2139, U+2141, U+2144, U+214B, U+2150-215F, U+2189, U+2190, U+2192, U+2194, U+21C4, U+21CF, U+21D2, U+21D4, U+21F5, U+2200-2205, U+2208-2209, U+220B-220C, U+2211, U+2213, U+2219-221E, U+2225, U+2227-2229, U+222B, U+222E, U+2234-2235, U+2248, U+2254, U+2260-2262, U+2264-2265, U+2282-2287, U+22A2, U+22A4-22A5, U+22A8, U+22BB-22BD, U+22C3, U+22C6, U+2300, U+2302, U+2318, U+231A-231B, U+2320-2321, U+23CF, U+23E9-23EA, U+23ED-23EF, U+23F3-23FD, U+2460-2473, U+24B6-24EA, U+2500, U+2502, U+250C, U+2510, U+2514, U+2518, U+251C, U+2524, U+252C, U+2534, U+253C, U+2550-256C, U+2580, U+2584, U+2588, U+258C, U+2590-2593, U+25A0-25A1, U+25B2-25B3, U+25B6-25B7, U+25BC-25BD, U+25C0-25C1, U+25C6-25C7, U+25CB, U+25CE-25CF, U+25D8, U+25E6, U+2600-2606, U+2608, U+2610-2612, U+2614, U+261C, U+261E, U+2620, U+262E-2637, U+2639-263B, U+263D, U+2640, U+2642, U+2660-2667, U+2669-266F, U+2680-2685, U+2690-2691, U+2693-2694, U+2697, U+26A0-26A1, U+26A5, U+26C4, U+26C8, U+26CF, U+26E8, U+2702, U+2709, U+270E, U+2714, U+2718, U+2744, U+274C, U+2763-2764, U+27D8, U+295D, U+29C8, U+2B50, U+2B58, U+2BEA-2BEB, U+2C62, U+2C65-2C66, U+2C6D, U+2C6F, U+2C71, U+2C7E-2C7F, U+2D00-2D25, U+2E18, U+2E2E, U+2E35, U+2E38, U+2E41, U+2E4B, U+3012, U+3125, U+A680-A697, U+A726-A729, U+A730-A73F, U+A74E-A74F, U+A75A-A75B, U+A760-A761, U+A779, U+A780-A781, U+A794-A795, U+A7A8-A7A9, U+A7AF-A7B0, U+A7C4, U+A7C6, U+AB50-AB51, U+AB63, U+FB00-FB06, U+FB13-FB17, U+FB1D, U+FB1F, U+FB2B, U+FB2E-FB2F, U+FB31, U+FB35, U+FB3B, U+FB44, U+FB4A-FB4C, U+FB4E, U+FF0B, U+FFFD, U+10330-1034A, U+1F30A, U+1F327, U+1F356, U+1F3A3, U+1F3F9, U+1F514, U+1F525, U+1F531, U+1F5E1, U+1F6E1, U+1F9EA, U+1FA93, U+1FAA3;
}

@font-face {
  font-family: "Slightly Improved";
  font-style: normal;
  font-weight: 100 500;
  font-display: swap;
  src: url("fonts/slightly-improved-regular-latin.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00B7, U+00B9-00FF, U+0131, U+0152-0153, U+2010-2011, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030-2037, U+2039-203D, U+2042, U+2047-204B, U+204E-204F, U+2051-2052, U+2057, U+20AC, U+2122, U+2191, U+2193, U+2212;
}

@font-face {
  font-family: "Slightly Improved";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("fonts/slightly-improved-bold-extended.woff2") format("woff2");
  unicode-range: U+0100-0130, U+0132-0151, U+0154-02AF, U+02BB, U+02CC, U+02D9, U+0327, U+037E, U+0386-038A, U+038C, U+038E-03A1, U+03A3-03CE, U+03D3-03D4, U+03DB, U+0400-045F, U+0462-0463, U+0472-0477, U+048A-04CE, U+04D0-0500, U+0502-052F, U+0531-0556, U+0559-0588, U+058A, U+058F, U+05BE, U+05C3, U+05C6, U+05D0-05EA, U+05F0-05F4, U+07C8, U+10A0-10C5, U+10C7, U+10CD, U+10D0-10FF, U+15E1, U+15FA, U+1614, U+16A0-16F8, U+1D00, U+1D02, U+1D04-1D05, U+1D07, U+1D09-1D0B, U+1D0D, U+1D0F, U+1D14, U+1D18, U+1D1A-1D1C, U+1D20-1D22, U+1D6B-1D77, U+1D7A, U+1D80-1D9A, U+1E00-1F15, U+1F18-1F1D, U+1F20-1F45, U+1F48-1F4D, U+1F50-1F57, U+1F59, U+1F5B, U+1F5D, U+1F5F-1F7D, U+1F80-1FB4, U+1FB6-1FBC, U+1FC2-1FC4, U+1FC6-1FCC, U+1FD0-1FD3, U+1FD6-1FDB, U+1FE0-1FEC, U+1FF2-1FF4, U+1FF6-1FFC, U+2070-2071, U+2074-208E, U+20A0-20AB, U+20AD-20BF, U+2116-2117, U+2132, U+2139, U+2141, U+2144, U+214B, U+2150-215F, U+2189, U+2190, U+2192, U+2194, U+21C4, U+21CF, U+21D2, U+21D4, U+21F5, U+2200-2205, U+2208-2209, U+220B-220C, U+2211, U+2213, U+2219-221E, U+2225, U+2227-2229, U+222B, U+222E, U+2234-2235, U+2248, U+2254, U+2260-2262, U+2264-2265, U+2282-2287, U+22A2, U+22A4-22A5, U+22A8, U+22BB-22BD, U+22C3, U+22C6, U+2300, U+2302, U+2318, U+231A-231B, U+2320-2321, U+23CF, U+23E9-23EA, U+23ED-23EF, U+23F3-23FD, U+2460-2473, U+24B6-24EA, U+2500, U+2502, U+250C, U+2510, U+2514, U+2518, U+251C, U+2524, U+252C, U+2534, U+253C, U+2550-256C, U+2580, U+2584, U+2588, U+258C, U+2590-2593, U+25A0-25A1, U+25B2-25B3, U+25B6-25B7, U+25BC-25BD, U+25C0-25C1, U+25C6-25C7, U+25CB, U+25CE-25CF, U+25D8, U+25E6, U+2600-2606, U+2608, U+2610-2612, U+2614, U+261C, U+261E, U+2620, U+262E-2637, U+2639-263B, U+263D, U+2640, U+2642, U+2660-2667, U+2669-266F, U+2680-2685, U+2690-2691, U+2693-2694, U+2697, U+26A0-26A1, U+26A5, U+26C4, U+26C8, U+26CF, U+26E8, U+2702, U+2709, U+270E, U+2714, U+2718, U+2744, U+274C, U+2763-2764, U+27D8, U+295D, U+29C8, U+2B50, U+2B58, U+2BEA-2BEB, U+2C62, U+2C65-2C66, U+2C6D, U+2C6F, U+2C71, U+2C7E-2C7F, U+2D00-2D25, U+2E18, U+2E2E, U+2E35, U+2E38, U+2E41, U+2E4B, U+3012, U+3125, U+A680-A697, U+A726-A729, U+A730-A73F, U+A74E-A74F, U+A75A-A75B, U+A760-A761, U+A779, U+A780-A781, U+A794-A795, U+A7A8-A7A9, U+A7AF-A7B0, U+A7C4, U+A7C6, U+AB50-AB51, U+AB63, U+FB00-FB06, U+FB13-FB17, U+FB1D, U+FB1F, U+FB2B, U+FB2E-FB2F, U+FB31, U+FB35, U+FB3B, U+FB44, U+FB4A-FB4C, U+FB4E, U+FF0B, U+FFFD, U+10330-1034A, U+1F30A, U+1F327, U+1F356, U+1F3A3, U+1F3F9, U+1F514, U+1F525, U+1F531, U+1F5E1, U+1F6E1, U+1F9EA, U+1FA93, U+1FAA3;
}

@font-face {
  font-family: "Slightly Improved";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("fonts/slightly-improved-bold-latin.woff2") format("woff2");
  unicode-range: U+0020-007E, U+00A0-00B7, U+00B9-00FF, U+0131, U+0152-0153, U+2010-2011, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030-2037, U+2039-203D, U+2042, U+2047-204B, U+204E-204F, U+2051-2052, U+2057, U+20AC, U+2122, U+2191, U+2193, U+2212;
}

/* heading and fallback fonts; SIL OFL in fonts/OFL-*.txt */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/sora-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/sora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* the main site's palette */
  --bg: #11100d;
  --bg-soft: #171410;
  --bg-surface: #211d17;
  --bg-surface-alt: #28221b;
  --gold: #c8a15f;
  --gold-soft: rgba(200, 161, 95, 0.2);
  --forest: #2f4a39;
  --text-primary: #f2eee7;
  --text-secondary: #b9afa2;
  --line: rgba(242, 238, 231, 0.12);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.34);
  --shadow-glow: 0 0 36px rgba(200, 161, 95, 0.18);
  --ease-main: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 8px;
  /* wider than the main site's 1140px: the exchange board needs the room, and the door scene was laid out on it */
  --container: min(1320px, calc(100% - 2.5rem));
  /* the Underground's own */
  --ink: #0f0d0a; /* solid fill for the door scene's shapes and buttons, the night sky's base colour */
  --yes: #93b874;
  --yes-soft: rgba(147, 184, 116, 0.13);
  --no: #d0766a;
  --no-soft: rgba(208, 118, 106, 0.13);
}

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

/* ==========================================================================
   Shell: copied from the main site
   ========================================================================== */

/* transparent body keeps fixed layers visible */
html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: "Slightly Improved", "Sora", sans-serif;
  background: transparent;
  color: var(--text-primary);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(1200px 600px at 12% -15%, rgba(200, 161, 95, 0.13), transparent 70%),
    radial-gradient(900px 550px at 92% 8%, rgba(47, 74, 57, 0.16), transparent 72%),
    linear-gradient(180deg, #120f0c 0%, #0f0d0a 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 3px,
      rgba(255, 255, 255, 0.045) 4px
    );
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.03em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 1.15rem;
  font-weight: 600;
}

h3 {
  font-size: clamp(1.45rem, 2.1vw, 1.8rem);
  margin-bottom: 0.7rem;
  font-weight: 600;
}

p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 1vw + 0.45rem, 1.06rem);
}

.nav-links a[aria-current="page"],
.mobile-menu a[aria-current="page"] {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(200, 161, 95, 0.22);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition:
    background-color 240ms var(--ease-main),
    border-color 240ms var(--ease-main),
    box-shadow 240ms var(--ease-main),
    backdrop-filter 240ms var(--ease-main);
}

.navbar.is-solid {
  background: rgba(17, 14, 11, 0.76);
  border-bottom: 1px solid rgba(200, 161, 95, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

.nav-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 34px;
  max-width: min(215px, 46vw);
  object-fit: contain;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 1.35rem;
  font-size: 0.93rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.nav-links a {
  position: relative;
  color: color-mix(in srgb, var(--text-primary) 88%, var(--gold) 12%);
  transition: color 220ms var(--ease-main), text-shadow 220ms var(--ease-main);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 42%, transparent 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-main);
}

.nav-links a:hover {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(200, 161, 95, 0.24);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(24, 21, 16, 0.74);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.26rem;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--text-primary);
  transition: transform 240ms var(--ease-main), opacity 240ms var(--ease-main);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.78rem 1.32rem;
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 600;
  transition:
    transform 220ms var(--ease-main),
    box-shadow 220ms var(--ease-main),
    background-color 220ms var(--ease-main),
    border-color 220ms var(--ease-main),
    color 220ms var(--ease-main);
}

.btn-secondary {
  border: 1px solid rgba(242, 238, 231, 0.22);
  background: transparent;
  color: var(--text-primary);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 161, 95, 0.5);
  background: rgba(200, 161, 95, 0.09);
}

.panel {
  position: relative;
  background: linear-gradient(160deg, rgba(34, 28, 21, 0.86), rgba(24, 20, 15, 0.9));
  border: 1px solid rgba(242, 238, 231, 0.09);
  border-radius: 10px;
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
  transition:
    transform 240ms var(--ease-main),
    border-color 240ms var(--ease-main),
    box-shadow 240ms var(--ease-main);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(200, 161, 95, 0.9);
  border-left: 1px solid rgba(200, 161, 95, 0.9);
  opacity: 0.9;
}

.panel:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 161, 95, 0.35);
  box-shadow: var(--shadow-soft), 0 0 26px rgba(200, 161, 95, 0.14);
}

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: rgba(10, 9, 7, 0.8);
}

.footer-inner {
  padding: 1.2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--text-secondary) 85%, #fff 15%);
}

.footer .footer-brand p {
  color: var(--gold);
}

.footer .footer-brand p a {
  color: inherit;
  text-decoration: none;
}

.footer .footer-brand p a:hover,
.footer .footer-brand p a:focus-visible {
  color: #f0c56e;
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 0.35rem;
  margin: 0.55rem 0 0 -0.4rem;
  padding: 0;
  list-style: none;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  color: color-mix(in srgb, var(--text-secondary) 80%, #fff 20%);
  transition: color 220ms var(--ease-main), background-color 220ms var(--ease-main);
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--gold);
  background: rgba(200, 161, 95, 0.1);
}

.footer-social svg {
  width: 1.15rem;
  height: 1.15rem;
}

.footer-legal {
  flex-basis: 100%;
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 238, 231, 0.68);
}

.star-sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the main site's welcome dialog (revised/styles.css), used here for logging in */
.welcome {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  background: #0b0a08;
  color: var(--text-primary);
}

.welcome[open] {
  animation: welcome-in 450ms var(--ease-main) both;
}

.welcome.is-closing {
  animation: welcome-out 320ms var(--ease-main) both;
}

@keyframes welcome-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes welcome-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.welcome::backdrop {
  background: #0b0a08;
}

.welcome .welcome-backdrop {
  position: fixed;
  -webkit-mask-image: none;
  mask-image: none;
}

.welcome-inner {
  --menu-ink: #f0eee7;
  --menu-gold: #e8b75e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: clamp(2rem, 6vh, 4rem) 1rem;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.6);
}

.welcome-emblem {
  --title-width: min(80vw, 520px);
}

.welcome-title {
  margin: 1.2rem 0 0.2rem;
  font-family: "Slightly Improved", "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--menu-gold);
}

.welcome-question {
  margin: 0 0 1.4rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--menu-ink);
}

.welcome-inner:focus {
  outline: none;
}

/* captions on touch; readout on hover */
.welcome-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.5rem, 4vw, 2.75rem);
}

.welcome-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem;
  border: 0;
  background: none;
  color: rgba(240, 238, 231, 0.8);
  cursor: pointer;
  transition:
    color 220ms var(--ease-main),
    transform 220ms var(--ease-main),
    filter 220ms var(--ease-main);
}

.welcome-choice svg {
  width: clamp(3.2rem, 8vw, 4.4rem);
  height: auto;
  overflow: visible;
}

.welcome-choice:hover,
.welcome-choice:focus-visible {
  color: var(--menu-gold);
  transform: scale(1.06);
  filter: drop-shadow(0 0 10px rgba(232, 183, 94, 0.5));
  outline: none;
}

.welcome-caption {
  max-width: 6.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.welcome-readout {
  min-height: 3.6rem;
  margin: 1rem 0 0;
}

.welcome-readout-title {
  display: block;
  min-height: 1.45em;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--menu-gold);
}

.welcome-readout-text {
  display: block;
  font-size: 0.86rem;
  color: rgba(240, 238, 231, 0.72);
}

@media (hover: hover) {
  .welcome-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (hover: none) {
  .welcome-readout {
    display: none;
  }
}

.welcome-note {
  margin: 1.8rem 0 0;
  font-size: 0.82rem;
  color: rgba(185, 181, 173, 0.9);
}

@media (prefers-reduced-motion: reduce) {
  .welcome[open],
  .welcome.is-closing {
    animation: none;
  }

  .welcome-choice {
    transition: none;
  }
}

/* lock scrolling behind dialog */
html:has(.welcome[open]) {
  overflow: hidden;
}

/* the main site's sections and legal page (revised/styles.css), used by privacy.html */
.section {
  position: relative;
  padding: 72px 0;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.01) 0%,
    transparent 30%,
    transparent 70%,
    rgba(0, 0, 0, 0.22) 100%
  );
}

.section-head {
  max-width: 760px;
  margin-bottom: 2.4rem;
}

.section-head p {
  max-width: 68ch;
}

.section.section-privacy {
  padding-top: calc(76px + clamp(2.2rem, 5vw, 3.5rem));
}

.legal-text {
  max-width: 68ch;
}

.legal-text h3 {
  margin: 2rem 0 0.5rem;
  font-size: clamp(1.4rem, 2vw, 1.65rem);
}

.legal-text h3:first-child {
  margin-top: 0;
}

.legal-link {
  color: color-mix(in srgb, var(--gold) 80%, #fff 20%);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-link:hover {
  color: var(--gold);
}

.legal-email {
  color: var(--text-primary);
  overflow-wrap: anywhere;
  user-select: all;
}

.legal-updated {
  margin-top: 2.4rem;
  font-size: 0.86rem;
}

/* --- Underground additions to the shell --- */

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

.navbar {
  transition:
    background-color 240ms var(--ease-main),
    border-color 240ms var(--ease-main),
    box-shadow 240ms var(--ease-main),
    backdrop-filter 240ms var(--ease-main),
    opacity 240ms var(--ease-main),
    transform 240ms var(--ease-main),
    visibility 240ms var(--ease-main);
}

/* the cellar door has its own menu, so the bar waits until the door has scrolled away */
.navbar.over-door {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
}

.brand-sub {
  margin-left: 0.8rem;
  padding-left: 0.8rem;
  border-left: 1px solid rgba(200, 161, 95, 0.35);
  color: var(--text-primary);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.elysian-word {
  color: var(--gold);
}

/* ==========================================================================
   The cellar door: the opening scene from the May 2026 design, colours changed only
   ========================================================================== */

.door-entry {
  min-height: 100vh;
  padding: clamp(1rem, 3vh, 2rem) 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.basement-picture {
  position: relative;
  width: min(860px, 100%);
  height: clamp(360px, 58vh, 560px);
  margin: 0 auto;
  border: 1px solid rgba(242, 238, 231, 0.42);
  background:
    linear-gradient(90deg, rgba(242, 238, 231, 0.035), transparent 24%, transparent 76%, rgba(242, 238, 231, 0.026)),
    repeating-linear-gradient(90deg, rgba(242, 238, 231, 0.04) 0 1px, transparent 1px 72px),
    transparent;
  overflow: hidden;
}

.basement-picture::before,
.basement-picture::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.basement-picture::before {
  background:
    radial-gradient(circle at 40% 15%, rgba(242, 238, 231, 0.08), transparent 34%),
    radial-gradient(circle at 50% 74%, rgba(15, 13, 10, 0.62), transparent 46%);
}

.basement-picture::after {
  border: 1px solid rgba(242, 238, 231, 0.16);
  inset: 13px;
}

.underground-title {
  margin: 1rem auto 0;
  text-align: center;
  color: var(--text-primary);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.entry-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.1rem auto 0;
}

.entry-menu a {
  position: relative;
  line-height: 1.65;
  min-width: 118px;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(242, 238, 231, 0.62);
  color: var(--text-primary);
  font-family: "Slightly Improved", "Sora", sans-serif;
  font-size: 0.82rem;
  text-align: center;
  background: var(--ink);
}

.entry-menu a:nth-child(1) {
  transform: rotate(-1.1deg);
}

.entry-menu a:nth-child(2) {
  transform: rotate(0.7deg);
}

.entry-menu a:nth-child(3) {
  transform: rotate(-0.45deg);
}

.entry-menu a:nth-child(4) {
  transform: rotate(1.05deg);
}

.entry-menu a::before,
.entry-menu a::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 1px;
  background: var(--ink);
  border-top: 1px solid rgba(242, 238, 231, 0.8);
}

.entry-menu a::before {
  left: 11px;
  top: -1px;
  transform: rotate(-18deg);
}

.entry-menu a::after {
  right: 15px;
  bottom: -1px;
  transform: rotate(14deg);
}

@media (max-width: 640px) {
  .door-entry > .container {
    width: min(1320px, calc(100% - 1.4rem));
  }

  .door-entry {
    min-height: 92vh;
  }

  .basement-picture {
    height: 330px;
  }

  .entry-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-menu a {
    min-width: 0;
  }
}

.door-entry {
  min-height: 100vh;
  padding: 0.2rem 0 1rem;
  overflow-x: clip;
}

.door-entry > .container {
  overflow-x: clip;
}

.basement-picture {
  width: min(1480px, 110vw);
  height: clamp(560px, 86vh, 900px);
  border: 0;
  background: transparent;
  overflow: visible;
  transform: translateY(clamp(-2.8rem, -4vh, -1.5rem));
}

.basement-picture::before,
.basement-picture::after {
  display: none;
}

.basement-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: scale(1.08);
  transform-origin: 50% 50%;
}

/* The drawing (redrawn December 2026): a stone arch, a planked door, solid steps and the door's
   light on the treads. Line weights are screen pixels, whatever size the drawing is shown at. */
.basement-svg path,
.basement-svg circle {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 6;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}

.basement-svg .ug-solid {
  fill: var(--ink);
  stroke: none;
}

/* what's left of the room: a corner for the cobweb and the ground, fading into the night */
.basement-room .ug-room-ground {
  stroke: url(#ugFadeGround);
  stroke-width: 4;
}

.basement-room .ug-room-wall {
  stroke: url(#ugFadeWall);
  stroke-width: 4;
}

.basement-room .ug-room-ceiling {
  stroke: url(#ugFadeCeiling);
  stroke-width: 4;
}

.basement-room .ug-room-floor {
  stroke: url(#ugFadeFloor);
  stroke-width: 4;
}

.basement-cobweb .ug-web {
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.5;
}

.basement-stairs .ug-faint {
  stroke-width: 3;
  opacity: 0.32;
}

.basement-stairs .ug-riser {
  stroke-width: 5;
  opacity: 0.85;
}

.basement-stairs .ug-tread {
  stroke-width: 7;
}

.basement-svg .ug-tread-light {
  fill: url(#ugTreadLight);
  stroke: none;
}

.basement-door .door-gap-light {
  fill: url(#ugGapLight);
  stroke: none;
}

.basement-door .ug-stone {
  stroke-width: 3;
  opacity: 0.75;
}

.basement-door .ug-arch-inner {
  stroke-width: 4;
}

.basement-door .ug-arch-outer {
  stroke-width: 9;
}

.basement-door .ug-keystone-line {
  stroke-width: 4;
}

.basement-door .ug-plank {
  stroke-width: 3;
  opacity: 0.8;
}

.basement-door .ug-solid.ug-strap {
  stroke: var(--text-primary);
  stroke-width: 3;
}

.basement-door .ug-rivet,
.basement-door .ug-ring-plate {
  fill: var(--text-primary);
  stroke: none;
}

.basement-door .ug-leaf {
  stroke-width: 6;
}

.basement-door .door-knob-svg {
  stroke-width: 4;
}

.basement-door .door-hover-target {
  fill: rgba(242, 238, 231, 0.001);
  stroke: none;
  pointer-events: all;
}

.door-link,
.basement-door {
  cursor: pointer;
}

/* the light behind the door breathes a little, like a lamp; it rests at full brightness.
   It dims by brightness, not opacity, so the gap's light stays solid over the floor light at the threshold */
.basement-svg .ug-light {
  animation: ug-lamp 7s ease-in-out infinite;
}

@keyframes ug-lamp {
  0%,
  100% {
    filter: brightness(1);
  }

  30% {
    filter: brightness(0.9);
  }

  36% {
    filter: brightness(0.97);
  }

  62% {
    filter: brightness(0.88);
  }

  72% {
    filter: brightness(1);
  }
}

/* pointing at the door (a link to the main site) brightens it */
.door-link:hover .ug-leaf,
.door-link:hover .door-knob-svg,
.door-link:hover .ug-arch-outer,
.door-link:focus-visible .ug-leaf,
.door-link:focus-visible .door-knob-svg,
.door-link:focus-visible .ug-arch-outer {
  stroke: #ffffff;
}

.door-link:hover .door-gap-light,
.door-link:focus-visible .door-gap-light,
.basement-svg:has(.door-link:hover) .ug-tread-light,
.basement-svg:has(.door-link:focus-visible) .ug-tread-light {
  animation: none;
  filter: brightness(1.18);
}

/* phones show the drawing at about half size: lighter lines, and no rivets */
@media (max-width: 640px) {
  .basement-door .ug-arch-outer {
    stroke-width: 6;
  }

  .basement-stairs .ug-tread {
    stroke-width: 5;
  }

  .basement-stairs .ug-riser,
  .basement-door .ug-leaf {
    stroke-width: 4;
  }

  .basement-door .ug-arch-inner,
  .basement-door .door-knob-svg,
  .basement-door .ug-keystone-line {
    stroke-width: 3;
  }

  .basement-door .ug-stone,
  .basement-door .ug-plank,
  .basement-door .ug-solid.ug-strap,
  .basement-stairs .ug-faint {
    stroke-width: 2;
  }

  .basement-room path {
    stroke-width: 3;
  }

  .basement-cobweb .ug-web {
    stroke-width: 1;
  }

  .basement-door .ug-rivet {
    display: none;
  }
}

.underground-title {
  position: absolute;
  left: clamp(33rem, 56%, 50rem);
  top: 30%;
  z-index: 2;
  width: max-content;
  margin: 0;
  padding: 0;
  text-align: left;
  font-size: clamp(1.5rem, 2.1vw, 2.1rem);
  line-height: 0.95;
  pointer-events: auto;
}

.underground-title span {
  display: block;
}

.underground-title span + span {
  margin-left: clamp(1.1rem, 2.6vw, 2.6rem);
}

.entry-menu {
  gap: 0.62rem;
  margin-top: 0.2rem;
}

.entry-menu a {
  min-width: 112px;
  padding: 0.5rem 0.72rem;
  border-width: 3px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.entry-menu a::before,
.entry-menu a::after {
  width: 24px;
  height: 3px;
  border-top: 0;
  background: var(--ink);
}

.entry-menu a::before {
  left: 10px;
  top: -3px;
  border-bottom: 3px solid var(--text-primary);
}

.entry-menu a::after {
  right: 12px;
  bottom: -3px;
  border-top: 3px solid var(--text-primary);
}

.entry-menu a:hover,
.entry-menu a:focus-visible {
  outline: 0;
  transform: translateY(-1px) rotate(0deg);
}

@media (max-width: 640px) {
  .door-entry {
    min-height: 100vh;
    padding-top: 0.35rem;
  }

  .basement-picture {
    width: 112vw;
    height: 66vh;
    min-height: 455px;
    margin-left: -2vw;
    transform: translateY(-1.4rem);
  }

  .basement-svg {
    transform: translateX(4.5%) scale(1.1);
    transform-origin: center;
  }

  .underground-title {
    left: 52%;
    top: 33%;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: clamp(1.15rem, 5vw, 1.4rem);
  }

  .underground-title span + span {
    margin-left: 0.8rem;
  }

  .entry-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 145px));
    gap: 0.56rem;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
    padding: 0;
    position: static;
    left: auto;
    transform: none;
    box-sizing: border-box;
    justify-content: center;
    justify-items: stretch;
    place-content: center;
  }

  .entry-menu a {
    width: 100%;
    min-width: 0;
    padding: 0.48rem 0.45rem;
    font-size: 0.76rem;
    transform: rotate(0deg);
  }

  .entry-menu a:nth-child(1),
  .entry-menu a:nth-child(2),
  .entry-menu a:nth-child(3),
  .entry-menu a:nth-child(4) {
    transform: rotate(0deg);
  }
}

/* keyboard focus on the door menu shows in gold (the May design only nudged the button by 1px) */
.entry-menu a:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

/* ==========================================================================
   Market board: the exchange itself. Like the rest of the site, everything rests on the
   night sky, with spacing and hairlines instead of boxes.
   ========================================================================== */

.board-shell {
  position: relative;
  padding: 2.5rem 0 5rem;
}

#market-board,
#ledger,
#how-it-works {
  scroll-margin-top: 96px;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.62fr);
  gap: 3.5rem;
  align-items: start;
}

.market-stage,
.side-rail {
  display: grid;
  align-content: start;
  min-width: 0;
}

.market-toolbar {
  margin-top: 3.5rem;
}

.side-rail {
  gap: 2.4rem;
}

.board-shell h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
}

.board-shell h3 {
  color: var(--text-primary);
}

.meta {
  margin: 0 0 0.45rem;
  color: var(--gold);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.small-label,
.whisper-time {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.board-shell .positive {
  color: var(--yes);
}

.board-shell .negative {
  color: var(--no);
}

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

/* category, deadline and status are coloured words, not badges */
.featured-badges,
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1.2rem;
}

.market-tag {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.market-lock,
.ticket-status,
.position-side {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.ticket-status.approved,
.position-side.yes {
  color: var(--yes);
}

.position-side.no {
  color: var(--no);
}

/* --- featured market --- */

.featured-head {
  display: grid;
  gap: 0.75rem;
}

.featured-market h2,
.board-empty h2 {
  max-width: 24ch;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}

.featured-summary {
  margin-top: 1rem;
  max-width: 64ch;
}

.featured-chart {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2.5rem;
  align-items: end;
  margin-top: 1.8rem;
}

.chart-value-column {
  display: flex;
  gap: 2.4rem;
}

.price-cluster {
  display: grid;
  gap: 0.1rem;
}

.price-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.price-cluster.yes .price-label {
  color: var(--yes);
}

.price-cluster.no .price-label {
  color: var(--no);
}

.price-cluster strong {
  color: var(--text-primary);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
}

.price-delta {
  font-size: 0.8rem;
}

/* the chart is just its line over a baseline */
.chart-surface {
  height: 118px;
  border-bottom: 1px solid var(--line);
}

#featuredSparkline {
  display: block;
  width: 100%;
  height: 100%;
}

.sparkline-fill {
  display: none;
}

.sparkline-line {
  fill: none;
  stroke: url(#sparklineGlow);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.featured-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.featured-meta-row strong,
.ticket-preview strong,
.ledger-stats strong,
.position-metrics strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 400;
}

/* --- the list of markets --- */

.toolbar-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem 2rem;
}

.searchbox {
  width: min(270px, 100%);
}

.searchbox input {
  width: 100%;
  min-height: 42px;
  padding: 0.4rem 0;
  border: 0;
  border-bottom: 1px solid rgba(242, 238, 231, 0.24);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
}

.searchbox input::placeholder {
  color: rgba(185, 175, 162, 0.65);
}

.searchbox input:focus-visible {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 var(--gold);
}

/* filters are text tabs with the main site's gold underline */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.5rem;
  margin-top: 0.8rem;
}

.chip {
  position: relative;
  min-height: 40px;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 220ms var(--ease-main);
}

.chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.3rem;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 42%, transparent 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-main);
}

.chip:hover {
  color: var(--text-primary);
}

.chip.is-active {
  color: var(--gold);
}

.chip.is-active::after,
.chip:hover::after {
  transform: scaleX(1);
}

/* one market per row: question on the left, the two prices on the right */
.market-list {
  margin-top: 0.6rem;
  border-top: 1px solid var(--line);
}

.market-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-areas:
    "head quotes"
    "title quotes"
    "summary quotes"
    "foot quotes";
  column-gap: 2.2rem;
  padding: 1.4rem 0 1.4rem 1.2rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

/* the selected market gets a thin gold rule on its left */
.market-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 2px;
  background: transparent;
  transition: background-color 220ms var(--ease-main);
}

.market-card.is-selected::before {
  background: var(--gold);
}

.market-card:focus-visible {
  outline: 1px solid rgba(200, 161, 95, 0.7);
  outline-offset: 2px;
}

.market-card.is-hidden {
  display: none;
}

.card-head {
  grid-area: head;
}

.market-card h3 {
  grid-area: title;
  margin: 0.45rem 0 0.35rem;
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  transition: color 220ms var(--ease-main);
}

.market-card:hover h3,
.market-card.is-selected h3 {
  color: #f6e7c8;
}

.card-summary {
  grid-area: summary;
  font-size: 0.92rem;
}

.card-foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.price-strip {
  grid-area: quotes;
  align-self: center;
  display: grid;
  gap: 0.2rem;
}

/* Yes and No are text buttons; hover and focus underline them in their colour */
.side-quote {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  min-height: 44px;
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color 220ms var(--ease-main);
}

.side-quote span,
.ticket-side span {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-quote.yes span,
.ticket-side.yes span {
  color: var(--yes);
}

.side-quote.no span,
.ticket-side.no span {
  color: var(--no);
}

.side-quote strong {
  font-size: 1.3rem;
  font-weight: 400;
}

.side-quote.yes:hover,
.side-quote.yes:focus-visible {
  border-bottom-color: var(--yes);
  outline: none;
}

.side-quote.no:hover,
.side-quote.no:focus-visible {
  border-bottom-color: var(--no);
  outline: none;
}

/* once trading closes, the prices stay readable but can't be picked */
.side-quote[disabled],
.ticket-side[disabled] {
  opacity: 0.45;
  cursor: default;
}

.side-quote[disabled]:hover {
  border-bottom-color: transparent;
}

/* --- trade ticket --- */

.ticket-head {
  position: relative;
}

.ticket-status {
  position: absolute;
  top: 0;
  right: 0;
  white-space: nowrap;
}

.trade-ticket h2 {
  margin-top: 0.2rem;
  font-size: clamp(1.35rem, 1.9vw, 1.6rem);
}

.ticket-price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.2rem;
}

.ticket-side {
  display: grid;
  gap: 0.1rem;
  min-height: 56px;
  padding: 0.3rem 0 0.55rem;
  border: 0;
  border-bottom: 2px solid rgba(242, 238, 231, 0.12);
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: border-color 220ms var(--ease-main), color 220ms var(--ease-main);
}

.ticket-side strong {
  font-size: 1.35rem;
  font-weight: 400;
}

.ticket-side:hover,
.ticket-side.is-live {
  color: var(--text-primary);
}

.ticket-side.is-live.yes {
  border-bottom-color: var(--yes);
}

.ticket-side.is-live.no {
  border-bottom-color: var(--no);
}

.ticket-side:focus-visible {
  outline: 1px solid rgba(200, 161, 95, 0.7);
  outline-offset: 3px;
}

.stake-field {
  display: grid;
  gap: 0.2rem;
  margin-top: 1.4rem;
}

.stake-field > label {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.stake-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  border-bottom: 1px solid rgba(242, 238, 231, 0.24);
}

.stake-input-wrap:focus-within {
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 var(--gold);
}

.stake-input-wrap input {
  width: 100%;
  padding: 0.4rem 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.15rem;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

/* no browser spinner box; the − and + beside the field step the stake by 100 Gu */
.stake-input-wrap input::-webkit-outer-spin-button,
.stake-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stake-steps {
  display: flex;
  gap: 0.1rem;
  margin-left: 0.7rem;
}

.stake-step {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 220ms var(--ease-main), background-color 220ms var(--ease-main);
}

.stake-step:hover {
  color: var(--gold);
  background: rgba(200, 161, 95, 0.1);
}

.stake-step:focus-visible {
  outline: 1px solid rgba(200, 161, 95, 0.7);
  outline-offset: 1px;
}

.stake-suffix {
  color: var(--gold);
}

.ticket-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.ticket-actions {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.4rem;
}

.btn {
  font-family: inherit;
  cursor: pointer;
}

.btn.block {
  width: 100%;
}

/* the main site's outlined button, in gold */
.btn-primary {
  border: 1px solid rgba(200, 161, 95, 0.6);
  background: rgba(200, 161, 95, 0.06);
  color: var(--gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(200, 161, 95, 0.12);
}

/* cash out is a quieter text button */
.btn-tertiary {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
}

.btn-tertiary:hover {
  color: var(--text-primary);
}

/* --- ledger, whispers and rules: plain sections divided by hairlines --- */

.staff-panel,
.ledger-panel,
.whispers-panel,
.rules-panel {
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}

/* staff: their controls sit at the top of the side rail, as plain text links */
.staff-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
}

.staff-market {
  margin-top: 1.4rem;
}

.staff-market-title {
  margin: 0.35rem 0 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.3rem;
  margin-top: 0.6rem;
}

.staff-actions .login-link.is-armed {
  color: var(--no);
  text-decoration-color: currentColor;
}

/* the opening price only shows for a new market; it lines up with the other fields */
.staff-opening {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  text-align: left;
}

.ledger-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.4rem;
  margin-top: 1.1rem;
}

.position-card {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.position-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

.position-market {
  color: var(--text-primary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.position-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.4rem;
  margin-top: 0.9rem;
}

.whispers-list,
.rules-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.whispers-list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.whispers-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.whispers-list li:last-child {
  padding-bottom: 0;
}

.whisper-time {
  color: var(--gold);
}

.whispers-list p {
  margin-top: 0.25rem;
  font-size: 0.92rem;
}

.rules-list {
  display: grid;
  gap: 0.6rem;
}

.rules-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.rules-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* --- the Underground's own line in the footer --- */

.footer-note {
  flex-basis: 100%;
  text-align: center;
}

.footer .footer-note p {
  font-size: 0.78rem;
}

@media (max-width: 1140px) {
  .board-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem 3rem;
  }
}

@media (max-width: 1140px) and (min-width: 861px) {
  .ledger-panel {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 860px) {
  .side-rail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .featured-chart {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .market-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "title"
      "summary"
      "quotes"
      "foot";
    padding-left: 1rem;
  }

  .price-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 0.5rem;
  }

  .searchbox {
    width: 100%;
  }
}

@media (max-width: 520px) {
  /* phones show just the ELYSIAN title, like the main site */
  .brand-sub {
    display: none;
  }
}

@media (max-width: 480px) {
  .featured-meta-row,
  .ticket-preview {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Logging in: the main site's welcome dialog, over the dimmed night sky
   ========================================================================== */

/* the page and its stars stay faintly visible behind the dialog */
.login-dialog {
  background: transparent;
}

.login-dialog::backdrop {
  background: rgba(11, 10, 8, 0.9);
  backdrop-filter: blur(4px);
}

.login-inner {
  max-width: 680px;
  margin: 0 auto;
}

.login-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.login-step .welcome-question:focus {
  outline: none;
}

.login-field {
  width: min(320px, 100%);
  padding: 0.5rem 0.2rem;
  border: 0;
  border-bottom: 1px solid rgba(242, 238, 231, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.35rem;
  text-align: center;
}

.login-field::placeholder {
  color: rgba(185, 175, 162, 0.5);
}

.login-field:focus-visible {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 var(--gold);
}

.login-code {
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.login-submit {
  min-width: 12rem;
  margin-top: 1.6rem;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
  transform: none;
}

/* the two ways to get a code, each with what happens */
.login-choices {
  gap: clamp(1.5rem, 6vw, 4rem);
}

.login-dialog .welcome-choice {
  max-width: 15rem;
}

.login-dialog .welcome-choice svg {
  width: clamp(3rem, 7vw, 3.8rem);
}

.login-dialog .welcome-caption {
  position: static;
  width: auto;
  height: auto;
  max-width: none;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  font-size: 0.8rem;
}

.login-choice-text {
  color: rgba(240, 238, 231, 0.68);
  font-size: 0.82rem;
  line-height: 1.55;
}

.welcome-choice:hover .login-choice-text,
.welcome-choice:focus-visible .login-choice-text {
  color: rgba(240, 238, 231, 0.9);
}

.login-hint {
  max-width: 34rem;
  margin: 0 0 1.3rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin-top: 1.2rem;
}

.login-link {
  padding: 0.3rem 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: underline;
  text-decoration-color: rgba(185, 175, 162, 0.4);
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.login-link:hover,
.login-link:focus-visible {
  color: var(--gold);
  text-decoration-color: currentColor;
  outline: none;
}

.login-link[disabled] {
  color: rgba(185, 175, 162, 0.5);
  text-decoration: none;
  cursor: default;
}

.login-error {
  max-width: 34rem;
  min-height: 1.5em;
  margin: 1.2rem 0 0;
  color: var(--no);
  font-size: 0.9rem;
}

.login-close {
  margin-top: 1.2rem;
}

/* --- market suggestions: a line under the board, and the login dialog's look with room for longer text --- */
.board-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.board-suggest p {
  margin: 0;
}

.suggest-form {
  width: min(560px, 100%);
}

.suggest-form .login-hint {
  margin-bottom: 0.4rem;
}

.suggest-label {
  align-self: stretch;
  margin: 1.4rem 0 0.3rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  text-align: left;
}

.suggest-optional {
  margin-left: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.suggest-field {
  align-self: stretch;
  width: 100%;
  padding: 0.45rem 0.1rem;
  border: 0;
  border-bottom: 1px solid rgba(242, 238, 231, 0.3);
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
  resize: vertical;
  color-scheme: dark; /* the date picker and the list of kinds open dark too */
}

.suggest-field:disabled {
  color: var(--text-secondary);
  opacity: 0.7;
}

select.suggest-field option {
  background: #14120e;
  color: var(--text-primary);
}

.suggest-field::placeholder {
  color: rgba(185, 175, 162, 0.5);
}

.suggest-field:focus-visible {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 var(--gold);
}

.suggest-help {
  align-self: stretch;
  margin: 0.4rem 0 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-align: left;
}

/* the header: log in, or the player's name and Gu */
.nav-links .nav-account,
.mobile-menu .nav-account {
  color: var(--gold);
}

.nav-account.is-player {
  text-transform: none;
  letter-spacing: 0.04em;
}

.nav-links a {
  white-space: nowrap;
}

/* with the account in the bar, the label beside the logo makes room on narrower screens */
@media (max-width: 1080px) {
  .brand-sub {
    display: none;
  }
}

/* visitors see a prompt where the player's book would be */
.ledger-guest p {
  margin: 0.9rem 0 1.1rem;
  font-size: 0.95rem;
}

.ticket-message {
  min-height: 1.4em;
  margin: 0.7rem 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
}

.ticket-message.is-error {
  color: var(--no);
}

.ticket-note {
  margin: 0.2rem 0 0;
  color: var(--gold);
  font-size: 0.8rem;
  text-align: center;
}

/* ==========================================================================
   Main site's responsive navigation and reduced motion
   ========================================================================== */

@media (max-width: 1080px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 860px) {
  .brand img {
    height: 30px;
    max-width: min(188px, 58vw);
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    display: flex;
    position: fixed;
    top: 76px;
    right: 0;
    width: min(320px, 85vw);
    height: calc(100vh - 76px);
    height: calc(100svh - 76px);
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-left: 1px solid rgba(200, 161, 95, 0.2);
    background: rgba(18, 15, 11, 0.94);
    backdrop-filter: blur(10px);
    transform: translateX(102%);
    transition: transform 260ms var(--ease-main);
    box-shadow: -18px 0 32px rgba(0, 0, 0, 0.35);
  }

  .mobile-menu a {
    padding: 0.8rem 0.9rem;
    border-radius: 7px;
    border: 1px solid transparent;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: color-mix(in srgb, var(--text-primary) 88%, var(--gold) 12%);
    transition: border-color 220ms var(--ease-main), background-color 220ms var(--ease-main);
  }

  .mobile-menu a:hover {
    border-color: rgba(200, 161, 95, 0.3);
    background: rgba(200, 161, 95, 0.08);
  }

  .mobile-menu.is-open {
    transform: translateX(0);
  }

  .nav-open {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .navbar.over-door {
    transform: none;
  }
}
