:root {
  --paper: #efeae1;
  --paper-2: #f7f3ec;
  --ink: #1c1915;
  --quiet: #5e584f;
  --line: #1c1915;
  --copper: #9a3e22;
  --copper-2: #e07a4c;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(640px, calc(100% - 40px)); }

h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 560; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); margin: 0 0 18px; max-width: 16ch; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 12px; }
h3 { font-size: 1.45rem; margin: 0 0 8px; }
p { margin: 0 0 1em; }
a { color: var(--copper); text-underline-offset: 0.18em; }
.kicker, .sheet, .num, .cat, time, .go {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 500;
}
.kicker { color: var(--copper); margin: 28px 0 12px; }
.lede { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.45; max-width: 38ch; color: var(--ink); }

.home {
  --cream: #f4efe6;
  --mist: #b7aea2;
  --stage: #0e1114;
  --stage-2: #161b20;
  color: var(--cream);
  background: var(--stage);
}
.home .stage {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--em-bar-h));
  background: var(--stage);
}
.home .stage-model {
  position: relative;
  flex: 1 1 auto;
  min-height: 48vh;
  background:
    radial-gradient(38% 52% at 50% 46%, #303841 0%, rgba(14, 17, 20, 0) 72%),
    var(--stage);
}
.home .stage-model img,
.home .stage-model canvas {
  position: absolute;
  inset: 4% 8% 0;
  width: 84%;
  height: 96%;
  margin: 0 auto;
  object-fit: contain;
}
.home .stage-model canvas { display: none; cursor: grab; touch-action: none; }
.home .stage-model.live img { visibility: hidden; }
.home .stage-model.live canvas { display: block; }
.home .stage-copy {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 48px;
}
.home .stage.empty .stage-copy { padding-top: 14vh; }
.home .kicker { color: #e7a08a; margin: 0 0 12px; }
.home .kicker span + span::before { content: "·"; margin: 0 0.7em; color: #e07a4c; }
.home .stage h1 {
  color: var(--cream);
  font-size: clamp(3.4rem, 6.6vw, 6.6rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 0.9;
  max-width: 11ch;
  margin: 0 0 22px;
}
.home .stage-foot {
  display: grid;
  grid-template-columns: minmax(0, 40rem) auto;
  gap: 20px 48px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}
.home .lede {
  color: var(--mist);
  font-size: 1.2rem;
  line-height: 1.45;
  max-width: 38ch;
  margin: 0;
}
.home .stage-actions { text-align: right; }
.home .enter {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid #e07a4c;
  padding-bottom: 3px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.home .enter::after { content: "→"; }
.home .enter:hover { color: #e7a08a; }
.home .turn {
  margin: 12px 0 0;
  color: var(--mist);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
}
.home .stage:has(.stage-model.live) .turn { opacity: 1; }

.home .shelf,
.home .titles { background: var(--stage); }
.home .shelf { padding: 28px 0 12px; }
.home .shelf-bar,
.home .titles-inner,
.home .grid,
.home .shelf .none,
.home .titles .none { width: min(1240px, calc(100% - 56px)); margin-left: auto; margin-right: auto; }
.home .shelf-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  align-items: end;
  gap: 16px 32px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.16);
}
.home .shelf h2 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(2.2rem, 3vw, 3rem);
}
.home .titles h2 {
  margin: 0;
  color: var(--mist);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.home .find { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.home .find label,
.home .titles .meta,
.home .titles time,
.home .titles .cat,
.home .card-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.home .find label { color: var(--mist); }
.home .find input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(244, 239, 230, 0.4);
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font: 400 1.05rem/1.3 "Source Serif 4", Georgia, serif;
}
.home .find input:focus { outline: none; border-bottom-color: #e07a4c; }
.home .find input::placeholder { color: rgba(183, 174, 162, 0.7); }
.home .grid {
  list-style: none;
  margin-top: 0;
  margin-bottom: 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.home .grid a {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;
  background: var(--stage-2);
  color: var(--cream);
  text-decoration: none;
  overflow: hidden;
}
.home .grid img,
.home .grid .blank {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background:
    radial-gradient(60% 70% at 50% 46%, #2c343c, var(--stage-2) 74%);
  transition: transform 0.45s ease;
}
.home .grid a:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .home .grid img { transition: none; }
  .home .grid a:hover img { transform: none; }
}
.home .card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
  color: #e7a08a;
}
.home .grid .name {
  display: block;
  margin-top: auto;
  padding: 10px 16px 18px;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.home .grid a:hover .name { color: #e7a08a; }
.home .grid .blurb { display: none; }
.home .grid.n1 { grid-template-columns: 1fr; }
.home .grid.n1 a {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
  min-height: 440px;
  align-content: end;
}
.home .grid.n1 img,
.home .grid.n1 .blank {
  grid-column: 1;
  grid-row: 1 / span 4;
  height: 100%;
  min-height: 440px;
  padding: 36px 28px;
  box-sizing: border-box;
}
.home .grid.n1 .card-meta { grid-column: 2; align-self: end; padding: 36px 40px 0; }
.home .grid.n1 .name {
  grid-column: 2;
  margin-top: 0;
  padding: 14px 40px 0;
  font-size: clamp(2.4rem, 3.4vw, 3.6rem);
}
.home .grid.n1 .blurb {
  display: block;
  grid-column: 2;
  margin: 0;
  padding: 16px 40px 40px;
  max-width: 34ch;
  color: var(--mist);
  font-size: 1.15rem;
  line-height: 1.45;
}
.home .grid.n2,
.home .grid.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home .grid.n2 a,
.home .grid.n3 a { min-height: 420px; }
.home .grid.n2 img,
.home .grid.n3 img,
.home .grid.n2 .blank,
.home .grid.n3 .blank { height: 300px; }
.home .shelf .none,
.home .titles .none { margin-bottom: 22px; color: var(--mist); }

.home .titles { padding: 56px 0 88px; }
.home .titles ul { list-style: none; margin: 22px 0 0; padding: 0; }
.home .titles li {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 8px 48px;
  align-items: start;
  padding: 22px 0 24px;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}
.home .titles a {
  color: var(--cream);
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-decoration: none;
}
.home .titles a:hover { color: #e7a08a; }
.home .titles .meta { display: flex; gap: 14px; margin: 10px 0 0; color: var(--mist); }
.home .titles time { margin-left: 0; }
.home .titles p { margin: 0.35em 0 0; max-width: 46ch; color: var(--mist); }

.prose { padding: 42px 0 80px; }
.prose h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.prose p { max-width: 62ch; font-size: 1.15rem; }

.legal {
  --cream: #f4efe6;
  --mist: #b7aea2;
  color: var(--cream);
  background: #0e1114;
  min-height: calc(100svh - var(--em-bar-h));
  padding: 56px 0 96px;
}
.legal-head,
.legal-list {
  width: min(1240px, calc(100% - 56px));
  margin-left: auto;
  margin-right: auto;
}
.legal .kicker { color: #e7a08a; margin: 0 0 14px; }
.legal h1 {
  color: var(--cream);
  max-width: 10ch;
  margin: 0 0 22px;
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.legal .lede {
  max-width: 38rem;
  margin: 0;
  color: var(--mist);
  font-size: 1.25rem;
  line-height: 1.45;
}
.legal .updated {
  margin: 22px 0 0;
  color: var(--mist);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.legal-list { margin-top: 48px; }
.legal-list section {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr);
  gap: 12px 64px;
  align-items: start;
  padding: 28px 0 8px;
  border-top: 1px solid rgba(244, 239, 230, 0.16);
}
.legal h2 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(1.55rem, 2.1vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}
.legal .copy p,
.legal .copy li {
  max-width: 62ch;
  color: var(--mist);
  font-size: 1.08rem;
  line-height: 1.55;
}
.legal .copy ul { margin: 0.2em 0 1em; padding: 0 0 0 1.15em; }
.legal .copy li { margin: 0.28em 0; }
.legal .copy li::marker { color: #e07a4c; }
.legal a { color: #e7a08a; }
.legal code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86em;
}
.em-foot nav a[aria-current="page"] { color: #9a3e22 !important; }
body.em-home .em-foot nav a[aria-current="page"] { color: #e7a08a !important; }

.flashes { list-style: none; margin: 16px auto; padding: 0; }
.flash { padding: 12px 14px; border: 1px solid var(--ink); background: #fff; }
.flash.error { border-color: #8f2d2d; }
.flash.ok { border-color: #2f6b3a; }

@media (max-width: 980px) {
  .home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home .titles li { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 800px) {
  .home .stage { min-height: 0; }
  .home .stage-model { flex: none; min-height: 46vh; }
  .home .stage-model img,
  .home .stage-model canvas { inset: 0 4% 0; width: 92%; }
  .home .stage-copy { width: min(1240px, calc(100% - 36px)); padding-bottom: 36px; }
  .home .stage h1 { max-width: none; font-size: clamp(2.8rem, 12vw, 4.2rem); }
  .home .stage-foot,
  .home .shelf-bar { grid-template-columns: 1fr; }
  .home .stage-actions { text-align: left; }
  .home .grid.n1 a,
  .home .grid.n2,
  .home .grid.n3 { grid-template-columns: 1fr; }
  .home .grid.n1 a { min-height: 0; display: flex; }
  .home .grid.n1 img,
  .home .grid.n1 .blank { height: 280px; min-height: 0; grid-row: auto; }
  .home .grid.n1 .card-meta,
  .home .grid.n1 .name,
  .home .grid.n1 .blurb { padding-left: 16px; padding-right: 16px; }
  .home .grid.n1 .blurb { padding-bottom: 22px; }
  .home .shelf-bar,
  .home .titles-inner,
  .home .grid,
  .home .shelf .none,
  .home .titles .none { width: min(1240px, calc(100% - 36px)); }
  .legal { padding: 36px 0 72px; }
  .legal-head,
  .legal-list { width: min(1240px, calc(100% - 36px)); }
  .legal h1 { max-width: none; font-size: clamp(2.8rem, 12vw, 4.2rem); }
  .legal-list section { grid-template-columns: 1fr; gap: 10px; padding-top: 22px; }
  h1 { max-width: none; }
}
@media (max-width: 560px) {
  .home .grid { grid-template-columns: 1fr; }
  .home .grid a { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
