:root {
  color-scheme: light;
  --paper: #efe4c8;
  --paper-light: #fbf4df;
  --ink: #201b16;
  --muted: #6f6251;
  --line: #b9a984;
  --accent: #8a2d1f;
  --button: #243b35;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #d8c7a0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.36;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }

.paper {
  width: min(100%, 980px);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px calc(80px + env(safe-area-inset-bottom));
  background:
    linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0)),
    var(--paper);
  box-shadow: 0 0 50px rgba(58, 44, 25, .25);
}

.masthead {
  padding: 4px 0 9px;
  border-bottom: 4px double var(--ink);
  text-align: center;
}

.overline, .section-name {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.overline { font-size: 15px; }
.masthead h1 {
  margin: 0;
  font-size: clamp(40px, 11vw, 74px);
  line-height: .9;
  letter-spacing: .01em;
}
.masthead > p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.safety-strip {
  margin: 8px 0 10px;
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.15;
}
.safety-strip a { color: var(--accent); font-weight: 850; }

.article {
  padding: 11px 0;
  border-bottom: 2px solid var(--line);
}

.article-lead {
  padding-top: 4px;
}

.photo {
  width: 100%;
  height: clamp(175px, 43vw, 295px);
  margin-bottom: 9px;
  display: block;
  border: 1px solid var(--line);
  background: var(--paper-light);
  object-fit: cover;
  object-position: center;
  filter: grayscale(.22) sepia(.08);
}

.photo-fallback {
  min-height: 175px;
}

.article-body h2 {
  margin: 3px 0 7px;
  font-size: clamp(29px, 7.4vw, 42px);
  line-height: 1.05;
}

.article:not(.article-lead) .article-body h2 {
  font-size: clamp(25px, 6.4vw, 34px);
}

.story-text {
  margin: 0 0 8px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.actions button,
.actions a,
.old-editions button,
.reader-bar button {
  min-height: 52px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--button);
  color: white;
  font-size: 19px;
  font-weight: 900;
  text-decoration: none;
  text-align: center;
}

.actions a {
  background: var(--paper-light);
  color: var(--button);
  border: 1px solid var(--line);
}

.old-editions {
  padding-top: 18px;
}

.old-editions h2 {
  margin: 0 0 10px;
  font-size: 32px;
}

#oldEditions {
  display: grid;
  gap: 8px;
}

.old-editions button {
  min-height: 68px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: var(--paper-light);
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}

.old-editions span {
  color: var(--muted);
  font-size: 17px;
}

.reader-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  min-height: 74px;
  padding: 10px max(12px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  background: #201b16;
  color: white;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .3);
}

.reader-bar[hidden] { display: none; }
.reader-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 800;
}
.reader-bar button {
  min-height: 50px;
  background: var(--accent);
}

@media (min-width: 760px) {
  .paper { padding-left: 28px; padding-right: 28px; }
  .article:not(.article-lead) {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 14px;
  }
  .article:not(.article-lead) .photo { height: 145px; margin-bottom: 0; }
  .actions { grid-template-columns: minmax(220px, auto); justify-content: start; }
}
