:root {
  --bg: #faf3e6;
  --bg-alt: #f1e6d0;
  --ink: #2c2418;
  --ink-soft: #4a4032;
  --gold: #9a6b1f;
  --gold-strong: #7a521a;
  --green: #2f5a3d;
  --green-strong: #234a30;
  --rule: #d8c6a0;
  --quote-bg: #f1e6d0;
  --quote-border: #b8862f;
  --link: #234a30;
  --link-visited: #4a3a17;
  --focus: #7a521a;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1812;
    --bg-alt: #241f17;
    --ink: #ecdfc4;
    --ink-soft: #cbb98f;
    --gold: #e0b25a;
    --gold-strong: #f0c877;
    --green: #7fb894;
    --green-strong: #9ccdae;
    --rule: #4a3e28;
    --quote-bg: #241f17;
    --quote-border: #e0b25a;
    --link: #8fcaa2;
    --link-visited: #d8b878;
    --focus: #e0b25a;
  }
}

:root[data-theme="dark"] {
  --bg: #1c1812;
  --bg-alt: #241f17;
  --ink: #ecdfc4;
  --ink-soft: #cbb98f;
  --gold: #e0b25a;
  --gold-strong: #f0c877;
  --green: #7fb894;
  --green-strong: #9ccdae;
  --rule: #4a3e28;
  --quote-bg: #241f17;
  --quote-border: #e0b25a;
  --link: #8fcaa2;
  --link-visited: #d8b878;
  --focus: #e0b25a;
}

:root[data-theme="light"] {
  --bg: #faf3e6;
  --bg-alt: #f1e6d0;
  --ink: #2c2418;
  --ink-soft: #4a4032;
  --gold: #9a6b1f;
  --gold-strong: #7a521a;
  --green: #2f5a3d;
  --green-strong: #234a30;
  --rule: #d8c6a0;
  --quote-bg: #f1e6d0;
  --quote-border: #b8862f;
  --link: #234a30;
  --link-visited: #4a3a17;
  --focus: #7a521a;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", Charter, "Times New Roman", serif;
  line-height: 1.65;
  font-size: 1.0625rem;
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:visited { color: var(--link-visited); }
a:hover { color: var(--gold-strong); }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--bg-alt);
  color: var(--ink);
  padding: 0.75em 1em;
  border: 1px solid var(--rule);
  z-index: 10;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

header.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 1.25rem 1.75rem;
}

.header-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

h1.site-title {
  font-family: Georgia, Charter, serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 0.25rem;
  letter-spacing: 0.01em;
  color: var(--gold-strong);
}

p.tagline {
  margin: 0 0 1.5rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

nav.site-nav {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 0;
  padding: 0;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--green);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1rem;
}

nav.site-nav a:hover,
nav.site-nav a:focus-visible {
  border-bottom-color: var(--gold);
}

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

section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--rule);
}

section:last-of-type {
  border-bottom: none;
}

h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.75rem);
  color: var(--green-strong);
  margin: 0 0 1.25rem;
  scroll-margin-top: 1.5rem;
}

h3 {
  font-size: 1.15rem;
  color: var(--gold-strong);
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

p { margin: 0 0 1.15rem; }

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.25rem;
  background: var(--quote-bg);
  border-left: 4px solid var(--quote-border);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

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

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.pull {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-strong);
  border-left-color: var(--green);
}

.living-note {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px dashed var(--rule);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

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

table.stage-map caption {
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

table.stage-map th,
table.stage-map td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

table.stage-map th {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green-strong);
}

.table-scroll {
  overflow-x: auto;
}

dl.quadrants {
  margin: 1rem 0 1.5rem;
}
dl.quadrants dt {
  font-weight: 700;
  color: var(--green-strong);
  margin-top: 1rem;
}
dl.quadrants dd {
  margin: 0.2rem 0 0;
}

ul.bib-list,
ul.plain-list {
  padding-left: 1.2rem;
}
ul.bib-list li,
ul.plain-list li {
  margin-bottom: 0.6rem;
}

.shadow-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  margin: 1rem 0 0.5rem;
}

.link-row a {
  font-weight: 700;
}

.musing-entry {
  margin-bottom: 1.75rem;
}

footer.site-footer {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
  padding: 2rem 1.25rem 3rem;
  margin-top: 1rem;
}

.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.footer-inner p {
  margin: 0 0 0.6rem;
}

@media (max-width: 30em) {
  header.site-header { padding: 1.75rem 1rem 1.25rem; }
  section { padding: 2.25rem 0; }
  body { font-size: 1rem; }
}

.song-note {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
  margin: -0.6rem 0 2rem;
  font-style: italic;
}
