/* Der Chronist — Zeitungssatz.
   Derived from design/referenz/template.html; generic selectors here
   instead of the reference's hand-built slot grid, since issue pages are
   plain markdown output (h1/h2/h3, p, img, ol, ul). */

:root {
  --ink: #1a1712;
  --paper: #faf6ec;
  --paper-edge: #ebe3cf;
  --rule: #2a251c;
  --rule-faint: #cbbf9f;
  --faint: #6b6152;
  --accent: #7a3b1e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e8e1cf;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.5;
  padding: 24px 12px 60px;
}

.sheet {
  max-width: 1360px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
  padding: 34px 40px 48px;
}

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

a { color: var(--accent); }
a:hover { color: var(--ink); }

hr {
  border: none;
  border-top: 3px double var(--rule);
  margin: 22px 0;
}

/* ---- top utility band (site chrome, both layouts) ---- */
.top-line {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  color: var(--faint);
}
.top-line a { color: inherit; text-decoration: none; }
.top-line a:hover { color: var(--ink); }

/* ---- masthead wordmark, shared by index and issue "# DER CHRONIST" ----
   .ausgabe-content > h1 covers .flow pages (h1 is a direct child there);
   .masthead h1 covers .grid pages (h1 moved inside <header class="masthead">
   by the zeitung transform). */
.wordmark, .ausgabe-content > h1, .masthead h1 {
  text-align: center;
  font-family: "Playfair Display", "Times New Roman", Georgia, serif;
  letter-spacing: .01em;
  font-size: clamp(46px, 9vw, 104px);
  line-height: .95;
  margin: 10px 0 6px;
  font-weight: 900;
}
.ausgabe-content > h1, .masthead h1 { font-size: clamp(36px, 6.6vw, 78px); } /* all-caps in the markdown, keep it on one line */
/* issue wordmark links home (wrapped by the transform) — no visual change */
.ausgabe-content > h1 a, .masthead h1 a { color: inherit; text-decoration: none; }
.flourish {
  text-align: center;
  font-style: italic;
  font-size: 15px;
  color: var(--faint);
  margin-bottom: 4px;
}

/* issue dateline band, filled by the layout with jahr/tag + ort */
.dateline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  margin: 10px 0 24px;
  padding: 6px 2px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.dateline b { font-weight: 700; }

/* ================= issue pages ================= */
main.ausgabe { display: block; }

/* ---- flow layout: fallback for pages without a numbered-story grid
   (1959, the 1936-07-13 Sonderausgabe) — untouched by the zeitung transform */
.ausgabe-content.flow {
  columns: 2 340px;
  column-gap: 2.6rem;
  column-rule: 1px solid var(--rule-faint);
  text-align: justify;
  hyphens: auto;
}

/* full-width elements break the column flow */
.ausgabe-content.flow > h1,
.ausgabe-content.flow > h2,
.ausgabe-content.flow > hr,
.ausgabe-content.flow > blockquote,
.ausgabe-content.flow > ol {
  column-span: all;
}

.ausgabe-content.flow > h1 { margin-top: 0; }

/* first h3 = issue subtitle ("### Jahresausgabe · Das Jahr 1959 …") */
.ausgabe-content.flow h3:first-of-type {
  column-span: all;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 13px;
  font-weight: 700;
  color: var(--faint);
  margin: 0 0 20px;
}

/* last h3 = "### Quellen" footer */
.ausgabe-content.flow h3:last-of-type {
  column-span: all;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: var(--faint);
  border-top: 1px solid var(--rule);
  margin: 28px 0 8px;
  padding-top: 10px;
}
.ausgabe-content.flow h3:last-of-type ~ ul,
.ausgabe-content.flow h3:last-of-type + ul {
  column-span: all;
  font-size: 11px;
  line-height: 1.6;
  color: var(--faint);
  columns: 2 260px;
  column-gap: 1.6rem;
}
.ausgabe-content.flow h3:last-of-type ~ ul a { color: var(--faint); }

/* other h3 = story headline (e.g. 1959's regionally-nested stories) */
.ausgabe-content.flow h3 {
  font-size: 1.25rem;
  line-height: 1.15;
  font-weight: 700;
  margin: 1.4em 0 .5em;
  break-inside: avoid-column;
}

/* h2 default = "## RESSORT · JAHR" section band (no trailing date italics) */
.ausgabe-content.flow h2 {
  column-span: all;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 13px;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 6px 0;
  margin: 28px 0 18px;
}
/* h2 with a trailing italic date = "## N · Story *(Datum)*" headline, not a banner */
.ausgabe-content.flow h2:has(em:last-child) {
  column-span: none;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1.4rem;
  line-height: 1.15;
  font-weight: 700;
  border: none;
  border-top: 1px solid var(--rule-faint);
  padding-top: .7em;
  margin: 1.6em 0 .5em;
  break-inside: avoid-column;
}
.ausgabe-content.flow h2:has(em:last-child) em { font-style: italic; font-size: .68em; color: var(--faint); font-weight: 400; }

