/* PlaybookHouse — one stylesheet. System fonts only, no external requests. */

:root {
  --ink: #1d1d1b;
  --muted: #5b5b56;
  --rule: #d8d6cf;
  --paper: #fbfaf7;
  --accent: #7a2e1f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header and navigation */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0 1rem;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus { color: var(--accent); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* Main text */
main { padding: 3rem 0 4rem; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: 2.1rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.45rem; margin: 3rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }

p, ul, ol, table, blockquote, dl { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover, a:focus { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lede { font-size: 1.2rem; color: var(--ink); }
.muted, .note { color: var(--muted); font-size: 0.95rem; }

blockquote {
  margin-left: 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.draft-notice {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.6rem 0.9rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
th { font-weight: 600; }
thead th { border-bottom: 1px solid var(--ink); font-size: 0.9rem; color: var(--muted); font-weight: normal; }
td.price, th.price { text-align: right; white-space: nowrap; padding-right: 0; }

/* Chapter and line lists */
ol.chapters { padding-left: 0; list-style: none; counter-reset: ch; }
ol.chapters li { counter-increment: ch; padding-left: 2.25rem; position: relative; margin-bottom: 0.9rem; }
ol.chapters li::before {
  content: counter(ch);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--serif);
  color: var(--accent);
}
ol.chapters strong { font-weight: 600; }

ol.line { padding-left: 1.5rem; }
ol.line li { margin-bottom: 0.5rem; }
.status { color: var(--muted); font-style: italic; }

dl dt { font-weight: 600; margin-top: 0.9rem; }
dl dd { margin: 0.15rem 0 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer p { margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.site-footer a { color: var(--muted); }

/* Wider screens: a little more air, same measure for text */
@media (min-width: 900px) {
  body { font-size: 1.125rem; }
  h1 { font-size: 2.6rem; }
  main { padding: 4.5rem 0 5rem; }
}

/* Narrow screens (360 px and below) */
@media (max-width: 400px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.3rem; }
  .wrap { padding: 0 1rem; }
  th, td { padding-right: 0.5rem; }
}

/* Print */
@media print {
  :root { --paper: #fff; --ink: #000; --muted: #333; --accent: #000; }
  body { font-size: 11pt; line-height: 1.45; }
  .site-nav { display: none; }
  .site-header { border: 0; padding: 0 0 1rem; }
  main { padding: 0; }
  .wrap { max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  main a[href^="http"]::after, main a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 0.9em; }
  h1, h2, h3 { page-break-after: avoid; break-after: avoid; }
  table, blockquote, li { page-break-inside: avoid; break-inside: avoid; }
  .site-footer { border-top: 1px solid #000; margin-top: 2rem; }
}
