/* BoldlyBalance Tech — Premium Editorial Styles */
:root {
  --primary: #0a0a0a;
  --secondary: #c8102e;
  --accent: #f59e0b;
  --bg: #fafaf8;
  --text: #1e293b;
  --muted: #475569;
  --card: #ffffff;
  --border: rgba(148,163,184,0.15);
  --border-strong: rgba(148,163,184,0.25);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 8px;
}
/* =====================
   DARK MODE
   ===================== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #f1f5f9;
    --bg: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --card: #1e293b;
    --border: rgba(148,163,184,0.1);
    --border-strong: rgba(148,163,184,0.18);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
  }
  .header { background: rgba(15,23,42,0.9); }
  .header.scrolled { background: rgba(30,41,59,0.95); }
  .footer { background: #020617; }
  .hero::before { background-image: radial-gradient(circle, rgba(200,16,46,0.07) 1px, transparent 1px); }
  .nav { background: var(--card); border-color: var(--border-strong); }
  .search-box input { background: var(--card); }
  .post-content code { background: rgba(255,255,255,0.06); }
  .affiliate-strip { background: rgba(200,16,46,0.08); }
  .affiliate-visual img { filter: brightness(0) invert(1); opacity: 0.5; }
  .affiliate-visual a:hover img { opacity: 0.85; }
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================
   HEADER
   ===================== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,250,252,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1.125rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: all 0.3s ease;
}
.header.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-md);
  padding: 0.875rem 2rem;
}
.header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700; font-size: 1.6rem; letter-spacing: -0.5px;
}
.header h1 a { text-decoration: none; color: var(--primary); }
.header h1 span { color: var(--secondary); }
.nav { display: flex; gap: 0.25rem; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 500;
  font-size: 0.875rem; padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm); transition: all 0.2s ease;
}
.nav a:hover { color: var(--primary); background: rgba(200,16,46,0.06); }
.nav a.active { color: var(--secondary); background: rgba(200,16,46,0.08); }

/* =====================
   LAYOUT
   ===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container--narrow { max-width: 760px; }

/* =====================
   HERO
   ===================== */
.hero {
  position: relative;
  padding: 5rem 2rem 4rem;
  overflow: hidden;
}
/* Subtle dot grid */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(200,16,46,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero__label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--secondary); margin-bottom: 1.25rem;
}
.hero__label::before {
  content: ''; width: 24px; height: 2px; background: var(--secondary);
  border-radius: 2px;
}
.hero h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 800; font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05; letter-spacing: -2px;
  color: var(--primary); margin-bottom: 1.25rem;
  max-width: 800px;
}
.hero p {
  font-size: 1.15rem; color: var(--muted); max-width: 600px;
  line-height: 1.75; font-weight: 400;
}
.hero--category {
  padding: 3.5rem 2rem 2.5rem;
}
.hero--category h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 800; font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -1.5px; color: var(--primary); margin-bottom: 0.75rem;
}
.hero--category p {
  font-size: 1.05rem; color: var(--muted); max-width: 560px;
}
.hero__count {
  margin-top: 1.5rem;
  font-size: 0.8rem; color: var(--muted);
  padding: 0.375rem 0.875rem;
  background: rgba(200,16,46,0.08);
  border-radius: 999px;
  display: inline-block;
}

/* =====================
   SECTION HEADERS
   ===================== */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--primary); letter-spacing: -0.5px;
}
.section-link {
  font-size: 0.8rem; font-weight: 600; color: var(--secondary);
  text-decoration: none; letter-spacing: 0.05em;
  display: inline-flex; align-items: center; gap: 0.375rem;
}
.section-link:hover { gap: 0.625rem; }

