/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #2c3227;
  --paper: #f4f6f0;
  --paper-alt: #e8ece2;
  --accent: #4a7c3f;
  --accent-hover: #3a6331;
  --accent-light: #8bc34a;
  --muted: #6b7a63;
  --border: #c8d1be;
  --code-bg: #2c3227;
  --code-fg: #d4e0c8;
  --serif: 'Georgia', 'Times New Roman', serif;
  --sans: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Consolas', 'Courier New', monospace;
  --max-w: 1200px;
  --gutter: 2rem;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  border-bottom: 3px solid var(--accent);
  padding: 1.5rem 0 1rem;
  background: var(--paper);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.header-date {
  display: none;
}

.site-logo {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  line-height: 1;
  color: var(--accent);
}

.site-logo span { color: var(--ink); font-weight: 400; }

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

.search-toggle {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.3rem;
}

.theme-toggle {
  background: var(--accent);
  border: none;
  border-radius: 2px;
  font-size: 0.65rem;
  padding: 0.35rem 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  font-weight: 700;
}

/* NAV */
.site-nav {
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink);
  padding: 0.3rem 0;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }

.bc-sep {
  margin: 0 0.4rem;
  color: var(--border);
}

.bc-current {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================
   HERO — featured post
   ============================================ */
.hero {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.hero-main { position: relative; }

.hero-image {
  display: block;
  width: 100%;
  height: 420px;
  background: var(--code-bg);
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* placeholder para mockup */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #5a7a4a 0%, #3a5a30 50%, #2a4a25 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-main .post-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.25rem 0.7rem;
  margin-top: 1.2rem;
}

.hero-main h2 {
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1.15;
  margin-top: 0.6rem;
  letter-spacing: -0.02em;
}

.hero-main h2 a:hover { color: var(--accent); }

.hero-main .post-excerpt {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-main .post-meta {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-meta .author { font-weight: 600; color: var(--ink); }
.post-meta .separator { color: var(--border); }
.post-meta .reading-time { font-style: italic; }

/* HERO sidebar */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-secondary {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-secondary:last-child { border-bottom: none; padding-bottom: 0; }

.hero-secondary .thumb {
  display: block;
  width: 140px;
  height: 100px;
  overflow: hidden;
}

.hero-secondary .thumb .img-placeholder { font-size: 0.6rem; }

.hero-secondary .post-category {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hero-secondary h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.3;
  margin-top: 0.25rem;
}

.hero-secondary h3 a:hover { color: var(--accent); }

.hero-secondary .post-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0 1.5rem;
}

.section-divider h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  white-space: nowrap;
  color: var(--accent);
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
  padding-bottom: 0.5rem;
}

/* ============================================
   POST GRID
   ============================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.post-card .card-image {
  display: block;
  height: 200px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.post-card .card-image .img-placeholder { transition: transform 0.3s; }
.post-card:hover .card-image .img-placeholder { transform: scale(1.03); }

.post-card .post-category {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.post-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.3;
  margin-top: 0.3rem;
}

.post-card h3 a:hover { color: var(--accent); }

.post-card .post-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .post-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.5rem;
  display: flex;
  gap: 0.8rem;
}

/* ============================================
   FEATURED STRIP
   ============================================ */
.featured-strip {
  background: var(--ink);
  color: var(--paper);
  padding: 2rem 0;
  margin: 0 calc(-50vw + 50%);
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
}

.strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.strip-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 1rem;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.strip-item {
  border-left: 2px solid rgba(255,255,255,0.1);
  padding-left: 1rem;
}

.strip-item:first-child { border-left: none; padding-left: 0; }

.strip-item .post-category {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
}

.strip-item h3 {
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.35;
  margin-top: 0.3rem;
}

.strip-item h3 a:hover { color: var(--accent-light); }

.strip-item .post-meta {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.4rem;
}

/* ============================================
   CONTENT + SIDEBAR layout
   ============================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding: 2rem 0;
}

.post-list-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.2rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-list-item:last-child { border-bottom: none; }

.post-list-item .list-thumb {
  display: block;
  height: 140px;
  overflow: hidden;
}

.post-list-item .post-category {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.post-list-item h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.3;
  margin-top: 0.2rem;
}

.post-list-item h3 a:hover { color: var(--accent); }

.post-list-item .post-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.5;
}

.post-list-item .post-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* SIDEBAR */
.sidebar-block {
  margin-bottom: 2rem;
}

.sidebar-block h4 {
  font-family: var(--serif);
  font-size: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 0.8rem;
}

.sidebar-block .about-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-cloud a {
  font-size: 0.72rem;
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  text-transform: lowercase;
  color: var(--muted);
  transition: all 0.15s;
}

.tag-cloud a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar-posts li {
  list-style: none;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-posts li:last-child { border-bottom: none; }

.sidebar-posts a {
  font-size: 0.85rem;
  font-family: var(--serif);
  line-height: 1.3;
}

.sidebar-posts a:hover { color: var(--accent); }

.sidebar-posts .post-meta {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-bar {
  background: var(--accent);
  padding: 2rem 0;
  color: #fff;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.newsletter-text h3 { font-family: var(--serif); font-size: 1.2rem; }
.newsletter-text p { font-size: 0.85rem; opacity: 0.85; margin-top: 0.2rem; }

.newsletter-form { display: flex; gap: 0; }

.newsletter-form input {
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-right: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  width: 280px;
  outline: none;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { border-color: #fff; }

.newsletter-form button {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.5rem;
  background: #fff;
  color: var(--accent);
  border: 2px solid #fff;
}

.newsletter-form button:hover { background: var(--paper); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 2.5rem 0 1.5rem;
  border-top: 3px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h5 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.footer-col p { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 0.2rem 0; }
.footer-col a { font-size: 0.82rem; color: var(--muted); }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}

.footer-bottom a:hover { color: var(--accent); }

/* ============================================
   POST DETAIL — header, cover, body
   ============================================ */
.post-detail-header {
  max-width: 720px;
  margin: 3rem auto 0;
  text-align: center;
}

.post-detail-header .post-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

.post-detail-header h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1.15;
  margin-top: 0.5rem;
  letter-spacing: -0.02em;
}

.post-detail-header .subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: 0.6rem;
  font-style: italic;
}

.post-detail-header .post-meta {
  justify-content: center;
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-detail-cover {
  max-width: 900px;
  margin: 2rem auto;
  height: 450px;
}

/* ============================================
   POST CONTENT LAYOUT (body + TOC)
   ============================================ */
.post-content-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* TABLE OF CONTENTS */
.toc {
  position: relative;
}

.toc-inner {
  position: sticky;
  top: 2rem;
}

.toc-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.8rem;
  font-family: var(--sans);
}

.toc ul {
  list-style: none;
  border-left: 2px solid var(--border);
  padding-left: 0;
}

.toc li {
  padding: 0;
}

.toc a {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.15s;
  line-height: 1.3;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.toc-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* POST BODY */
.post-body {
  max-width: 680px;
  padding-bottom: 3rem;
}

.post-body p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.4rem;
  color: var(--ink);
}

.post-body h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-style: italic;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.6;
}

.post-body pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1.2rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-left: 3px solid var(--accent);
}

.post-body ol, .post-body ul {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.4rem;
  padding-left: 1.5rem;
  color: #2a2a2a;
}

.post-body li {
  margin-bottom: 0.4rem;
}

/* ── Separador de bloque ───────────────────────────────── */
.block-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Bloque HTML genérico ──────────────────────────────── */
.block-html { margin: 1.5rem 0; }

/* ── Bibliografía ──────────────────────────────────────── */
.bibliography {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bibliography li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  font-family: var(--sans);
}

.bibliography li:last-child { border-bottom: none; }

/* La <a> (o <span> sin enlace) actúa de grid y es el elemento clicable */
.bib-entry-link,
.bib-no-link {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0 0.5rem;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s;
}

.bib-entry-link:hover { background: var(--paper-alt); color: var(--ink); }

.bib-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
  padding-top: 0.2rem;
}

.bib-meta  { display: block; }
.bib-title { display: block; font-weight: 700; font-style: italic; color: var(--accent); margin-top: 0.2rem; }
.bib-pub   { display: block; margin-top: 0.1rem; }

.bib-isbn {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Callout */
.callout {
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 2px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.callout-warning {
  background: #fcf0e4;
  border-left: 3px solid var(--accent);
  color: #5a3a20;
}

.callout-info {
  background: #e8f0f8;
  border-left: 3px solid #4a8ec2;
  color: #1a3a5c;
}

/* Figure */
.post-figure {
  margin: 2rem 0;
}

.post-figure figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ============================================
   POST TAGS + SHARE
   ============================================ */
.post-tags-detail {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 680px;
  margin: 0 auto 2rem;
}

.post-tags-detail a {
  font-size: 0.72rem;
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  color: var(--muted);
}

.post-tags-detail a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.share-bar {
  max-width: 680px;
  margin: 0 auto 3rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.share-bar span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.5rem;
}

.share-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  font-size: 0.72rem;
  color: var(--muted);
  transition: all 0.15s;
}

.share-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
  max-width: 680px;
  margin: 0 auto 3rem;
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem;
  background: var(--paper-alt);
  border: 1px solid var(--border);
}

.author-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.author-box-body h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.author-box-body h3 a:hover { color: var(--accent); }

.author-box-body p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.5;
}

.author-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
}

.author-links a {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
}

.author-links a:hover { color: var(--accent); }

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.comments-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.comments-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.comments-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.comment {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.comment-header strong {
  font-size: 0.85rem;
}

.comment-header time {
  font-size: 0.7rem;
  color: var(--muted);
}

.comment-author-badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: #fff;
  padding: 0.1rem 0.4rem;
  font-weight: 700;
  border-radius: 2px;
}

.comment-body > p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
}