.ausgabe-content.flow p { margin: 0 0 10px; font-size: 15.5px; break-inside: avoid-column; }

/* image paragraph followed by an italic caption paragraph */
.ausgabe-content.flow p img {
  display: block;
  width: 100%;
  border: 1px solid #b7ab8a;
  margin: 0 0 4px;
}
.ausgabe-content.flow p > em:only-child {
  display: block;
  font-size: 11.5px;
  font-style: italic;
  color: var(--faint);
  line-height: 1.35;
  margin: 0 0 12px;
}

.ausgabe-content.flow blockquote {
  text-align: justify;
  hyphens: auto;
  font-style: normal;
  font-size: 16px;
  color: #33301f;
  max-width: 880px;
  margin: 16px auto;
  padding: 12px 0;
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
}
.ausgabe-content.flow blockquote p { margin: 0; }
.ausgabe-content.flow blockquote p::first-letter {
  float: left;
  font-family: "Playfair Display", serif;
  font-size: 44px;
  line-height: .8;
  padding: 4px 8px 0 0;
  font-weight: 900;
}
.ausgabe-content.flow blockquote .kicker {
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 15px;
  color: var(--accent);
  text-align: left;
  margin: 0 0 8px;
}

.ausgabe-content.flow strong { font-weight: 700; }

/* Top-N hit lists */
.ausgabe-content.flow ol {
  columns: 2 220px;
  column-gap: 1.8rem;
  margin: 0 0 16px;
  padding-left: 26px;
  font-size: 14px;
}
.ausgabe-content.flow ol li { margin-bottom: 6px; break-inside: avoid; }

/* ---- grid layout: the front-page magazine grid (91/92 issues) ---- */
.ausgabe-content.grid { text-align: justify; hyphens: auto; }
.ausgabe-content.grid > .masthead > h1 { margin-top: 0; }

.ausgabe-content.grid .dateline span { margin: 0 auto; }

.lead { text-align: center; padding: 6px 4% 4px; }
.lead .byline {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--faint);
  max-width: 880px;
  margin: 0 auto 10px;
}
/* optional "*Zum Geleit:*" lead-in, lifted out of the standfirst by the transform */
.lead .kicker {
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 15px;
  color: var(--accent);
  margin: 0 0 8px;
}
.lead .standfirst {
  text-align: justify;
  hyphens: auto;
  font-size: 16px;
  color: #33301f;
  max-width: 880px;
  margin: 0 auto;
  border-top: 1px solid var(--paper-edge);
  border-bottom: 1px solid var(--paper-edge);
  padding: 10px 0;
}
.lead .standfirst p { margin: 0; }
.lead .standfirst p::first-letter {
  float: left;
  font-family: "Playfair Display", serif;
  font-size: 44px;
  line-height: .8;
  padding: 4px 8px 0 0;
  font-weight: 900;
}

.section-band {
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 13px;
  padding: 6px;
  margin: 26px 0 20px;
}

.frontpage {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 26px 32px;
  align-items: start;
}
.story { margin: 0; break-inside: avoid-column; }
.span6 { grid-column: span 6; }
.span3 { grid-column: span 3; }
.frontpage .divider { border-left: 1px solid var(--rule-faint); padding-left: 22px; }

/* small uppercase dateline above every story's headline, lead included */
.story-date {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin: 0 0 6px;
}
.story-date::after { content: ""; display: block; width: 26px; height: 2px; background: var(--accent); margin-top: 5px; }
.lead-head .story-date::after { margin-left: auto; margin-right: auto; }

.story h3 {
  font-size: 21px;
  line-height: 1.12;
  margin: 0 0 8px;
  font-weight: 900;
}

