/* Theme "dateline": an original wire-service identity — built from scratch
   for this network. Stark black-and-white typographic power: zero
   corner-rounding anywhere (a deliberate contrast with every rounded-corner
   theme in this catalog), oversized bold serif (Playfair Display)
   headlines, and monospace all-caps labels standing in for a wire
   service's city dateline — the label uses the post's real category name
   since this app's data model has no per-post location field (no invented
   data, same rule applied to every theme this session). --accent defaults
   to a wire-service red used sparingly as the single spot color against
   black and white; it's overridden per-site by documentShell's inline
   :root style. Playfair Display + Inter are the only two webfonts this
   network loads globally, via documentShell. Same
   renderHome/renderCategory/renderPost/renderTag/renderSearch/renderAbout
   contract as every other theme (see functions/_themes/dateline.js). */

:root {
  --ink-900:#0a0a0a; --ink-800:#1a1a1a; --ink-700:#333333; --ink-600:#4d4d4d;
  --ink-500:#707070; --ink-400:#9a9a9a; --ink-300:#c4c4c4; --ink-200:#e0e0e0; --ink-100:#eeeeee;
  --paper:#ffffff; --paper-raised:#ffffff;
  --accent: #c81e1e; /* overridden per-site by documentShell's inline :root style */
  --mono: 'Courier New', Courier, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink-900); }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- Placeholder image system — square corners, no exceptions ---- */
.ph {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; object-fit: cover; overflow: hidden; border-radius: 0;
  background: linear-gradient(135deg,#161616,#2b2b2b 60%,#161616); color: rgba(255,255,255,.3);
}
.ph.tone-a { background: linear-gradient(135deg,#111,#2e2e2e 60%,#111); }
.ph.tone-b { background: linear-gradient(135deg,#1c1414,#3a2323 60%,#1c1414); }
.ph.tone-c { background: linear-gradient(135deg,#14161c,#242a38 60%,#14161c); }
.ph svg { width: 24%; }
img.ph { background: none; }
.ratio-16-9 { aspect-ratio: 16/9; }
.ratio-4-3 { aspect-ratio: 4/3; }
.ratio-1-1 { aspect-ratio: 1/1; }
.ratio-3-2 { aspect-ratio: 3/2; }

/* ---- Utility bar ---- */
.utility-bar { background: var(--ink-900); color: var(--ink-300); font-size: 11.5px; font-family: var(--mono); }
.utility-bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 34px; gap: 12px; flex-wrap: wrap; }
.utility-date { color: var(--ink-400); letter-spacing: .02em; text-transform: uppercase; }
.utility-right { display: flex; align-items: center; gap: 14px; }
.utility-right a:not(.btn-subscribe) { color: var(--ink-300); font-weight: 700; }
.utility-right a:not(.btn-subscribe):hover { color: #fff; }
.icon-dot { width: 19px; height: 19px; border-radius: 0; background: var(--ink-700); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #fff; }
.icon-dot:hover { background: var(--accent); }
.btn-subscribe { background: var(--accent); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .03em; text-transform: uppercase; padding: 4px 12px; border-radius: 0; }
.btn-subscribe:hover { filter: brightness(1.1); }

/* ---- Masthead ---- */
.masthead { background: var(--paper-raised); border-bottom: 3px solid var(--ink-900); }
.masthead .wrap { display: flex; justify-content: center; padding: 26px 20px 20px; }
.logo-group { display: flex; align-items: center; gap: 12px; }
.logo-box { width: 48px; height: 48px; border-radius: 0; background: var(--ink-900); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 22px; }
.logo-img { height: 72px; width: auto; max-width: 420px; object-fit: contain; }
.site-name { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: clamp(28px,4vw,42px); letter-spacing: -0.01em; color: var(--ink-900); }
.site-tagline { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-500); margin-top: 2px; }

/* ---- Primary nav ---- */
.primary-nav { background: var(--ink-900); }
.primary-nav .wrap { display: flex; justify-content: center; }
.nav-list { display: flex; align-items: stretch; flex-wrap: wrap; justify-content: center; }
.nav-list a { display: flex; align-items: center; height: 42px; padding: 0 16px; color: #eaeaea; font-weight: 700; font-size: 12.5px; letter-spacing: .03em; text-transform: uppercase; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav-list a:hover, .nav-list a.home { color: #fff; border-bottom-color: var(--accent); }

/* ---- Dateline label & meta ---- */
.dateline-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.row-kicker { margin-bottom: 6px; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 11.5px; color: var(--ink-500); font-family: var(--mono); }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-400); }
.editors-pick { display: inline-block; background: var(--ink-900); color: #fff; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; margin-left: 4px; }

/* ---- Sections ---- */
.section { padding: 40px 0; }
.section-rule { border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); background: var(--ink-100); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 3px solid var(--ink-900); }
.section-title { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 900; color: var(--ink-900); }
.section-viewall { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.section-viewall:hover { text-decoration: underline; }

/* ---- Hero ---- */
.hero-section { padding: 32px 0 8px; }
.hero-section .wrap { display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: start; }
.hero-lead { display: flex; flex-direction: column; }
.hero-title { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(30px,4.4vw,50px); font-weight: 900; line-height: 1.06; color: var(--ink-900); margin: 6px 0 12px; }
.hero-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.hero-dek { font-size: 16px; color: var(--ink-600); line-height: 1.6; margin-bottom: 12px; max-width: 62ch; }
.hero-frame { margin-top: 18px; }
.hero-side { border-top: 3px solid var(--ink-900); padding-top: 14px; }
.hero-side-label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 6px; display: block; }
.hero-side-list { display: flex; flex-direction: column; }

/* ---- Type row: the core reading unit, pure typography ---- */
.type-list { display: flex; flex-direction: column; }
.type-row { display: grid; grid-template-columns: 1fr; align-items: start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--ink-200); }
.type-row.has-num { grid-template-columns: 30px 1fr; }
.type-row:first-child { padding-top: 0; }
.type-row:last-child { border-bottom: none; padding-bottom: 0; }
.row-num { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 20px; color: var(--ink-300); line-height: 1.3; }
.row-body h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--ink-900); margin: 0 0 6px; }
.row-body h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.row-body p { font-size: 13.5px; color: var(--ink-600); line-height: 1.55; margin: 0 0 7px; }
.ranked-list .type-row { padding: 12px 0; }
.ranked-list .row-body h3 { font-size: 14.5px; }

/* ---- Dispatches: the one image-card break ---- */
.dispatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap: 2px; background: var(--ink-900); }
.dispatch-card { display: flex; flex-direction: column; background: var(--paper); }
.dispatch-card-body { padding: 16px; }
.dispatch-card-body h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink-900); margin: 0; }
.dispatch-card-body h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* ---- Main grid: reading list + sidebar ---- */
.main-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }

