/* ============================================================
   PixelPrompt – Creative Design System
   Fonts: Cormorant Garamond · Plus Jakarta Sans · DM Mono
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Jost:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Variables: Light Theme ───────────────────────────────── */
:root {
  /* Core palette */
  --bg-base:     #e8e3da;
  --bg-surface:  rgba(255, 255, 255, 0.88);
  --bg-card:     rgba(255, 255, 255, 0.96);
  --text:        #0a0a0a;
  --text-dim:    #5a5a5a;
  --text-faint:  #aaaaaa;
  --border:      rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.18);

  /* Accent — monochrome */
  --accent:       #0a0a0a;
  --accent-hover: #2a2a2a;
  --accent-light: rgba(0, 0, 0, 0.06);

  /* Tags */
  --tag-bg:   rgba(0, 0, 0, 0.08);
  --tag-text: #0a0a0a;

  /* Shadows */
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.06);

  /* Typography */
  --font-display: 'Bebas Neue', 'Futura', Impact, sans-serif;
  --font-body:    'Jost', 'Futura', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  /* Patina blobs – light mode: warm ochre top-left, cool slate bottom-right */
  --pat-spotlight: radial-gradient(ellipse 55% 45% at var(--mouse-x, 35%) var(--mouse-y, 25%), rgba(200, 160, 100, 0.11) 0%, transparent 65%);
  --pat-a: radial-gradient(ellipse 68% 55% at  7% 14%, rgba(180, 125, 60, 0.14)  0%, transparent 70%);
  --pat-b: radial-gradient(ellipse 55% 65% at 94% 86%, rgba(75,  110, 175, 0.10) 0%, transparent 65%);
  --pat-c: radial-gradient(ellipse 45% 45% at 80%  6%, rgba(165,  95, 55, 0.09)  0%, transparent 60%);
  --pat-d: radial-gradient(ellipse 50% 50% at 14% 93%, rgba(100,  75, 145, 0.07) 0%, transparent 60%);
  --pat-e: radial-gradient(ellipse 88% 88% at 50% 50%, rgba(237, 232, 223, 0.96) 0%, transparent 75%);

  /* Grain */
  --grain-opacity: 0.030;

  /* Misc */
  --radius:    10px;
  --radius-lg: 16px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Variables: Dark Theme ────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:     #0d0c09;
  --bg-surface:  rgba(12, 12, 12, 0.90);
  --bg-card:     rgba(14, 14, 14, 0.96);
  --text:        #f0f0f0;
  --text-dim:    #888888;
  --text-faint:  #484848;
  --border:      rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --accent:       #f0f0f0;
  --accent-hover: #ffffff;
  --accent-light: rgba(255, 255, 255, 0.08);

  --tag-bg:   rgba(255, 255, 255, 0.10);
  --tag-text: #f0f0f0;

  --shadow:       0 1px 4px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.06);

  /* Patina blobs – dark mode: mineral depths, oxidised copper + deep teal */
  --pat-spotlight: radial-gradient(ellipse 55% 45% at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(100, 145, 210, 0.11) 0%, transparent 60%);
  --pat-a: radial-gradient(ellipse 65% 55% at  7% 14%, rgba(112, 44, 16, 0.30)  0%, transparent 65%);
  --pat-b: radial-gradient(ellipse 55% 65% at 94% 86%, rgba(16,  52, 92, 0.26)  0%, transparent 65%);
  --pat-c: radial-gradient(ellipse 45% 45% at 80%  6%, rgba(122, 82, 28, 0.20)  0%, transparent 60%);
  --pat-d: radial-gradient(ellipse 50% 50% at 14% 93%, rgba(58,  28, 85, 0.22)  0%, transparent 60%);
  --pat-e: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(13, 12, 9, 0.50)  0%, transparent 80%);

  --grain-opacity: 0.055;
}

/* ── Global Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ── Body & Patina Background System ─────────────────────── */
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  transition: color var(--transition);
}

/* Colour-blob patina layer — fixed background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg-base);
  background-image:
    var(--pat-spotlight),
    var(--pat-a),
    var(--pat-b),
    var(--pat-c),
    var(--pat-d),
    var(--pat-e);
  transition: background-color 0.45s ease, background-image 0.45s ease;
}

/* Grain texture overlay — animated film-grain shimmer */
body::after {
  content: '';
  position: fixed;
  inset: -180px;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.80' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
  animation: grain-drift 10s steps(1) infinite;
  transition: opacity 0.45s ease;
}