/* =====================
   GRID & CARDS
   ===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 3px double var(--mag-rule);
}
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.grid--featured { grid-template-columns: repeat(3, 1fr); }
.grid--featured .card:first-child { grid-column: 1 / -1; }
.grid--featured .card:first-child h3 { font-size: 1.5rem; }

/* Card — magazine flat style */
.card {
  background: transparent;
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--mag-rule);
  border-bottom: 1px solid var(--mag-rule);
  position: relative;
  transition: background 0.15s;
  display: flex; flex-direction: column;
}
.card:nth-child(3n) { border-right: none; }
@media (max-width: 900px) { .card { border-right: none; } }
.card:hover { background: rgba(212,208,200,0.15); }
.card__inner { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card__image { display: none; }
.card .tag {
  background: none; color: var(--mag-red);
  padding: 0; border-radius: 0;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  display: block; margin-bottom: 0.5rem;
}
.card h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400; font-size: 1.1rem; line-height: 1.3;
  margin-bottom: 0.5rem; color: var(--mag-ink);
}
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--mag-red); }
.card__excerpt {
  color: var(--mag-muted); font-size: 0.85rem; line-height: 1.6;
  flex: 1; margin-bottom: 0.875rem;
}
.card__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 0.625rem;
  border-top: 1px solid var(--mag-rule);
}
.card__read-time {
  font-size: 0.65rem; color: var(--mag-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.card-link {
  font-size: 0.65rem; font-weight: 700; color: var(--mag-ink);
  text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.375rem;
}
.card-link:hover { color: var(--mag-red); }

/* Tag — post headers, hero sections */
.tag {
  background: rgba(200,16,46,0.08); color: var(--mag-red);
  padding: 0.25rem 0.625rem; border-radius: 2px;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-block;
}

/* Magazine category post grid */
.mag-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 3px double var(--mag-rule);
}
@media (max-width: 900px) { .mag-post-grid { grid-template-columns: 1fr; } }
.mag-post-grid .col-article {
  border-bottom: 1px solid var(--mag-rule);
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-right: 1px solid var(--mag-rule);
}
.mag-post-grid .col-article:nth-child(3n) { border-right: none; padding-left: 1.25rem; padding-right: 0; }
.mag-post-grid .col-article:nth-child(3n-1) { padding: 1.5rem 1.25rem; }
@media (max-width: 900px) {
  .mag-post-grid .col-article { border-right: none; padding: 1.25rem 0; }
  .mag-post-grid .col-article:nth-child(3n),
  .mag-post-grid .col-article:nth-child(3n-1) { padding: 1.25rem 0; }
}

/* =====================
   ARTICLE / POST PAGE
   ===================== */
.post-page {
  max-width: 720px; margin: 0 auto; padding: 3rem 2rem 5rem;
}
.post-header { margin-bottom: 3rem; }
.post-header .tag { margin-bottom: 1.25rem; }
.post-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -1.5px; color: var(--primary);
  margin-bottom: 1.25rem;
}
.post-header__meta {
  display: flex; align-items: center; gap: 1.5rem;
  color: var(--muted); font-size: 0.875rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.post-header__meta svg {
  width: 14px; height: 14px; opacity: 0.6;
}
.post-header__meta span { display: inline-flex; align-items: center; gap: 0.375rem; }
.post-header__meta a { color: var(--secondary); text-decoration: none; }
.post-header__meta a:hover { text-decoration: underline; }

/* Article body */
.post-content {
  margin: 2.5rem 0;
}
.post-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
}
.post-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.625rem; font-weight: 700;
  color: var(--primary); letter-spacing: -0.5px;
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.post-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 600;
  color: var(--primary); letter-spacing: -0.25px;
  margin: 2rem 0 0.75rem;
}
.post-content .lead {
  font-size: 1.25rem; line-height: 1.7;
  color: var(--muted); margin-bottom: 2.5rem;
  font-weight: 400; padding-left: 1.25rem;
  border-left: 3px solid var(--mag-red);
}
.post-content a { color: var(--secondary); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { opacity: 0.8; }

/* Pull quote */
.post-content blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  background: rgba(200,16,46,0.04);
  border-left: 4px solid var(--mag-red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content blockquote p {
  font-size: 1.125rem !important;
  font-style: italic;
  color: var(--primary) !important;
  margin-bottom: 0 !important;
  line-height: 1.65 !important;
}

/* Article footer */
.post-footer {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.post-footer .tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.back-link {
  color: var(--mag-ink); font-weight: 600;
  font-size: 0.875rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.375rem;
}
.back-link:hover { color: var(--mag-red); gap: 0.625rem; }

/* Post article container */
.post { max-width: 760px; margin: 0 auto; }
.post-meta { color: var(--muted); font-size: 0.9rem; }

/* Table styles inside posts */
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.post-content th { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border-strong); font-weight: 600; }
.post-content td { padding: 0.5rem; border-bottom: 1px solid var(--border); }
.post-content tr:last-child td { border-bottom: none; }
.post-content code { background: rgba(10,10,10,0.06); padding: 0.125rem 0.375rem; border-radius: 2px; font-size: 0.9em; }

/* Share buttons */
.share-buttons {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 1.5rem 0; padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.share-label { font-size: 0.875rem; font-weight: 600; color: var(--muted); margin-right: 0.5rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 0;
  background: rgba(10,10,10,0.06); color: var(--mag-ink);
  text-decoration: none; transition: all 0.2s ease;
}
.share-btn:hover {
  background: var(--mag-ink); color: #fff;
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(10,10,10,0.15);
}

/* Related posts */
.related-posts {
  margin-top: 4rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.related-posts h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; font-weight: 700;
  color: var(--primary); margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.related-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
  width: fit-content;
}
.related-card h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0.5rem 0;
  flex-grow: 1;
  color: var(--text);
}
.related-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: var(--primary); color: rgba(255,255,255,0.6);
  padding: 4rem 2rem 3rem; margin-top: 6rem;
}
.footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer__brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700;
  color: white; margin-bottom: 0.75rem;
}
.footer__brand h3 span { color: var(--secondary); }
.footer__brand p { font-size: 0.875rem; line-height: 1.7; max-width: 280px; }
.footer__col h4 {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 0.625rem; }
.footer__col a {
  color: rgba(255,255,255,0.6); text-decoration: none;
  font-size: 0.875rem; transition: color 0.2s;
}
.footer__col a:hover { color: var(--secondary); }
.footer__bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: 2rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem;
}
.footer__social { display: flex; gap: 1.5rem; }
.footer__social a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer__social a:hover { color: var(--secondary); }

