:root {
  --parchment: #f7f3e9;
  --parchment-deep: #f2ecde;
  --ink: #27251f;
  --ink-soft: #6d5b46;
  --gold: #b1843f;
  --gold-dark: #8d6932;
  --rule: rgba(115, 91, 55, 0.25);
  --rule-light: rgba(115, 91, 55, 0.14);
  --content: 770px;
  --wide: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 18px;
  line-height: 1.65;
  background-color: var(--parchment);
  background-image:
    radial-gradient(circle at 17% 21%, rgba(123, 91, 43, 0.055) 0 0.65px, transparent 0.8px),
    radial-gradient(circle at 73% 64%, rgba(123, 91, 43, 0.045) 0 0.55px, transparent 0.75px),
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 45%, rgba(197, 168, 113, 0.025));
  background-size: 23px 23px, 31px 31px, 100% 100%;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--ink);
  background: rgba(177, 132, 63, 0.2);
}

a {
  color: inherit;
}

img {
  display: block;
}

h1,
h2,
h3,
.brand-word,
.d-title,
.r-title,
.speaker {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  color: var(--ink);
}

/* Header */
.site-header {
  width: calc(100% - 16px);
  max-width: var(--wide);
  min-height: 69px;
  margin: 0 auto;
  padding: 0 2px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.site-header > .brand { justify-self: start; }
.site-header > .nav-left { justify-self: start; }
.site-header > .brand-center { justify-self: center; }
.site-header > .nav-center { justify-self: center; }
.site-header > .nav-right { justify-self: end; }

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 40px;
  height: 40px;
}

.brand-word {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.28em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 36px);
}

.site-nav a {
  position: relative;
  padding: 25px 0 22px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.19em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 17px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-dark);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
}

/* Shared page frame */
main {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 77px 0 92px;
}

.page-sun {
  width: 72px;
  height: 72px;
  margin: 0 auto 40px;
}

h1.page-title {
  position: relative;
  width: fit-content;
  margin: 0 auto 75px;
  padding: 0 0 23px;
  font-size: clamp(50px, 7.4vw, 80px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-align: center;
}

h1.page-title::after {
  content: "◆";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 272px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 7px;
  line-height: 1px;
  letter-spacing: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) left center / calc(50% - 14px) 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) right center / calc(50% - 14px) 1px no-repeat;
  transform: translateX(-50%);
}

.lede {
  max-width: 650px;
  margin: -39px auto 38px;
  color: var(--ink-soft);
  font-size: 17px;
  font-style: italic;
  text-align: center;
}

/* Landing page */
body:has(.hero) main {
  width: 100%;
  padding: 0;
}

.hero {
  min-height: 72vh;
  padding: 8vh 24px 3vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero .sun-emblem {
  width: 108px;
  height: 108px;
  margin-bottom: 61px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(45px, 7.2vw, 75px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.17em;
  text-indent: 0.17em;
  text-transform: uppercase;
}

.hero p {
  margin: 33px 0 0;
  color: var(--ink-soft);
  font-size: 26px;
  font-style: italic;
  line-height: 1.2;
}

.enter-link {
  position: relative;
  margin-top: 77px;
  color: var(--gold-dark);
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.39em;
  text-indent: 0.39em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, letter-spacing 180ms ease;
}

.enter-link::before {
  content: "◆";
  position: absolute;
  left: 50%;
  top: -45px;
  width: 272px;
  color: var(--gold);
  font-size: 7px;
  line-height: 1px;
  letter-spacing: 0;
  text-indent: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) left center / calc(50% - 14px) 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) right center / calc(50% - 14px) 1px no-repeat;
  transform: translateX(-50%);
}

.enter-link:hover,
.enter-link:focus-visible {
  color: var(--ink);
  letter-spacing: 0.46em;
}

.enter-link.no-divider {
  margin-top: 24px;
}

.enter-link.no-divider::before {
  display: none;
}

.hero .enter-link {
  margin-top: 84px;
  font-size: 17px;
}

.returning-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5vh 24px 8vh;
  text-align: center;
}