@keyframes grain-drift {
  0%   { transform: translate(  0%,   0%); }
  10%  { transform: translate( -5%,  -9%); }
  20%  { transform: translate(-13%,   4%); }
  30%  { transform: translate(  5%, -14%); }
  40%  { transform: translate( -3%,  12%); }
  50%  { transform: translate( 14%,  -3%); }
  60%  { transform: translate( -1%,  14%); }
  70%  { transform: translate(-11%,   2%); }
  80%  { transform: translate(  8%,   7%); }
  90%  { transform: translate(  3%, -6%); }
  100% { transform: translate(  0%,   0%); }
}

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: var(--bg-surface);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity var(--transition);
  flex-shrink: 0;
}
.logo:hover { opacity: 0.75; }

/* Image-based logo — multiply removes white bg in light, screen in dark */
.logo-img {
  height: 30px;
  width: auto;
  display: block;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .logo-img {
  filter: invert(1);
  mix-blend-mode: screen;
}

/* Icon shown only on mobile / small viewports, hidden alongside wordmark */
.logo-icon-img {
  height: 30px;
  width: auto;
  display: none;   /* hide when full wordmark is present */
  mix-blend-mode: multiply;
}
[data-theme="dark"] .logo-icon-img {
  filter: invert(1);
  mix-blend-mode: screen;
}

/* Fallback text logo (shown when image fails or not yet added) */
.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* On very small screens: swap to icon only */
@media (max-width: 420px) {
  .logo-img      { display: none; }
  .logo-icon-img { display: block; }
}

.logo-icon { color: var(--accent); font-size: 1.35rem; }

/* ── Services Nav Link ────────────────────────────────────── */
.services-link {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  padding: 0.3rem 0.85rem 0.25rem;
  border-radius: 4px;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.services-link:hover {
  background: var(--text);
  color: var(--bg-base);
  border-color: var(--text);
}

/* ── Header Controls (groups Services + Lang + Theme) ───── */
.header-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tagline {
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Theme Toggle ─────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: all var(--transition);
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(12deg) scale(1.05);
}
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ── Language Toggle ────────────────────────────── */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--bg-surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
  flex-shrink: 0;
  transition: all var(--transition);
}
.lang-toggle:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 400; /* Bebas Neue has no weight variants, 400 = bold */
  line-height: 1.0;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 1rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Category Bar ─────────────────────────────────────────── */
.category-bar {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
  position: sticky;
  top: 57px;
  z-index: 50;
  transition: background var(--transition);
}

.category-bar .container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-bar .container::-webkit-scrollbar { display: none; }

#category-pills { display: flex; gap: 0.5rem; }

.cat-pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
}
.cat-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.cat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

/* ── Articles Grid ────────────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 2.5rem 0;
}

/* ── Article Card ─────────────────────────────────────────── */
.article-card .card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}
.article-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.article-card:hover .card-image img {
  transform: scale(1.04);
}

.article-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.article-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: var(--border-strong);
  color: inherit;
}

.article-card .card-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.article-card .card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.article-card .category-badge {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.article-card .date {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.article-card h2 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: 0.01em;
}

.article-card .excerpt {
  color: var(--text-dim);
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
}

.article-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.article-card .read-more {
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 0.8rem;
}

/* ── Article Page ─────────────────────────────────────────── */
.article-page { padding: 2.5rem 0; }

.article-page .article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
}

.article-page .category-badge {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-page .reading-time {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.article-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
  max-width: 820px;
  color: var(--text);
}

/* ── Article Body ─────────────────────────────────────────── */
.article-body {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-body h2 {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 0.8rem;
  color: var(--text);
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.article-body h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.6rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin: 1rem 0; padding-left: 1.6rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { font-weight: 700; }

.article-body blockquote {
  border-left: 3px solid var(--text);
  padding: 0.75rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.01em;
}

.article-body code {
  background: var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: var(--font-mono);
  color: var(--text);
}

.article-body pre {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  line-height: 1.6;
}

[data-theme="dark"] .article-body pre {
  background: rgba(10, 9, 6, 0.8);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.article-body img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.article-body a:hover { color: var(--accent-hover); }

/* ── Affiliate Links ──────────────────────────────────────── */
.affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  margin: 0 0.2rem;
  vertical-align: middle;
  white-space: nowrap;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.affiliate-link:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg-base) !important;
}

/* ── Tags ─────────────────────────────────────────────────── */
.article-tags {
  margin: 2rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.2rem 0.65rem;
  border-radius: 5px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

/* ── Share Bar ────────────────────────────────────────────── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

.share-bar span { color: var(--text-dim); }

.share-bar a {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: all var(--transition);
}
.share-bar a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── Related ──────────────────────────────────────────────── */
.related-articles {
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
}

/* ── Load More ────────────────────────────────────────────── */
.load-more-wrap { text-align: center; padding: 1rem 0 4rem; }

.load-more-btn {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 0.8rem 2.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: all var(--transition);
  letter-spacing: 0.01em;
}
.load-more-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 5rem 0;
  font-size: 1.1rem;
  color: var(--text-dim);
}
.empty-state .dim {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--text-faint);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
  transition: background var(--transition);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }
  .articles-grid { grid-template-columns: 1fr; gap: 1rem; }
  .article-page h1 { font-size: 1.7rem; }
  .article-body { font-size: 1rem; }
  .tagline { display: none; }
}

