:root {
  --night: #10141c;
  --board: #18202c;
  --board-2: #222c3a;
  --board-3: #2c3848;
  --hair: #3d4c60;
  --hair-2: #5a6d84;
  --ivory: #f4efe4;
  --dust: #b7b0a3;
  --amber: #d4a04a;
  --amber-hot: #e4b45c;
  --ink: #1a1408;
  --wash: linear-gradient(135deg, #e0b45a 0%, #b88834 100%);
  --curve: 10px;
  --span: 1080px;
  --pad: 40px;
  --type: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --ridge: 70px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
body {
  margin: 0;
  font: 16px/1.6 var(--type);
  color: var(--ivory);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, [role="link"]:focus-visible, label:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 2px;
}
h1, h2, h3, h4 { margin: 0 0 16px; font-weight: 700; line-height: 1.25; color: var(--ivory); overflow-wrap: break-word; }
h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; overflow-wrap: break-word; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
strong { font-weight: 700; }
.min-w0 { min-width: 0; }
.gridwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 28px; overflow: hidden; border-radius: var(--curve); }
th, td { padding: 13px 15px; border: 1px solid var(--hair); text-align: center; vertical-align: middle; font-size: 15px; }
th { background: var(--wash); color: var(--ink); font-weight: 700; }
td { background: var(--board); }
tr:nth-child(even) td { background: var(--board-2); }
th[scope="row"] { text-align: left; background: var(--board-2); color: var(--ivory); }

.shell { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
.page { max-width: calc(var(--span) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad) 40px; min-width: 0; }
.page > section { min-width: 0; }
.page p, .page li { max-width: none; }

.hop { cursor: pointer; -webkit-user-select: none; user-select: none; }

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(212, 160, 74, 0); }
  50% { transform: scale(1.04); box-shadow: 0 0 22px rgba(212, 160, 74, .4); }
}
.act, .door-up, .voices__add {
  animation: pulse 2.8s ease-in-out infinite;
  will-change: transform;
}
.act:hover, .door-up:hover, .voices__add:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .act, .door-up, .voices__add { animation: none; }
}

