:root {
  --bg: #1a1a1a;
  --bg-raised: #222221;
  --bg-sunken: #141413;
  --ink: #e8e6e1;
  --ink-muted: #a8a59e;
  --ink-faint: #6e6c66;
  --rule: #2e2d2b;
  --rule-strong: #3a3937;
  --bronze: #c9a574;
  --bronze-dim: #8a7350;
  --callout: #1f1d18;
  --callout-rule: #4a3f2a;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--bronze);
  text-decoration: underline;
  text-decoration-color: var(--bronze-dim);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

/* Header */

.page-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 1rem;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0;
}

.pdf-button {
  background: transparent;
  color: var(--bronze);
  border: 1px solid var(--bronze-dim);
  padding: 0.55rem 1.1rem;
  margin-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.pdf-button:hover {
  background: var(--bronze);
  color: var(--bg);
  border-color: var(--bronze);
}

/* Table of contents */

.toc {
  margin: 0 0 4rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-raised);
  border-left: 2px solid var(--bronze);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  font-size: 0.9rem;
  padding: 0.2rem 0;
  break-inside: avoid;
}

.toc a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 120ms ease;
}

.toc a:hover {
  color: var(--bronze);
}

/* Sections */

section {
  margin: 0 0 3.5rem;
  scroll-margin-top: 1.5rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: -0.005em;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.section-sub {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: -0.75rem 0 1.25rem;
  font-style: italic;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--bronze);
  margin: 1.75rem 0 0.5rem;
}

h3:first-of-type {
  margin-top: 0.5rem;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

strong {
  color: var(--ink);
  font-weight: 600;
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

li { margin-bottom: 0.5rem; }
li:last-child { margin-bottom: 0; }

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

thead th {
  text-align: left;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule-strong);
}

tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-muted);
  vertical-align: top;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  width: 38%;
}

tbody td {
  padding: 0.85rem 0 0.85rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: none;
}

.sku {
  display: block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--bronze);
  letter-spacing: 0.01em;
}

.model-note {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

.note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 0.75rem;
}

/* Callout (shower notes) */

.callout {
  background: var(--callout);
  border-left: 2px solid var(--bronze);
  padding: 1.5rem 1.75rem;
}

.callout h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* TBD list */

.tbd {
  list-style: none;
  padding-left: 0;
  columns: 2;
  column-gap: 2rem;
}

.tbd li {
  break-inside: avoid;
  padding-left: 1.25rem;
  position: relative;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.tbd li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 0.5rem;
  height: 1px;
  background: var(--bronze-dim);
}

/* Mobile */

@media (max-width: 600px) {
  main {
    padding: 3rem 1.25rem 4rem;
  }

  .toc ol,
  .tbd {
    columns: 1;
  }

  tbody th,
  tbody td {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
  }

  tbody th {
    border-bottom: none;
    padding-bottom: 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  tbody td {
    padding-bottom: 1rem;
  }
}

/* Print */

@media print {
  body {
    background: white;
    color: black;
  }
  .toc, .pdf-button { display: none; }
  main { max-width: none; padding: 1rem; }
  h1, h2 { color: black; }
  a { color: #6b5530; text-decoration-color: #6b5530; }
  .sku { color: #6b5530; }
  .callout { background: #f5f1e8; border-left-color: #6b5530; }
  section { page-break-inside: avoid; }
}