.returning-section .entry-label {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.returning-section .threshold-form {
  width: min(260px, 100%);
}

.returning-section .threshold-input {
  font-size: 18px;
}

.returning-section .threshold-submit {
  font-size: 11px;
}

/* Threshold page */
body:has(.threshold) main {
  padding: 0;
}

.threshold {
  min-height: 100vh;
  padding: 9vh 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.threshold .sun-emblem {
  width: 108px;
  height: 108px;
  margin-bottom: 42px;
}

.threshold .sun-emblem.emblem-large {
  width: 132px;
  height: 132px;
}

.threshold h1 {
  margin: 0 0 35px;
  font-size: clamp(50px, 7.4vw, 80px);
  font-weight: 500;
  line-height: 1;
}

.threshold-note {
  max-width: 520px;
  margin: -18px 0 40px;
  color: var(--ink-soft);
  font-size: 22px;
  font-style: italic;
  line-height: 1.55;
}

.threshold-note.success-text {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--gold-dark);
  font-size: 27px;
  font-style: normal;
  line-height: 1.5;
}

.threshold-form {
  width: min(420px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 27px;
}

.confirm-label {
  display: block;
  max-width: 480px;
  margin: -18px 0 4px;
  color: var(--ink-soft);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.55;
  text-align: center;
}

.threshold-input {
  width: 100%;
  padding: 11px 8px;
  color: var(--ink);
  font: italic 22px/1.4 "EB Garamond", Garamond, Georgia, serif;
  text-align: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
}

select.threshold-input {
  appearance: none;
  -webkit-appearance: none;
  text-align-last: center;
  cursor: pointer;
}

.threshold-input:focus {
  outline: 0;
  border-color: var(--gold);
}

.threshold-input::placeholder {
  color: rgba(109, 91, 70, 0.65);
}

.threshold-submit {
  padding: 4px 2px;
  color: var(--gold-dark);
  font: 500 12px/1 "Cormorant Garamond", Garamond, Georgia, serif;
  letter-spacing: 0.31em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}

.threshold-submit:hover,
.threshold-submit:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.threshold-response {
  min-height: 1.4em;
  max-width: 520px;
  margin: 25px auto 0;
  color: var(--ink-soft);
  font-size: 22px;
  font-style: italic;
  text-align: center;
}

.threshold-response.accepted {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 6px;
  color: var(--gold-dark);
  font-style: normal;
  border-bottom: 1px solid var(--rule);
}

/* Library */
.dialogue-list {
  margin: 0 0 42px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule-light);
}

.dialogue-list li {
  border-bottom: 1px solid var(--rule);
}

.dialogue-list a,
.dialogue-list .pending {
  min-height: 72px;
  padding: 13px 2px;
  display: grid;
  grid-template-columns: 92px 1fr 24px;
  align-items: center;
  gap: 17px;
  text-decoration: none;
}

.dialogue-list a {
  transition: background 160ms ease, padding 160ms ease;
}

.dialogue-list a:hover {
  padding-left: 8px;
  background: rgba(177, 132, 63, 0.045);
}

.dialogue-list .num {
  color: var(--gold-dark);
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 16px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.dialogue-list .meta {
  min-width: 0;
}

.dialogue-list .d-title {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.15;
}

.dialogue-list .d-desc {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.25;
}

.dialogue-list .d-tag {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.d-tag.authentic { color: var(--gold); }
.d-tag.spurious { color: var(--ink-soft); opacity: 0.7; }
.d-tag.preparing { color: var(--gold-dark); opacity: 0.85; }

.letter-tag {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  margin: -34px 0 40px;
}
.letter-tag.authentic { color: var(--gold); }
.letter-tag.spurious { color: var(--ink-soft); opacity: 0.75; }

.dialogue-list .arrow {
  color: var(--gold-dark);
  font-size: 18px;
  text-align: right;
}

.dialogue-list .pending {
  color: var(--ink-soft);
  cursor: default;
}

.dialogue-list .pending .d-title {
  color: var(--ink-soft);
}

/* About */
.prose {
  width: min(722px, calc(100% - 40px));
}

.prose h1.page-title {
  margin-bottom: 48px;
}

.prose > p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.75;
}

.prose h2 {
  margin: 54px 0 15px;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
}

.prose .enter-link {
  display: block;
  width: fit-content;
  margin: 44px auto 0;
}

/* Dialogue reader */
.dialogue-nav {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}

.dialogue-nav:hover {
  color: var(--gold-dark);
}

.view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.view-toggle-bar .dialogue-nav {
  margin-bottom: 0;
}

.view-toggle-buttons {
  display: flex;
  gap: 8px;
}

.view-btn {
  padding: 6px 14px;
  color: var(--ink-soft);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.view-btn:hover {
  color: var(--ink);
  border-color: var(--gold-dark);
}

.view-btn[aria-pressed="true"] {
  color: var(--gold-dark);
  border-color: var(--gold-dark);
  background: rgba(168, 118, 44, 0.08);
}

#dialogue-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 44px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

#dialogue-pager button {
  padding: 6px 14px;
  color: var(--gold-dark);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 14px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
}

#dialogue-pager button:hover:not(:disabled) {
  border-color: var(--gold-dark);
}

#dialogue-pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

#page-indicator {
  color: var(--ink-soft);
  font-size: 14px;
}

