/* ═══════════════════════════════════════════════════════
   STREAMED.NEWS — Newspaper Theme
   ═══════════════════════════════════════════════════════ */

/* ── Self-hosted fonts ──────────────────────────────────
   Place font files in assets/fonts/ using these names:
     PlayfairDisplay-VariableFont_wght.ttf
     PlayfairDisplay-Italic-VariableFont_wght.ttf
     SourceSerif4-VariableFont_opsz,wght.ttf
     SourceSerif4-Italic-VariableFont_opsz,wght.ttf
     Inter-VariableFont_opsz,wght.ttf
   (These are the exact filenames from Google Fonts "Download family")
   ──────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/SourceSerif4-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/SourceSerif4-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ── */
:root {
  --cream:      #faf8f4;
  --ink:        #1a1a1a;
  --ink-light:  #444;
  --rule:       #2a2a2a;
  --rule-light: #ddd;
  --muted:      #777;
  --max-w:      1200px;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ── Container ── */
.sn-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════
   MASTHEAD
   ══════════════════════════════════════════ */
.sn-masthead {
  border-top: 4px double var(--ink);
  padding-top: 16px;
}

.sn-masthead-top {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  align-items: center;
  gap: 16px;
  padding-bottom: 12px;
}

/* Left / Right section nav */
.sn-masthead-nav {
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 2;
}
.sn-masthead-nav ul { list-style: disc; padding-left: 14px; }
.sn-masthead-nav.right { text-align: right; list-style-position: inside; padding-left: 0; }
.sn-masthead-nav a { text-decoration: none; color: var(--ink-light); }
.sn-masthead-nav a:hover { text-decoration: underline; }

/* Logo */
.sn-logo-wrap { text-align: center; }
.sn-logo {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 76px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.sn-logo:hover { opacity: 0.85; }

/* Tagline */
.sn-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 6px 0;
  margin: 8px 0;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  letter-spacing: 0.3px;
}

/* Metadata bar */
.sn-masthead-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--muted);
  padding: 5px 0;
  border-top: 1px solid var(--rule-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Section nav bar ── */
.sn-nav {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 0;
}
.sn-nav-list {
  display: flex;
  list-style: none;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.sn-nav-list li { border-right: 1px solid var(--rule-light); }
.sn-nav-list li:first-child { border-left: 1px solid var(--rule-light); }
.sn-nav-list a {
  display: block;
  padding: 7px 20px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sn-nav-list a:hover {
  background: var(--ink);
  color: var(--cream);
}

/* ══════════════════════════════════════════
   FRONT PAGE LAYOUT
   ══════════════════════════════════════════ */
.sn-main { padding: 24px 0 48px; }

.sn-front-top {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  margin-bottom: 0;
}

/* ── Hero (left 2/3) ── */
.sn-hero-col {
  padding: 24px 32px 24px 0;
  border-right: 1px solid var(--rule-light);
}

.sn-hero-section {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.sn-hero-section a { text-decoration: none; }
.sn-hero-section a:hover { text-decoration: underline; }

.sn-hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.sn-hero-title a { text-decoration: none; color: var(--ink); }
.sn-hero-title a:hover { text-decoration: underline; }

.sn-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 12px;
}

.sn-hero-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-light);
  margin-bottom: 10px;
}

.sn-hero-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
}

/* ── Sidebar (right 1/3) ── */
.sn-sidebar {
  padding: 24px 0 24px 28px;
}

.sn-sidebar-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.sn-sidebar-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-light);
}
.sn-sidebar-item:last-child { border-bottom: none; }

.sn-sidebar-thumb-wrap { display: block; flex-shrink: 0; }
.sn-sidebar-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
}
.sn-thumb-placeholder {
  display: block;
  width: 72px;
  height: 52px;
  opacity: 0.7;
}

.sn-sidebar-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.sn-sidebar-title a { text-decoration: none; color: var(--ink); }
.sn-sidebar-title a:hover { text-decoration: underline; }

.sn-sidebar-meta {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   SECTION ROWS
   ══════════════════════════════════════════ */
.sn-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 24px 0;
}

.sn-section-row { margin-bottom: 8px; }

.sn-section-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink);
  padding-bottom: 8px;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sn-section-label a { text-decoration: none; color: inherit; }
