@font-face {
  font-family: "Barlow Condensed Local";
  src: url("/assets/barlow-condensed-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f1eadb;
  --paper-deep: #e5dac5;
  --ink: #18211e;
  --muted: #59625d;
  --rule: #9f9a8c;
  --signal: #bb2f26;
  --clear: #2e7253;
  --focus: #184d8a;
  --display: "Barlow Condensed Local", "Arial Narrow", sans-serif;
  --body: Georgia, "Times New Roman", serif;
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(to bottom, transparent 31px, rgba(88, 82, 70, 0.1) 32px);
  background-size: 100% 32px;
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  line-height: 1.68;
}

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

a {
  color: inherit;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--focus);
  transform: translateY(-180%);
}

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

.masthead,
main,
footer {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 6rem;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.signal-mark,
.lamp {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 2px 8px rgba(92, 20, 15, 0.28);
}

.masthead nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.masthead nav a[aria-current="page"] {
  box-shadow: inset 0 -2px var(--signal);
}

.opening {
  display: grid;
  grid-template-columns: minmax(12rem, 0.75fr) minmax(0, 2fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 62vh;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.route-plate {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 18rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(42, 36, 27, 0.13);
}

.route-plate::before,
.route-plate::after {
  position: absolute;
  inset-inline: 12%;
  height: 2px;
  content: "";
  background: var(--ink);
}

.route-plate::before {
  top: 31%;
}

.route-plate::after {
  bottom: 31%;
}

.route-plate span {
  font-family: var(--display);
  font-size: clamp(4.5rem, 12vw, 8.5rem);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.route-plate i {
  position: absolute;
  right: 7%;
  bottom: 8%;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--clear);
  box-shadow: 0 3px 12px rgba(27, 85, 57, 0.32);
}

.opening-copy {
  max-width: var(--measure);
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.98;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1.8rem;
  font-size: clamp(3.5rem, 8vw, 6rem);
  letter-spacing: -0.035em;
}

.opening-copy p,
.page-heading > p:last-child {
  max-width: 54ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.17em;
}

.register {
  margin-bottom: clamp(5rem, 10vw, 9rem);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.register-heading,
.entry {
  display: grid;
  grid-template-columns: minmax(10rem, 0.8fr) minmax(0, 2.2fr);
  gap: 2rem;
}

.register-heading {
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.register-heading h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: inherit;
}

.register-heading time {
  font-variant-numeric: tabular-nums;
}

.entry {
  padding: 2.2rem 0 2.4rem;
}

.entry-state {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding-top: 0.28rem;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.lamp.is-clear {
  margin-top: 0.25rem;
  background: var(--clear);
  box-shadow: 0 2px 8px rgba(27, 85, 57, 0.28);
}

.entry-body h3 {
  margin-bottom: 0.9rem;
  font-size: clamp(2rem, 3.7vw, 3.15rem);
  letter-spacing: -0.02em;
}

.entry-body p {
  max-width: var(--measure);
  margin-bottom: 0;
}

.index-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: clamp(5rem, 11vw, 10rem);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.index-strip a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  min-height: 8rem;
  padding: 1.25rem;
  text-decoration: none;
}

.index-strip a + a {
  border-left: 1px solid var(--ink);
}

.index-strip a:hover {
  background: rgba(187, 47, 38, 0.06);
}

.index-code {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 1.25rem;
}

.index-strip strong,
.index-strip small {
  display: block;
}

.index-strip strong {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1.1;
}

.index-strip small {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.reading-page {
  min-height: 70vh;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.page-heading {
  max-width: var(--measure);
  margin-left: calc(27% + 2rem);
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.page-heading h1 {
  margin-bottom: 1.4rem;
}

.note-list {
  border-top: 2px solid var(--ink);
}

.note-list article {
  display: grid;
  grid-template-columns: minmax(10rem, 0.8fr) minmax(0, 2.2fr);
  gap: 2rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--rule);
}

.note-list time {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.note-list h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.9rem, 3.2vw, 2.65rem);
  letter-spacing: -0.015em;
}

.note-list p,
.prose p {
  max-width: var(--measure);
}

.prose {
  max-width: var(--measure);
  margin-left: calc(27% + 2rem);
  font-size: 1.08em;
}

.prose p {
  margin-bottom: 1.55rem;
}

.missing-page {
  display: grid;
  grid-template-columns: minmax(12rem, 0.75fr) minmax(0, 2fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 72vh;
  padding-block: 4rem;
}

.route-plate.is-closed i {
  background: var(--signal);
}

.missing-page p {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.17em;
}

.text-action {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.35rem 0 2.5rem;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.86rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

@media (max-width: 720px) {
  .masthead,
  main,
  footer {
    width: min(100% - 2rem, 42rem);
  }

  .masthead {
    align-items: flex-start;
    min-height: auto;
    padding: 1.25rem 0;
  }

  .wordmark {
    font-size: 1.08rem;
  }

  .masthead nav {
    gap: 0.9rem;
    font-size: 0.79rem;
  }

  .opening,
  .missing-page {
    grid-template-columns: 1fr;
    gap: 2.8rem;
    min-height: auto;
    padding-block: 4rem 5rem;
  }

  .route-plate {
    width: min(13rem, 55vw);
  }

  .register-heading,
  .entry,
  .note-list article {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .page-heading {
    margin-left: 0;
  }

  .index-strip {
    grid-template-columns: 1fr;
  }

  .index-strip a + a {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }

  .prose {
    margin-left: 0;
  }

  footer {
    flex-direction: column;
    gap: 0.35rem;
  }
}

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

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

@media (prefers-contrast: more) {
  :root {
    --muted: #303733;
    --rule: #4f554f;
  }
}