.page-jump-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

#page-jump-input {
  width: 56px;
  padding: 4px 6px;
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 14px;
  text-align: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.page-jump-form button {
  padding: 5px 12px;
  color: var(--gold-dark);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 14px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
}

.page-jump-form button:hover {
  border-color: var(--gold-dark);
}

#resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 12px 16px;
  color: var(--ink);
  font-size: 15px;
  background: rgba(168, 118, 44, 0.08);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.resume-actions {
  display: flex;
  gap: 8px;
}

#resume-banner button {
  padding: 5px 12px;
  color: var(--gold-dark);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
}

#resume-banner button:hover {
  border-color: var(--gold-dark);
}

.bookmark-highlight {
  animation: bookmark-flash 2.2s ease;
}

@keyframes bookmark-flash {
  0% { background: rgba(168, 118, 44, 0.22); }
  100% { background: transparent; }
}

.dialogue-pager {
  display: flex;
  justify-content: space-between;
  margin: 0 0 42px;
  padding-bottom: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  border-bottom: 1px solid var(--rule);
}

.dialogue-pager a {
  text-decoration: none;
}

.dialogue-pager a:hover {
  color: var(--gold-dark);
}

.eyebrow {
  margin: -50px 0 15px;
  color: var(--gold-dark);
  font-size: 11px;
  letter-spacing: 0.17em;
  text-align: center;
  text-transform: uppercase;
}

.epigraph {
  max-width: 590px;
  margin: -44px auto 52px;
  padding: 0;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
  border: 0;
}

.intro-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: -30px auto 56px;
  text-align: center;
}

