/* ==========================================================================
   The Dalkeith Chronicle — shared broadsheet stylesheet
   ========================================================================== */

:root {
  --paper: #f4efe4;
  --paper2: #ebe4d2;
  --ink: #181613;
  --ink-dim: #544d42;
  --rule: #241f1a;
  --red: #a02820;
  --gold: #a58530;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: #1a1814; }
body {
  font-family: 'Libre Caslon Text', 'Times New Roman', serif;
  color: var(--ink);
  line-height: 1.5;
  background: var(--paper);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  max-width: 1200px; margin: 0 auto;
  box-shadow: 0 0 60px rgba(0,0,0,0.7);
  padding: 0 0 40px;
}
a { color: inherit; text-decoration: none; }

/* ==== Masthead ============================================================ */
.masthead {
  padding: 24px 40px 12px; border-bottom: 4px double var(--rule);
  text-align: center; position: relative;
}
.masthead .kicker {
  display: flex; justify-content: space-between; font-family: 'Cormorant Garamond';
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.masthead h1 {
  font-family: 'Playfair Display', serif; font-weight: 900;
  font-size: clamp(64px, 9vw, 112px); line-height: 0.9; letter-spacing: -0.02em;
  padding: 14px 0 8px; font-variant-ligatures: discretionary-ligatures;
}
.masthead h1 em { font-style: italic; font-weight: 700; }
.masthead .tagline {
  font-family: 'Cormorant Garamond'; font-style: italic; font-size: 16px;
  padding: 8px 0 0; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; color: var(--ink-dim);
}

/* ==== Nav bar ============================================================= */
.sec-bar {
  padding: 10px 40px; font-family: 'Oswald'; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); display: flex; gap: 28px; overflow-x: auto;
}
.sec-bar a { white-space: nowrap; color: inherit; }
.sec-bar a:hover { color: var(--gold); }
.sec-bar a.active { color: var(--gold); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }
.sec-bar .spacer { flex: 1; }
.sec-bar .date { color: var(--paper2); letter-spacing: 0.15em; white-space: nowrap; }

/* ==== Page scaffolding ==================================================== */
.paper-body { padding: 40px; position: relative; }
.page-h {
  text-align: center; padding: 20px 0 26px; border-bottom: 4px double var(--rule); margin-bottom: 32px;
}
.page-h .kicker {
  font-family: 'Oswald'; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--red); margin-bottom: 10px;
}
.page-h h2 {
  font-family: 'Playfair Display'; font-weight: 900; font-size: clamp(48px, 6vw, 78px);
  letter-spacing: -0.02em; line-height: 0.95;
}
.page-h h2 em { font-style: italic; font-weight: 700; }
.page-h .deck {
  font-family: 'Cormorant Garamond'; font-style: italic; font-size: 18px;
  color: var(--ink-dim); margin-top: 12px; max-width: 60ch; margin-left: auto; margin-right: auto;
}

/* ==== Pull quote ========================================================== */
.pull {
  font-family: 'Playfair Display'; font-size: 34px; line-height: 1.1; font-style: italic;
  padding: 20px 40px; margin: 30px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  text-align: center;
}
.pull::before { content: "“"; color: var(--red); font-size: 72px; line-height: 0; vertical-align: -18px; margin-right: 4px; }
.pull::after { content: "”"; color: var(--red); font-size: 72px; line-height: 0; vertical-align: -18px; margin-left: 4px; }
.pull .att { display: block; font-family: 'Oswald'; font-size: 11px; letter-spacing: 0.3em; font-style: normal; color: var(--ink-dim); margin-top: 10px; }