/* ---- Sidebar widgets ---- */
.sidebar { display: flex; flex-direction: column; }
.widget { background: var(--paper-raised); border: 1px solid var(--ink-900); padding: 20px; margin-bottom: 22px; }
.widget h3 { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-900); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .05em; padding-bottom: 10px; border-bottom: 3px solid var(--ink-900); }
.newsletter-widget { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.newsletter-widget h3 { color: #fff; }
.newsletter-widget p { font-size: 12.5px; color: var(--ink-300); line-height: 1.5; margin-bottom: 12px; }
.newsletter-form { display: flex; flex-direction: column; gap: 9px; }
.newsletter-form input { padding: 10px 12px; border-radius: 0; border: 1px solid var(--ink-700); background: var(--ink-800); color: #fff; font-size: 13px; font-family: inherit; }
.newsletter-form input::placeholder { color: var(--ink-400); }
.newsletter-form button { background: var(--accent); color: #fff; padding: 10px; border-radius: 0; font-weight: 800; font-size: 12.5px; letter-spacing: .03em; text-transform: uppercase; cursor: pointer; border: none; }
.newsletter-form button:hover:not(:disabled) { filter: brightness(1.1); }
.newsletter-fine { font-size: 10.5px; color: var(--ink-400); margin-top: 9px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { background: var(--ink-100); border: 1px solid var(--ink-900); border-radius: 0; padding: 5px 12px; font-size: 12px; font-weight: 700; color: var(--ink-800); }
.tag-cloud a:hover { background: var(--ink-900); color: #fff; }
.ad-widget { border: 1px dashed var(--ink-400); background: transparent; text-align: center; color: var(--ink-500); font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 48px 10px; }

/* ---- Category / tag / search listing pages ---- */
.category-title { font-family: 'Playfair Display', Georgia, serif; font-size: 30px; font-weight: 900; color: var(--ink-900); margin: 0 0 20px; padding-bottom: 14px; border-bottom: 3px solid var(--ink-900); }
.search-form { display: flex; gap: 10px; margin: 0 0 24px; max-width: 520px; }
.search-form input { flex: 1; padding: 11px 15px; border: 1px solid var(--ink-900); border-radius: 0; font-size: 14.5px; font-family: inherit; }
.search-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-form button { background: var(--ink-900); color: #fff; border: none; border-radius: 0; padding: 0 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.search-form button:hover { background: var(--accent); }
.pagination { display: flex; justify-content: space-between; margin-top: 36px; padding-top: 16px; border-top: 3px solid var(--ink-900); font-weight: 700; font-size: 13px; font-family: var(--mono); }
.pagination a { color: var(--accent); }
.empty-state { text-align: center; padding: 76px 20px; color: var(--ink-500); }
.empty-state h1 { color: var(--ink-900); font-family: 'Playfair Display', Georgia, serif; font-size: 26px; margin-bottom: 8px; }
.btn { display: inline-block; margin-top: 14px; background: var(--ink-900); color: #fff; padding: 9px 18px; border-radius: 0; font-weight: 700; font-size: 13px; }

/* ---- Single post ---- */
.single-post { max-width: 720px; margin: 0 auto; }
.breadcrumb { font-family: var(--mono); font-size: 11.5px; color: var(--ink-500); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .02em; }
.breadcrumb a { font-weight: 700; color: var(--ink-800); }
.single-post-header h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(28px,4.2vw,44px); line-height: 1.14; margin: 8px 0 14px; color: var(--ink-900); font-weight: 900; }
.single-post-headline { width: 100%; max-height: 460px; object-fit: cover; margin: 22px 0 28px; border-radius: 0; }
.single-post-content { font-size: 17.5px; }
.single-post-content p { margin: 0 0 20px; }
.single-post-content h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 23px; margin: 30px 0 12px; font-weight: 800; }
.single-post-content h3 { font-size: 18px; margin: 22px 0 10px; font-weight: 700; }
.single-post-content img { margin: 22px 0; width: 100%; border-radius: 0; }
.single-post-content a { color: var(--accent); text-decoration: underline; }
.single-post-content blockquote { border-left: 4px solid var(--ink-900); margin: 24px 0; padding-left: 18px; font-style: italic; color: var(--ink-600); }

.post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--ink-200); }
.tag-pill-link { background: var(--ink-100); color: var(--ink-800); font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 0; border: 1px solid var(--ink-900); }
.tag-pill-link:hover { background: var(--ink-900); color: #fff; }

.related-posts { max-width: 720px; margin: 50px auto 0; border-top: 3px solid var(--ink-900); padding-top: 24px; }
.related-posts h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 19px; margin-bottom: 14px; font-weight: 800; }

/* ---- Layout wrapper for inner pages ---- */
.page-layout { max-width: 1200px; margin: 0 auto; padding: 32px 20px 56px; }

/* ---- Footer ---- */
.site-footer { background: var(--ink-900); color: var(--ink-400); padding: 44px 0 0; margin-top: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--ink-800); }
.footer-grid h4 { color: #fff; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 13px; }
.footer-grid p { font-size: 12.5px; color: var(--ink-500); line-height: 1.6; }
.footer-grid ul { display: flex; flex-direction: column; gap: 8px; }
.footer-grid li a:hover { color: #fff; }
.footer-logo { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 21px; color: #fff; margin-bottom: 9px; }
.footer-social { display: flex; gap: 8px; margin-top: 12px; }
.footer-recent-item { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.footer-recent-item a { font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--ink-300); }
.footer-recent-item a:hover { color: #fff; }
.footer-recent-item span { font-family: var(--mono); font-size: 11px; color: var(--ink-600); }
.footer-bottom { padding: 16px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-600); }

@media (max-width: 1080px) {
  .main-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-section .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dispatch-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .type-row.has-num { grid-template-columns: 24px 1fr; }
}
@media (max-width: 460px) {
  .dispatch-grid { grid-template-columns: 1fr; }
}