.intro-btn {
  display: inline-block;
  padding: 7px 20px;
  color: var(--gold-dark);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.intro-btn:hover {
  color: var(--ink);
  border-color: var(--gold-dark);
  background: rgba(168, 118, 44, 0.08);
}

.book-label {
  margin: 4px auto 10px;
  text-align: center;
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* Republic: button bar sits directly below the title */
.intro-bar.rep-bar {
  margin: -34px auto 30px;
}

/* Republic: epigraph moved below the BOOK label */
.epigraph.rep-epigraph {
  margin: 0 auto 44px;
}

/* Republic: choose-a-book dropdown */
.book-chooser {
  position: relative;
  width: fit-content;
  margin: 0;
}

.book-chooser-btn::after {
  content: " \25BE";
  font-size: 0.8em;
}

.book-chooser-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: 6px;
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(39, 37, 31, 0.12);
  display: grid;
  grid-template-columns: repeat(2, minmax(84px, 1fr));
  gap: 2px;
}

.book-chooser-menu[hidden] { display: none; }

.book-chooser-menu a {
  display: block;
  padding: 6px 16px;
  color: var(--ink-soft);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 3px;
  white-space: nowrap;
}

.book-chooser-menu a:hover {
  background: rgba(168, 118, 44, 0.10);
  color: var(--ink);
}

.book-chooser-menu a[aria-current="page"] {
  color: var(--gold-dark);
  font-weight: 600;
}

.book-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 44px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.book-nav a {
  color: var(--gold-dark);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 15px;
  text-decoration: none;
}

.book-nav a:hover { color: var(--ink); }
.book-nav .spacer { flex: 1; }

.dramatis {
  max-width: 620px;
  margin: 0 auto 40px;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.7;
}

.speaker-inline {
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.line {
  margin: 24px 0 0;
}

/* Footer */
.site-footer {
  max-width: var(--content);
  margin: 0 auto;
  padding: 34px 20px 46px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.07em;
  text-align: center;
  border-top: 1px solid var(--rule-light);
}

.site-footer .page-sun {
  width: 38px;
  height: 38px;
  margin: 0 auto 13px;
}

@media (max-width: 720px) {
  .site-header {
    width: calc(100% - 28px);
    min-height: auto;
    padding: 15px 0 10px;
    flex-wrap: wrap;
    gap: 9px 20px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-word {
    font-size: 13px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-end;
    gap: 21px;
  }

  .site-nav a {
    padding: 8px 0 7px;
    font-size: 10px;
  }

  .site-nav a::after {
    bottom: 2px;
  }

  main {
    padding-top: 57px;
  }

  .page-sun {
    width: 49px;
    height: 49px;
    margin-bottom: 30px;
  }

  h1.page-title {
    margin-bottom: 63px;
  }

  .hero {
    min-height: 72svh;
  }

  .hero .sun-emblem {
    width: 86px;
    height: 86px;
    margin-bottom: 45px;
  }

  .hero h1 {
    font-size: clamp(34px, 10vw, 49px);
    letter-spacing: 0.11em;
    text-indent: 0.11em;
  }

  .threshold h1 {
    font-size: clamp(34px, 10vw, 49px);
  }

  .threshold .sun-emblem {
    width: 86px;
    height: 86px;
  }

  .threshold .sun-emblem.emblem-large {
    width: 106px;
    height: 106px;
  }

  .hero p {
    margin-top: 25px;
    font-size: 19px;
  }

  .enter-link {
    margin-top: 70px;
  }

  .dialogue-list a,
  .dialogue-list .pending {
    grid-template-columns: 66px 1fr 18px;
    gap: 10px;
  }
}

@media (max-width: 430px) {
  .brand-word {
    letter-spacing: 0.2em;
  }

  .site-nav {
    justify-content: space-between;
    gap: 12px;
  }

  .prose > p {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Print / PDF export */
@media print {
  @page {
    margin: 0.75in;
  }

  .site-header,
  .view-toggle-bar,
  .intro-bar,
  .book-chooser,
  .book-nav,
  #resume-banner,
  #dialogue-pager,
  #resolution-continue {
    display: none !important;
  }

  html {
    background: #fff;
  }

  body {
    background: #fff;
    color: #000;
  }

  .print-branding {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 0 30px;
    text-align: center;
  }

  .print-branding img {
    width: 42px;
    height: 42px;
  }

  .print-branding .print-wordmark {
    font-family: "Cormorant Garamond", Garamond, Georgia, serif;
    font-size: 20px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold-dark);
  }

  .dialogue-page {
    display: block !important;
  }

  .line {
    orphans: 3;
    widows: 3;
  }

  .speaker-inline {
    color: var(--gold-dark);
  }

  main {
    max-width: 100%;
    padding: 0;
  }

  h1.page-title,
  .epigraph {
    text-align: center;
  }

  .site-footer {
    display: flex !important;
    background: transparent;
    margin-top: 50px;
  }
}

/* Dialogue-list group headings (Genuine / Spurious) */
.list-group-head {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto 30px;
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dark);
  white-space: nowrap;
}

/* A hairline runs out to either side, so the label reads as a division
   of the list rather than as a stray caption above it. */
.list-group-head::before,
.list-group-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
}

.list-group-head--second {
  margin-top: 78px;
}

@media (max-width: 600px) {
  .list-group-head { gap: 12px; font-size: 17px; letter-spacing: 0.22em; }
  .list-group-head--second { margin-top: 56px; }
}

/* ---- Reading progress: locked and next entries ---- */

.dialogue-list li.locked { opacity: 0.45; }
.dialogue-list li.locked a { cursor: default; }
.dialogue-list li.locked a:hover { background: none; }
.d-state { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-dark); margin-top: 5px; }
.dialogue-list li.locked .d-state { color: var(--ink-soft); }


.locked-notice { max-width: 46ch; margin: 40px auto; text-align: center; font-style: italic;
  color: var(--ink-soft); line-height: 1.6; }
@media print { .finish-bar { display: none !important; } }

/* ---- Locked, next, and finished entries ---- */
.dialogue-list li.locked { opacity: 0.38; }
.dialogue-list li.locked a { cursor: default; }
.dialogue-list li.locked a:hover { background: none; }
.dialogue-list li.locked .arrow { color: var(--ink-soft); }
.lock-icon { display: inline-block; vertical-align: -2px; opacity: 0.85; }

/* The one to read next is the only thing lit. */
.dialogue-list li.next-up { opacity: 1; }
.dialogue-list li.next-up > a {
  background: rgba(198,161,74,0.09);
  box-shadow: inset 3px 0 0 var(--gold);
  border-radius: 3px;
}
.dialogue-list li.next-up .d-title { color: var(--ink); font-weight: 600; }
.dialogue-list li.next-up .arrow { color: var(--gold-dark); }

.key-missing { max-width: 46ch; margin: 0 auto 26px; text-align: center; font-size: 14px;
  font-style: italic; color: var(--ink-soft); }
.key-missing a { color: var(--gold-dark); }

/* ---- The close of a dialogue ---- */
.finish-bar { max-width: 44ch; margin: 76px auto 26px; text-align: center; }
.finish-rule { display: block; width: 74px; height: 1px; margin: 0 auto 24px;
  background: var(--gold); opacity: 0.4; }
.finish-prompt { font-family: "Cormorant Garamond", Georgia, serif; font-size: 19px;
  font-style: italic; color: var(--ink-soft); margin: 0 0 20px; }
