:root {
  --ink: #120809;
  --panel: #1c1012;
  --bone: #f6efe6;
  --ash: #b5a49c;
  --crimson: #c81d2e;
  --line: color-mix(in oklab, var(--bone) 16%, transparent);
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Fraunces", "Iowan Old Style", Palatino, serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  line-height: 1.5;
}
h1 { margin: 0; font-family: var(--display); font-weight: 500; line-height: 0.98; letter-spacing: 0; }
a { color: inherit; }
button, a.btn { cursor: pointer; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--ink) 85%, transparent);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; text-decoration: none; }
.brand svg { width: 1.6rem; height: 1.6rem; }
.brand-name { font-family: var(--display); font-size: 1.15rem; line-height: 1; }
.age { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--crimson); }
.nav { display: flex; }
.nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem; color: var(--ash); text-decoration: none; font-size: 0.9rem; }
.nav a[aria-current="page"], .nav a:hover { color: var(--bone); }

.shell { display: flex; align-items: flex-start; gap: 1rem; max-width: 100rem; margin: 0 auto; padding: 1rem 0.75rem 2rem; }
.rail { display: none; }
.main { min-width: 0; flex: 1; }
.page { max-width: 72rem; margin: 0 auto; padding: 2.5rem 0.75rem 3rem; }
.kicker { margin: 0; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.lede { max-width: 36rem; margin: 1.4rem 0 0; color: var(--ash); font-size: 1.1rem; }
h1.display { margin-top: 0.8rem; font-size: clamp(2.6rem, 6vw, 4.2rem); }
.italic { font-style: italic; color: var(--crimson); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; margin-top: 1.6rem; padding: 0 1.15rem;
  background: var(--crimson); color: var(--bone); border: 0;
  font: 600 0.75rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
}
.note { margin-top: 1.4rem; color: var(--ash); font-size: 0.9rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; border-top: 1px solid var(--line); color: var(--ash); font-size: 0.9rem; }
.footer a { color: var(--ash); }

.ad { display: grid; justify-items: center; gap: 0.4rem; }
.ad p { margin: 0; font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.slot { overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.slot span { display: flex; height: 100%; align-items: flex-end; padding: 0.75rem; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); }
.mobile-ad { display: flex; justify-content: center; margin-bottom: 0.75rem; }

.cards { display: grid; gap: 1rem; margin: 2.5rem 0 0; padding: 0; list-style: none; }
.card { display: flex; min-height: 13rem; flex-direction: column; justify-content: space-between; padding: 1.25rem; border: 1px solid var(--line); background: var(--panel); text-decoration: none; }
.card:hover { border-color: var(--crimson); }
.tag { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--crimson); }
.title { display: block; font-family: var(--display); font-size: 1.8rem; }
.credit { display: block; margin-top: 0.4rem; color: var(--ash); font-size: 0.9rem; }

.gate { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 1.25rem; background: var(--ink); }
html:not(.gated) .gate { display: none; }
html.gated .shell, html.gated .header, html.gated .footer, html.gated .stage { display: none; }
.gate-card { width: min(100%, 28rem); padding: 1.5rem; border: 1px solid color-mix(in oklab, var(--bone) 20%, transparent); }
.gate h1 { margin-top: 0.7rem; font-size: 3rem; }
.gate p { color: var(--ash); }
.gate .btn { width: 100%; }

.stage { display: flex; height: 100dvh; flex-direction: column; }
.play { display: flex; min-height: 0; flex: 1; }
.play-main { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 1rem; border-bottom: 1px solid var(--line); }
.bar a, .bar button { color: var(--ash); background: none; border: 0; font: inherit; text-decoration: none; min-height: 2.75rem; }
.bar a:hover, .bar button:hover { color: var(--bone); }
.bar-title { min-width: 0; text-align: center; }
.bar-title p { margin: 0; }
.bar-title .name { overflow: hidden; font-family: var(--display); font-size: 1.1rem; text-overflow: ellipsis; white-space: nowrap; }
.bar-title .who { overflow: hidden; color: var(--ash); font-size: 0.75rem; text-overflow: ellipsis; white-space: nowrap; }
.port-wrap { position: relative; min-height: 0; flex: 1; }
.port { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--ink); }
.missing { display: grid; height: 100%; place-items: center; padding: 1.5rem; }
.missing div { max-width: 28rem; padding: 1.5rem; border: 1px solid color-mix(in oklab, var(--bone) 20%, transparent); }
.missing h1 { font-size: 2.4rem; }

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .brand-rest { display: inline; }
}
@media (max-width: 639px) {
  .brand-rest { display: none; }
}
@media (min-width: 1024px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1280px) {
  .rail { display: block; position: sticky; top: 4rem; width: 11rem; flex: none; }
  .mobile-ad { display: none; }
}