.sn-section-label a:hover { opacity: 0.7; }
.sn-section-label::after {
  content: "See all →";
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.sn-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ══════════════════════════════════════════
   STORY CARD
   ══════════════════════════════════════════ */
.sn-card { }

.sn-card-thumb-wrap { display: block; margin-bottom: 10px; }
.sn-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.2s;
}
.sn-card-thumb:hover { opacity: 0.9; }
.sn-card-thumb.sn-thumb-placeholder {
  height: 0;
  padding-top: 56.25%;
  opacity: 0.6;
}

.sn-card-body { }

.sn-card-section {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  margin-bottom: 5px;
}
.sn-card-section:hover { text-decoration: underline; }

.sn-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.sn-card-title a { text-decoration: none; color: var(--ink); }
.sn-card-title a:hover { text-decoration: underline; }

.sn-card-excerpt {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-light);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sn-card-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   POST PAGE
   ══════════════════════════════════════════ */
.sn-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 0 48px;
}

.sn-post-section {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  margin-bottom: 12px;
}
.sn-post-section:hover { text-decoration: underline; }

.sn-post-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.sn-post-meta {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  padding: 8px 0;
  margin-bottom: 28px;
}

.sn-post-feature-image {
  margin-bottom: 28px;
}
.sn-post-feature-image img {
  width: 100%;
}
.sn-post-feature-image figcaption {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

/* Post content typography */
.sn-post-content {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
}
/* Explicitly lock body font for inline elements so Ghost's
   gh-content injected CSS cannot override them */
.sn-post-content p,
.sn-post-content li,
.sn-post-content em,
.sn-post-content strong,
.sn-post-content span {
  font-family: var(--font-body);
}
.sn-post-content h1,
.sn-post-content h2,
.sn-post-content h3 {
  font-family: var(--font-display);
  margin: 32px 0 14px;
  line-height: 1.2;
}
.sn-post-content h2 { font-size: 26px; border-bottom: 1px solid var(--rule-light); padding-bottom: 8px; }
.sn-post-content h3 { font-size: 20px; }
.sn-post-content p  { margin-bottom: 20px; }
.sn-post-content ul,
.sn-post-content ol { margin: 0 0 20px 28px; }
.sn-post-content li { margin-bottom: 6px; }
.sn-post-content blockquote {
  border-left: 3px solid var(--ink);
  margin: 24px 0;
  padding: 8px 24px;
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-light);
}
.sn-post-content a { color: var(--ink); text-decoration: underline; }
.sn-post-content a:hover { opacity: 0.7; }
.sn-post-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  margin: 16px 0 24px;
}

/* Post tags */
.sn-post-tags {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-light);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sn-post-tag {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border: 1px solid var(--rule-light);
  text-decoration: none;
  color: var(--ink-light);
}
.sn-post-tag:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ══════════════════════════════════════════
   CHANNEL / SECTION PAGE
   ══════════════════════════════════════════ */
.sn-channel { padding: 32px 0 48px; }

.sn-channel-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--ink);
}
.sn-channel-name {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
}
.sn-channel-description {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}

.sn-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

