:root {
  --paper: #eee3cf;
  --paper-deep: #ddcba8;
  --paper-light: #f7efdf;
  --ink: #241d17;
  --ink-soft: #5b4b3a;
  --wine: #4b1b3f;
  --wine-deep: #290d23;
  --wine-light: #6d2c5a;
  --purple-mist: #d7bed0;
  --gold: #d5a75e;
  --bronze: #986224;
  --teal: #24534c;
  --rule: rgb(36 29 23 / 19%);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wide: 1120px;
  --reading: 760px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgb(75 27 63 / 2%) 31px 32px),
    var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--wine-light);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.03;
  text-wrap: balance;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  padding: 0.65rem 0.9rem;
  color: var(--wine-deep);
  background: var(--gold);
  font-family: var(--sans);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  color: var(--paper-light);
  border-bottom: 1px solid rgb(247 239 223 / 16%);
}

.header-inner {
  width: min(calc(100% - 2rem), var(--wide));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  text-decoration: none;
}

.wordmark-mark {
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.header-nav a {
  text-decoration: none;
}

.language-switch {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgb(247 239 223 / 60%);
  font-family: var(--mono);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 780px;
  color: var(--paper-light);
  background:
    radial-gradient(ellipse 100% 90% at 9% -10%, #783562 0, transparent 58%),
    linear-gradient(145deg, var(--wine) 0%, var(--wine-deep) 78%);
}

.hero-ghost {
  position: absolute;
  top: 0.32em;
  right: -0.06em;
  color: rgb(238 227 207 / 4%);
  font-size: clamp(8rem, 20vw, 20rem);
  line-height: 1;
  white-space: nowrap;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 2rem), var(--wide));
  min-height: 760px;
  margin: 0 auto;
  padding: 9rem 0 7rem;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.eyebrow,
.section-kicker,
.folio,
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow,
.hero .section-kicker {
  color: var(--gold);
}

h1 {
  max-width: 10.5ch;
  margin: 1.1rem 0 1.6rem;
  font-size: clamp(3.7rem, 8vw, 7.4rem);
  letter-spacing: -0.055em;
}

.hero-summary {
  max-width: 58ch;
  margin-bottom: 2rem;
  color: #eaddea;
  font-size: clamp(1.1rem, 2vw, 1.34rem);
}

.hero-cta {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.6rem 0;
  color: var(--gold);
  border-bottom: 1px solid currentColor;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.hero-cta::after {
  content: "↓";
}

.greek-plate {
  padding: clamp(1.6rem, 3vw, 2.6rem);
  border: 1px solid rgb(238 227 207 / 25%);
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgb(255 255 255 / 4%) 37px 38px),
    rgb(41 13 35 / 65%);
  box-shadow: 22px 22px 0 rgb(13 3 11 / 34%);
}

.folio {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.4rem;
  color: #bca8ba;
}

.greek-line {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1.32;
}

.epithet {
  position: relative;
  color: var(--paper-light);
  white-space: nowrap;
}

.epithet::after {
  content: "";
  position: absolute;
  right: -0.04em;
  bottom: -0.08em;
  left: -0.04em;
  height: 0.12em;
  background: var(--gold);
  transform: rotate(-1.5deg);
}

.margin-note {
  margin: 2rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid rgb(238 227 207 / 20%);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.hero-thread {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 100px;
  color: rgb(213 167 94 / 50%);
}

.essay-section,
.sources-section {
  width: min(calc(100% - 2rem), var(--wide));
  margin: 0 auto;
  padding: clamp(5.5rem, 10vw, 9rem) 0;
}

.essay-section + .essay-section,
.sources-section {
  border-top: 1px solid var(--rule);
}

.section-heading {
  max-width: var(--reading);
  margin: 0 auto clamp(3rem, 6vw, 5.5rem);
}

.section-kicker {
  margin-bottom: 1.1rem;
  color: var(--wine);
}

h2 {
  max-width: 19ch;
  margin-bottom: 1.35rem;
  font-size: clamp(2.55rem, 5.5vw, 5rem);
  letter-spacing: -0.04em;
}

.chapter-intro {
  max-width: 56ch;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.range-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--wine);
  border-bottom: 1px solid var(--wine);
}

.range-card {
  min-height: 260px;
  padding: 2.2rem;
}

.range-card + .range-card {
  border-left: 1px solid var(--rule);
}

.greek-root {
  display: block;
  margin-bottom: 2.2rem;
  color: var(--wine);
  font-size: 2rem;
}

.range-card h3 {
  margin-bottom: 0.7rem;
  font-size: 1.7rem;
}

.range-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.comparison-section {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100vw - var(--wide)) / 2));
  padding-left: max(1rem, calc((100vw - var(--wide)) / 2));
  color: var(--paper-light);
  background: var(--wine-deep);
}

