/* Archive-faithful Perakee restoration: centered early-web reading column. */
:root {
  --page: #d8d3c6;
  --paper: #f7f3e8;
  --paper-deep: #e8dfc9;
  --ink: #2d2b27;
  --ink-soft: #625e55;
  --river: #345d68;
  --river-dark: #203f48;
  --rust: #8a4b36;
  --sun: #c99b45;
  --rule: #9c9079;
  --reading-width: 42rem;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(52, 93, 104, 0.18), transparent 34rem),
    var(--page);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.04rem;
  line-height: 1.7;
}

a {
  color: var(--river-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible { color: var(--rust); }

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
}

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

.site-header,
.page-grid,
.footer-inner {
  width: min(48rem, calc(100% - 1.25rem));
  margin-inline: auto;
}

.site-header {
  margin-top: 1.25rem;
  border: 1px solid #b8aa8e;
  border-bottom: 0;
  background: var(--paper);
}

.site-header::before {
  display: block;
  height: 5rem;
  content: "";
  border-bottom: 0.45rem solid var(--sun);
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(247, 243, 232, 0.18) 42% 45%, transparent 45% 100%),
    repeating-linear-gradient(20deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 13px),
    linear-gradient(135deg, var(--river-dark), var(--river) 58%, #6f7764);
}

.masthead {
  padding: 1.2rem 1rem 1.1rem;
  text-align: center;
}

.site-mark {
  color: var(--ink);
  text-decoration: none;
}

.site-name {
  display: block;
  font-size: clamp(2rem, 8vw, 3.55rem);
  font-weight: normal;
  letter-spacing: 0.035em;
  line-height: 1;
}

.site-kicker,
.edition,
.eyebrow,
.archive-label,
.footer-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-kicker {
  display: block;
  margin-top: 0.45rem;
  color: var(--rust);
}

.edition {
  margin: 0.55rem auto 0;
  color: var(--ink-soft);
}

.page-grid {
  border: 1px solid #b8aa8e;
  background:
    linear-gradient(90deg, transparent, rgba(201, 155, 69, 0.07) 50%, transparent),
    var(--paper);
}

.archive-nav {
  padding: 0.75rem 1rem 0.8rem;
  border-top: 0.32rem solid var(--river-dark);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

.archive-label {
  margin: 0 0 0.35rem;
  color: var(--rust);
}

.archive-nav ol,
.archive-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-nav li + li::before {
  margin: 0 0.5rem;
  color: var(--rule);
  content: "·";
}

.archive-nav a {
  color: var(--river-dark);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
}

.archive-nav a[aria-current="page"] {
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.archive-nav .secondary-label {
  margin-top: 0.55rem;
  color: var(--ink-soft);
}

.archive-nav .companion-nav a {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 400;
}

.archive-nav .companion-nav a[aria-current="page"] {
  color: var(--rust);
  font-weight: 700;
}

.reading-column {
  width: min(var(--reading-width), calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 3.5rem) 0 3.5rem;
}

.eyebrow {
  display: block;
  margin-bottom: 1rem;
  color: var(--river);
  text-align: center;
}

h1,
h2,
h3 {
  color: #282621;
  font-weight: normal;
  line-height: 1.18;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.1rem, 8vw, 3.45rem);
  letter-spacing: 0.015em;
  text-align: center;
  text-transform: uppercase;
}

.byline,
.subtitle {
  color: var(--rust);
  font-style: italic;
  text-align: center;
}

h2 {
  margin: 2.6rem 0 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: clamp(1.45rem, 4vw, 1.95rem);
  text-align: center;
}

h3 {
  margin: 2rem 0 0.55rem;
  color: var(--rust);
  font-size: 1.2rem;
}

p,
ul,
ol,
blockquote,
.verse { margin-top: 0; margin-bottom: 1.2rem; }

.reading-column ul,
.reading-column ol { padding-left: 1.4rem; }

.reading-column li { margin-bottom: 0.35rem; }

.contents {
  columns: 2;
  padding: 1rem 1rem 1rem 2.25rem;
  border: 1px solid var(--rule);
  background: rgba(232, 223, 201, 0.45);
}

.verse {
  padding-left: clamp(0.75rem, 4vw, 2.5rem);
  white-space: normal;
}

.verse p { margin-bottom: 0.65rem; }

blockquote {
  margin-left: 0;
  padding-left: 1.15rem;
  border-left: 4px solid var(--sun);
  color: var(--ink-soft);
  font-style: italic;
}

.story-image {
  margin: 1.6rem auto 2rem;
  border: 1px solid var(--rule);
  background: var(--paper-deep);
}

.story-image img { width: 100%; }

.story-image figcaption {
  padding: 0.55rem 0.7rem 0.65rem;
  color: var(--ink-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  line-height: 1.45;
}

.source-note {
  margin: 0 0 2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  background: rgba(232, 223, 201, 0.52);
  color: var(--ink-soft);
  font-size: 0.87rem;
  line-height: 1.55;
}

.source-note.end-note { margin: 2.75rem 0 0; }
.source-note strong { color: var(--ink); }

.margin-index,
.reading-progress { display: none; }

.site-footer {
  width: min(48rem, calc(100% - 1.25rem));
  margin: 0 auto 1.5rem;
  border: 1px solid #b8aa8e;
  border-top: 0;
  background: #ded4bf;
}

.footer-inner {
  width: auto;
  padding: 1.2rem 1rem 1.35rem;
  color: var(--ink-soft);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.footer-inner p { margin: 0; }
.footer-inner p + p { margin-top: 0.45rem; }
.footer-label { color: var(--rust); }
.not-found { min-height: 48vh; }

@media (max-width: 36rem) {
  body { font-size: 1rem; }
  .site-header { margin-top: 0.4rem; }
  .site-header,
  .page-grid,
  .site-footer { width: calc(100% - 0.8rem); }
  .reading-column { width: calc(100% - 1.3rem); }
  .archive-nav li + li::before { margin-inline: 0.34rem; }
  .contents { columns: 1; }
}

@media print {
  body { background: white; }
  .archive-nav,
  .skip-link { display: none; }
  .site-header,
  .page-grid,
  .site-footer { width: auto; border: 0; }
  .reading-column { width: auto; }
}
