/*
Theme Name: African Folder
Theme URI: https://africanfolder.com
Author: African Folder
Author URI: https://africanfolder.com
Description: The African Folder editorial theme - culture, business, sport and the conversations that matter. Editors publish; readers comment, follow and discuss. Built to run with the African Folder Engagement plugin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary - All rights reserved
License URI: LICENSE.txt
Text Domain: africanfolder
*/

/* Copyright (c) 2026 African Folder. All rights reserved. Proprietary - see LICENSE.txt. */

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  --paper: #FBF6EC;
  --paper-2: #F5EEDE;
  --paper-3: #EDE4CE;
  --ink: #12100F;
  --ink-soft: #3A3532;
  --ink-muted: #6A6259;
  --muted: #8A817A;
  --rule: #E8DFD1;
  --rule-2: #D9CFB8;

  --terracotta: #C64C1E;
  --terracotta-2: #8B2E10;
  --gold: #C9821A;
  --forest: #2D5A3D;
  --midnight: #1E2A44;
  --clay: #7A2723;
  --link: #1E4A7A;
}

/* Category accent colors - used on badges and section icons */
.cat-politics, .badge-politics { background: #1E3A5F; }
.cat-culture, .badge-culture { background: #7A2723; }
.cat-music, .badge-music { background: #4F46E5; }
.cat-sport, .badge-sport { background: #0D9488; }
.cat-business, .badge-business { background: #334155; }
.cat-tech, .badge-tech { background: #1E4A7A; }
.cat-news, .badge-news { background: #B91C1C; }
.cat-movies, .badge-movies { background: #EA580C; }
.cat-food, .badge-food { background: var(--gold); }
.cat-football, .badge-football { background: #15803D; }
.cat-romance, .badge-romance { background: #A82256; }
.cat-jobs, .badge-jobs { background: #7A2FBD; }
.cat-fashion, .badge-fashion { background: #A21CAF; }
.cat-history, .badge-history { background: #8B5A2B; }
.cat-family, .badge-family { background: #6B8E23; }

/* ==========================================================================
   RESET + BASE
   ========================================================================== */
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.site-wrap { min-height: 100vh; }
.main-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 32px 32px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}
.main-content { min-width: 0; }
.sidebar { min-width: 0; }
.discover-page { max-width: 600px; margin: 0 auto; padding: 24px 20px 40px; }
.discover-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 100px;
  padding: 12px 18px; margin-bottom: 24px;
}
.discover-search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.discover-search input { flex: 1; border: none; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.header-top { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.header-top-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "SOFT" 80, "opsz" 32;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand em { font-style: italic; color: var(--terracotta); font-weight: 700; }
/* Logo image. The picture is never stretched, cropped or squashed: width and height are both "auto" and each is only
   capped, so the browser keeps the file's own proportions at every size. The header logo takes all the room left of
   the search bar (or, where the search bar is hidden, left of the bell and Log in link) up to a maximum height; the
   two heights come from Appearance → Customize → Site Identity and reach this file as variables set in <head>. */
.custom-logo-link { display: block; max-width: 100%; line-height: 0; }
.custom-logo-link img { display: block; width: auto; height: auto; max-width: 100%; object-fit: contain; }
.brand-logo { min-width: 0; display: flex; align-items: center; }
.brand-logo--header { flex: 1 1 0; }
.brand-logo--header .custom-logo-link img { max-height: var(--eng-logo-h-desktop, 56px); }
.brand-logo--footer .custom-logo-link img { max-height: 44px; }
.brand-logo--header + .header-search { flex: 0 1 420px; min-width: 200px; }
.header-actions { flex-shrink: 0; }

/* Ad placements. An AdSense unit's wrapper takes up no space at all
   until AdSense reports the unit as filled (data-ad-status): label,
   margins and padding all appear only then, so an unfilled unit, a
   slow load, or a visitor running an ad blocker sees no gap and no
   orphaned "Advertisement" label. Other networks and hand-made banners
   report nothing, so they're marked --static and treated as always
   live. The wrapper itself must stay displayed (never display:none up
   front) - responsive units measure their container when they load
   and error out if it has no width.
   "Live" below = filled AdSense unit OR a static banner. */
.eng-ad { text-align: center; clear: both; }
.eng-ad ins { text-decoration: none; }
.eng-ad ins.adsbygoogle { display: block; }
.eng-ad img, .eng-ad iframe { max-width: 100%; }
/* the theme resets img to display:block globally, which text-align can't centre - centre blocks by margin instead */
.eng-ad img, .eng-ad iframe { margin-left: auto; margin-right: auto; }
.eng-ad iframe { display: block; }
.eng-ad-label { display: none; }
.eng-ad:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) { margin-top: 24px; margin-bottom: 24px; }
.eng-ad:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) .eng-ad-label {
  display: block; margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.eng-ad:has(ins[data-ad-status="unfilled"]) { display: none; }

/* In lists: sit like a feed row */
.eng-ad--home-feed:is(.eng-ad--static, :has(ins[data-ad-status="filled"])),
.eng-ad--archive-feed:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) {
  margin: 0; padding: 18px 16px; border-bottom: 1px solid var(--rule);
}
.eng-ad--home-top:is(.eng-ad--static, :has(ins[data-ad-status="filled"])),
.eng-ad--archive-top:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) { margin-top: 0; margin-bottom: 20px; }

/* Full-width strips under the nav / above the footer, kept inside the same width as the page */
.eng-ad--header-banner, .eng-ad--footer-banner {
  max-width: 1400px; margin-left: auto; margin-right: auto;
  padding-left: 32px; padding-right: 32px; box-sizing: border-box;
}
.eng-ad--header-banner:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) { margin-top: 16px; margin-bottom: 0; }
.eng-ad--footer-banner:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) { margin-top: 32px; margin-bottom: 0; }
@media (max-width: 600px) {
  .eng-ad--header-banner, .eng-ad--footer-banner { padding-left: 16px; padding-right: 16px; }
}

.sidebar .eng-ad:is(.eng-ad--static, :has(ins[data-ad-status="filled"])) { margin: 0 0 16px; }

.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 16px; height: 16px; }
.footer-social a:hover { background: var(--terracotta); color: #fff; }

.sb-see-more {
  display: block; width: 100%; margin-top: 8px;
  background: none; border: 1px solid var(--rule); border-radius: 8px;
  padding: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.sb-see-more:hover { background: var(--paper-2); }
.brand-mark {
  width: 30px; height: 30px;
  background: var(--terracotta);
  color: var(--paper);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700;
  font-family: 'Fraunces', serif; font-style: italic;
}
.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: 100px;
  font-family: inherit; font-size: 18px; color: var(--ink);
  outline: none;
  transition: all 0.15s;
}
.header-search input:focus { border-color: var(--terracotta); background: var(--paper); }
.header-search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--muted);
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-btn {
  background: transparent;
  border: 1px solid var(--rule);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 17px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: all 0.15s;
}
.header-btn:hover { border-color: var(--ink); }
.header-bell {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.header-bell svg { width: 18px; height: 18px; }
.header-bell[data-soon]::after {
  content: 'soon';
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--paper); padding: 0 4px;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
  color: var(--paper);
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 19px; font-style: italic;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.login-link {
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 100px;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Category nav */
.category-nav { padding: 12px 0; overflow-x: auto; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.nav-link {
  padding: 8px 14px; border-radius: 100px;
  font-size: 17px; color: var(--ink-soft); font-weight: 500;
  transition: all 0.15s;
}
.nav-link:hover { background: var(--paper-2); }
.nav-link.active { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   STORIES STRIP (editors only — see functions.php for why)
   ========================================================================== */
.stories-strip {
  margin: 8px 0 8px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.stories-strip::after {
  content: '';
  position: absolute; top: 10px; right: 0; bottom: 10px; width: 48px;
  background: linear-gradient(to right, transparent, var(--paper));
  pointer-events: none;
}
.stories-scroll {
  display: flex; gap: 16px;
  overflow-x: auto; scrollbar-width: none;
  padding: 2px 4px;
}
.stories-scroll::-webkit-scrollbar { display: none; }
.story-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex-shrink: 0; width: 64px; text-align: center;
}
.story-ring {
  position: relative;
  width: 68px; height: 68px; border-radius: 50%;
  padding: 3px; margin: 0 auto 8px;
  background: conic-gradient(from 180deg, var(--terracotta), var(--gold), var(--terracotta-2), var(--terracotta));
}
.story-ring-inner {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--paper); padding: 2px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.story-ring-inner img, .story-ring-inner .avatar-fallback { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* Avatar color variety - cycled by user ID so different people get
   different colors, matching the reference design's a1-a9 palette */
.avatar-fallback.a1 { background: linear-gradient(135deg, var(--gold), var(--terracotta)); }
.avatar-fallback.a2 { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.avatar-fallback.a3 { background: linear-gradient(135deg, #A855F7, #6B21A8); }
.avatar-fallback.a4 { background: linear-gradient(135deg, var(--forest), #0B3821); }
.avatar-fallback.a5 { background: linear-gradient(135deg, var(--clay), #4A1310); }
.avatar-fallback.a6 { background: linear-gradient(135deg, #EA580C, #9A3412); }
.avatar-fallback.a7 { background: linear-gradient(135deg, #C7A063, #7A4919); }
.avatar-fallback.a8 { background: linear-gradient(135deg, #0891B2, #164E63); }
.avatar-fallback.a9 { background: linear-gradient(135deg, #DB2777, #831843); }
.story-count-badge {
  position: absolute; bottom: -2px; right: -2px;
  background: var(--terracotta); color: var(--paper);
  border: 2px solid var(--paper); border-radius: 100px;
  font-size: 12px; font-family: 'JetBrains Mono', monospace; font-weight: 700;
  padding: 1px 5px; min-width: 20px; line-height: 1.3;
}
.story-name {
  font-size: 15px; color: var(--ink-soft); font-weight: 500;
  max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Stories strip: the rings load separately (assets/js/stories.js) ------------ */
.stories-scroll { cursor: grab; }
.stories-scroll.is-dragging { cursor: grabbing; user-select: none; }
.story-item { color: inherit; text-decoration: none; }
/* A ring the signed-in reader has WATCHED turns grey. Every other ring - including old ones, and every ring for a signed-out visitor - stays colourful. */
.story-item.is-seen .story-ring { background: var(--rule-2); }
.story-item.is-seen .story-count-badge { background: var(--ink-muted); }
.story-item.is-seen .story-name { color: var(--ink-muted); }
/* Placeholders that hold the strip's exact space until the rings arrive, so nothing jumps */
.story-item--skeleton .story-ring { background: var(--paper-2); animation: storySkel 1.4s ease-in-out infinite; }
.story-item--skeleton .story-ring-inner { background: var(--paper-2); }
.story-skel-name { width: 44px; color: transparent; background: var(--paper-2); border-radius: 6px; animation: storySkel 1.4s ease-in-out infinite; }
@keyframes storySkel { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .story-item--skeleton .story-ring, .story-skel-name { animation: none; } }
/* Scroll arrows: only where there's a mouse (phones just swipe) and only when there is more to scroll to */
.stories-arrow {
  display: none; position: absolute; top: 50%; z-index: 3; width: 36px; height: 36px; margin-top: -26px; padding: 0;
  border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  box-shadow: 0 2px 10px rgba(20, 17, 15, 0.14); align-items: center; justify-content: center; cursor: pointer;
}
.stories-arrow svg { width: 18px; height: 18px; }
.stories-arrow.prev { left: 6px; }
.stories-arrow.next { right: 6px; }
@media (hover: hover) and (pointer: fine) {
  .stories-strip.can-prev .stories-arrow.prev, .stories-strip.can-next .stories-arrow.next { display: flex; }
}
/* A Blip's story plays its video: the video fills the screen like a picture, the progress bar follows it, and one speaker button controls sound */
.story-stage video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.story-progress-bar.is-video.active::after { animation: none; }
.story-progress-bar.is-video.active.go::after { animation: storyProgress var(--dur, 12s) linear forwards; }
.story-sound {
  flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.story-sound svg { width: 20px; height: 20px; }
.story-sound-hint {
  position: absolute; z-index: 3; top: 104px; right: 16px; padding: 4px 10px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 13px; pointer-events: none; animation: storyHint 4.5s ease forwards;
}
@keyframes storyHint { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.story-stage.is-buffering::before {
  content: ''; position: absolute; z-index: 2; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: blipSpin 0.8s linear infinite; pointer-events: none;
}
@media (max-width: 600px) {
  .story-sound { margin-right: 52px; }   /* clear of the viewer's close button */
  .story-sound-hint { right: 68px; top: 96px; }
}
/* The viewer while a person's story is on its way */
.story-stage--loading { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--midnight), #0B1428); cursor: default; }
.story-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: blipSpin 0.8s linear infinite; }

/* ==========================================================================
   STORY VIEWER OVERLAY
   ========================================================================== */
.story-viewer {
  position: fixed; inset: 0;
  background: rgba(10, 8, 6, 0.97);
  backdrop-filter: blur(20px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.story-viewer.open { display: flex; }
.story-viewer-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; color: white;
  font-size: 28px; cursor: pointer; z-index: 10;
}
.story-viewer-content {
  width: 100%; max-width: 430px;
  height: min(780px, calc(100vh - 32px));
  background: var(--ink); border-radius: 10px; overflow: hidden;
  position: relative;
}
.story-stage { position: relative; height: 100%; cursor: pointer; overflow: hidden; }
.story-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-stage::after {
  content: ''; position: absolute; inset: 40% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.9));
  pointer-events: none;
}
.story-progress {
  position: absolute; inset: 0 0 auto; z-index: 4;
  display: flex; gap: 4px; padding: 10px 12px 0;
}
.story-progress-bar {
  flex: 1; height: 3px; background: rgba(255,255,255,0.3);
  border-radius: 100px; overflow: hidden;
}
.story-progress-bar.done { background: var(--paper); }
.story-progress-bar.active::after {
  content: ''; display: block; height: 100%; width: 0;
  background: var(--paper); animation: storyProgress 7s linear forwards;
}
@keyframes storyProgress { from { width: 0; } to { width: 100%; } }
.story-viewer-header {
  position: absolute; inset: 18px 0 auto; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  color: var(--paper); padding: 14px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.58), transparent);
}
.story-viewer-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.story-viewer-user { flex: 1; min-width: 0; }
.story-viewer-name { font-size: 17px; font-weight: 600; color: var(--paper); text-decoration: none; }
.story-viewer-name:hover { text-decoration: underline; }
.story-viewer-meta { font-size: 15px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.story-copy { position: absolute; z-index: 2; left: 24px; right: 24px; bottom: 24px; color: var(--paper); }
.story-kicker {
  font: 700 10px 'JetBrains Mono', monospace; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 10px;
}
.story-headline { font: 600 31px/1.12 'Fraunces', serif; margin-bottom: 10px; }
.story-excerpt { font: 400 18px/1.5 'Source Serif 4', serif; color: rgba(255,255,255,0.84); margin-bottom: 16px; }
.story-actions-row { display: flex; align-items: center; gap: 10px; }
.story-read-more {
  border: 1px solid rgba(255,255,255,0.65); background: rgba(0,0,0,0.22);
  color: var(--paper); border-radius: 100px; padding: 9px 16px;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.story-like-btn {
  border: 1px solid rgba(255,255,255,0.65); background: rgba(0,0,0,0.22);
  color: var(--paper); border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.15s;
}
.story-like-btn svg { width: 17px; height: 17px; }
.story-like-btn.liked { background: var(--terracotta); border-color: var(--terracotta); }
.story-like-btn.liked svg { fill: currentColor; }
.story-nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; color: white;
  cursor: pointer; display: none; align-items: center; justify-content: center;
}
.story-nav-arrow svg { width: 20px; height: 20px; }
.story-nav-arrow.prev { left: 20px; }
.story-nav-arrow.next { right: 20px; }
@media (min-width: 640px) { .story-nav-arrow { display: flex; } }
@media (max-width: 600px) {
  .story-viewer { padding: 0; }
  .story-viewer-content { border-radius: 0; height: 100vh; max-height: none; max-width: none; }
  .story-headline { font-size: 29px; }
}

/* ==========================================================================
   FEED HEADER
   ========================================================================== */
.feed-top { padding: 8px 0; }
.feed-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.feed-title-line {
  font-family: 'Fraunces', serif;
  font-size: 26px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "SOFT" 80, "opsz" 32;
  margin-top: 2px;
}
.feed-title-line em { font-style: italic; opacity: 0.7; }
.feed-tabs {
  display: flex; gap: 2px; padding: 3px;
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 100px; width: fit-content; margin: 14px 0 4px;
}
.feed-tab {
  padding: 6px 14px; border: none; background: transparent;
  border-radius: 100px; font-size: 16px; font-weight: 500;
  color: var(--ink-soft); transition: all 0.15s;
}
.feed-tab.active { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   POST / THREAD CARDS (feed + archive)
   ========================================================================== */
.thread-list {
  max-width: 680px;
  margin: 0 auto;
  border: 1px solid var(--rule);
  border-bottom: 0;
  background: var(--paper);
}
.thread-row {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 0 12px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
}
.thread-row:hover { background: var(--paper-2); }
.thread-avatar {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--midnight);
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 19px;
  text-transform: uppercase;
  overflow: hidden;
}
.thread-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-content { display: flex; flex-direction: column; min-width: 0; }
.thread-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  margin: 0 0 5px;
  font-size: 15px; color: var(--muted);
}
.thread-meta .author { color: var(--ink); font-size: 17px; font-weight: 700; }
.thread-meta .dot { color: var(--muted); }
.category-badge {
  padding: 1px 8px; border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--paper);
}
.category-badge:not([class*="cat-"]) { background: var(--muted); }
.thread-title {
  font-family: 'Fraunces', serif;
  font-size: 21px; line-height: 1.3;
  margin: 0 0 6px;
  color: var(--ink);
}
.thread-row:hover .thread-title { color: var(--terracotta); }
.thread-preview {
  font-size: 18px; line-height: 1.5; color: var(--ink-muted);
  margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.thread-image {
  width: 100%; aspect-ratio: 16/9;
  margin: 2px 0 8px;
  border: 1px solid var(--rule); border-radius: 8px;
  overflow: hidden; background: var(--paper-3);
}
.thread-image img { width: 100%; height: 100%; object-fit: cover; }
.thread-stats {
  display: flex; align-items: center; gap: 28px;
  min-height: 34px; font-size: 16px; color: var(--muted);
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.thread-stats::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  .thread-stats { gap: 16px; }
}
.stat-item {
  display: inline-flex; align-items: center; gap: 5px;
  transition: color 0.15s;
  /* Several of these are real <button> elements (clickable), but
     must look identical to the plain <a>/<span> ones (comment count,
     views) - no browser default border/background/padding box. */
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit;
}
a.stat-item:hover { color: var(--terracotta); }
.stat-item[data-soon] { opacity: 0.4; cursor: default; }
.stat-item.liked { color: var(--terracotta); }
.stat-item.liked svg { fill: currentColor; }
.thread-stats svg { width: 15px; height: 15px; }

.share-wrap { position: relative; }
.share-btn { background: none; border: none; cursor: pointer; font-family: inherit; color: inherit; padding: 0; }
.share-menu {
  display: none; position: fixed; z-index: 9999;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14); min-width: 160px; overflow: hidden;
}
.share-menu.open { display: block; }
.share-option {
  display: block; width: 100%; text-align: left; padding: 11px 16px;
  background: none; border: none; font-family: inherit; font-size: 15px;
  color: var(--ink); cursor: pointer; text-decoration: none;
}
.share-option:hover { background: var(--paper-2); color: var(--terracotta); }
.share-copied { color: var(--terracotta) !important; }

.single-engagement-row {
  margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.single-engagement-row .thread-stats { gap: 36px; font-size: 17px; }
.single-engagement-row .thread-stats svg { width: 18px; height: 18px; }
@media (max-width: 600px) {
  .single-engagement-row .thread-stats { gap: 12px; font-size: 15px; }
  .single-engagement-row .thread-stats svg { width: 15px; height: 15px; }
}

.must-log-in a { color: var(--terracotta); font-weight: 600; text-decoration: underline; }

/* ==========================================================================
   SINGLE POST ("THREAD") VIEW
   ========================================================================== */
.breadcrumb {
  font-size: 16px; color: var(--muted);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.breadcrumb a:hover { color: var(--terracotta); }
.breadcrumb .sep { color: var(--rule-2); }

.thread-main {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.thread-main-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.thread-main-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #C7A063, #7A4919);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 21px; font-style: italic;
  overflow: hidden;
}
.thread-main-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-main-user { flex: 1; }
.thread-main-user .meta-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  font-size: 15px; color: var(--muted);
}
.thread-main-user .meta-line .author { color: var(--ink); font-size: 17px; font-weight: 700; }
.thread-main-user .meta-line .dot { color: var(--muted); }

.thread-main-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500; line-height: 1.15; letter-spacing: -0.02em;
  margin: 12px 0 18px;
  color: var(--ink);
}
.thread-hero-image {
  width: 100%; max-height: 420px; object-fit: cover;
  margin: 0 0 20px; border-radius: 8px;
}
.thread-main-body {
  font-family: 'Source Serif 4', serif;
  font-size: 21px; line-height: 1.65; color: var(--ink);
}
.thread-main-body p { margin-bottom: 1.2em; }
.thread-main-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.thread-main-body a.related-post,
.thread-main-body a.related-post .related-post-title { color: var(--ink); text-decoration: none; }
.thread-main-body a.related-post:hover .related-post-title { color: var(--terracotta); }
.thread-main-body h2, .thread-main-body h3 { font-family: 'Fraunces', serif; margin: 1.5em 0 0.5em; }

/* Lists inside article and page text.
   The reset near the top of this file removes bullets and numbers from EVERY list - right for menus, the footer
   and comment threads, but it also stripped them from bullet and numbered lists written in a post. These rules
   give real content lists their markers and indentation back. They apply only to plain lists and the block
   editor's list block, so any list a component styles for itself is left alone. */
.thread-main-body :where(ul:not([class]), ul.wp-block-list) { list-style: disc outside; padding-left: 1.5em; margin: 0 0 1.2em; }
.thread-main-body :where(ol:not([class]), ol.wp-block-list) { list-style: decimal outside; padding-left: 1.7em; margin: 0 0 1.2em; }
.thread-main-body :where(ul:not([class]), ul.wp-block-list, ol:not([class]), ol.wp-block-list) > li { margin: 0 0 0.45em; padding-left: 0.2em; }
.thread-main-body :where(ul:not([class]), ul.wp-block-list, ol:not([class]), ol.wp-block-list) > li > :where(ul, ol) { margin: 0.45em 0 0.2em; }
.thread-main-body :where(ul:not([class]), ul.wp-block-list) :where(ul:not([class]), ul.wp-block-list) { list-style: circle outside; }
.thread-main-body :where(ul:not([class]), ul.wp-block-list) :where(ul:not([class]), ul.wp-block-list) :where(ul:not([class]), ul.wp-block-list) { list-style: square outside; }
.thread-main-body :where(ol:not([class]), ol.wp-block-list) :where(ol:not([class]), ol.wp-block-list) { list-style: lower-alpha outside; }
.thread-main-body :where(ol:not([class]), ol.wp-block-list) :where(ol:not([class]), ol.wp-block-list) :where(ol:not([class]), ol.wp-block-list) { list-style: lower-roman outside; }

/* Tables, embeds and anything wide inside article and page text
   ------------------------------------------------------------------
   The theme had no table styling, and nothing kept wide content inside the text column - so a wide table or an
   Instagram embed could push a phone page wider than the screen (the last part of every line then got cut off). */

/* A positioned column: an embed that positions itself (Instagram's does) now sizes itself to THIS column and
   not to the whole page. Long unbreakable words, email addresses and web addresses are allowed to wrap, so they can't push the column wider
   than the screen ("anywhere" also removes them from the column's minimum-width calculation, which "break-word" doesn't). */
.thread-main-body { position: relative; overflow-wrap: anywhere; }
.thread-main-body img, .thread-main-body video, .thread-main-body canvas, .thread-main-body iframe { max-width: 100%; }
.thread-main-body img[class*="wp-image-"], .thread-main-body .wp-block-image img { height: auto; }
.thread-main-body pre { max-width: 100%; overflow-x: auto; }
/* Instagram's embed insists on a 326px minimum, wider than a phone's text column. Let it follow the column on a
   phone, while keeping Instagram's own 540px maximum on a wide screen. */
.thread-main-body iframe.instagram-media { min-width: 0 !important; max-width: min(100%, 540px) !important; width: calc(100% - 2px) !important; }

/* Tables. Every table sits in a .table-scroll box (added by eng_wrap_content_tables in functions.php):
   a table that fits looks like a neat bordered table; one that is wider than the column scrolls sideways inside
   its own box, with a soft shadow on the edge that still has more to show. */
.thread-main-body .table-scroll {
  /* contain: inline-size = this box never asks its surroundings to be as wide as the table inside it. Without it,
     pages (whose text column is centred and sized from its content) would grow to fit a wide table. */
  contain: inline-size; overflow-wrap: normal; /* tables keep normal word behaviour: they scroll instead of breaking words mid-way */
  max-width: 100%; margin: 0 0 1.4em; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule); border-radius: 8px; background-color: var(--paper);
  background-image: linear-gradient(to right, var(--paper), var(--paper)), linear-gradient(to right, var(--paper), var(--paper)),
                    linear-gradient(to right, rgba(18, 16, 15, 0.16), rgba(18, 16, 15, 0)), linear-gradient(to left, rgba(18, 16, 15, 0.16), rgba(18, 16, 15, 0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 28px 100%, 28px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
.thread-main-body .table-scroll:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.thread-main-body figure.wp-block-table { margin: 0 0 1.4em; }
.thread-main-body figure.wp-block-table .table-scroll { margin-bottom: 0.5em; }
.thread-main-body figure.wp-block-table figcaption { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-muted); text-align: left; }
.thread-main-body table {
  width: 100%; margin: 0; border-collapse: collapse;
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; line-height: 1.45; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.thread-main-body th, .thread-main-body td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.thread-main-body td { min-width: 4em; }
/* Header labels stay on one line - that also gives each column a sensible minimum width, so a text-heavy
   table scrolls sideways on a phone instead of being squeezed into tall, narrow cells. */
.thread-main-body th { background: var(--paper-2); font-weight: 700; white-space: nowrap; border-bottom: 2px solid var(--rule-2); }
.thread-main-body tbody th { background: transparent; border-bottom: 1px solid var(--rule); }
.thread-main-body tbody tr:nth-child(even) td { background: rgba(18, 16, 15, 0.025); }
.thread-main-body tbody tr:last-child > th, .thread-main-body tbody tr:last-child > td { border-bottom: 0; }
.thread-main-body caption { caption-side: bottom; padding: 10px 14px; font-size: 14px; color: var(--ink-muted); text-align: left; }
@media (max-width: 600px) {
  .thread-main-body table { font-size: 15px; }
  .thread-main-body th, .thread-main-body td { padding: 8px 10px; }
}
.thread-main-body blockquote {
  border-left: 3px solid var(--terracotta);
  margin: 1.5em 0; padding-left: 20px;
  font-style: italic; color: var(--ink-soft);
}

/* oEmbeds (YouTube, Twitter/X, Vimeo, etc.) - centered, full content width.
   Requires add_theme_support('responsive-embeds') in functions.php, which
   is what makes WordPress wrap these in a scalable aspect-ratio container
   in the first place. */
.thread-main-body .wp-block-embed,
.thread-main-body .wp-embed-responsive,
.thread-main-body > iframe,
.thread-main-body > embed,
.thread-main-body > object {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.5em auto;
}
.thread-main-body .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
}
.thread-main-body figure.wp-block-embed { margin-left: 0; margin-right: 0; }

/* Drop caps - ignored regardless of whether an editor enables the block
   setting. Overrides WordPress core's default .has-drop-cap styling by
   resetting the first-letter treatment back to normal inline text. */
.thread-main-body .has-drop-cap:not(:focus)::first-letter {
  float: none;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
  color: inherit;
}

.related-post {
  display: block;
  margin: 28px 0;
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  transition: border-color 0.15s;
}
.related-post:hover { border-color: var(--terracotta); }
.related-post-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); padding: 16px 16px 0;
}
.related-post-header { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; }
.related-post-avatar {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
}
.related-post-who { flex: 1; min-width: 0; }
.related-post-handle { font-size: 15px; font-weight: 700; color: var(--ink); }
.related-post-cat { font-size: 13px; color: var(--muted); }
.related-post-mark {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px;
  background: var(--terracotta); color: var(--paper); overflow: hidden;
  font-family: 'Fraunces', serif; font-weight: 700; font-style: italic; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.related-post-mark img { width: 100%; height: 100%; object-fit: cover; }
.related-post-title {
  font-family: 'Fraunces', serif;
  font-size: 21px; font-weight: 500; line-height: 1.3;
  color: var(--ink); padding: 0 16px 14px;
}
.related-post:hover .related-post-title { color: var(--terracotta); }
.related-post-image { width: calc(100% - 32px); aspect-ratio: 16/9; margin: 0 16px 14px; border-radius: 8px; background: var(--paper-3); overflow: hidden; }
.related-post-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-post-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 16px; font-size: 15px; color: var(--muted);
}
.related-post-cta { color: var(--terracotta); font-weight: 600; }

/* ==========================================================================
   COMMENTS ("DISCUSSION")
   ========================================================================== */
.comments-section { max-width: 820px; }
.comments-heading {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 10px;
}
.comments-count { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: var(--muted); font-weight: 500; }

.comment-reply-form {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.comment-reply-form textarea {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Source Serif 4', serif; font-size: 19px;
  resize: vertical; min-height: 80px; outline: none;
}
.comment-reply-form textarea:focus { border-color: var(--terracotta); }
.comment-reply-form input[type="submit"] {
  padding: 8px 18px;
  background: var(--terracotta); color: var(--paper);
  border: none; border-radius: 100px;
  font-size: 17px; font-weight: 600;
  margin-top: 10px;
}

ul.comment-list, .children { list-style: none; margin: 0; padding: 0; }
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.comment-item .children { margin-left: 42px; }
.comment-header-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(135deg, #3B82F6, #1E40AF);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-name { font-size: 17px; font-weight: 600; color: var(--ink); }
.comment-date { font-size: 15px; color: var(--muted); }
.comment-body-text { font-family: 'Source Serif 4', serif; font-size: 19px; line-height: 1.55; color: var(--ink-soft); padding-left: 42px; margin-bottom: 8px; }
.comment-actions { display: flex; align-items: center; gap: 14px; padding-left: 42px; }
.comment-actions a { font-size: 16px; color: var(--muted); font-weight: 500; }
.comment-actions a:hover { color: var(--terracotta); }
.comment-upvote {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--muted);
  font-size: 16px; font-weight: 500; font-family: inherit;
  padding: 0; cursor: pointer;
}
.comment-upvote svg { width: 15px; height: 15px; }
.comment-upvote:hover { color: var(--terracotta); }
.comment-upvote[data-soon] { opacity: 0.7; }

/* User tier badges - rendered only when the engagement plugin is active */
.user-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 100px;
  font-size: 12px; font-weight: 600; vertical-align: 1px;
}
.user-tag.fan { background: rgba(45,90,61,0.10); color: var(--forest); border: 1px solid rgba(45,90,61,0.25); }
.user-tag.topfan { background: rgba(198,76,30,0.10); color: var(--terracotta-2); border: 1px solid rgba(198,76,30,0.28); }
.user-tag.superfan { background: var(--gold); color: var(--paper); }

.verified-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--link); color: var(--paper); vertical-align: -3px;
  margin-left: 6px;
}
.verified-badge svg { width: 11px; height: 11px; }
.verified-badge.lg { width: 24px; height: 24px; vertical-align: -5px; margin-left: 8px; }
.verified-badge.lg svg { width: 15px; height: 15px; }

/* ==========================================================================
   CATEGORY / TAG ARCHIVE HERO
   ========================================================================== */
.term-hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.term-hero-inner { max-width: 1400px; margin: 0 auto; padding: 0 32px; display: flex; align-items: flex-start; gap: 20px; }
.term-icon {
  width: 60px; height: 60px; border-radius: 12px; flex-shrink: 0;
  color: var(--paper); font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 26px; font-style: italic;
  display: flex; align-items: center; justify-content: center;
}
.term-info { flex: 1; min-width: 0; }
.term-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.term-title { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 8px; }
.term-description { font-family: 'Source Serif 4', serif; font-size: 18px; font-style: italic; color: var(--ink-soft); line-height: 1.5; max-width: 640px; margin-bottom: 12px; }
.term-meta { font-size: 15px; color: var(--ink-soft); }
.term-meta strong { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--ink); }
@media (max-width: 600px) {
  .term-hero-inner { flex-direction: column; }
  .term-title { font-size: 26px; }
}

/* ==========================================================================
   AUTHOR PROFILE HERO
   ========================================================================== */
.profile-hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.profile-hero-inner {
  max-width: 720px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 92px 1fr; gap: 22px; align-items: start;
}
.profile-avatar {
  width: 92px; height: 92px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--gold), var(--terracotta));
  color: var(--paper); font-family: 'Fraunces', serif; font-weight: 600;
  font-size: 38px; font-style: italic;
  display: flex; align-items: center; justify-content: center;
}
.profile-name-line { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.profile-name {
  font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--ink);
}
.profile-handle-line { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.profile-handle-line .sep { margin: 0 6px; opacity: 0.6; }
.profile-bio {
  font-family: 'Source Serif 4', serif; font-size: 17px; line-height: 1.5;
  color: var(--ink-soft); margin-bottom: 14px; max-width: 520px;
}
.profile-stats { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--ink-soft); flex-wrap: wrap; margin-bottom: 16px; }
.profile-stats .stat strong { font-family: 'Fraunces', serif; font-weight: 600; color: var(--ink); font-size: 17px; }
.profile-stats .stat-sep { color: var(--rule-2); margin: 0 10px; }
.profile-actions { display: flex; gap: 8px; }
.profile-follow {
  padding: 9px 20px; background: var(--ink); color: var(--paper); border: none;
  border-radius: 100px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.profile-follow[data-soon] { opacity: 0.75; }
.profile-edit-btn {
  display: inline-flex; align-items: center; padding: 9px 20px;
  border: 1px solid var(--terracotta); border-radius: 100px;
  background: transparent; color: var(--terracotta); font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.profile-edit-btn:hover { background: var(--terracotta); color: var(--paper); }
.profile-tabs { max-width: 720px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; border-bottom: 1px solid var(--rule); }
.must-log-in-link { color: var(--terracotta); font-weight: 600; text-decoration: underline; cursor: pointer; }

.smart-date { position: relative; cursor: default; border-bottom: 1px dotted currentColor; }
.smart-date::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 6px 12px; border-radius: 100px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  z-index: 20;
}
.smart-date:hover::after { opacity: 1; }

.review-card { margin: 32px 0; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--paper); }
.review-card-header {
  position: relative; min-height: 140px; background-size: cover; background-position: center;
  background-color: var(--ink); display: flex; align-items: flex-end;
}
.review-card-header-overlay {
  width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.1));
}
.review-card-title { color: #fff; font-family: 'Fraunces', serif; font-weight: 700; font-size: 22px; line-height: 1.2; }
.review-card-score-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.review-card-score-circle {
  width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--terracotta);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'Fraunces', serif; font-weight: 800; font-size: 20px;
  background: rgba(0,0,0,0.25);
}
.review-card-score-label { color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.review-card-body { padding: 22px 24px; }
.review-card-row { margin-bottom: 16px; }
.review-card-row-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.review-card-label { font-weight: 700; font-size: 15px; }
.review-card-rating { color: var(--muted); font-size: 14px; }
.review-card-bar-track { height: 6px; border-radius: 100px; background: var(--paper-2); overflow: hidden; }
.review-card-bar-fill { height: 100%; border-radius: 100px; background: var(--terracotta); }
.review-card-summary { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); }
.review-card-summary-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.review-card-cta {
  display: block; text-align: center; margin-top: 18px; padding: 13px 20px;
  background: var(--terracotta); color: #fff; font-weight: 700; border-radius: 8px; text-decoration: none;
}
.review-card-cta:hover { opacity: 0.9; }

/* Blips - shared rules that apply on both mobile and desktop */
.blips-feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.blips-feed::-webkit-scrollbar { display: none; }
/* scroll-snap-stop: always = a fast, long swipe can never fly past a video - every swipe lands on the very next one */
.blip-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: flex-end; background: #000; }
.blip-player { position: absolute; inset: 0; }
.blip-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.blip-player { background: #000 center / cover no-repeat; cursor: pointer; }

/* Thin progress line along the bottom of the picture */
.blip-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.22); z-index: 3; pointer-events: none; }
.blip-progress i { display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(0); transform-origin: left center; }

/* Tap to pause: a big play mark while paused */
.blip-paused { position: absolute; inset: 0; z-index: 3; display: none; align-items: center; justify-content: center; color: #fff; pointer-events: none; }
.blip-paused svg { width: 76px; height: 76px; padding: 20px; border-radius: 50%; background: rgba(0,0,0,0.42); }
.blip-slide.is-paused .blip-paused { display: flex; }

/* Buffering spinner (appears only if the video stalls for a moment) */
.blip-spinner { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; z-index: 3; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; display: none; animation: blipSpin 0.8s linear infinite; pointer-events: none; }
.blip-slide.is-loading .blip-spinner { display: block; }
@keyframes blipSpin { to { transform: rotate(360deg); } }

/* If a video can't load at all, say so instead of showing a dead black screen */
.blip-error { position: absolute; left: 24px; right: 24px; top: 42%; z-index: 3; display: none; text-align: center; color: #fff; font-size: 14px; line-height: 1.5; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.blip-slide.is-error .blip-error { display: block; }

.blip-creator { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.blip-avatar { flex-shrink: 0; }
.blip-caption { margin: 0 0 4px; font-size: 14.5px; line-height: 1.4; }

.blips-empty { padding: 80px 0; text-align: center; color: var(--muted); font-size: 14px; }

.blip-comments-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.blip-comments-overlay.open { opacity: 1; pointer-events: auto; }
.blip-comments-sheet {
  width: 100%; max-width: 480px; max-height: 70vh;
  background: var(--paper); border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.25s ease;
}
.blip-comments-overlay.open .blip-comments-sheet { transform: translateY(0); }
.bc-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.bc-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.bc-close { background: none; border: none; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0; }
.bc-body { padding: 14px 18px; overflow-y: auto; flex: 1; }
.bc-loading { font-size: 13.5px; color: var(--muted); text-align: center; padding: 20px 0; }
.bc-item { display: flex; gap: 10px; margin-bottom: 16px; }
.bc-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.bc-avatar img { width: 100%; height: 100%; }
.bc-text { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.bc-name { font-weight: 700; margin-right: 5px; }
.bc-time { color: var(--muted); font-size: 12px; margin-top: 2px; }
.bc-input-row { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--rule); flex-shrink: 0; }
.bc-input-row input { flex: 1; border: 1px solid var(--rule); border-radius: 100px; padding: 9px 14px; font-size: 13.5px; font-family: inherit; outline: none; background: #fff; }
.bc-input-row button { background: var(--terracotta); color: #fff; border: none; border-radius: 100px; padding: 0 16px; font-weight: 700; font-size: 13px; cursor: pointer; }
.bc-login-prompt { justify-content: center; }
.bc-login-prompt button { background: var(--ink); width: 100%; padding: 10px; border-radius: 8px; }

/* One sound button for the whole feed: tap once and every Blip and ad that follows plays with sound */
.blip-sound {
  position: absolute; top: 14px; right: 12px; z-index: 6;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.blip-sound svg { width: 20px; height: 20px; }
.blip-sound .icon-on { display: none; }
.blip-sound.is-on .icon-off { display: none; }
.blip-sound.is-on .icon-on { display: block; }
.blip-sound-hint {
  position: absolute; top: 20px; right: 58px; z-index: 6; padding: 7px 12px; border-radius: 100px;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  opacity: 0; transform: translateX(6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.blip-sound-hint.show { opacity: 1; transform: none; }

.blips-back-floating {
  position: fixed; top: 20px; left: 20px; z-index: 50;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.blips-back-floating svg { width: 18px; height: 18px; }

/* --- Mobile: full-screen, immersive, exactly as before --- */
body.eng-blips-page { overflow: hidden; }
body.eng-blips-page .site-header { display: none; }
body.eng-blips-page .sidebar { display: none; }
body.eng-blips-page .site-footer { display: none; }
.blips-main-wrap { padding: 0 !important; max-width: none !important; }
.blips-main-wrap .main-content { padding: 0; max-width: none; }
.blip-unit { position: fixed; inset: 0; z-index: 10; }
.blips-feed-frame { position: absolute; inset: 0; }
.blip-actions-slot, .blip-meta-slot { display: none; }

.blip-foot {
  position: relative; z-index: 2; width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
  padding: 50px 14px 18px 16px;
  pointer-events: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.blip-foot > * { pointer-events: auto; }
.blip-info { color: #fff; max-width: calc(100% - 60px); }
.blip-handle { color: #fff; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.blip-excerpt { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.8); max-height: 3.2em; overflow: hidden; }
.blip-excerpt p { margin: 0; }

/* The phone's bottom nav (72px, plus the iPhone home-indicator area) sits over the feed -
   keep every caption, the sponsor's button and the share icon clear of it. */
body.eng-blips-page .blip-foot { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }

/* Sponsored slide (Blip Ads): a short muted vertical video, labelled "Ad" beside the sponsor's name. */
.blip-sponsor-media { background: #0f2d33 center / cover no-repeat; }
.blip-sponsor-logo {
  width: 32px; height: 32px; border-radius: 50%; background: #1b4b4a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 700; font-size: 15px;
}
.blip-sponsor-label {
  font: 700 10px/1 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 4px; padding: 3px 6px; opacity: 0.85;
}
.blip-cta {
  display: inline-block; margin-top: 10px; background: #fff; color: #12100F;
  font-weight: 700; font-size: 13.5px; padding: 10px 20px; border-radius: 100px; text-decoration: none;
}
.blip-cta:hover { opacity: 0.92; }

.blip-actions .thread-stats {
  flex-direction: column; align-items: center; gap: 16px;
  color: #fff; overflow: visible;
}
.blip-actions .thread-stats .stat-item,
.blip-actions .thread-stats .share-btn { color: #fff; flex-direction: column; gap: 3px; }
.blip-actions .thread-stats svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.blip-actions .thread-stats .count,
.blip-actions .thread-stats span { font-size: 11.5px; }
.blip-actions .post-like-btn.liked svg,
.blip-actions .post-reshare-btn.liked svg,
.blip-actions .post-bookmark-btn.liked svg { fill: var(--terracotta); color: var(--terracotta); }
.blip-actions .share-menu { bottom: 0; right: 40px; }

/* --- Desktop: real site shell, video constrained to a phone-shaped column, icons/caption live outside the frame --- */
/* On a phone the 72px bottom nav sits over the feed: keep the progress line just above it */
@media (max-width: 859px) {
  body.eng-blips-page .blip-progress { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body.eng-blips-page .blip-sound { top: 20px; }
  body.eng-blips-page .blip-sound-hint { top: 26px; }
}

@media (min-width: 860px) {
  body.eng-blips-page { overflow: visible; }
  body.eng-blips-page .site-header,
  body.eng-blips-page .sidebar,
  body.eng-blips-page .site-footer { display: block; }

  .blips-back-floating { display: none; } /* the real header's own logo already does this job on desktop */

  .blips-main-wrap.main-wrap { padding: 28px 24px 60px !important; max-width: 1180px !important; margin: 0 auto; }
  .blips-main-wrap .main-content { display: flex; justify-content: center; max-width: none; padding: 0; }

  .blip-unit { position: static; display: flex; gap: 18px; align-items: flex-start; }
  .blips-feed-frame {
    position: relative; width: 360px; height: 640px; border-radius: 16px; overflow: hidden;
    background: #000; box-shadow: 0 20px 60px rgba(0,0,0,0.2); flex-shrink: 0;
  }

  /* Each slide's own foot is hidden - its contents get relocated into
     the slots below via JS instead, so there's exactly one real copy
     of each engagement row, just repositioned, never duplicated. */
  .blip-foot { display: none; }

  .blip-actions-slot {
    display: flex; flex-direction: column; gap: 20px; align-items: center; padding-top: 10px;
  }
  .blip-actions-slot .blip-actions .thread-stats {
    position: static; color: var(--ink);
  }
  .blip-actions-slot .stat-item,
  .blip-actions-slot .share-btn { color: var(--ink) !important; }
  .blip-actions-slot svg { width: 21px; height: 21px; filter: none; }
  .blip-actions-slot .stat-item,
  .blip-actions-slot .share-wrap > .share-btn {
    width: 46px; height: 46px; border-radius: 50%; background: var(--paper-2);
    border: 1px solid var(--rule);
    display: flex; align-items: center; justify-content: center;
  }
  .blip-actions-slot .post-like-btn.liked,
  .blip-actions-slot .post-reshare-btn.liked,
  .blip-actions-slot .post-bookmark-btn.liked { background: var(--terracotta); }
  .blip-actions-slot .post-like-btn.liked svg,
  .blip-actions-slot .post-reshare-btn.liked svg,
  .blip-actions-slot .post-bookmark-btn.liked svg { fill: #fff; color: #fff; }

  .blip-meta-slot { display: block; width: 360px; margin-top: 14px; }
  .blip-meta-slot .blip-info { color: var(--ink); max-width: none; }
  .blip-meta-slot .blip-handle { color: var(--ink); }
  .blip-meta-slot .blip-excerpt { color: var(--muted); max-height: none; }
  .blip-meta-slot .blip-cta { background: var(--terracotta); color: #fff; }
}

.header-bell-wrap { position: relative; }
.header-bell-wrap .header-bell { border: none; background: none; cursor: pointer; }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--terracotta); color: var(--paper);
  font-size: 10px; font-weight: 700; line-height: 1;
  min-width: 16px; height: 16px; border-radius: 100px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.notifications-dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 200;
  width: 340px; max-width: 90vw; max-height: 420px; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
}
.notifications-dropdown.open { display: block; }
.notifications-header { padding: 14px 18px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--rule); }
.notifications-loading, .notifications-empty { padding: 24px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.notification-item {
  display: flex; gap: 12px; padding: 13px 18px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--paper-2); }
.notification-item.unread { background: rgba(198,76,30,0.05); }
.notification-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.notification-body { font-size: 14px; line-height: 1.4; }
.notification-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (max-width: 600px) {
  .notifications-dropdown { position: fixed; top: auto; bottom: 64px; left: 12px; right: 12px; width: auto; }
}

.profile-tab {
  padding: 14px 4px; margin-right: 20px; background: none; border: none; border-bottom: 2px solid transparent;
  font-size: 15px; font-weight: 500; color: var(--ink-soft); cursor: pointer; text-decoration: none;
}
.profile-tab.active { color: var(--terracotta); border-bottom-color: var(--terracotta); font-weight: 700; }
.profile-tab .cnt { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); margin-left: 3px; }
.profile-tab.active .cnt { color: var(--terracotta); }
.profile-comment-item { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.profile-comment-item .on { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.profile-comment-item .on strong { color: var(--ink); font-weight: 600; }
.profile-comment-item .on a:hover strong { color: var(--terracotta); }
.profile-comment-item .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.profile-comment-item .body { font-family: 'Source Serif 4', serif; font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 600px) {
  .profile-hero-inner { grid-template-columns: 68px 1fr; gap: 14px; }
  .profile-avatar { width: 68px; height: 68px; font-size: 28px; }
  .profile-name { font-size: 22px; }
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar-block {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.sb-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.sb-item {
  padding: 8px 0; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: baseline;
}
.sb-item:last-child { border-bottom: none; padding-bottom: 0; }
.sb-item:hover .sb-item-title { color: var(--terracotta); }
.sb-rank { font-family: 'JetBrains Mono', monospace; font-size: 16px; font-weight: 700; color: var(--muted); }
.sb-item-title { font-size: 17px; color: var(--ink); line-height: 1.3; font-weight: 500; }
.sb-item-meta { font-size: 12px; color: var(--muted); }

.sections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.section-chip {
  padding: 8px 10px; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 8px;
  font-size: 16px; color: var(--ink); font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.15s;
}
.section-chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.section-chip .count { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.section-chip:hover .count { color: rgba(255,255,255,0.6); }

.sb-newsletter { background: var(--ink); color: var(--paper); padding: 24px; border-radius: 12px; text-align: center; }
.sb-newsletter .sb-title { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.1); }
.sb-newsletter h3 { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 400; margin-bottom: 8px; }
.sb-newsletter h3 em { font-style: italic; color: var(--terracotta); }
.sb-newsletter p { font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 16px; }
.sb-newsletter input {
  width: 100%; padding: 10px 14px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; color: var(--paper); font-size: 17px; outline: none;
  margin-bottom: 8px; text-align: center;
}
.sb-newsletter button {
  width: 100%; padding: 10px;
  background: var(--terracotta); color: var(--paper);
  border: none; border-radius: 100px; font-size: 17px; font-weight: 600;
}

.suggested-user { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.suggested-user:last-child { border-bottom: none; padding-bottom: 0; }
.suggested-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: block; }
.suggested-who { flex: 1; min-width: 0; }
.suggested-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.suggested-handle { font-size: 13px; color: var(--muted); }
.follow-mini {
  flex-shrink: 0; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  border-radius: 100px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.follow-mini[data-soon] { opacity: 0.7; }

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 500;
}
.mobile-bottom-nav-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 420px; margin: 0 auto;
}
.bottom-nav-item {
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; color: var(--muted);
  min-height: 52px; justify-content: center;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item .lbl { font-size: 12px; font-weight: 500; }
.bottom-nav-item.active, .bottom-nav-item[aria-current="page"] { color: var(--terracotta); }
.bottom-nav-item[data-soon] { opacity: 0.45; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 32px 30px; background: var(--paper-2); margin-top: 60px; }
.footer-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; font-size: 17px; color: var(--ink-soft); padding: 4px 0; }
.footer-col a:hover { color: var(--terracotta); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { list-style: none; display: block; margin: 0; padding: 0; }
.footer-tag { font-family: 'Source Serif 4', serif; font-style: italic; color: var(--ink-muted); font-size: 17px; max-width: 280px; }
.footer-bottom { max-width: 1400px; margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   404 / EMPTY STATES
   ========================================================================== */
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-state h1 { font-family: 'Fraunces', serif; font-size: 32px; color: var(--ink); margin-bottom: 12px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .brand-logo--header .custom-logo-link img { max-height: calc(var(--eng-logo-h-mobile, 44px) + 4px); }
  .main-wrap { grid-template-columns: 1fr; padding: 10px 20px 90px; }
  .sidebar { width: 100%; }
  .header-search { display: none; }
  .mobile-bottom-nav { display: block; }
}
@media (max-width: 600px) {
  .brand-logo--header .custom-logo-link img { max-height: var(--eng-logo-h-mobile, 44px); }
  .header-top-inner { padding: 0 16px; gap: 12px; }
  .category-nav-inner { padding: 0 16px; }
  .brand { font-size: 26px; }
  .thread-row { grid-template-columns: 40px minmax(0,1fr); padding: 14px 16px 9px; }
  .thread-main { padding: 20px 16px; }
  .thread-main-title { font-size: 26px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
}