.comment-reply-btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comment-reply-btn:hover { color: var(--accent); }

.comment-nested {
  margin-top: 1rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
}

/* Comment form */
.comment-form-wrapper {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comment-form-wrapper h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.comment-form { position: relative; }

.comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-form .form-group {
  margin-bottom: 0.8rem;
}

.comment-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comment-form input,
.comment-form textarea {
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--ink);
}

.comment-form textarea { resize: vertical; }

.btn-submit {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: all 0.15s;
}

.btn-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   POST NAVIGATION (prev/next)
   ============================================ */
.post-nav {
  background: var(--paper-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.post-nav-item {
  display: block;
  padding: 0.5rem 0;
}

.post-nav-item.next { text-align: right; }

.post-nav-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.post-nav-title {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--ink);
}

.post-nav-item:hover .post-nav-title { color: var(--accent); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image { height: 300px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .strip-item:nth-child(3) { border-left: none; padding-left: 0; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .post-content-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .post-nav-grid { grid-template-columns: 1fr; gap: 1rem; }
  .post-nav-item.next { text-align: left; }
}

@media (max-width: 600px) {
  html { font-size: 15px; }

  /* Header: dos filas en móvil */
  .header-top {
    display: grid;
    grid-template-areas:
      "date    actions"
      "logo    logo";
    grid-template-columns: 1fr auto;
    gap: 0.4rem 0;
    align-items: center;
  }
  .header-date    { grid-area: date; }
  .header-actions { grid-area: actions; }
  .site-logo {
    grid-area: logo;
    text-align: center;
    font-size: 2rem;
    padding: 0.35rem 0 0.1rem;
  }
  .hero-main h2 { font-size: 1.6rem; }
  .post-grid { grid-template-columns: 1fr; }
  .strip-grid { grid-template-columns: 1fr; }
  .strip-item { border-left: none; padding-left: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
  .strip-item:last-child { border-bottom: none; }
  .post-list-item { grid-template-columns: 1fr; }
  .post-list-item .list-thumb { height: 200px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-secondary { grid-template-columns: 100px 1fr; }
  .hero-secondary .thumb { width: 100px; height: 75px; }
  .post-detail-header h1 { font-size: 1.8rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { width: 100%; border-right: 2px solid rgba(255,255,255,0.3); }
  .comment-form .form-row { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; align-items: center; text-align: center; }
}

/* ── Language switcher ─────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.lang-btn {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.3rem;
  border-radius: 2px;
  transition: color 0.15s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { color: var(--accent); }
.lang-sep { color: var(--border); font-size: 0.7rem; }

/* ── Archive page ──────────────────────────────────────── */
.archive-page { padding: 3rem 0 5rem; }
.archive-page .page-title { font-size: 2rem; font-weight: 700; margin-bottom: 2.5rem; color: var(--ink); }
.archive-year { margin-bottom: 3rem; }
.archive-year-title { font-size: 1.4rem; font-weight: 700; color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.archive-year-title a { color: inherit; text-decoration: none; }
.archive-year-title a:hover { opacity: 0.75; }
.archive-month { margin-bottom: 2rem; padding-left: 1rem; }
.archive-month-title { font-size: 1rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.archive-month-title a { color: inherit; text-decoration: none; }
.archive-month-title a:hover { color: var(--ink); }
.post-count { font-weight: 400; font-size: 0.85rem; }
.archive-post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.archive-post-list li { display: flex; align-items: baseline; gap: 1rem; }
.archive-post-list time { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.8rem; }
.archive-post-list a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
.archive-post-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ── Static pages ──────────────────────────────────────── */
.static-page { max-width: 740px; margin: 3rem auto 5rem; padding: 0 1rem; }
.page-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.page-title { font-size: 2.2rem; font-weight: 700; color: var(--ink); line-height: 1.2; margin: 0; }
.page-body { font-size: 1.05rem; line-height: 1.8; color: var(--ink); }
.page-body h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.page-body p { margin-bottom: 1.2rem; }

/* ── About page (ap-*) ─────────────────────────────────── */
.about-page { padding-bottom: 0; }
.ap-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
/* Hero */
.ap-hero { padding: 5rem 0; border-bottom: 1px solid var(--border); }
.ap-hero-inner { display: grid; grid-template-columns: 1fr 320px; gap: 4rem; align-items: start; }
.ap-hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.1; margin: 0 0 1.5rem; display: flex; flex-direction: column; }
.ap-hero-title .ap-accent { color: var(--accent); }
.ap-hero-sub { font-size: 1.05rem; color: var(--muted); line-height: 1.75; max-width: 500px; margin: 0; }
.ap-hero-card { background: var(--ink); border-radius: 6px; overflow: hidden; }
.ap-hero-card-row { display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem 1.6rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ap-hero-card-row:last-child { border-bottom: none; }
.ap-big-num { font-size: 2.4rem; font-weight: 800; color: var(--accent); font-family: monospace; min-width: 3rem; line-height: 1; }
.ap-big-label { font-size: 0.78rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; white-space: pre-line; line-height: 1.4; }
/* Manifesto */
.ap-manifesto { padding: 5rem 0; background: var(--ink); }
.ap-manifesto-inner { display: grid; grid-template-columns: 200px 1fr; gap: 4rem; align-items: start; }
.ap-manifesto-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.35); padding-top: 0.3rem; }
.ap-manifesto-lines { display: flex; flex-direction: column; gap: 0; }
.ap-mline { display: flex; gap: 2rem; align-items: baseline; padding: 1.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.ap-mline:first-child { padding-top: 0; }
.ap-mline:last-child { border-bottom: none; }
.ap-mline-num { font-size: 0.7rem; font-weight: 700; color: var(--accent); font-family: monospace; flex-shrink: 0; min-width: 1.8rem; }
.ap-mline p { font-size: 1.1rem; color: rgba(255,255,255,0.85); line-height: 1.6; margin: 0; font-weight: 500; }
/* Story */
.ap-story { padding: 5rem 0; border-bottom: 1px solid var(--border); }
.ap-story-grid { display: grid; grid-template-columns: 1fr 360px; gap: 5rem; align-items: start; }
.ap-story-text h2 { font-size: 1.7rem; font-weight: 700; margin: 0 0 1.5rem; }
.ap-story-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.1rem; font-size: 1.02rem; }
.ap-value-list { display: flex; flex-direction: column; gap: 1rem; }
.ap-value { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem; border: 1px solid var(--border); transition: border-color 0.2s, transform 0.2s; }
.ap-value:hover { border-color: var(--accent); transform: translateX(4px); }
.ap-value-bar { width: 3px; height: 100%; min-height: 40px; background: var(--accent); flex-shrink: 0; border-radius: 2px; }
.ap-value strong { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.25rem; }
.ap-value p { color: var(--muted); font-size: 0.85rem; margin: 0; line-height: 1.5; }
/* CTA */
.ap-cta { padding: 5rem 0; background: var(--accent); }
.ap-cta-inner { text-align: center; }
.ap-cta h2 { font-size: 2.4rem; font-weight: 800; color: #fff; margin: 0 0 0.75rem; }
.ap-cta p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin: 0 0 2rem; }
.ap-cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.ap-btn-primary { padding: 0.85rem 2rem; background: #fff; color: var(--accent); font-weight: 700; font-size: 0.95rem; text-decoration: none; border-radius: 3px; transition: opacity 0.15s; }
.ap-btn-primary:hover { opacity: 0.9; }
.ap-btn-ghost { padding: 0.85rem 2rem; border: 2px solid rgba(255,255,255,0.6); color: #fff; font-weight: 700; font-size: 0.95rem; text-decoration: none; border-radius: 3px; transition: border-color 0.15s; }
.ap-btn-ghost:hover { border-color: #fff; }

/* ── Contact page (cp-*) ───────────────────────────────── */
.contact-page { padding-bottom: 0; }
.hp-field { display: none !important; }
/* Hero */
.cp-hero { padding: 5rem 0 4rem; border-bottom: 1px solid var(--border); }
.cp-hero-title { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; line-height: 1; margin: 0.5rem 0 1.2rem; letter-spacing: -0.02em; }
.cp-hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 480px; line-height: 1.7; margin: 0; }
/* Body */
.cp-body { padding: 5rem 0 6rem; }
.cp-grid { display: grid; grid-template-columns: 1fr 340px; gap: 6rem; align-items: start; }
/* Form */
.cp-form { display: flex; flex-direction: column; gap: 1.5rem; }
.cp-field { display: flex; flex-direction: column; gap: 0.5rem; }
.cp-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.cp-input, .cp-textarea {
  width: 100%; padding: 0.9rem 1rem;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--ink);
  font-family: inherit; font-size: 1rem;
  border-radius: 3px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.cp-input:focus, .cp-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.cp-textarea { resize: vertical; min-height: 180px; line-height: 1.6; }
.cp-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.cp-form-note { font-size: 0.8rem; color: var(--muted); margin: 0; line-height: 1.5; }
.cp-submit { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.9rem 2rem; background: var(--ink); color: #fff; border: none; border-radius: 3px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: background 0.2s; white-space: nowrap; font-family: inherit; }
.cp-submit:hover { background: var(--accent); }
.cp-submit-arrow { transition: transform 0.2s; }
.cp-submit:hover .cp-submit-arrow { transform: translateX(4px); }
/* Channels */
.cp-channels-col { display: flex; flex-direction: column; gap: 1rem; padding-top: 0.25rem; }
.cp-channel-card { padding: 1.4rem; border: 1px solid var(--border); border-radius: 4px; display: flex; flex-direction: column; gap: 0.6rem; transition: border-color 0.2s; }
.cp-channel-card:hover { border-color: var(--accent); }
.cp-channel-icon { font-size: 1.4rem; color: var(--accent); line-height: 1; }
.cp-channel-card strong { font-size: 0.95rem; font-weight: 700; }
.cp-channel-card p { color: var(--muted); font-size: 0.875rem; margin: 0; line-height: 1.55; }
.cp-channel-link { font-size: 0.85rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.cp-channel-link:hover { text-decoration: underline; }
.cp-channel-card--alt { background: var(--ink); border-color: var(--ink); }
.cp-channel-card--alt p { color: rgba(255,255,255,0.55); }
.cp-response-stat { display: flex; align-items: baseline; gap: 0.6rem; }
.cp-response-num { font-size: 2.2rem; font-weight: 800; color: var(--accent); font-family: monospace; line-height: 1; }
.cp-response-label { font-size: 0.75rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Responsive about + contact ────────────────────────── */
@media (max-width: 900px) {
  .ap-hero-inner { grid-template-columns: 1fr; }
  .ap-hero-card { display: flex; }
  .ap-hero-card-row { flex: 1; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.07); }
  .ap-hero-card-row:last-child { border-right: none; }
  .ap-manifesto-inner { grid-template-columns: 1fr; gap: 2rem; }
  .ap-story-grid { grid-template-columns: 1fr; gap: 3rem; }
  .cp-grid { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 600px) {
  .ap-hero-card { flex-direction: column; }
  .ap-hero-card-row { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .cp-form-footer { flex-direction: column; align-items: flex-start; }
  .archive-page .page-title { font-size: 1.5rem; }
}

/* ── Search page ───────────────────────────────────────── */
.search-page { padding: 3rem 0 5rem; max-width: 740px; margin: 0 auto; }
.search-page .page-title { font-size: 2rem; font-weight: 700; margin-bottom: 2rem; }
.search-form { margin-bottom: 2.5rem; }
.search-input-wrapper { display: flex; gap: 0; border: 1.5px solid var(--border); border-radius: 4px; overflow: hidden; transition: border-color 0.2s; }
.search-input-wrapper:focus-within { border-color: var(--accent); }
.search-input { flex: 1; padding: 0.85rem 1rem; border: none; background: transparent; color: var(--ink); font-family: inherit; font-size: 1rem; outline: none; }
.search-input::placeholder { color: var(--muted); }
.search-button { padding: 0.75rem 1.1rem; background: var(--accent); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; transition: opacity 0.15s; }
.search-button:hover { opacity: 0.85; }
.search-results-count { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }
.search-results { display: flex; flex-direction: column; gap: 0; }
.search-result-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.search-result-item:last-child { border-bottom: none; }
.search-result-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.4rem; }
.search-result-title a { color: var(--ink); text-decoration: none; }
.search-result-title a:hover { color: var(--accent); }
.search-result-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }
.search-result-excerpt { color: var(--muted); font-size: 0.95rem; line-height: 1.65; margin: 0; }
.search-result-excerpt mark { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--ink); padding: 0 2px; border-radius: 2px; }
.no-results { padding: 3rem 0; text-align: center; color: var(--muted); }

/* ── Legal pages ───────────────────────────────────────── */
.legal-page { padding: 4rem 0 6rem; }
.legal-inner { max-width: 700px; }
.legal-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.legal-header h1 { font-size: 2.2rem; font-weight: 700; margin: 0.5rem 0 0.75rem; }
.legal-updated { font-size: 0.85rem; color: var(--muted); margin: 0; }
.legal-body { font-size: 1rem; line-height: 1.8; }
.legal-body h2 { font-size: 1.15rem; font-weight: 700; margin: 2.5rem 0 0.75rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.legal-body h2:first-child { border-top: none; padding-top: 0; }
.legal-body p { color: var(--muted); margin-bottom: 1rem; }
.legal-highlight { background: color-mix(in srgb, var(--accent) 8%, transparent); border-left: 3px solid var(--accent); padding: 1rem 1.2rem; border-radius: 0 3px 3px 0; margin-bottom: 2rem; font-size: 0.95rem; line-height: 1.6; }
.legal-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9rem; }
.legal-table th { text-align: left; padding: 0.6rem 0.8rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 2px solid var(--border); }
.legal-table td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.legal-table td code { font-family: monospace; font-size: 0.85rem; background: var(--border); padding: 0.1rem 0.4rem; border-radius: 2px; color: var(--ink); }
.legal-list { padding-left: 1.2rem; color: var(--muted); }
.legal-list li { margin-bottom: 0.5rem; }
.legal-list--check { list-style: none; padding-left: 0; }
.legal-list--check li::before { content: "✗ "; color: var(--accent); font-weight: 700; }

/* ── Categories page ───────────────────────────────────── */
.categories-page { padding: 3rem 0 5rem; }
.categories-header { margin-bottom: 2.5rem; }
.categories-header .page-title { margin-bottom: 0.5rem; }
.categories-subtitle { color: var(--muted); font-size: 1.05rem; margin: 0; }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.category-card { text-decoration: none; color: inherit; display: block; border: 1px solid var(--border); border-radius: 4px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.category-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.07); }
.category-card-inner { padding: 1.8rem; display: flex; flex-direction: column; gap: 0.75rem; height: 100%; box-sizing: border-box; }
.category-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.category-card-name { font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.3; }
.category-card-count { font-size: 0.75rem; font-weight: 700; background: var(--accent); color: #fff; padding: 0.2rem 0.55rem; border-radius: 20px; white-space: nowrap; flex-shrink: 0; margin-top: 0.15rem; }
.category-card-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; flex: 1; }
.category-card-link { font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-top: auto; }

/* ── Category detail page ──────────────────────────────── */
.category-page { padding: 0 0 4rem; }
.category-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.category-header .page-title { margin-bottom: 0.5rem; }
.category-description { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 600px; }

@media (max-width: 860px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .categories-grid { grid-template-columns: 1fr; } }

/* ── Tags cloud ────────────────────────────────────────── */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 2rem 0 3rem;
}

.tag-cloud-item {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--paper-alt);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.85rem;
  color: var(--ink);
  font-family: var(--sans);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tag-cloud-item:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Newsletter ok message ──────────────────────────────── */
.newsletter-ok {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

/* ── Dark mode ─────────────────────────────────────────── */
:root.dark {
  --ink:    #e8f0e3;
  --paper:  #1e2219;
  --accent: #6aad5a;
  --accent-light: #8bc34a;
  --muted:  #a0b898;
  --border: #2e3829;
  --paper-alt: #242c1e;
}
:root.dark body { background: #161a12; }
:root.dark .site-header { background: #161a12; border-bottom-color: var(--accent); }
:root.dark .ap-hero, :root.dark .about-content { background: #1e2219; }
:root.dark .cp-input, :root.dark .cp-textarea { background: #1e2219; border-color: var(--border); color: var(--ink); }
:root.dark .legal-highlight { background: color-mix(in srgb, var(--accent) 12%, #1e2219); }
:root.dark .post-card, :root.dark .ap-value, :root.dark .cp-channel-card:not(.cp-channel-card--alt) { background: #242c1e; }
:root.dark .site-footer { background: #161a12; }
:root.dark .img-placeholder { background: linear-gradient(135deg, #2a3a22 0%, #1e2a18 100%); }

/* ── Error pages ─────────────────────────────── */
.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 4rem 1rem;
}

.error-content {
  text-align: center;
  max-width: 480px;
}

.error-code {
  font-size: clamp(5rem, 20vw, 9rem);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  font-family: var(--mono);
  opacity: 0.18;
  margin-bottom: -0.5rem;
}

.error-content h1 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.error-content p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.error-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-error-home {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-error-home:hover { opacity: 0.85; }

.btn-error-sec {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--ink);
  transition: border-color 0.15s;
}
.btn-error-sec:hover { border-color: var(--accent); color: var(--accent); }