#finish-msg { font-family: "Cormorant Garamond", Georgia, serif; font-size: 17px;
  font-style: italic; color: var(--ink-soft); margin: 22px 0 0; min-height: 1.4em; }
#finish-msg a { color: var(--gold-dark); text-decoration: none; border-bottom: 1px solid rgba(198,161,74,0.45); }
#finish-msg a:hover { color: var(--ink); }
@media print { .finish-bar { display: none !important; } }

.lock-slot {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  line-height: 0;
}
.lock-slot .lock-icon { display: block; }

.finish-bar .finish-btn,
.finish-bar button#btn-finished {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  padding: 14px 32px;
  margin: 0;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: transparent;
  background-image: none;
  color: var(--gold-dark);
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.finish-bar .finish-btn:hover,
.finish-bar button#btn-finished:hover {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.finish-bar .finish-btn:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

.dialogue-list li.preparing > a { opacity: 0.62; }
.dialogue-list li.preparing .arrow { color: var(--ink-soft); }

.d-dedication { display: block; font-style: italic; font-size: 13.5px; color: var(--gold-dark);
  opacity: 0.85; margin-top: 3px; }

/* ─────────────────────────────────────────────────────────────────────
   Header, revised
   Dialegesthai and its sun on the left · Plato in the middle · About right.
   Everything below overrides the rules above; delete this block to undo.
   ───────────────────────────────────────────────────────────────────── */

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  grid-template-columns: none;
}

/* The two navs stop being boxes, so their links become header items
   in their own right and can be placed individually. */
.site-header .site-nav {
  display: contents;
}

/* The sun, and Dialegesthai beside it, at the far left. */
.site-header .brand {
  order: 1;
  justify-self: auto;
  gap: 14px;
}

.site-header .brand img {
  width: 34px;
  height: 34px;
}

.site-header .site-nav a[href*="dialegesthai"] {
  order: 2;
  margin-left: 14px;
}

/* Plato, exactly in the middle of the bar, whatever sits either side. */
.site-header .site-nav a[href*="plato"] {
  order: 3;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* About, at the far right. */
.site-header .site-nav a[href*="about"] {
  order: 4;
  margin-left: auto;
}

/* All three, larger and more openly lettered. */
.site-header .site-nav a {
  font-size: 15px;
  letter-spacing: 0.22em;
}

.site-header .site-nav a::after { bottom: 15px; }

/* The sun above each page, larger. */
.page-sun {
  width: 108px;
  height: 108px;
  margin-bottom: 46px;
}

@media (max-width: 700px) {
  .site-header .site-nav a { font-size: 13px; letter-spacing: 0.16em; }
  .site-header .site-nav a[href*="dialegesthai"] { margin-left: 10px; }
  .page-sun { width: 96px; height: 96px; }
}

/* ─────────────────────────────────────────────────────────────────────
   Header on small screens
   Plato is positioned in the middle of the bar on a wide screen, which
   leaves it overlapping its neighbours on a narrow one. Below 760px the
   three simply sit in a row of their own, evenly spaced, beneath the
   wordmark. Delete this block to undo.
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 2px;
    padding: 8px 10px;
    min-height: 0;
  }

  /* The sun and the wordmark, together, on their own line. */
  .site-header .brand {
    order: 1;
    flex: 0 0 100%;
    justify-content: center;
    gap: 10px;
  }

  .site-header .brand img { width: 26px; height: 26px; }

  .site-header .site-nav a[href*="dialegesthai"] {
    order: 2;
    margin-left: 0;
  }

  /* Plato comes out of the middle of the bar and joins the row. */
  .site-header .site-nav a[href*="plato"] {
    order: 3;
    position: static;
    left: auto;
    transform: none;
  }

  .site-header .site-nav a[href*="about"] {
    order: 4;
    margin-left: 0;
  }

  .site-header .site-nav a {
    font-size: 11.5px;
    letter-spacing: 0.14em;
    padding: 10px 0 12px;
    margin: 0 9px;
  }

  .site-header .site-nav a::after { bottom: 7px; }

  .page-sun { width: 76px; height: 76px; margin-bottom: 34px; }
}

@media (max-width: 380px) {
  .site-header .site-nav a { font-size: 10.5px; letter-spacing: 0.1em; margin: 0 6px; }
}

/* Air between the reading controls and the title, on every dialogue. */
.view-toggle-bar {
  margin-bottom: 2.4rem;
}
#resume-banner:not([style*="display: none"]) {
  margin-top: .4rem;
}
@media (max-width: 700px) {
  .view-toggle-bar { margin-bottom: 1.7rem; }
}