.comparison-section .section-kicker {
  color: var(--gold);
}

.comparison-section .chapter-intro {
  color: var(--purple-mist);
}

.comparator {
  display: grid;
  grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
  min-height: 600px;
  border: 1px solid rgb(238 227 207 / 23%);
  background: var(--wine);
}

.translator-list {
  max-height: 700px;
  overflow: auto;
  border-right: 1px solid rgb(238 227 207 / 23%);
  background: rgb(20 5 17 / 24%);
}

.translator-button {
  width: 100%;
  display: grid;
  grid-template-columns: 3.3rem 1fr;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  color: #cdbacd;
  border: 0;
  border-bottom: 1px solid rgb(238 227 207 / 14%);
  background: transparent;
  font: 0.9rem/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
}

.translator-button:hover {
  color: var(--paper-light);
  background: rgb(238 227 207 / 7%);
}

.translator-button[aria-selected="true"] {
  color: var(--wine-deep);
  background: var(--gold);
}

.translator-year {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.translator-button[aria-selected="true"] .translator-year {
  color: var(--wine);
}

.translator-name {
  font-weight: 800;
}

.translation-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 6vw, 5.5rem);
}

.translation-quote {
  max-width: 17ch;
  margin: 0 0 3rem;
  color: var(--paper-light);
  font-size: clamp(2.6rem, 5.5vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.translation-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(238 227 207 / 25%);
}

.translation-meta span {
  display: block;
}

.translation-meta .label {
  margin-bottom: 0.35rem;
  color: var(--gold);
}

.translation-note {
  max-width: 60ch;
  margin: 1.5rem 0 0;
  color: #d8c8d7;
}

.essay-copy,
.prose-flow {
  max-width: var(--reading);
  margin: 0 auto;
}

.essay-copy {
  margin-bottom: 3.5rem;
  font-size: 1.08rem;
}

.ledger {
  border-top: 2px solid var(--wine);
}

.ledger-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(150px, 0.8fr) minmax(170px, 1fr) minmax(0, 1.35fr);
  gap: 1.35rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.ledger-row:first-child {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ledger-year {
  color: var(--wine);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.ledger-name {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 800;
}

.ledger-form {
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 700;
}

.ledger-choice {
  font-size: 1.08rem;
}

.lexical-case {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  border: 1px solid var(--wine);
  background: var(--paper-light);
  box-shadow: 20px 20px 0 var(--paper-deep);
}

.lexical-word {
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 2rem;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 30% 20%, var(--wine-light), transparent 55%),
    var(--wine-deep);
  text-align: center;
}

.lexical-word strong {
  display: block;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 500;
}

.lexical-word span {
  display: block;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.07em;
}

.lexical-copy {
  padding: clamp(2rem, 6vw, 5rem);
}

.lexical-copy h3 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.lexical-copy p {
  max-width: 52ch;
  color: var(--ink-soft);
}

.pullquote {
  margin: 2rem 0 0;
  padding: 1.4rem 0 0 1.4rem;
  border-top: 1px solid var(--rule);
  border-left: 4px solid var(--wine);
  color: var(--wine) !important;
  font-size: 1.28rem;
}

.reception-section .prose-flow {
  columns: 2 300px;
  column-gap: 4rem;
}

.prose-flow p {
  break-inside: avoid;
}

.loom-section {
  color: var(--paper-light);
  background:
    linear-gradient(90deg, transparent 0 9%, rgb(213 167 94 / 7%) 9% calc(9% + 1px), transparent calc(9% + 1px)),
    #30281f;
}

.loom-inner {
  width: min(calc(100% - 2rem), var(--wide));
  margin: 0 auto;
  padding: clamp(6rem, 11vw, 10rem) 0;
  display: grid;
  grid-template-columns: minmax(200px, 0.38fr) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.loom-section .section-kicker {
  color: var(--gold);
}

.loom-section h2 {
  max-width: 18ch;
}

.loom-section .prose-flow {
  margin: 0;
  color: #e4d8c6;
}

.loom-mark {
  padding-top: 5rem;
}

.loom-mark svg {
  width: 100%;
  max-width: 360px;
  overflow: visible;
  fill: var(--gold);
  stroke: var(--gold);
  stroke-width: 1.4;
}

.loom-mark .unwoven {
  stroke: var(--purple-mist);
}

.dropcap::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  color: var(--gold);
  font-size: 4.3em;
  line-height: 0.78;
}

.final-section {
  padding: clamp(6rem, 12vw, 11rem) 1rem;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 80% 0, var(--wine-light), transparent 38rem),
    var(--wine);
}

.final-section > div {
  width: min(100%, var(--reading));
  margin: 0 auto;
}

.final-section .section-kicker {
  color: var(--gold);
}

.final-section .chapter-intro {
  color: #e2d1df;
}

.final-quote {
  margin: 2.4rem 0 0;
  padding-top: 1.8rem;
  border-top: 1px solid rgb(238 227 207 / 25%);
  color: var(--gold);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  line-height: 1.35;
}

.sources-section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.sources-section details {
  border-top: 1px solid var(--wine);
  border-bottom: 1px solid var(--wine);
}

.sources-section summary {
  padding: 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.sources-section summary::-webkit-details-marker {
  display: none;
}

.sources-section summary .section-kicker {
  display: block;
  margin: 0 0 0.25rem;
}

.sources-section summary strong {
  font-size: 1.55rem;
  font-weight: 500;
}

.sources-content {
  padding: 1rem 0 3rem;
}

.sources-intro,
.method-note {
  max-width: var(--reading);
  color: var(--ink-soft);
}

.source-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
}

.source-card {
  padding: 1.4rem;
  background: var(--paper-light);
}

.source-card h3 {
  margin-bottom: 0.55rem;
  font-family: var(--sans);
  font-size: 0.93rem;
  font-weight: 800;
  line-height: 1.35;
}

.source-card p {
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.source-card a {
  color: var(--wine);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 800;
}

.method-note {
  margin: 2.5rem 0 0;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.86rem;
}

.site-footer {
  color: #d5c6d3;
  background: var(--wine-deep);
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--wide));
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
}