.act {
  display: flex; align-items: center; justify-content: center; text-align: center;
  max-width: 320px; width: 100%; min-height: 56px; margin: 8px auto 0; padding: 12px 22px;
  border-radius: var(--curve); background: linear-gradient(180deg, #e4b45c 0%, #d4a04a 100%); color: var(--ink);
  font-size: 17px; font-weight: 700; text-decoration: none; transition: background .2s, transform .1s;
}
.act:hover { background: linear-gradient(180deg, #efc46c 0%, #e4b45c 100%); }
.act:active { transform: scale(.98); }

.ridge { position: sticky; top: 0; z-index: 50; background: var(--board); border-bottom: 1px solid var(--hair); }
.ridge__row {
  max-width: none; margin-inline: 0; width: 100%;
  padding: 0 var(--pad); height: var(--ridge);
  display: flex; align-items: center; gap: 20px;
}
.mark img { height: 46px; width: auto; }
.ridge .mark { margin-right: auto; }
.trail__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.trail__list li { margin: 0; }
.trail__list .hop {
  display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 700;
  color: var(--ivory); background: var(--board-2); border: 1px solid var(--hair);
}
.trail__list .hop:hover { background: var(--board-3); border-color: var(--hair-2); }
.trail__btns { display: none; }
.ridge__btns { display: flex; gap: 8px; margin-left: auto; }
.door-in, .door-up {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px;
  border-radius: 8px; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.door-in { background: var(--board-2); color: var(--amber); border: 1px solid var(--amber); }
.door-in:hover { background: var(--board-3); }
.door-up { background: linear-gradient(180deg, #e4b45c 0%, #d4a04a 100%); color: var(--ink); }
.door-up:hover { background: linear-gradient(180deg, #efc46c 0%, #e4b45c 100%); }
.menu-toggle { position: absolute; opacity: 0; pointer-events: none; }
.latch { display: none; width: 40px; height: 40px; padding: 8px; flex-direction: column; justify-content: space-between; cursor: pointer; border-radius: 8px; background: var(--board-2); border: 1px solid var(--hair); }
.latch span { display: block; height: 3px; border-radius: 2px; background: var(--ivory); }

.opener { padding: 32px 0 36px; text-align: center; }
.opener__title { margin-bottom: 18px; }
.opener__flag { display: block; margin: 0 auto 22px; border-radius: var(--curve); overflow: hidden; }
.opener__flag img { width: 100%; height: auto; }
.opener__copy { margin: 0 auto 20px; text-align: left; font-size: 17px; }
.opener__copy p:last-child { margin-bottom: 0; }
.widepic { margin: 8px 0 40px; }
.widepic img { width: 100%; border-radius: var(--curve); }

.sheet { margin: 0 0 44px; }
.sheet__title {
  display: flex; align-items: center; justify-content: flex-start; min-height: 58px; margin: 0 0 20px; padding: 12px 18px;
  border-radius: var(--curve); background: var(--wash); text-align: left; font-size: 22px; color: var(--ink);
}

.chapter, .rack, .voices, .asks, .plinth {
  content-visibility: auto;
  contain-intrinsic-size: auto 560px;
}
.chapter { margin: 0 0 44px; padding: 28px 0 4px; border-top: 1px solid var(--hair); }
.chapter h3 { margin-top: 26px; }
.chapter p, .chapter li { font-size: 17px; }

.scales { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.scales__box { padding: 22px; border-radius: var(--curve); background: var(--board); border: 1px solid var(--hair); }
.scales__box h3 { margin-bottom: 12px; }
.scales__box ul { margin: 0; padding: 0; list-style: none; }
.scales__box li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.scales__box li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 50%; }
.scales__plus li::before { background: #4cc98a; }
.scales__less li::before { background: #c96a4c; }

.rack { margin: 0 0 52px; padding-top: 8px; }
.rack h2 { text-align: left; margin-bottom: 20px; }
.rack__nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; list-style: none; margin: 0 0 22px; padding: 0; }
.rack__nav li { margin: 0; }
.rack__tab {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 8px;
  background: var(--board); border: 1px solid var(--hair); color: var(--ivory); font-size: 15px; font-weight: 700; text-decoration: none;
}
.rack__tab svg { fill: currentColor; flex: none; }
.rack__tab:hover, .rack__tab.on { background: var(--board-3); border-color: var(--amber); }
.pane { display: none; }
.pane.on { display: block; }
.rack__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px 14px; }
.tile { display: block; text-decoration: none; color: var(--ivory); min-width: 0; }
.tile__art { display: block; position: relative; border-radius: 8px; overflow: hidden; background: var(--board); aspect-ratio: 360 / 472; }
.tile__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.tile:hover .tile__art img { transform: scale(1.04); }
.tile__name { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.tile small { display: block; font-size: 12px; color: var(--dust); }
.tile--mark .tile__name { text-align: center; }
.tile__logo {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 2 / 1; background: var(--board-2); border: 1px solid var(--hair); border-radius: 8px; padding: 10px;
}
.tile__logo img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

.voices { margin: 0 0 52px; }
.voices__bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; margin-bottom: 18px; border-radius: var(--curve); background: var(--board); border: 1px solid var(--hair); }
.voices__cap { font-size: 13px; color: var(--dust); margin-bottom: 4px; }
.voices__score { display: flex; align-items: center; gap: 10px; }
.voices__score > span { font-size: 26px; font-weight: 700; }
.voices__score small { color: var(--dust); font-size: 13px; }
.sparks { display: inline-flex; gap: 2px; }
.sparks svg { width: 18px; height: 18px; fill: var(--amber); }
.voices__add { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border-radius: 8px; background: linear-gradient(180deg, #e4b45c 0%, #d4a04a 100%); color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.voices__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.voices__card { padding: 18px; border-radius: var(--curve); background: var(--board); border: 1px solid var(--hair); }
.voices__who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.voices__badge { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--wash); font-weight: 700; font-size: 17px; color: var(--ink); }
.voices__who span { display: block; font-weight: 700; }
.voices__who small { color: var(--dust); font-size: 12px; }
.voices__card p { margin: 8px 0 0; font-size: 15px; }

.asks { margin: 0 0 36px; }
.asks__item { padding: 18px 22px; margin-bottom: 10px; border-radius: var(--curve); background: var(--board); border: 1px solid var(--hair); }
.asks__item h3 { font-size: 17px; margin-bottom: 8px; }
.asks__item p { margin: 0; font-size: 16px; }

.dated { margin: 0 0 16px; }
.dated__box {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--curve); background: var(--board); border: 1px solid var(--hair);
  font-size: 15px; color: var(--dust);
}
.dated__box svg { width: 22px; height: 22px; fill: var(--amber); flex: none; }

.plinth { background: var(--board); border-top: 1px solid var(--hair); }
.plinth__top { max-width: calc(var(--span) + var(--pad) * 2); margin: 0 auto; padding: 36px var(--pad); display: flex; justify-content: space-between; gap: 36px; }
.plinth__blurb { font-size: 14px; color: var(--dust); }
.plinth__label { font-size: 13px; font-weight: 700; margin: 16px 0 8px; color: var(--ivory); }
.plinth__social { display: flex; gap: 10px; }
.plinth__social .hop {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 8px; background: var(--board-2); border: 1px solid var(--hair);
}
.plinth__social svg { width: 20px; height: 20px; fill: var(--ivory); }
.plinth__cols { display: flex; gap: 48px; }
.plinth__list { list-style: none; margin: 0; padding: 0; }
.plinth__list li { margin-bottom: 8px; }
.plinth__list .hop { font-size: 14px; color: var(--ivory); }
.plinth__list .hop:hover { text-decoration: underline; }
.plinth__pay {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px;
  max-width: calc(var(--span) + var(--pad) * 2); margin: 0 auto; padding: 18px var(--pad);
  border-top: 1px solid var(--hair);
}
.plinth__pay img { height: 32px; width: auto; }
.plinth__seals {
  display: grid; grid-template-columns: repeat(7, 1fr); align-items: center; gap: 12px;
  max-width: calc(var(--span) + var(--pad) * 2); margin: 0 auto; padding: 18px var(--pad) 8px;
  border-top: 1px solid var(--hair);
}
.plinth__seals img { height: 40px; width: auto; margin: 0 auto; }
.plinth__seals a:first-child img { height: 44px; }
.plinth__base { border-top: 1px solid var(--hair); }
.plinth__legal { max-width: calc(var(--span) + var(--pad) * 2); margin: 0 auto; padding: 18px var(--pad) 28px; text-align: left; font-size: 12px; line-height: 1.65; color: var(--dust); }
.plinth__legal p { margin: 0 0 8px; }
.plinth__legal a { text-decoration: underline; }

@media (max-width: 1100px) {
  :root { --pad: 24px; }
  .rack__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .latch { display: flex; order: 3; }
  .ridge__btns { order: 2; }
  .ridge .mark { margin-right: 0; }
  .trail { display: none; position: absolute; left: 0; right: 0; top: var(--ridge); padding: 12px var(--pad) 20px; background: var(--board); border-bottom: 1px solid var(--hair); }
  .menu-toggle:checked ~ .trail { display: block; }
  .menu-toggle:checked ~ .latch span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
  .menu-toggle:checked ~ .latch span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked ~ .latch span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }
  .trail__list { flex-direction: column; gap: 6px; }
  .trail__btns { display: flex; gap: 10px; margin-top: 14px; }
  .trail__btns .hop { flex: 1; }
  .voices__grid { grid-template-columns: repeat(2, 1fr); }
  .plinth__top { flex-direction: column; }
  .plinth__cols { gap: 28px; flex-wrap: wrap; }
  .plinth__seals { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  :root { --pad: 18px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  .chapter p, .chapter li, .opener__copy { font-size: 16px; }
  th, td { padding: 10px 8px; font-size: 13px; }
  .sheet__title { font-size: 18px; }
  .rack__nav { grid-template-columns: repeat(2, 1fr); }
  .rack__grid { grid-template-columns: repeat(3, 1fr); }
  .voices__bar { flex-direction: column; align-items: flex-start; }
  .voices__add { width: 100%; }
  .scales { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --pad: 18px; }
  .rack__grid { grid-template-columns: repeat(2, 1fr); }
  .voices__grid { grid-template-columns: 1fr; }
  .plinth__seals { grid-template-columns: repeat(3, 1fr); }
  .ridge__btns { gap: 6px; }
  .door-in, .door-up { height: 34px; padding: 0 10px; font-size: 13px; }
  .mark img { height: 34px; }
}
@media (max-width: 380px) {
  :root { --pad: 14px; }
  .rack__grid { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
}
