/* Theme "flicker": an original media/video-blog identity — dark masthead
   and footer bookending light content, with a play-button overlay on every
   thumbnail carrying the "video" feel (this network's post model has no
   dedicated video field, so the treatment is purely visual chrome, same
   idea as the "By the Newsroom" byline standing in for a missing author
   system elsewhere). Cyan/teal accent by default, deliberately distinct
   from the existing "reel" theme's amber full-bleed treatment. Inter
   throughout (the only webfont this network loads globally, via
   documentShell). Same renderHome/renderCategory/renderPost/renderTag/
   renderSearch/renderAbout contract as every other theme (see
   functions/_themes/flicker.js). */

:root {
  --ink-900:#12181c; --ink-800:#1e262b; --ink-700:#374249; --ink-600:#54626a;
  --ink-500:#78868d; --ink-400:#a2adb2; --ink-300:#ccd4d7; --ink-200:#e2e7e9; --ink-100:#eff2f3;
  --paper:#f7fafa; --paper-raised:#ffffff;
  --dark-900:#0f1518; --dark-800:#161f23; --dark-700:#26333a;
  --accent: #12a3ad; /* overridden per-site by documentShell's inline :root style */
  --radius:12px;
  --shadow-sm:0 1px 2px rgba(15,21,24,.07), 0 1px 1px rgba(15,21,24,.05);
  --shadow-lg:0 20px 45px rgba(15,21,24,.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink-800); }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.56; -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: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- Placeholder image system + play-button overlay ---- */
.ph {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; object-fit: cover; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(135deg,#1c2830,#324450 60%,#1c2830); color: rgba(255,255,255,.35);
}
.ph.tone-teal { background: linear-gradient(135deg,#123536,#1d5254 60%,#123536); }
.ph.tone-violet { background: linear-gradient(135deg,#241c38,#3a2c58 60%,#241c38); }
.ph.tone-coral { background: linear-gradient(135deg,#3a2018,#5c3226 60%,#3a2018); }
.ph svg { width: 26%; }
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; }

.media-frame { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }
.media-frame .ph, .media-frame img { border-radius: var(--radius); }
.play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; background: rgba(15,21,24,.55);
  display: flex; align-items: center; justify-content: center; color: #fff;
  backdrop-filter: blur(2px); transition: background .15s, transform .15s;
}
.play-btn svg { width: 17px; height: 17px; margin-left: 2px; }
.media-frame:hover .play-btn { background: var(--accent); transform: translate(-50%,-50%) scale(1.08); }

/* ---- Masthead ---- */
.masthead { background: var(--dark-900); color: #fff; }
.masthead-row { display: flex; align-items: center; gap: 24px; padding: 16px 20px; flex-wrap: wrap; }
.logo-group { display: flex; align-items: center; gap: 12px; }
.logo-box { width: 40px; height: 40px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.logo-img { height: 72px; width: auto; max-width: 420px; object-fit: contain; }
.site-name { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: #fff; }
.site-tagline { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); margin-top: 2px; }
.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-left: 8px; }
.main-nav a { padding: 8px 13px; border-radius: 6px; color: #d7dee0; font-weight: 600; font-size: 13.5px; }
.main-nav a:hover, .main-nav a.home { background: var(--dark-700); color: #fff; }
.masthead-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--dark-700); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }
.icon-dot:hover { background: var(--accent); }
.btn-subscribe { background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 18px; border-radius: 6px; white-space: nowrap; }
.btn-subscribe:hover { filter: brightness(1.1); }

/* ---- Section headers & tags ---- */
.section { padding: 42px 0; }
.section-dark { background: var(--dark-900); color: #fff; }
.section-dark .section-title { color: #fff; }
.section-tint { background: var(--paper-raised); border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-title { font-size: 20px; font-weight: 800; color: var(--ink-900); display: flex; align-items: center; gap: 10px; }
.section-title .swatch { width: 8px; height: 18px; border-radius: 2px; background: var(--accent); }
.section-viewall { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: var(--accent); white-space: nowrap; }
.section-viewall:hover { text-decoration: underline; }

.tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--ink-500); }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-400); }
.section-dark .meta-row, .section-dark .meta-row .dot { color: var(--ink-400); background: none; }

/* ---- Hero ---- */
.hero-section { padding-top: 32px; padding-bottom: 6px; background: var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 30px; }
.hero-lead-body { padding-top: 16px; }
.hero-lead-title { font-size: clamp(23px,3vw,34px); font-weight: 800; line-height: 1.18; color: var(--ink-900); margin: 10px 0; }
.hero-lead-title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.hero-lead-dek { font-size: 15px; color: var(--ink-600); line-height: 1.6; margin-bottom: 12px; max-width: 62ch; }

.hero-side-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 14px; }
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.popular-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--ink-200); }
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-item .media-frame { aspect-ratio: 1/1; }
.popular-item .play-btn { width: 30px; height: 30px; }
.popular-item .play-btn svg { width: 11px; height: 11px; }
.popular-item h4 { font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--ink-900); margin-bottom: 5px; }
.popular-item h4 a:hover { text-decoration: underline; }

/* ---- Channels ---- */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 18px; }
.channel-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.channel-card .ph, .channel-card img { position: absolute; inset: 0; height: 100%; border-radius: var(--radius); }
.channel-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(9,14,16,.9), rgba(9,14,16,.05) 60%); }
.channel-card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 15px; z-index: 1; }
.channel-card-body h3 { color: #fff; font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.channel-card-body span { color: rgba(255,255,255,.72); font-size: 11.5px; font-weight: 600; }

/* ---- Main grid: feed + sidebar ---- */
.main-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 24px; }
.feed-grid-4 { grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); }
.feed-card { display: flex; flex-direction: column; }
.feed-card-body { padding-top: 12px; }
.feed-card-body h3 { font-weight: 700; font-size: 16px; line-height: 1.32; color: var(--ink-900); margin: 8px 0 6px; }
.feed-card-body h3 a:hover { text-decoration: underline; }