/* =====================
   SEARCH
   ===================== */
.search-hero { padding: 4rem 2rem 2rem; text-align: center; }
.search-hero h1 { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.search-hero p { color: var(--muted); margin-bottom: 2rem; }
.search-box {
  display: flex; gap: 0.75rem; max-width: 560px; margin: 0 auto;
}
.search-box input {
  flex: 1; padding: 0.875rem 1.25rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); font-size: 1rem;
  font-family: inherit; outline: none;
  background: var(--card); color: var(--text);
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--secondary); }
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  padding: 0.875rem 1.5rem;
  background: var(--secondary); color: white;
  border: none; border-radius: var(--radius);
  font-weight: 600; font-family: inherit;
  cursor: pointer; transition: opacity 0.2s;
  white-space: nowrap;
}
.search-box button:hover { opacity: 0.85; }
.search-results { padding: 2rem 0; border-top: 3px double var(--mag-rule); }
.search-result {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--mag-rule);
}
.search-result .col-cat { display: block; margin-bottom: 0.25rem; }
.search-result h3 {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: 1.15rem; color: var(--mag-ink); margin-bottom: 0.375rem;
}
.search-result h3 a { color: inherit; text-decoration: none; }
.search-result h3 a:hover { color: var(--mag-red); }
.search-result p { font-size: 0.85rem; color: var(--mag-muted); }

/* =====================
   CATEGORY PILL FILTER
   ===================== */