/* ── Back Link ────────────────────────────────────────────── */
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-decoration: none;
  margin: 1.5rem 0 0;
  padding: 0.35rem 0;
  transition: color var(--transition), gap var(--transition);
}

.page-back svg {
  transition: transform var(--transition);
}

.page-back:hover {
  color: var(--text-dim);
  gap: 0.6rem;
}

.page-back:hover svg {
  transform: translateX(-3px);
}

/* ── Utilities ────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Consent Modal ────────────────────────────────────────── */
.pp-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pp-consent-overlay.pp-consent--in {
  opacity: 1;
  pointer-events: all;
}

.pp-consent-overlay.pp-consent--out {
  opacity: 0;
  pointer-events: none;
}

.pp-consent-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0,0,0,0.06);
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.pp-consent--in .pp-consent-modal {
  transform: translateY(0);
}

.pp-consent--out .pp-consent-modal {
  transform: translateY(24px);
}

/* Header */
.pp-consent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.pp-consent-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--accent-light);
  padding: 0.25em 0.65em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.pp-consent-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  transition: border-color var(--transition), color var(--transition);
  padding: 0;
}

.pp-consent-close:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Title & text */
.pp-consent-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.1;
}

.pp-consent-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

/* Categories */
.pp-consent-cats {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.pp-consent-cats li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.pp-consent-cats li:last-child {
  border-bottom: none;
}

.pp-consent-cats li div {
  flex: 1;
  min-width: 0;
}

.pp-consent-cats strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.pp-consent-cats span span,
.pp-consent-cats li div span {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.pp-consent-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pp-consent-cat-dot--on  { background: var(--text); }
.pp-consent-cat-dot--opt { background: var(--text); }

/* Always-on label */
.pp-consent-always {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

/* Toggle switch */
.pp-consent-opt {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--text);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
  display: block;
}

.pp-consent-opt--off {
  background: var(--border-strong);
}

.pp-consent-opt-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.pp-consent-opt--off .pp-consent-opt-thumb {
  transform: translateX(0);
}

.pp-consent-opt:not(.pp-consent-opt--off) .pp-consent-opt-thumb {
  transform: translateX(16px);
}

/* Buttons */
.pp-consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.pp-consent-btn {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1;
}

.pp-consent-btn--primary {
  background: var(--accent);
  color: var(--bg-base);
  border-color: var(--accent);
}

.pp-consent-btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.pp-consent-btn--secondary {
  background: transparent;
  color: var(--text);
}

.pp-consent-btn--secondary:hover {
  background: var(--accent-light);
}

/* Legal link */
.pp-consent-legal {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}

.pp-consent-legal a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pp-consent-legal a:hover {
  color: var(--text);
}

/* Dark mode overrides */
[data-theme="dark"] .pp-consent-btn--primary {
  color: #0a0a0a;
}

[data-theme="dark"] .pp-consent-opt-thumb {
  background: #0a0a0a;
}

/* Mobile */
@media (max-width: 540px) {
  .pp-consent-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .pp-consent-modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    padding: 1.4rem 1.25rem 2rem;
  }

  .pp-consent-actions {
    grid-template-columns: 1fr;
  }
}

/* ── Featured Image ───────────────────────────────────────── */
.featured-image {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.featured-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}
.featured-image figcaption {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}

/* ── Article Body h1 (SSR content_html) ──────────────────── */
.article-body h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
  max-width: 820px;
  color: var(--text);
}
