/* Change these variables to make the reader your own. */
:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --surface: #fffdf8;
  --ink: #172d3a;
  --muted: #596872;
  --line: #d5d9d5;
  --accent: #246859;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #12212a;
  --surface: #192d37;
  --ink: #edece4;
  --muted: #b0c0c8;
  --line: #38505b;
  --accent: #99d3b7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    17px/1.7 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

button,
select {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 46px;
  padding: 8px 12px;
  max-width: 100%;
}

button,
summary,
select {
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.shell {
  max-width: 960px;
  margin: auto;
  padding: 0 32px;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-weight: 800;
  font-size: 25px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark span {
  color: var(--accent);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.intro {
  padding: 48px 0 28px;
}

h1 {
  font:
    normal clamp(42px, 8vw, 76px)/1.04 Georgia,
    serif;
  letter-spacing: -0.045em;
  margin: 14px 0 20px;
}

h1 span {
  display: block;
  color: var(--accent);
}

.dek {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.archive-note {
  font-size: 13px;
  color: var(--muted);
  max-width: 560px;
}

.stamp {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 1px 7px;
  margin-right: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.edition-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.edition-meta {
  text-align: right;
}

.edition-meta > * {
  display: block;
}

time {
  font-variant-numeric: tabular-nums;
}

#status {
  font-size: 13px;
  color: var(--muted);
}

#reading {
  margin: 24px 0 36px;
  overflow-wrap: anywhere;
}

#reading > h2 {
  font:
    normal 25px/1.3 Georgia,
    serif;
}

details {
  border-top: 1px solid var(--line);
  margin: 0;
}

summary {
  min-height: 52px;
  padding: 17px 6px;
  font-weight: 650;
  line-height: 1.45;
}

summary::marker {
  color: var(--accent);
}

.section-content {
  padding: 0 8px 20px;
  max-width: 76ch;
}

.section-content p {
  margin: 14px 0;
  white-space: pre-line;
}

.section-content h3 {
  font-size: 18px;
  margin: 25px 0 10px;
}

#original-panel {
  font-size: 13px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 24px 0 44px;
  color: var(--muted);
  font-size: 12px;
}

footer > span {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  background: var(--surface);
  padding: 10px;
}

.skip:focus {
  top: 8px;
  z-index: 2;
}

@media (max-width: 540px) {
  .shell {
    padding: 0 20px;
  }

  .masthead {
    padding: 18px 0;
  }

  .masthead > .eyebrow {
    display: none;
  }

  .intro {
    padding-top: 30px;
  }

  .edition-bar {
    align-items: flex-start;
    gap: 12px;
  }

  .edition-meta {
    padding-top: 3px;
    font-size: 13px;
  }

  .edition-meta .eyebrow {
    font-size: 9px;
    max-width: 100px;
  }

  .dek {
    font-size: 16px;
  }

  body {
    font-size: 16px;
  }

  summary {
    padding: 18px 2px;
  }

  .section-content {
    padding: 0 2px 18px;
  }

  select {
    font-size: 15px;
  }

  #reading > h2 {
    font-size: 23px;
  }
}

@media print {
  button,
  .edition-bar,
  #original-panel {
    display: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .shell {
    max-width: none;
  }
}