.story figure { margin: 0 0 10px; }
.story img { width: 100%; height: auto; display: block; border: 1px solid #b7ab8a; }
/* tile images (everything but the lead) crop to a consistent ratio */
.story:not(.lead-story) img { aspect-ratio: 4 / 3; object-fit: cover; }
.story figcaption {
  font-size: 11px;
  font-style: italic;
  color: var(--faint);
  padding: 4px 2px 0;
  line-height: 1.35;
  text-align: left;
}
.story p { margin: 0 0 9px; font-size: 15px; }
.story p:first-of-type::first-letter {
  float: left;
  font-size: 52px;
  line-height: .82;
  padding: 6px 8px 0 0;
  font-weight: 900;
}
.story strong { font-weight: 700; }

/* the full-width title story */
.lead-story {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2px 34px;
  border-bottom: 3px double var(--rule);
  padding-bottom: 22px;
}
.lead-story .lead-head { grid-column: 1 / -1; text-align: center; }
.lead-story .lead-head h3 {
  font-size: clamp(27px, 4.2vw, 44px);
  line-height: 1.08;
  margin: 6px 0 12px;
}
.lead-story figure { grid-column: 1; margin: 0; align-self: start; }
.lead-story .lead-body { grid-column: 2; }
.lead-story .lead-body p { font-size: 16px; margin: 0 0 10px; }
.lead-story .lead-body p:first-child::first-letter {
  float: left;
  font-size: 60px;
  line-height: .78;
  padding: 6px 9px 0 0;
  font-weight: 900;
}

/* ---- stories 4+: outside the 6-col grid, a multi-column tile block ---- */
.stories {
  columns: 3 260px; /* never below ~260px per column at the 1360px sheet */
  column-gap: 32px;
  margin: 26px 0 0;
}
.stories .story { break-inside: avoid; margin: 0 0 26px; }

/* ---- ressort boxes (Am Rande notiert, Sport, Mode, Kultur, Lichtblicke) ---- */
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 30px; }
.ressort { break-inside: avoid; }
.ressort h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--rule);
}
.ressort p, .ressort li { font-size: 14px; text-align: left; }
.ressort ul { margin: 0 0 8px; padding-left: 18px; }
.ressort li { margin-bottom: 7px; }

/* LICHTBLICKE spans the full width under the 3-column grid, tinted */
.ressort.lichtblicke {
  grid-column: 1 / -1;
  background: rgba(122, 59, 30, .06);
  border: 1px solid var(--accent);
  padding: 14px 18px;
}
/* AM RANDE NOTIERT + LICHTBLICKE: no bullets, hanging indent, hairline between items */
.ressort.notiert ul, .ressort.lichtblicke ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ressort.notiert li, .ressort.lichtblicke li {
  padding: 8px 0 8px 1em;
  text-indent: -1em;
  border-top: 1px solid var(--rule-faint);
}
.ressort.notiert li:first-child, .ressort.lichtblicke li:first-child { border-top: none; padding-top: 0; }

.weather {
  border: 3px double var(--rule);
  padding: 14px 16px;
  margin: 0 0 20px;
  background: rgba(255, 255, 255, .25);
}
.weather h2 { margin: 0 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: .12em; }
.weather p { font-size: 14px; text-align: left; margin: 0 0 8px; }

.hits h2 {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 13px;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 6px;
  margin: 0 0 14px;
}
.hits > p { text-align: center; font-size: 13px; color: var(--faint); }
.hits ol {
  list-style: none;
  counter-reset: hit;
  columns: 4 180px;
  column-gap: 1.6rem;
  margin: 0 0 10px;
  padding-left: 0;
  font-size: 13px;
  text-align: left;
}
.hits ol li { counter-increment: hit; margin-bottom: 8px; break-inside: avoid; }
.hits ol li::before {
  content: counter(hit) ". ";
  font-family: "Playfair Display", serif;
  font-weight: 900;
  color: var(--accent);
}
.hits ol li .interp { color: var(--faint); }

.ausgaben-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 0;
  border-top: 1px solid var(--rule-faint);
}
.ausgaben-nav a { text-decoration: none; }
.ausgaben-nav a:hover { text-decoration: underline; }
.ausgaben-nav .btn-home {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 5px 16px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ausgaben-nav .btn-home:hover { background: var(--accent); color: var(--paper); text-decoration: none; }

/* single-line chrome above the masthead: prev · issue label · next */
.ausgaben-nav.top {
  border-top: none;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--faint);
}
.ausgaben-nav.top a { color: var(--faint); white-space: nowrap; }
.ausgaben-nav.top a:hover { color: var(--ink); }
.ausgaben-nav.top .issue-label { color: var(--ink); font-weight: 700; text-align: center; }

/* ================= landing page ================= */
.landing .lead-in {
  text-align: center;
  max-width: 760px;
  margin: 4px auto 30px;
  font-style: italic;
  color: var(--faint);
}

.box {
  border: 3px double var(--rule);
  background: rgba(255, 255, 255, .25);
  padding: 18px 22px;
  margin: 0 0 30px;
}
.box h2 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--accent);
}
.box p { margin: 0 0 10px; font-size: 15px; }
.box p:last-child { margin-bottom: 0; }

.section-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 13px;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 6px 0;
  margin: 30px 0 18px;
}

table.chronologie {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 30px;
  font-size: 14px;
}
table.chronologie caption { display: none; }
table.chronologie th, table.chronologie td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule-faint);
  vertical-align: top;
}
table.chronologie th {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  color: var(--faint);
  border-bottom: 2px solid var(--rule);
}
table.chronologie td.jahre { white-space: nowrap; font-weight: 700; }