/* ==== Section + divider helpers =========================================== */
.section { margin-top: 30px; padding-top: 20px; border-top: 4px double var(--rule); }
.section h3 {
  font-family: 'Playfair Display'; font-size: 34px; font-weight: 900; text-align: center; margin-bottom: 8px; letter-spacing: -0.01em;
}
.section .deck {
  font-family: 'Cormorant Garamond'; font-style: italic; font-size: 16px; text-align: center;
  color: var(--ink-dim); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.rule-sep { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; }
.rule-double { border: 0; border-top: 4px double var(--rule); margin: 30px 0; }

/* ==== Classic tables / lists ============================================== */
.tbl-classic { font-family: 'Cormorant Garamond'; width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl-classic th { text-align: left; font-family: 'Oswald'; font-size: 10px; letter-spacing: 0.2em; padding: 6px 8px; border-bottom: 2px solid var(--rule); text-transform: uppercase; font-weight: 500; }
.tbl-classic td { padding: 8px 8px; border-bottom: 1px dotted var(--rule); }
.tbl-classic tr.self td { font-weight: 700; background: rgba(160,40,32,0.08); }
.tbl-classic tr.self td:first-child::after { content: " ◆"; color: var(--red); font-size: 10px; }
.tbl-classic .num-col { text-align: right; font-weight: 700; }

/* ==== Editorial boxes ===================================================== */
.editorial {
  background: var(--paper2); padding: 24px 28px; border: 1px solid var(--rule);
  font-family: 'Cormorant Garamond';
}
.editorial.plain { background: transparent; border: 2px solid var(--rule); }
.editorial .kicker { font-family: 'Oswald'; font-size: 11px; letter-spacing: 0.3em; color: var(--red); text-transform: uppercase; margin-bottom: 8px; }
.editorial h3 { font-family: 'Playfair Display'; font-weight: 700; font-size: 28px; margin-bottom: 10px; line-height: 1.1; }
.editorial h3.ital { font-style: italic; }
.editorial p { font-size: 16px; line-height: 1.6; margin-bottom: 10px; }
.editorial .sig { font-style: italic; color: var(--ink-dim); border-top: 1px solid var(--rule); padding-top: 10px; margin-top: 14px; font-size: 14px; }

/* ==== Foot ================================================================ */
.foot {
  border-top: 4px double var(--rule); margin-top: 30px; padding: 20px 40px;
  display: flex; justify-content: space-between; font-family: 'Cormorant Garamond'; font-size: 13px; color: var(--ink-dim);
  font-style: italic;
}

/* ==== Homepage lede / columns (used on home.html) ========================= */
.leader-row {
  display: grid; grid-template-columns: 1fr 2.2fr 1fr; gap: 36px; padding-bottom: 28px;
  border-bottom: 4px double var(--rule);
}
.leader-row > div + div { border-left: 1px solid var(--rule); padding-left: 36px; }
.leader-row > div:nth-child(2) { padding-left: 36px; }
.leader-row > div:last-child { padding-left: 36px; }

.mini-col .kicker { font-family: 'Oswald'; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--red); padding-bottom: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 10px; }
.mini-col h4 { font-family: 'Playfair Display'; font-weight: 700; font-size: 20px; line-height: 1.15; margin-bottom: 4px; }
.mini-col .byline { font-family: 'Cormorant Garamond'; font-style: italic; font-size: 13px; color: var(--ink-dim); margin-bottom: 10px; }
.mini-col p { font-family: 'Cormorant Garamond'; font-size: 15px; line-height: 1.55; margin-bottom: 10px; }
.mini-col .sep { text-align: center; font-family: 'Playfair Display'; color: var(--gold); margin: 16px 0; font-size: 22px; letter-spacing: 0.3em; }

.lede .kicker { font-family: 'Oswald'; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--red); text-align: center; }
.lede .kicker::before, .lede .kicker::after { content: "—"; margin: 0 8px; color: var(--ink); }
.lede h2 { font-family: 'Playfair Display'; font-weight: 900; font-size: clamp(36px, 5vw, 60px); line-height: 0.95; letter-spacing: -0.015em; margin: 10px 0 8px; text-align: center; }
.lede .subhead { font-family: 'Playfair Display'; font-weight: 700; font-size: 22px; line-height: 1.2; text-align: center; font-style: italic; color: var(--ink-dim); margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.lede .photo { width: 100%; aspect-ratio: 16/9; background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent 30%, rgba(0,0,0,0.4)), repeating-linear-gradient(90deg, #32544a 0 8px, #3e6b5c 8px 16px); filter: grayscale(1) contrast(1.3); border: 2px solid var(--rule); margin-bottom: 6px; }
.lede .caption { font-family: 'Cormorant Garamond'; font-style: italic; font-size: 13px; color: var(--ink-dim); padding: 4px 6px 16px; text-align: center; border-bottom: 1px solid var(--rule); margin-bottom: 14px; }
.lede .body { column-count: 2; column-gap: 28px; column-rule: 1px solid var(--rule); font-family: 'Cormorant Garamond'; font-size: 16px; line-height: 1.55; }
.lede .body p { margin-bottom: 10px; text-align: justify; hyphens: auto; }
.lede .body p:first-child::first-letter { font-family: 'Playfair Display'; float: left; font-size: 72px; line-height: 0.85; padding: 6px 8px 0 0; font-weight: 900; }
.lede .by { font-family: 'Oswald'; font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-dim); text-align: center; padding: 10px 0; }

.right-col { font-family: 'Cormorant Garamond'; }
.right-col .kicker { font-family: 'Oswald'; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--red); padding-bottom: 8px; border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
.right-col h4 { font-family: 'Playfair Display'; font-size: 18px; line-height: 1.2; font-weight: 700; margin-bottom: 6px; }
.right-col p { font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.next-box { background: var(--ink); color: var(--paper); padding: 16px 18px; margin-bottom: 20px; font-family: 'Cormorant Garamond'; }
.next-box .m { font-family: 'Oswald'; font-size: 10px; letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase; }
.next-box h5 { font-family: 'Playfair Display'; font-size: 26px; line-height: 1; margin: 4px 0 10px; font-weight: 700; }
.next-box .sc { display: flex; gap: 16px; align-items: center; justify-content: center; font-family: 'Playfair Display'; font-size: 22px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2); margin-bottom: 10px; }
.next-box .sc .vs { font-style: italic; font-size: 16px; color: var(--gold); }
.next-box .det { font-size: 13px; line-height: 1.6; }
.next-box .det span { color: var(--gold); }

@media (max-width: 900px) {
  .leader-row { grid-template-columns: 1fr; }
  .leader-row > div + div { border-left: 0; border-top: 2px solid var(--rule); padding-left: 0; padding-top: 24px; margin-top: 8px; }
  .leader-row > div:nth-child(2), .leader-row > div:last-child { padding-left: 0; }
  .lede .body { column-count: 1; }
}
