/*
Theme Name: Caolan Report
Theme URI: https://caolan.report
Author: Caolan Report
Description: Newspaper-style hub theme for Caolan Report. Reports, Dispatches, and Chronicles sections, editorial desk byline support.
Version: 4.8
Text Domain: caolan-report
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Source+Serif+4:wght@400;500&family=Inter:wght@400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #0a0a0a;
  color: #FAFAF7;
  font-family: 'Inter', sans-serif;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 28px; }

/* top strap */
.strap {
  background: #000;
  border-bottom: 1px solid #333;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #b8b8b0;
  padding: 8px 0;
}
.strap .wrap { display: flex; justify-content: center; align-items: center; }

/* masthead */
.masthead { padding: 22px 0 22px; text-align: center; border-bottom: 3px double #4a4a4a; }
.masthead .dateline {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #a8a8a0; margin-bottom: 6px;
}
.masthead .days-counter {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #b8b8b0; margin-bottom: 10px;
}
.masthead h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 58px;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}
.masthead h1 a { color: inherit; }
.masthead .tag {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 17px;
  color: #c2c2ba;
  margin-top: 10px;
}
.nav {
  display: flex; justify-content: center; gap: 22px; flex-wrap: wrap;
  font-size: 12.5px; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 14px 0; border-bottom: 1px solid #333; color: #e0e0da;
}
.nav a.current, .nav a:hover { color: #FFFFFF; font-weight: 600; border-bottom: 2px solid #d9603f; padding-bottom: 4px; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px;
  padding: 34px 0; border-bottom: 1px solid #333;
}
.hero-media { position: relative; background: #000; border-radius: 2px; overflow: hidden; }
.hero-media img { width: 100%; display: block; }
.hero-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(160deg, #262622 0%, #171715 55%, #0c0c0b 100%);
}
.hero-video-thumb {
  width: 100%; aspect-ratio: 16/9; position: relative;
  background-color: #000; background-size: cover; background-position: center;
}
.play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(0,0,0,0.55); border: 1.5px solid #FFFFFF;
  display: flex; align-items: center; justify-content: center;
}
.play-badge::after {
  content: ''; border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #FFFFFF; margin-left: 4px;
}
.caption { font-size: 12px; color: #a8a8a0; padding: 8px 2px 0; font-style: italic; }
.eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #e0764f; margin-bottom: 8px; }
.hero-text h2 {
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: 30px; line-height: 1.22; color: #FFFFFF; margin-bottom: 10px;
}
.hero-text h2 a:hover { color: #e0764f; }
.hero-text p.dek { font-family: 'Source Serif 4', serif; font-size: 15px; color: #d0d0c8; line-height: 1.55; margin-bottom: 10px; }
.byline { font-size: 12px; color: #a8a8a0; }

.sidebar {
  border-left: 1px solid #333; padding-left: 30px;
}
.sidebar .eyebrow { color: #a8a8a0; }
.most-viewed-title {
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 26px;
  color: #FFFFFF; margin: 6px 0 20px;
}
.most-viewed-list { list-style: none; }
.most-viewed-list li { padding: 14px 0; border-top: 1px solid #333; }
.most-viewed-list li:first-child { border-top: none; padding-top: 0; }
.most-viewed-list a {
  display: flex; align-items: baseline; gap: 12px;
  font-family: 'Playfair Display', serif; font-size: 16px; line-height: 1.35; color: #e5e5df;
}
.most-viewed-list a:hover { color: #e0764f; }
.most-viewed-list .mv-num {
  font-family: 'Inter', sans-serif; font-size: 13px; color: #e0764f; flex-shrink: 0;
}

.subscribe-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; padding: 26px 0; border-top: 1px solid #333; border-bottom: 1px solid #333;
}
.subscribe-bar-label {
  font-family: 'Source Serif 4', serif; font-size: 14px; color: #d0d0c8; flex: 1 1 320px;
}
.subscribe-bar form { display: flex; gap: 8px; flex: 0 1 380px; }
.subscribe-bar input {
  flex: 1; background: #1a1a1a; border: 1px solid #4a4a4a; color: #FFFFFF;
  padding: 10px 12px; font-size: 13px; border-radius: 2px;
}
.subscribe-bar button {
  background: #d9603f; color: #FFFFFF; border: none; padding: 10px 16px;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; border-radius: 2px;
  white-space: nowrap;
}
#caolan-subscribe-message { font-size: 12px; display: none; }

.no-list { list-style: none; }

.support-box { margin-top: 32px; padding-top: 24px; border-top: 1px solid #333; }
.support-box .eyebrow { margin-bottom: 8px; }
.support-box p { font-family: 'Source Serif 4', serif; font-size: 13px; color: #b8b8b0; line-height: 1.5; margin-bottom: 14px; }
.support-links { display: flex; gap: 10px; }
.support-btn {
  flex: 1; text-align: center; padding: 9px 10px; border-radius: 2px;
  font-size: 12.5px; letter-spacing: 0.03em; text-transform: uppercase;
  border: 1px solid #4a4a4a; color: #e5e5df;
  background: transparent; font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none; outline: none;
}
.support-btn:hover { border-color: #d9603f; color: #FFFFFF; }
.no-list li { font-size: 12px; color: #a8a8a0; padding: 3px 0; }

/* section grids (Reports / Dispatches / Chronicles / archives) */
.section-label {
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #FFFFFF;
  padding: 26px 0 16px; border-bottom: 1px solid #333; margin-bottom: 22px;
}
.reports-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  padding-bottom: 30px; border-bottom: 1px solid #333;
}
.reports-grid article { padding: 0 22px; border-left: 1px solid #333; }
.reports-grid article:nth-child(3n+1) { border-left: none; padding-left: 0; }
.reports-grid article:nth-child(n+4) { border-top: 1px solid #333; padding-top: 22px; margin-top: 22px; }
.card-thumb-link { display: block; margin-bottom: 12px; }
.card-thumb {
  aspect-ratio: 16 / 9; background: #1a1a1a; background-size: cover; background-position: center;
  border-radius: 4px; border: 1px solid #333; position: relative; overflow: hidden;
}
.card-thumb .short-play { position: absolute; bottom: 8px; right: 8px; }

.reports-grid h4 {
  font-family: 'Playfair Display', serif; font-size: 17px; line-height: 1.3;
  color: #FFFFFF; margin-bottom: 8px;
}
.reports-grid h4 a:hover { color: #e0764f; }
.reports-grid p { font-family: 'Source Serif 4', serif; font-size: 13px; color: #c2c2ba; line-height: 1.5; margin-bottom: 10px; }
.reports-grid .byline { color: #a8a8a0; }

/* shorts grid */
.shorts-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px;
  padding-bottom: 30px;
}
.short-item { display: block; text-decoration: none; }
.short-thumb {
  aspect-ratio: 9 / 16; background: #1a1a1a; background-size: cover; background-position: center;
  border-radius: 6px; border: 1px solid #333; position: relative; overflow: hidden;
}
.short-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #262622 0%, #171715 55%, #0c0c0b 100%);
}
.short-play {
  position: absolute; bottom: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.55); border: 1.2px solid #FFFFFF;
  display: flex; align-items: center; justify-content: center;
}
.short-play::after {
  content: ''; border-style: solid; border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #FFFFFF; margin-left: 2px;
}
.short-title {
  margin-top: 8px; font-size: 13px; color: #e0e0da; line-height: 1.35; font-weight: 500;
}

/* video row */
.video-row { padding: 30px 0; }
.video-row .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.video-row .head span.link { font-size: 12px; color: #e0764f; text-transform: uppercase; letter-spacing: 0.05em; }
.video-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.video-grid figure {
  background: #1a1a1a; border: 1px solid #333; border-radius: 2px;
  aspect-ratio: 16/9; position: relative; display: flex; align-items: center; justify-content: center;
  margin: 0;
}
.video-grid .vp {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1.2px solid #999992;
  display: flex; align-items: center; justify-content: center;
}
.video-grid .vp::after {
  content: ''; border-style: solid; border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #d8d8d0; margin-left: 3px;
}
.video-grid figcaption {
  font-size: 12.5px; color: #e0e0da; margin-top: 8px; line-height: 1.35;
  font-weight: 500;
}

/* single post / article body */
.single-article { padding: 30px 0; max-width: 720px; margin: 0 auto; }
.single-article .eyebrow { text-align: center; }
.single-article h1 {
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: 34px; line-height: 1.2; color: #FFFFFF; margin-bottom: 14px; text-align: center;
}
.single-article .meta { text-align: center; font-size: 13px; color: #a8a8a0; margin-bottom: 24px; }
.single-article .lead-image { width: 100%; border-radius: 2px; margin-bottom: 24px; }
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 2px; overflow: hidden; margin-bottom: 24px; background: #000;
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.single-article .body-content {
  font-family: 'Source Serif 4', serif; font-size: 17px; line-height: 1.7; color: #e5e5df;
}
.single-article .body-content p { margin-bottom: 20px; }
.single-article .body-content img { max-width: 100%; height: auto; border-radius: 2px; margin: 10px 0; }
.single-article .body-content h2, .single-article .body-content h3 {
  font-family: 'Playfair Display', serif; color: #FFFFFF; margin: 30px 0 14px;
}

/* pagination / archive */
.pagination { display: flex; justify-content: center; gap: 16px; padding: 30px 0; font-size: 13px; }
.pagination a { color: #e0764f; }

footer {
  border-top: 1px solid #333; padding: 26px 0 34px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; color: #999992;
}
footer .socials { display: flex; gap: 20px; color: #c2c2ba; }

@media (max-width: 640px) {
  .shorts-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .short-title { font-size: 12px; }
  .strap { padding: 12px 0; }
  .strap .wrap { flex-direction: column; gap: 10px; text-align: center; }
  .masthead { padding: 38px 0 20px; }
  .masthead .dateline { margin-bottom: 10px; }
  .masthead .days-counter { line-height: 1.6; margin-bottom: 16px; padding: 0 12px; }
  .masthead h1 { font-size: 34px; }
  .masthead .tag { font-size: 14px; padding: 0 20px; margin-top: 12px; }
  .nav { gap: 16px 16px; padding: 18px 16px; row-gap: 14px; }
  .nav a { font-size: 11px; }

  .hero { grid-template-columns: 1fr; padding: 28px 0; gap: 24px; }
  .hero-text h2 { font-size: 23px; }
  .sidebar { border-left: none; border-top: 1px solid #333; padding-left: 0; padding-top: 24px; }

  .video-grid { grid-template-columns: repeat(2, 1fr); }

  .single-article h1 { font-size: 26px; }

  footer { flex-direction: column; gap: 10px; text-align: center; }
  .subscribe-bar { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 14px; text-align: center; }
  .subscribe-bar-label { flex: none; }
  .subscribe-bar form { flex: none; }
}

/* Support page: donate box embedded mid-story via a Custom HTML block.
   Deliberately named donate-box, not support-box, so it never collides
   with the existing homepage sidebar "Support my work" box. */
.support-cta { text-align: center; margin: 34px 0; }
.donate-box {
  border: 1px solid #333; border-radius: 6px; padding: 30px 24px; max-width: 460px; margin: 0 auto;
  min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donate-box .donate-label {
  display: block; background: none; color: #FFFFFF;
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: 22px; letter-spacing: 0.01em; text-transform: none;
  padding: 0; margin-bottom: 8px;
}
.donate-box .widget-wrap { max-width: 420px; margin: 20px auto 0; width: 100%; }

/* Bitcoin reveal panel inside the homepage support box */
.btc-reveal {
  display: none; margin-top: 12px; padding: 12px; background: #1a1a1a;
  border: 1px solid #4a4a4a; border-radius: 2px;
}
.btc-reveal.is-open { display: block; }
.btc-reveal .btc-address {
  font-family: monospace; font-size: 12.5px; color: #e5e5df;
  word-break: break-all; margin-bottom: 8px; line-height: 1.5;
}
.btc-reveal .btc-copy-btn {
  background: #d9603f; color: #FFFFFF; border: none; padding: 7px 12px;
  font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer; border-radius: 2px;
}
.btc-reveal .btc-copy-btn.copied { background: #4a7a58; }