ul.sonderausgaben { list-style: none; margin: 0 0 30px; padding: 0; }
ul.sonderausgaben li {
  border-bottom: 1px solid var(--rule-faint);
  padding: 8px 2px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
ul.sonderausgaben a { text-decoration: none; font-weight: 700; }
ul.sonderausgaben a:hover { text-decoration: underline; }
ul.sonderausgaben .anlass { color: var(--faint); font-style: italic; font-size: 13px; }

.jahrzehnt { margin: 0 0 26px; }
.jahrzehnt h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .12em;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 4px;
  margin: 0 0 12px;
}
.jahrgaenge {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.jahrgaenge a {
  display: block;
  text-decoration: none;
  border: 1px solid var(--rule-faint);
  background: rgba(255, 255, 255, .3);
  padding: 10px 10px 8px;
  transition: background .15s, border-color .15s;
}
.jahrgaenge a:hover { background: rgba(255, 255, 255, .6); border-color: var(--rule); }
.jahrgaenge .jahr { display: block; font-size: 20px; font-weight: 700; color: var(--ink); }
.jahrgaenge .ort { display: block; font-size: 11px; color: var(--faint); font-style: italic; margin-top: 2px; }
.jahrgaenge .teaser {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 5px;
}

/* ---- "Neueste Ausgabe" feature box, above the decade grid ---- */
.neueste-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  text-decoration: none;
  color: inherit;
  border: 3px double var(--rule);
  background: rgba(255, 255, 255, .25);
  padding: 16px 20px;
  margin: 0 0 10px;
}
.neueste-card img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid #b7ab8a; }
.neueste-card .jahr { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 6px; }
.neueste-card h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.15; }
.neueste-card p { margin: 0; font-size: 14px; color: var(--faint); }

.colophon {
  text-align: center;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 30px;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

/* ---- issue-page Quellen footer ---- */
footer.colophon { text-align: left; text-transform: none; letter-spacing: 0; }
footer.colophon h3 {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .28em;
  border-top: 3px double var(--rule);
  border-bottom: 3px double var(--rule);
  padding: 6px 14px;
  margin: 0 0 14px;
}
footer.colophon ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3 220px;
  column-gap: 1.6rem;
}
footer.colophon li { font-size: 11px; break-inside: avoid; margin-bottom: 6px; color: var(--faint); }
footer.colophon a { color: var(--faint); text-decoration: none; }
footer.colophon a:hover { text-decoration: underline; }

/* ---- responsive: single column under ~700px (flow pages) ---- */
@media (max-width: 700px) {
  .sheet { padding: 20px 16px 30px; }
  .ausgabe-content.flow,
  .ausgabe-content.flow h3:last-of-type ~ ul,
  .ausgabe-content.flow ol { columns: 1; }
  .top-line { font-size: 10px; }
  .dateline { font-size: 11px; }
}

/* ---- responsive: grid pages — 2-column grid under ~900px, single under ~600px ---- */
@media (max-width: 900px) {
  .frontpage { grid-template-columns: 1fr 1fr; gap: 22px 26px; }
  .span6, .span3 { grid-column: span 2; }
  .lead-story { grid-template-columns: 1fr; }
  .lead-story figure, .lead-story .lead-body { grid-column: 1; }
  .frontpage .divider { border-left: none; padding-left: 0; }
  .stories { columns: 2 240px; }
  .cols3 { grid-template-columns: 1fr 1fr; }
  .ressort.lichtblicke { grid-column: 1 / -1; }
  .hits ol { columns: 2 180px; }
  footer.colophon ul { columns: 2 200px; }
  .neueste-card { grid-template-columns: 160px 1fr; }
}
@media (max-width: 600px) {
  .cols3 { grid-template-columns: 1fr; }
  .hits ol { columns: 1; }
  .frontpage { grid-template-columns: 1fr; }
  .span6, .span3 { grid-column: span 1; }
  .stories { columns: 1; }
  footer.colophon ul { columns: 1; }
  .ausgaben-nav:not(.top) { flex-direction: column; align-items: center; gap: 6px; text-align: center; }
  .neueste-card { grid-template-columns: 1fr; }
}

/* ---- print: plain paper, no chrome, tighter columns ---- */
@media print {
  body { background: #fff; padding: 0; }
  .sheet { border: none; box-shadow: none; max-width: 100%; padding: 8px 4px; }
  .ausgaben-nav, .top-line { display: none; }
  .stories, .cols3, .hits ol, footer.colophon ul { columns: 2; }
  img { max-height: 40vh; object-fit: contain; }
  a { color: var(--ink); text-decoration: none; }
  a[href]::after { content: none !important; }
}