.category-filter {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.category-filter button {
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: 0.8rem; font-weight: 500;
  color: var(--muted); cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.category-filter button:hover,
.category-filter button.active {
  border-color: var(--secondary);
  color: var(--secondary);
  background: rgba(200,16,46,0.06);
}

/* =====================
   UTILITIES & POLISH
   ===================== */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* Animate section titles on scroll */
@media (prefers-reduced-motion: no-preference) {
  .section-header { opacity: 0; transform: translateY(10px); animation: fadeUp 0.5s ease forwards; }
  .grid .card:nth-child(1) { animation: fadeUp 0.5s ease 0.1s forwards; opacity: 0; }
  .grid .card:nth-child(2) { animation: fadeUp 0.5s ease 0.15s forwards; opacity: 0; }
  .grid .card:nth-child(3) { animation: fadeUp 0.5s ease 0.2s forwards; opacity: 0; }
  .grid .card:nth-child(4) { animation: fadeUp 0.5s ease 0.25s forwards; opacity: 0; }
  .grid .card:nth-child(5) { animation: fadeUp 0.5s ease 0.3s forwards; opacity: 0; }
  .grid .card:nth-child(6) { animation: fadeUp 0.5s ease 0.35s forwards; opacity: 0; }
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Reading progress bar */
#reading-progress {
  position: fixed; top: 0; left: 0; z-index: 200;
  height: 3px; width: 0;
  background: var(--secondary);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
  .grid--featured { grid-template-columns: 1fr; }
  .grid--featured .card:first-child { display: flex; flex-direction: column; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header { padding: 0.875rem 1rem; flex-wrap: wrap; }
  .header h1 { flex: 1; }
  .nav { gap: 0.125rem; }
  .nav a { font-size: 0.8rem; padding: 0.375rem 0.625rem; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  .hero h2 { letter-spacing: -1px; }
  .container { padding: 0 1.5rem; }
  .grid { grid-template-columns: 1fr; gap: 1rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .post-page { padding: 2rem 1.5rem 4rem; }
  .post-footer { flex-direction: column; align-items: flex-start; }
  .search-box { flex-direction: column; }
}

/* =====================
   MOBILE MENU
   ===================== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 36px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-menu-btn .hamburger-line {
  width: 100%;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile dropdown menu */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-top: 0.75rem;
  }

  .nav.mobile-open {
    display: flex;
  }

  .nav a {
    display: block;
    width: 100%;
    text-align: left;
  }
}

/* =====================
   MAGAZINE HOMEPAGE
   ===================== */
:root {
  --mag-ink: #0a0a0a;
  --mag-ink-light: #3d3d3d;
  --mag-muted: #757575;
  --mag-rule: #d4d0c8;
  --mag-red: #c8102e;
  --mag-bg: #fafaf8;
}

/* Masthead top bar */
.masthead-top {
  background: var(--mag-ink);
  color: rgba(255,255,255,0.5);
  padding: 0.375rem 2rem;
  font-size: 0.7rem; letter-spacing: 0.05em;
  display: flex; justify-content: space-between; align-items: center;
}
.masthead-top a { color: inherit; text-decoration: none; }
.masthead-top a:hover { color: white; }
.masthead-top span:not(:last-child) { color: rgba(255,255,255,0.25); margin: 0 0.5rem; }

/* Masthead */
.masthead {
  border-bottom: 3px solid var(--mag-ink);
  padding: 1.25rem 0;
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 2rem;
}
.masthead-left { display: flex; flex-direction: column; gap: 0.25rem; }
.masthead-issue {
  font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mag-muted);
}
.masthead-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem; line-height: 0.9; letter-spacing: -1px;
  color: var(--mag-ink); text-decoration: none;
}
.masthead-logo sup {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.05em; font-weight: 600;
  vertical-align: super; color: var(--mag-red); text-transform: uppercase;
}
.masthead-tagline {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mag-muted); border-top: 1px solid var(--mag-rule);
  padding-top: 0.375rem; margin-top: 0.25rem;
}
.masthead-nav {
  display: flex; gap: 0; border: 1px solid var(--mag-rule);
  align-self: center;
}
.masthead-nav a {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mag-ink);
  text-decoration: none; padding: 0.5rem 0.875rem;
  border-right: 1px solid var(--mag-rule); transition: all 0.15s;
}
.masthead-nav a:last-child { border-right: none; }
.masthead-nav a:hover { background: var(--mag-ink); color: white; }

/* Category strip */
.cat-strip {
  border-bottom: 1px solid var(--mag-rule);
  display: flex; gap: 0; overflow-x: auto;
}
.cat-strip a {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mag-muted);
  text-decoration: none; padding: 0.625rem 1rem;
  border-right: 1px solid var(--mag-rule); white-space: nowrap;
  transition: all 0.15s;
}
.cat-strip a:hover { color: var(--mag-ink); }
.cat-strip a.active { color: var(--mag-red); border-bottom: 2px solid var(--mag-red); }

/* Hero split */
.mag-hero {
  border-bottom: 1px solid var(--mag-rule);
  display: grid; grid-template-columns: 1fr 340px;
}
.hero-main {
  padding: 2.5rem 2rem 2.5rem 0;
  border-right: 1px solid var(--mag-rule);
}
.hero-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mag-red); margin-bottom: 0.875rem;
}
.hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05; letter-spacing: -0.5px;
  color: var(--mag-ink); margin-bottom: 1rem;
}
.hero-title em { font-style: italic; color: var(--mag-red); }
.hero-deck {
  font-size: 1.05rem; color: var(--mag-ink-light);
  line-height: 1.7; max-width: 560px; margin-bottom: 1.25rem;
}
.hero-byline {
  font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--mag-muted); display: flex; gap: 1rem; align-items: center;
  margin-bottom: 1.25rem;
}
.hero-byline strong { color: var(--mag-ink); }
.hero-read-btn {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: white; background: var(--mag-red); text-decoration: none;
  padding: 0.625rem 1.25rem; transition: background 0.2s;
}
.hero-read-btn:hover { background: #a00d23; }

.hero-sidebar { padding: 2rem; }
.sidebar-title {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mag-muted);
  border-bottom: 2px solid var(--mag-ink); padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.sidebar-item {
  padding: 1rem 0; border-bottom: 1px solid var(--mag-rule);
  display: flex; gap: 0.875rem;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; line-height: 1; color: var(--mag-rule);
  flex-shrink: 0; width: 2rem; text-align: center;
}
.sidebar-item-title {
  font-family: 'DM Serif Display', serif;
  font-size: 0.95rem; line-height: 1.3;
  color: var(--mag-ink); text-decoration: none; display: block;
}
.sidebar-item-title:hover { color: var(--mag-red); }
.sidebar-item-meta {
  font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--mag-muted); margin-top: 0.25rem;
}