/* ══════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════ */
.sn-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid var(--rule-light);
  font-family: var(--font-ui);
  font-size: 13px;
}
.sn-page-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 14px;
  border: 1px solid var(--rule);
}
.sn-page-link:hover { background: var(--ink); color: var(--cream); }
.sn-page-info { color: var(--muted); font-size: 12px; }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.sn-footer {
  border-top: 4px double var(--ink);
  padding: 28px 0 32px;
  margin-top: 48px;
}
.sn-footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sn-footer-nav a {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  color: var(--ink-light);
}
.sn-footer-nav a:hover { text-decoration: underline; }
.sn-footer-copy {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

/* ══════════════════════════════════════════
   ERROR PAGE
   ══════════════════════════════════════════ */
.sn-error {
  text-align: center;
  padding: 80px 0;
}
.sn-error-code {
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  color: var(--rule-light);
}
.sn-error-msg {
  font-size: 18px;
  color: var(--ink-light);
  margin: 16px 0 28px;
}
.sn-error-home {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

/* Empty state */
.sn-empty { color: var(--muted); font-style: italic; padding: 24px 0; font-size: 15px; }

/* ══════════════════════════════════════════
   KOENIG EDITOR CARDS  (Ghost content cards)
   ══════════════════════════════════════════ */

/* Wide + Full breakout — escape the 760px post column */
.kg-width-wide {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  left: 50%;
  margin-left: -42.5vw;
  margin-right: -42.5vw;
}
.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Image card */
.kg-image-card { margin: 28px 0; }
.kg-image-card img { width: 100%; border-radius: 2px; }
.kg-image-card figcaption {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* Gallery card */
.kg-gallery-card { margin: 28px 0; }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 6px; margin-bottom: 6px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Embed card (YouTube, Twitter, etc.) */
.kg-embed-card { margin: 28px 0; }
.kg-embed-card > * { margin: 0 auto; }
.kg-embed-card iframe { aspect-ratio: 16 / 9; width: 100%; border: none; }

/* Bookmark card */
.kg-bookmark-card { margin: 28px 0; }
.kg-bookmark-container {
  display: flex;
  border: 1px solid var(--rule-light);
  text-decoration: none;
  color: var(--ink);
}
.kg-bookmark-content { flex: 1; padding: 20px; min-width: 0; }
.kg-bookmark-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.kg-bookmark-description { font-size: 13px; color: var(--ink-light); line-height: 1.5; margin-bottom: 8px; }
.kg-bookmark-metadata { font-family: var(--font-ui); font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kg-bookmark-icon { width: 14px; height: 14px; }
.kg-bookmark-thumbnail { width: 160px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-container:hover .kg-bookmark-title { text-decoration: underline; }

/* Callout card */
.kg-callout-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  margin: 28px 0;
  border-left: 4px solid var(--ink);
  background: rgba(26,26,26,0.04);
}
.kg-callout-emoji { font-size: 20px; line-height: 1.4; flex-shrink: 0; }
.kg-callout-text { font-size: 16px; line-height: 1.6; }

/* Toggle card */
.kg-toggle-card { margin: 28px 0; border: 1px solid var(--rule-light); padding: 16px 20px; }
.kg-toggle-heading { font-family: var(--font-display); font-weight: 700; font-size: 18px; cursor: pointer; }
.kg-toggle-content { margin-top: 12px; font-size: 15px; line-height: 1.65; }

/* Button card */
.kg-button-card { margin: 28px 0; text-align: center; }
.kg-btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  background: var(--ink);
  color: var(--cream);
  border: 2px solid var(--ink);
  transition: background 0.15s, color 0.15s;
}
.kg-btn:hover { background: transparent; color: var(--ink); }

/* Divider card */
.kg-divider-card { margin: 36px 0; border: none; border-top: 1px solid var(--rule-light); }

/* Video card */
.kg-video-card { margin: 28px 0; }
.kg-video-card video { width: 100%; }

/* Audio card */
.kg-audio-card { margin: 28px 0; }

/* NFT / Product / Header cards (Ghost 5.x) */
.kg-product-card { margin: 28px 0; padding: 24px; border: 1px solid var(--rule-light); }
.kg-product-card-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.kg-product-card-description { font-size: 15px; line-height: 1.6; color: var(--ink-light); }

/* Code card */
.kg-code-card { margin: 28px 0; }
.kg-code-card pre {
  background: var(--ink);
  color: var(--cream);
  padding: 20px 24px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  border-radius: 2px;
}

/* File card */
.kg-file-card { margin: 28px 0; }
.kg-file-card-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border: 1px solid var(--rule-light);
  text-decoration: none;
  color: var(--ink);
}
.kg-file-card-title { font-family: var(--font-ui); font-weight: 600; font-size: 14px; }
.kg-file-card-caption { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 960px) {
  .sn-masthead-top { grid-template-columns: 1fr; text-align: center; }
  .sn-masthead-nav { display: none; }
  .sn-front-top { grid-template-columns: 1fr; }
  .sn-hero-col { border-right: none; padding-right: 0; border-bottom: 1px solid var(--rule-light); margin-bottom: 24px; }
  .sn-sidebar { padding-left: 0; }
  .sn-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .sn-channel-grid { grid-template-columns: repeat(2, 1fr); }
  .sn-nav-list { overflow-x: auto; }
}

@media (max-width: 600px) {
  .sn-logo { font-size: 36px; letter-spacing: -1px; }
  .sn-cards-grid { grid-template-columns: 1fr; }
  .sn-channel-grid { grid-template-columns: 1fr; }
  .sn-masthead-meta { flex-direction: column; gap: 2px; text-align: center; }
  .sn-nav-list a { padding: 7px 12px; font-size: 11px; }
}