/* ---- Sidebar widgets ---- */
.widget { background: var(--paper-raised); border: 1px solid var(--ink-200); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.widget h3 { font-size: 14.5px; font-weight: 800; color: var(--ink-900); margin-bottom: 15px; }
.popular-list { display: flex; flex-direction: column; }
.newsletter-widget { background: var(--dark-900); border-color: var(--dark-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: 13px; }
.newsletter-widget.alt { background: var(--paper-raised); border-color: var(--ink-200); color: var(--ink-800); }
.newsletter-widget.alt h3 { color: var(--ink-900); }
.newsletter-widget.alt p { color: var(--ink-600); }
.newsletter-widget.alt .newsletter-form input { background: var(--paper); border-color: var(--ink-300); color: var(--ink-800); }
.newsletter-widget.alt .newsletter-form input::placeholder { color: var(--ink-500); }
.newsletter-form { display: flex; flex-direction: column; gap: 9px; }
.newsletter-form input { padding: 10px 13px; border-radius: 6px; border: 1px solid var(--dark-700); background: var(--dark-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: 6px; font-weight: 700; font-size: 13px; cursor: pointer; border: none; }
.newsletter-form button:hover:not(:disabled) { filter: brightness(1.1); }
.newsletter-fine { font-size: 11px; color: var(--ink-400); margin-top: 9px; }
.follow-widget .social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.follow-widget .icon-dot { background: var(--ink-100); color: var(--ink-700); }
.follow-widget .icon-dot:hover { background: var(--accent); color: #fff; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { background: var(--paper); border: 1px solid var(--ink-200); border-radius: 6px; padding: 6px 13px; font-size: 12.5px; font-weight: 700; color: var(--ink-700); }
.tag-cloud a:hover { background: var(--dark-900); color: #fff; border-color: var(--dark-900); }

/* ---- Category / tag / search listing pages ---- */
.category-title { font-size: 27px; font-weight: 800; color: var(--ink-900); margin: 0 0 20px; }
.search-form { display: flex; gap: 10px; margin: 0 0 26px; max-width: 520px; }
.search-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--ink-200); border-radius: 6px; font-size: 15px; font-family: inherit; }
.search-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-form button { background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 0 22px; font-weight: 700; cursor: pointer; }
.pagination { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--ink-200); font-weight: 700; font-size: 13.5px; }
.pagination a { color: var(--accent); }
.empty-state { text-align: center; padding: 80px 20px; color: var(--ink-500); }
.empty-state h1 { color: var(--ink-900); font-size: 25px; margin-bottom: 8px; }
.btn { display: inline-block; margin-top: 14px; background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 6px; font-weight: 700; font-size: 13.5px; }

/* ---- Single post ---- */
.single-post { max-width: 720px; margin: 0 auto; }
.breadcrumb { font-size: 12px; color: var(--ink-500); margin-bottom: 14px; }
.breadcrumb a { font-weight: 700; color: var(--ink-800); }
.single-post-header h1 { font-size: clamp(25px,4vw,36px); line-height: 1.22; margin: 10px 0 14px; color: var(--ink-900); font-weight: 800; }
.single-post-headline-frame { margin: 22px 0 28px; }
.single-post-headline-frame .play-btn { width: 62px; height: 62px; }
.single-post-headline-frame .play-btn svg { width: 22px; height: 22px; }
.single-post-content { font-size: 17px; }
.single-post-content p { margin: 0 0 22px; }
.single-post-content h2 { font-size: 22px; margin: 32px 0 14px; font-weight: 800; }
.single-post-content h3 { font-size: 18.5px; margin: 24px 0 12px; font-weight: 700; }
.single-post-content img { margin: 24px 0; width: 100%; border-radius: var(--radius); }
.single-post-content a { color: var(--accent); text-decoration: underline; }
.single-post-content blockquote { border-left: 3px solid var(--accent); margin: 26px 0; padding-left: 20px; font-style: italic; color: var(--ink-600); }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--ink-200); }
.tag-pill-link { background: var(--ink-100); color: var(--ink-700); font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 6px; }
.tag-pill-link:hover { background: var(--accent); color: #fff; }

.related-posts { max-width: 720px; margin: 56px auto 0; border-top: 1px solid var(--ink-200); padding-top: 28px; }
.related-posts h2 { font-size: 18px; margin-bottom: 18px; font-weight: 800; }

/* ---- Layout wrapper for inner pages ---- */
.page-layout { max-width: 1240px; margin: 0 auto; padding: 34px 20px 60px; }

/* ---- Footer ---- */
.site-footer { background: var(--dark-900); color: var(--ink-400); padding: 44px 0 0; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--dark-700); }
.footer-grid h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.footer-grid p { font-size: 13px; color: var(--ink-500); line-height: 1.6; }
.footer-grid ul { display: flex; flex-direction: column; gap: 9px; }
.footer-grid li a:hover { color: #fff; }
.footer-logo { font-weight: 800; font-size: 20px; color: #fff; margin-bottom: 10px; }
.footer-social { display: flex; gap: 8px; margin-top: 14px; }
.footer-recent-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; margin-bottom: 12px; align-items: center; }
.footer-recent-item h5 { font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--ink-300); }
.footer-recent-item h5 a:hover { color: #fff; }
.footer-bottom { padding: 18px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; 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-grid { grid-template-columns: 1fr; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .feed-grid, .feed-grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .popular-item { grid-template-columns: 66px 1fr; }
  .masthead-actions { margin-left: 0; }
}
@media (max-width: 460px) {
  .feed-grid, .feed-grid-4 { grid-template-columns: 1fr; }
}