/* Three-column section */
.three-col-header {
  padding: 1.5rem 0 0.75rem;
  border-bottom: 3px double var(--mag-rule);
  display: flex; align-items: baseline; gap: 1rem;
}
.three-col-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem; letter-spacing: 0.05em; color: var(--mag-ink);
}
.three-col-header span {
  font-size: 0.65rem; color: var(--mag-muted); letter-spacing: 0.1em; text-transform: uppercase;
}
.three-col {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-bottom: 1px solid var(--mag-rule);
}
.col-article {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-right: 1px solid var(--mag-rule);
  display: flex; flex-direction: column;
}
.col-article:last-child { border-right: none; padding-right: 0; padding-left: 1.5rem; }
.col-article:nth-child(2) { padding: 1.5rem; }
.col-cat {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mag-red);
  margin-bottom: 0.5rem; display: block;
}
.col-cat--green { color: var(--mag-red); }
.col-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem; line-height: 1.25;
  color: var(--mag-ink); text-decoration: none; display: block;
  margin-bottom: 0.625rem;
}
.col-title:hover { color: var(--mag-red); }
.col-excerpt { font-size: 0.85rem; color: var(--mag-muted); line-height: 1.6; margin-bottom: 0.875rem; flex: 1; }
.col-meta {
  font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--mag-muted); border-top: 1px solid var(--mag-rule);
  padding-top: 0.625rem;
  display: flex; justify-content: space-between;
}

/* Pull-quote stripe */
.quote-stripe {
  background: var(--mag-ink);
  padding: 2rem;
  display: flex; gap: 2rem; align-items: center;
  margin: 0 -2rem;
}
.quote-mark {
  font-family: 'DM Serif Display', serif;
  font-size: 7rem; line-height: 0.6; color: var(--mag-red);
  flex-shrink: 0;
}
.quote-text {
  font-family: 'DM Serif Display', serif;
  font-size: 1.625rem; line-height: 1.3;
  color: white; font-style: italic;
}
.quote-source {
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-top: 0.875rem;
}

/* Big four-column grid */
.big-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border-bottom: 1px solid var(--mag-rule);
}
.grid-card {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-right: 1px solid var(--mag-rule);
}
.grid-card:last-child { border-right: none; padding-right: 0; padding-left: 1.5rem; }
.grid-card:nth-child(2),
.grid-card:nth-child(3) { padding: 1.5rem; }
.grid-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem; line-height: 1; color: var(--mag-rule); margin-bottom: 0.5rem;
}
.grid-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem; line-height: 1.3;
  color: var(--mag-ink); text-decoration: none; display: block;
  margin-bottom: 0.5rem;
}
.grid-title:hover { color: var(--mag-red); }
.grid-meta {
  font-size: 0.65rem; color: var(--mag-muted); letter-spacing: 0.05em; text-transform: uppercase;
}