.back-to-top {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--paper-light);
  border-radius: 50%;
  color: var(--paper-light);
  background: var(--wine-deep);
  font-size: 1.15rem;
  text-decoration: none;
}

.js .back-to-top {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.js .back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .hero-inner,
  .lexical-case,
  .loom-inner {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: 0;
    padding-bottom: 9rem;
  }

  .greek-plate {
    max-width: 640px;
  }

  .loom-mark {
    padding-top: 0;
  }

  .ledger-row {
    grid-template-columns: 4.5rem minmax(130px, 0.7fr) minmax(150px, 1fr);
  }

  .ledger-choice {
    grid-column: 2 / -1;
  }

  .ledger-row:first-child span:last-child {
    display: none;
  }
}

@media (max-width: 650px) {
  body {
    font-size: 17px;
  }

  .header-inner {
    min-height: 64px;
  }

  .header-nav > a:not(.language-switch) {
    display: none;
  }

  .hero-inner,
  .essay-section,
  .loom-inner,
  .sources-section,
  .footer-inner {
    width: min(calc(100% - 1.25rem), var(--wide));
  }

  .hero {
    min-height: 0;
  }

  .hero-inner {
    padding: 7.5rem 0 8rem;
    gap: 4rem;
  }

  h1 {
    font-size: clamp(3.35rem, 16vw, 4.7rem);
  }

  h2 {
    font-size: clamp(2.45rem, 12vw, 3.7rem);
  }

  .greek-plate {
    padding: 1.25rem;
    box-shadow: 10px 10px 0 rgb(13 3 11 / 34%);
  }

  .greek-line {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .range-grid {
    grid-template-columns: 1fr;
  }

  .range-card {
    min-height: 0;
  }

  .range-card + .range-card {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .comparator {
    display: block;
  }

  .translator-list {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgb(238 227 207 / 23%);
    scroll-snap-type: x mandatory;
  }

  .translator-button {
    min-width: 165px;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    border-right: 1px solid rgb(238 227 207 / 14%);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .translation-panel {
    min-height: 500px;
    padding: 2rem 1.25rem;
  }

  .translation-quote {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  .ledger-row,
  .ledger-row:first-child {
    grid-template-columns: 4rem 1fr;
    gap: 0.4rem 1rem;
  }

  .ledger-row:first-child span:nth-child(n + 3) {
    display: none;
  }

  .ledger-form,
  .ledger-choice {
    grid-column: 2;
  }

  .lexical-case {
    box-shadow: 8px 8px 0 var(--paper-deep);
  }

  .lexical-word {
    min-height: 330px;
  }

  .reception-section .prose-flow {
    columns: auto;
  }

  .source-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

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

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

@media print {
  .site-header,
  .hero-cta,
  .js .back-to-top {
    display: none;
  }

  .hero,
  .comparison-section,
  .loom-section,
  .final-section {
    color: var(--ink);
    background: white;
  }
}
