@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --ink: #1A1F1D;
  --ink-soft: #414A46;
  --teal: #0D4A45;
  --teal-deep: #08332F;
  --gold: #B07D2B;
  --gold-light: #D9B877;
  --bone: #F4F0E8;
  --parchment: #E8DFD0;
  --rule: #CFC3AE;
  --rule-faint: #E0D6C4;

  --serif: 'EB Garamond', Georgia, serif;
  --sans: 'Archivo', system-ui, sans-serif;

  --nav-w: 264px;
  --measure: 66ch;
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.62;
  font-feature-settings: "liga" 1, "onum" 1;
}

a { color: inherit; }

::selection { background: var(--gold-light); color: var(--ink); }

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

/* ---------- Sidebar ---------- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-w);
  background: var(--teal);
  color: var(--bone);
  padding: 44px 34px 34px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow-y: auto;
}

.mark {
  display: block;
  background:#F4F0E8;
  padding: 18px 20px;
  margin-bottom: 52px;
  border-radius: 2px;
  line-height: 0;
}

.mark img {
  display: block;
  width: 100%;
  height: auto;
}

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-group-rule {
  height: 1px;
  background: rgba(244, 240, 232, 0.22);
  margin: 22px 0 20px;
}

.nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  padding: 7px 0;
  color: rgba(244, 240, 232, 0.82);
  font-size: 19px;
  transition: color 0.18s ease;
}

.nav a:hover { color: #fff; }

.nav a[aria-current="page"] { color: #fff; }

.nav a[aria-current="page"] .tier { color: var(--gold-light); }

.tier {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(217, 184, 119, 0.8);
  min-width: 26px;
}

.nav-foot {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.85;
  letter-spacing: 0.07em;
  color: rgba(244, 240, 232, 0.5);
}

.nav-foot a { text-decoration: none; border-bottom: 1px solid rgba(244,240,232,0.28); }
.nav-foot a:hover { color: var(--gold-light); border-color: var(--gold-light); }

/* ---------- Main ---------- */

.main {
  margin-left: var(--nav-w);
  padding: 92px 7vw 120px;
  max-width: 1180px;
}

.tagline {
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.08;
  font-weight: 500;
  margin: 0;
  max-width: 12ch;
  color: var(--teal-deep);
}

.tagline em {
  font-style: normal;
  display: block;
  color: var(--ink);
  font-size: 0.36em;
  letter-spacing: 0.005em;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2px solid var(--gold);
  max-width: none;
  white-space: nowrap;
  line-height: 1.3;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 344px;
  gap: 64px;
  align-items: start;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 52px;
}

.lede-block { max-width: var(--measure); }

.hero-portrait {
  width: 100%;
  display: block;
  border-radius: 2px;
  filter: saturate(0.94);
}

.portrait-note {
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  margin-top: 12px;
  line-height: 1.7;
}

.lede p { max-width: var(--measure); }
.lede p:first-child { margin-top: 0; }

p { margin: 0 0 1.15em; }

/* ---------- Page headings ---------- */

.page-head {
  padding-bottom: 40px;
  margin-bottom: 46px;
  border-bottom: 1px solid var(--rule);
}

.page-title {
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.1;
  font-weight: 500;
  color: var(--teal-deep);
  margin: 0;
}

.page-tier {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.standfirst {
  font-size: 22px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 26px 0 0;
}

/* ---------- Entries ---------- */

.entry {
  padding: 42px 0;
  border-bottom: 1px solid var(--rule-faint);
  max-width: 78ch;
}

.entry:last-of-type { border-bottom: none; }

.entry h2 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--teal);
  margin: 0 0 18px;
}

.entry h3 {
  font-size: 25px;
  font-weight: 500;
  color: var(--teal);
  margin: 34px 0 14px;
}

.entry p { max-width: var(--measure); }

.entry-meta {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-top: 18px;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  max-width: 58ch;
}

.subentries {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.subentries li {
  padding: 9px 0 9px 20px;
  border-left: 1px solid var(--rule);
  font-style: italic;
  color: var(--ink-soft);
}

.placeholder {
  background: var(--parchment);
  padding: 18px 22px;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 58ch;
  margin-top: 22px;
  border-left: 3px solid var(--rule);
}

/* ---------- Tier index (home) ---------- */

.index-head {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  padding-top: 64px;
  border-top: 1px solid var(--rule);
  margin-bottom: 8px;
}

.index-list { display: flex; flex-direction: column; }

.index-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule-faint);
  text-decoration: none;
  transition: background 0.2s ease;
}

.index-item:hover { background: rgba(232, 223, 208, 0.55); }

.index-numeral {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 400;
  color: var(--gold);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.index-item h2 {
  font-size: 31px;
  font-weight: 500;
  color: var(--teal);
  margin: 0 0 8px;
}

.index-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 19px;
  max-width: 56ch;
}

.index-aside {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-faint);
  text-decoration: none;
}

.index-aside:hover { background: rgba(232, 223, 208, 0.55); }

.index-aside h2 {
  font-size: 25px;
  font-weight: 500;
  color: var(--teal);
  margin: 0 0 6px;
}

.index-aside p { margin: 0; color: var(--ink-soft); font-size: 18px; max-width: 56ch; }

.closing {
  margin-top: 64px;
  font-size: 23px;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  body { font-size: 18px; }

  .sidebar {
    position: static;
    width: 100%;
    padding: 28px 24px 30px;
    overflow: visible;
  }

  .mark { margin-bottom: 24px; max-width: 220px; padding: 14px 16px; }

  .nav { flex-direction: row; flex-wrap: wrap; gap: 2px 20px; }
  .nav a { padding: 4px 0; font-size: 17px; gap: 0; }
  .tier { display: none; }
  .tagline em { font-size: 17px; white-space: normal; }
  .nav-group-rule { display: none; }
  .nav-foot { padding-top: 26px; }

  .main { margin-left: 0; padding: 48px 24px 80px; }

  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero-portrait { max-width: 330px; }

  .index-item, .index-aside { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .index-numeral { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Paper list ---------- */

.paper-list {
  list-style: none;
  counter-reset: paper;
  padding: 0;
  margin: 30px 0 0;
}

.paper-list li {
  counter-increment: paper;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-faint);
}

.paper-list li::before {
  content: counter(paper);
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
}

.paper-list a {
  font-size: 22px;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  grid-column: 2;
}

.paper-list a:hover { border-color: var(--gold); }

.paper-list span {
  grid-column: 2;
  display: block;
  font-size: 17.5px;
  color: var(--ink-soft);
  margin-top: 5px;
}

@media (max-width: 900px) {
  .paper-list li { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .paper-list a { font-size: 19px; }
}

/* ---------- Paper pages ---------- */

.backlink {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.05em;
  margin: 0 0 28px;
}

.backlink a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.backlink a:hover { color: var(--teal); border-color: var(--gold); }

.paper-subtitle {
  font-size: 24px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 12px 0 0;
  max-width: 48ch;
}

.colophon {
  margin-top: 80px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.colophon a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.colophon a:hover { color: var(--teal); border-color: var(--gold); }