/* Subscribe box */
.subscribe-box {
  background: var(--mag-red);
  padding: 2rem;
  display: flex; justify-content: space-between;
  align-items: center; gap: 2rem;
  margin: 2rem 0;
}
.subscribe-box h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem; letter-spacing: 0.05em; color: white;
}
.subscribe-box p { font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.subscribe-form { display: flex; gap: 0; flex-shrink: 0; }
.subscribe-form input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem; background: white;
  border: none; padding: 0.75rem 1.25rem;
  color: var(--mag-ink); outline: none; width: 240px;
}
.subscribe-form input::placeholder { color: var(--mag-muted); }
.subscribe-form button {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--mag-ink); color: white;
  border: none; padding: 0.75rem 1.5rem;
  cursor: pointer; transition: background 0.2s;
}
.subscribe-form button:hover { background: #222; }

/* Load more */
.mag-load-more {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: transparent; color: var(--mag-ink);
  border: 2px solid var(--mag-ink); padding: 0.75rem 2rem;
  cursor: pointer; transition: all 0.2s;
}
.mag-load-more:hover { background: var(--mag-ink); color: white; }
.mag-load-more:disabled { opacity: 0.4; cursor: not-allowed; }

/* Magazine footer */
.mag-footer {
  background: var(--mag-ink);
  color: rgba(255,255,255,0.6);
  margin-top: 3rem;
  border-top: 3px solid var(--mag-ink);
}
.mag-footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem; padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mag-footer .footer-brand .logo-f {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem; color: white; margin-bottom: 0.5rem;
}
.mag-footer .footer-brand p { font-size: 0.8rem; line-height: 1.7; max-width: 280px; }
.mag-footer .footer-col h4 {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem; margin-bottom: 0.875rem;
}
.mag-footer .footer-col ul { list-style: none; }
.mag-footer .footer-col li { margin-bottom: 0.5rem; }
.mag-footer .footer-col a {
  font-size: 0.8rem; color: rgba(255,255,255,0.55); text-decoration: none;
}
.mag-footer .footer-col a:hover { color: var(--mag-red); }
.mag-footer-bottom {
  padding: 1rem 2rem;
  font-size: 0.7rem; color: rgba(255,255,255,0.35); letter-spacing: 0.03em;
  display: flex; justify-content: space-between;
}

/* Affiliate strip */
.affiliate-strip {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(200,16,46,0.04);
  border-left: 3px solid var(--mag-red);
  border-radius: var(--radius-sm);
}
.affiliate-content { display: flex; flex-direction: column; gap: 0.5rem; }
.affiliate-label {
  display: inline-block;
  width: fit-content;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mag-red);
  background: rgba(200,16,46,0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
}
.affiliate-content h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--mag-ink);
  line-height: 1.1;
}
.affiliate-content p {
  font-size: 0.85rem;
  color: var(--mag-muted);
  line-height: 1.55;
  margin: 0;
}
.affiliate-cta {
  display: inline-block;
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mag-red);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.15s ease;
}
.affiliate-cta:hover { color: var(--mag-ink); }
.affiliate-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.affiliate-visual a { display: block; line-height: 0; }
.affiliate-visual img {
  height: 42px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.affiliate-visual a:hover img { opacity: 1; }

/* Magazine responsive */
@media (max-width: 900px) {
  .mag-hero { grid-template-columns: 1fr; }
  .hero-main { border-right: none; padding-right: 0; border-bottom: 1px solid var(--mag-rule); }
  .three-col, .big-grid { grid-template-columns: 1fr; }
  .col-article,
  .grid-card {
    border-right: none;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--mag-rule);
  }
  .col-article:last-child,
  .grid-card:last-child { border-bottom: none; }
  .col-article:nth-child(2),
  .grid-card:nth-child(2),
  .grid-card:nth-child(3) { padding: 1.25rem 0; }
  .quote-stripe { margin: 0; }
  .affiliate-strip { grid-template-columns: 1fr; gap: 1rem; }
  .affiliate-visual img { height: 34px; }
  .subscribe-box { flex-direction: column; align-items: flex-start; }
  .subscribe-form { width: 100%; }
  .subscribe-form input { flex: 1; width: auto; }
  .mag-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .masthead-nav { flex-wrap: wrap; }
  .masthead-top { padding: 0.375rem 1rem; font-size: 0.65rem; }
  .mag-footer-inner { grid-template-columns: 1fr; }
  .mag-footer-bottom { flex-direction: column; gap: 0.5rem; }
  .quote-stripe { flex-direction: column; gap: 1rem; }
  .quote-mark { font-size: 4rem; }

  /* Post mobile styles */
  .post { max-width: 100%; padding: 0 1rem; }
  .post-header { margin-bottom: 2rem; }
  .post-header h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
  .post-content { margin: 1.5rem 0; }
  .post-content p { font-size: 1rem; line-height: 1.7; margin-bottom: 1.25rem; }
  .post-content h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; padding-top: 1rem; }
  .post-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
  .post-content .lead { font-size: 1.1rem; padding-left: 1rem; margin-bottom: 1.75rem; }
  .post-content blockquote { padding: 1rem 1.25rem; margin: 1.5rem 0; }
  .post-footer { padding: 1.5rem 0; }

  /* Related posts mobile */
  .related-posts { margin-top: 2.5rem; padding-top: 1.5rem; }
  .related-grid { grid-template-columns: 1fr; gap: 1rem; }
  .related-card { padding: 1rem; }
  .related-card h4 { font-size: 0.9rem; }
}
