@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=EB+Garamond:wght@400;500;600&family=Spectral:ital,wght@0,300;0,400;0,600;1,400&display=swap');

:root {
  color-scheme: light dark;
  --table: #e9ebef;
  --card: #ffffff;
  --ink: #181f2a;
  --ink-soft: #5a6472;
  --rule: #dde1e6;
  --red: #b01b2e;
  --link: #1c4f7c;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --display: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --index: 'Abril Fatface', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --table: #0e1218;
    --card: #171d26;
    --ink: #e4e8ee;
    --ink-soft: #98a3b2;
    --rule: #2b3542;
    --red: #e2596b;
    --link: #86b9e8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--table);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

.masthead {
  max-width: 45rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.75rem 0.25rem 1.5rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--red); }
.wordmark .studios {
  font-size: 0.82em;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-left: 0.15em;
}

.masthead nav { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.masthead nav a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--ink); border-bottom-color: var(--red); }

.card {
  position: relative;
  max-width: 45rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 4.25rem 3.5rem 4.25rem;
  box-shadow: 0 1px 2px rgba(20, 26, 34, 0.05), 0 12px 32px -20px rgba(20, 26, 34, 0.35);
}

.pip {
  position: absolute;
  font-family: var(--index);
  font-weight: 400;
  font-size: 1.85rem;
  line-height: 0.92;
  text-align: center;
  color: var(--ink);
  user-select: none;
}
.pip .suit { display: block; font-size: 1.15rem; margin-top: 0.05rem; }
.pip.red { color: var(--red); }
.pip-tl { top: 1.6rem; left: 1.6rem; }
.pip-br { bottom: 1.6rem; right: 1.6rem; transform: rotate(180deg); }

.prose { max-width: 34rem; min-width: 0; }

h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 6vw, 3.2rem);
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0 0 1rem;
}

.standfirst {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  max-width: 32rem;
}

.prose > *, .hero > * { max-width: 100%; }

.stamp {
  font-size: 0.85rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 0;
  margin: 0 0 2.75rem;
  max-width: 34rem;
}

h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 3rem 0 0.85rem;
}
h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 2rem 0 0.5rem;
}

p, ul, ol { margin: 0 0 1.15rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.55rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

strong { font-weight: 600; }

.note {
  border-left: 2px solid var(--red);
  padding: 0.15rem 0 0.15rem 1.1rem;
  margin: 1.75rem 0;
  color: var(--ink-soft);
  max-width: 34rem;
}

.tablewrap { overflow-x: auto; max-width: 100%; margin: 1.5rem 0 2rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; font-size: 0.95rem; min-width: 34rem; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 1.25rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; border-bottom-color: var(--ink-soft); }
td:last-child, th:last-child { padding-right: 0; }

.mailto { font-weight: 600; }

footer.colophon {
  max-width: 45rem;
  margin: 2rem auto 0;
  padding: 0 0.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
footer.colophon a { color: var(--ink-soft); }
footer.colophon p { margin: 0 0 0.5rem; }

/* Home */
.hero { max-width: 36rem; min-width: 0; }
.hero h1 { font-size: clamp(2.8rem, 8.5vw, 4.5rem); margin-bottom: 1.25rem; }
.hero .lede { font-size: 1.3rem; line-height: 1.55; margin-bottom: 1.5rem; }
.shelf { border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.5rem; max-width: 36rem; }

@media (max-width: 44rem) {
  body { font-size: 17px; padding-bottom: 3rem; }
  .card { padding: 4rem 1.4rem 3.25rem; border-radius: 8px; }
  .pip-tl { top: 1.1rem; left: 1.1rem; font-size: 1.45rem; }
  .pip-br { display: none; }
  table { min-width: 24rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

a:focus-visible, .wordmark:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
