:root {
  color-scheme: dark;
  font-family: "Reference Sans", "Figtree", Arial, sans-serif;
  --ink: #000;
  --fg: #f6f1ea;
  --copy: rgba(236, 230, 222, .86);
  --quiet: rgba(229, 222, 214, .58);
  --line: rgba(255, 255, 255, .1);
  --ember: #e0a47c;
  --side: #0c0b0a;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--fg); }
body { min-height: 100svh; }
a { color: var(--ember); }
a:hover { color: #f0c7ad; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.book { min-height: 100svh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.book-top { display: none; }
.book-scrim { display: none; }
.book-side {
  position: sticky; top: 0; height: 100svh;
  display: flex; flex-direction: column;
  padding: 18px 14px 16px;
  background: var(--side);
  border-right: 1px solid var(--line);
}
.book-brand {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 8px; margin-bottom: 12px;
  color: #fff; text-decoration: none;
}
.book-brand svg { display: block; flex: none; }
.book-brand span {
  font-family: "Reference Display", "Schibsted Grotesk", "Figtree", sans-serif;
  font-size: 18px; font-weight: 560; letter-spacing: -.03em; line-height: 1;
}
.book-find {
  display: flex; align-items: center;
  height: 40px; margin: 0 6px 12px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
}
.book-find input {
  width: 100%; border: 0; background: transparent; outline: none; font-size: 14px;
}
.book-find input::placeholder { color: var(--quiet); }
.book-nav { overflow: auto; flex: 1; padding: 0 4px 12px; }
.book-nav p {
  margin: 16px 8px 6px;
  color: var(--quiet); font-size: 11px; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase;
}
.book-nav a {
  display: flex; align-items: center;
  min-height: 36px; padding: 6px 10px; border-radius: 10px;
  color: rgba(246, 241, 234, .82); text-decoration: none; font-size: 14.5px;
}
.book-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.book-nav a.on {
  background: rgba(224, 164, 124, .14); color: #f3d2be;
}
.book-app {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; margin-top: 8px; border-radius: 999px;
  background: #fff; color: #111; text-decoration: none; font-weight: 620;
}
.book-app:hover { color: #111; }

.book-main {
  display: grid;
  grid-template-columns: minmax(0, 760px) 200px;
  gap: 32px;
  justify-content: center;
  padding: 48px 32px 80px;
}
.crumb { margin: 0 0 12px; color: var(--quiet); font-size: 13px; letter-spacing: .04em; }
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { color: #fff; }
article h1 {
  margin: 0 0 16px;
  font-family: "Reference Display", "Schibsted Grotesk", "Figtree", sans-serif;
  font-weight: 520; font-size: clamp(36px, 5vw, 52px); letter-spacing: -.04em; line-height: 1.05;
}
.lede { margin: 0 0 28px; color: var(--copy); font-size: 18px; line-height: 1.55; }
article h2 {
  margin: 36px 0 10px;
  font-family: "Reference Display", "Schibsted Grotesk", "Figtree", sans-serif;
  font-size: 26px; font-weight: 520; letter-spacing: -.03em;
}
article h2:target { scroll-margin-top: 24px; }
article p, article li { color: var(--copy); font-size: 16.5px; line-height: 1.6; }
article p { margin: 0 0 14px; }
article ul, article ol { margin: 0 0 16px; padding-left: 1.2em; }
article li { margin: 0 0 8px; }
article strong { color: #fff; font-weight: 620; }
.callout {
  margin: 8px 0 22px; padding: 16px 16px 8px;
  border-radius: 16px; border: 1px solid rgba(224, 164, 124, .35);
  background: rgba(224, 164, 124, .08);
}
.callout strong { display: block; margin-bottom: 6px; color: #f3d2be; }
.sheet {
  width: 100%; border-collapse: collapse; margin: 8px 0 22px;
  font-size: 15px;
}
.sheet th, .sheet td {
  text-align: left; padding: 12px 10px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.sheet th { color: var(--quiet); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.sheet td { color: var(--copy); }
.steps { list-style: none; padding: 0; margin: 0 0 18px; }
.steps li {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  margin: 0 0 12px;
}
.steps span {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: rgba(224, 164, 124, .16); color: #f3d2be; font-size: 13px; font-weight: 700;
}
.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
}
.pager a {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 72px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line); color: #fff; text-decoration: none;
}
.pager a:hover { border-color: rgba(224, 164, 124, .5); }
.pager a span { color: var(--quiet); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.pager a.next { text-align: right; align-items: flex-end; }
.toc { position: sticky; top: 32px; align-self: start; }
.toc p {
  margin: 0 0 8px; color: var(--quiet); font-size: 11px; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase;
}
.toc a {
  display: block; padding: 6px 0; color: rgba(246, 241, 234, .72);
  text-decoration: none; font-size: 13.5px; line-height: 1.35;
}
.toc a:hover { color: #fff; }

@media (max-width: 980px) {
  .book { display: block; }
  .book-top {
    display: flex; align-items: center; gap: 8px;
    position: sticky; top: 0; z-index: 20;
    padding: 10px 12px;
    background: rgba(0, 0, 0, .86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  #bookMenu {
    width: 44px; height: 44px; flex: none; border-radius: 12px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: #fff;
  }
  .book-top .book-brand { margin: 0; min-width: 0; }
  .book-launch {
    margin-left: auto; min-height: 44px; padding: 0 14px; border-radius: 999px;
    background: #fff; color: #111; text-decoration: none; font-weight: 650; font-size: 14px;
    display: inline-flex; align-items: center;
  }
  .book-launch:hover { color: #111; }
  .book-side {
    position: fixed; z-index: 30; inset: 0 auto 0 0;
    width: min(300px, 88vw); height: 100svh;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: 16px 0 40px rgba(0, 0, 0, .45);
  }
  .book.menu-open .book-side { transform: none; }
  .book-scrim {
    display: none; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .5);
  }
  .book.menu-open .book-scrim { display: block; }
  .book-main { display: block; padding: 28px 18px 64px; }
  .toc { position: static; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .book-side { transition: none; }
}
