/*
Theme Name: Bitacero Editorial
Description: Medio de noticias tecnológicas: portada con noticias destacadas, actualidad y categorías. Editor de bloques nativo.
Version: 3.0.0
Author: Bitacero
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: techblog-editorial
*/

/*
  Design system — “Escritorio de señales”
  Color: cool lab paper, deep ink, one industrial signal accent
  Type: Bricolage Grotesque (display/brand) + Source Serif 4 (reading)
  Layout: left-aligned; brand-first masthead; lead image as dominant plane; feed as ruled list
  Boldness: oversized wordmark only; everything else stays quiet
*/

:root {
  --paper: #FAF8F3;
  --ink: #192321;
  --muted: #56635D;
  --accent: #B74321;
  --accent-deep: #923319;
  --line: #D8DDD7;
  --soft: #F0EEE7;
  --panel: #E8EBE5;
  --night: #192321;
  --content: 680px;
  --radius: 2px;
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "Bricolage Grotesque", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 11px,
      color-mix(in srgb, var(--ink) 2.2%, transparent) 11px,
      color-mix(in srgb, var(--ink) 2.2%, transparent) 12px
    ),
    radial-gradient(900px 420px at 0% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover { color: var(--accent); }

a:focus-visible,
summary:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea { font: inherit; }

button,
.button {
  background: var(--ink);
  color: #f4f6f8;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 18px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.15s ease;
}

button:hover,
.button:hover {
  background: var(--accent);
  color: #fff;
}

button:active,
.button:active { transform: scale(0.98); }

.button { display: inline-block; }

.wrap {
  width: min(1240px, calc(100% - 72px));
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
}

.skip:focus { top: 12px; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin-top: 0;
  font-weight: 700;
}

p { text-wrap: pretty; }

/* Header — brand is the memorable element */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.header-shell {
  padding-top: 20px;
  padding-bottom: 0;
}

.header-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 24px 40px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(48px, 7.5vw, 72px);
  line-height: 0.88;
  letter-spacing: -0.055em;
  font-weight: 800;
  animation: brand-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand:hover { color: var(--ink); }

.brand-dot {
  display: inline-block;
  width: 0.14em;
  height: 0.14em;
  margin-left: 0.06em;
  border-radius: 1px;
  background: var(--accent);
  vertical-align: 0.08em;
  animation: signal-blink 2.8s ease-in-out infinite;
}

.brand:hover .brand-dot {
  background: var(--accent-deep);
}

.brand-caption {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  max-width: 24rem;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.custom-logo {
  max-height: 64px;
  width: auto;
}

.header-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  justify-content: flex-end;
  padding-bottom: 4px;
}

.header-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.header-meta a {
  font-weight: 650;
  color: var(--ink);
}

.header-search .search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-search .search-form { position: relative; }

.header-search .search-row {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, #fff 55%, var(--paper));
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search .search-row:focus-within {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.header-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 11px 4px 11px 14px;
  outline: none;
  font-family: var(--font-ui);
  font-size: 14px;
}

.header-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.header-search button:hover {
  background: transparent;
  color: var(--accent);
}

#search-status {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  min-height: 0;
}

.navigation-bar { margin-top: 0; }

.navigation-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.navigation-inner nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}

.navigation-inner nav::-webkit-scrollbar { display: none; }

.navigation-inner nav,
.navigation-inner nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.navigation-inner nav ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.navigation-inner nav a {
  display: block;
  white-space: nowrap;
  padding: 14px 12px 15px;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  position: relative;
}

.navigation-inner nav a:hover {
  color: var(--ink);
}

.navigation-inner nav [aria-current="page"],
.navigation-inner .current-menu-item > a {
  color: var(--ink);
}

.navigation-inner nav [aria-current="page"]::after,
.navigation-inner .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
}

.latest-link {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  flex-shrink: 0;
  padding: 8px 0;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 1px;
}

@keyframes brand-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes signal-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Search outside header */
.search-form .search-label,
.search-form label:not(.search-label) {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.search-form .search-row,
.search-form > div {
  display: flex;
  gap: 8px;
}

.search-form input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  font-family: var(--font-ui);
}

.empty-state .search-form .search-label {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 10px;
  clip: auto;
  overflow: visible;
}

.empty-state .header-search .search-row,
.empty-state .search-form .search-row {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

/* Home */
.news-main {
  padding-top: 0;
  padding-bottom: 80px;
}

.news-main:not(:has(.news-hero)) {
  padding-top: 28px;
}

.news-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  grid-template-areas:
    "visual visual"
    "copy side";
  gap: 0 40px;
  padding-bottom: 36px;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--ink);
  align-items: start;
}

.news-card { min-width: 0; }

.lead-story { display: contents; }

.lead-story .visual-link {
  grid-area: visual;
  margin-inline: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
  margin-bottom: 8px;
}

.lead-story .card-content {
  grid-area: copy;
  padding-top: 22px;
  max-width: 40rem;
}

.side-stack {
  grid-area: side;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding-top: 22px;
}

.visual-link {
  display: block;
  overflow: hidden;
  background: var(--soft);
}

.cover {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 1.55;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.visual-link:hover .cover { transform: scale(1.025); }

.lead-story .cover {
  aspect-ratio: 2.35;
  max-height: min(52vh, 520px);
  animation: brand-in 0.85s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card-content { padding-top: 18px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
}

.meta-sep {
  display: inline-block;
  width: 1px;
  height: 0.85em;
  background: var(--line);
  vertical-align: -0.05em;
}

.news-category {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-transform: none;
}

.news-card h2 {
  margin: 10px 0 12px;
  font-weight: 700;
}

.lead-story h2 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.excerpt {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 12px;
  max-width: 54ch;
}

.lead-story .excerpt { font-size: 17px; }

.byline {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}

.side-story .cover {
  aspect-ratio: 2.05;
  max-height: 160px;
}

.side-story h2 {
  font-size: 20px;
  line-height: 1.18;
  margin-bottom: 4px;
}

.side-story .card-content { padding-top: 12px; }

.side-story + .side-story {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 8px;
}

.one-story {
  grid-template-areas:
    "visual visual"
    "copy copy";
  grid-template-columns: minmax(0, 1fr);
}

.one-story .lead-story .card-content {
  max-width: 42rem;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(240px, 1fr);
  gap: 48px;
}

.posts-section,
.news-sidebar { min-width: 0; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--ink);
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
}

.section-heading > span {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 4px;
}

.feed-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.55fr);
  gap: 22px 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.feed-card .cover { aspect-ratio: 1.45; }

.feed-card .card-content { padding-top: 0; }

.feed-card h2 { font-size: 24px; margin-top: 8px; }

.news-sidebar .section-heading { padding-bottom: 12px; }

.news-sidebar .section-heading h2 { font-size: 17px; }

.headline-list ol {
  list-style: none;
  counter-reset: headlines;
  padding: 0;
  margin: 0 0 28px;
}

.headline-list li {
  counter-increment: headlines;
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.headline-list li::before {
  content: counter(headlines);
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  min-width: 1.25em;
}

.headline-list h3 {
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  font-family: var(--font-ui);
  font-weight: 650;
}

.category-section { margin-bottom: 28px; }

.category-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-section li { border-bottom: 1px solid var(--line); }

.category-section a {
  display: block;
  padding: 12px 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 550;
}

.category-section [aria-current="page"] { color: var(--accent); }

.rss-box {
  padding: 22px 0 0;
  border-top: 2px solid var(--ink);
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 0 0 10px;
  display: block;
  text-transform: none;
}

.rss-box h2 {
  font-size: 22px;
  line-height: 1.15;
  margin: 6px 0 10px;
}

.rss-box p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.text-link {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
}

.feed-note {
  color: var(--muted);
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 24px;
}

.pagination { margin-top: 32px; }

.pagination .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  background: color-mix(in srgb, #fff 55%, transparent);
}

.page-numbers.current {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Footer */
.site-footer {
  border-top: 2px solid var(--ink);
  background: color-mix(in srgb, var(--soft) 70%, var(--paper));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 36px;
  padding-bottom: 40px;
}

.footer-brand {
  font-size: 34px;
  letter-spacing: -0.05em;
}

.site-footer p {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 12px;
}

.footer-links > span { color: var(--muted); }

.tb-footer-main {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  padding: 48px 0 36px;
}

.site-footer .tb-footer-brand {
  font-size: 48px;
  letter-spacing: -0.055em;
  display: inline-block;
}

.site-footer .tb-footer-identity p {
  font-size: 15px;
  line-height: 1.7;
  margin: 16px 0 14px;
  color: var(--muted);
}

.tb-footer-rss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}

.tb-footer-rss svg { color: var(--accent); }

.tb-footer-topics h2 {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  margin: 4px 0 16px;
  font-family: var(--font-ui);
  color: var(--muted);
}

.tb-footer-topics ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tb-footer-topics li { min-width: 0; }

.tb-footer-topics a {
  display: block;
  padding: 12px 0;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.45;
}

.tb-footer-topics a[aria-current="page"],
.tb-footer-topics a:hover { color: var(--accent); }

.tb-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 16px 0 22px;
  font-family: var(--font-ui);
  font-size: 12px;
}

.tb-footer-copyright {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.tb-footer-demo { font-size: 11px; }

.tb-footer-info {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.tb-footer-info a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.tb-footer-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-left: 16px;
  font-weight: 650;
  white-space: nowrap;
}

.tb-footer-top > span {
  font-size: 16px;
  color: var(--accent);
}

/* Archives / empty */
.archive-heading { padding: 18px 0 32px; }

.archive-heading h1 {
  font-size: clamp(30px, 4vw, 48px);
  margin: 0;
}

.archive-description {
  max-width: 58ch;
  color: var(--muted);
  margin-top: 12px;
}

.archive-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.archive-count {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.empty-state {
  padding: 28px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.empty-state h2 { font-size: 30px; }

.empty-state h1 { font-size: 42px; }

.empty-state p { color: var(--muted); }

/* Article */
.article-main {
  padding-top: 44px;
  padding-bottom: 72px;
}

.article-header {
  max-width: var(--content);
  margin: 0 auto 32px;
}

.article-header .meta { margin: 24px 0 14px; }

.article-header h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 750;
  line-height: 1.06;
  margin-bottom: 16px;
}

.article-header .byline {
  font-size: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 20px;
}

.article-deck {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  margin: 16px 0;
  max-width: 42rem;
}

.article-cover {
  max-width: 960px;
  margin: 0 auto 36px;
}

.article-cover img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.article-cover figcaption {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 10px;
}

.article-cover figcaption a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body {
  max-width: var(--content);
  margin-inline: auto;
  font-size: 19px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.article-body h2 {
  font-size: 28px;
  margin-top: 1.6em;
}

.article-body h3 {
  font-size: 22px;
  margin-top: 1.4em;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--accent);
}

.article-body blockquote {
  margin: 28px 0;
  padding: 14px 22px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
}

.article-body pre {
  font-size: 14px;
  overflow: auto;
  padding: 18px;
  background: var(--soft);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.article-body figure { margin: 28px 0; }

.article-body figcaption {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 10px;
}

.article-body table {
  border-collapse: collapse;
  width: 100%;
}

.article-body td,
.article-body th {
  padding: 10px;
  border: 1px solid var(--line);
}

.article-body .alignwide {
  width: min(960px, calc(100vw - 72px));
  max-width: none;
  margin-left: calc((min(960px, 100vw - 72px) - 100%) / -2);
}

.article-body .alignfull {
  width: calc(100vw - 72px);
  max-width: none;
  margin-left: calc((100vw - 72px - 100%) / -2);
}

.article-tags {
  max-width: var(--content);
  margin: 28px auto;
  font-family: var(--font-ui);
  font-size: 12px;
}

.article-tags a {
  display: inline-block;
  padding: 6px 12px;
  background: var(--soft);
  margin: 4px;
  border-radius: var(--radius);
}

.article-notice {
  max-width: var(--content);
  margin: 28px auto 0;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.article-body .article-sources {
  font-size: 14px;
  line-height: 1.75;
}

.post-navigation {
  max-width: var(--content);
  margin: 40px auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.post-navigation > div { flex: 1; }

.post-navigation span {
  display: block;
  font-family: var(--font-ui);
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.post-navigation a {
  font-family: var(--font-ui);
  font-weight: 650;
}

.comments {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 16px;
}

.comment-list { padding-left: 22px; }

.comment-body {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.comment-form input:not([type="checkbox"]),
.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui);
}

.comment-form label {
  display: block;
  font-family: var(--font-ui);
}

.comment-form-cookies-consent {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.comment-form input[type="submit"] {
  background: var(--ink);
  color: #fff;
  width: auto;
  cursor: pointer;
}

.preview-note {
  background: var(--ink);
  color: #e8ecf1;
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 8px 18px;
  text-align: center;
}

.preview-nav a { scroll-margin-top: 20px; }

.demo-footer { font-size: 11px !important; }

.archive .archive-heading {
  padding-top: 18px;
  padding-bottom: 30px;
}

.archive .archive-heading h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.archive .rss-box { margin-top: 24px; }

@media (min-width: 1600px) {
  .wrap { width: min(1320px, calc(100% - 96px)); }
  .lead-story h2 { font-size: 50px; }
  .side-story .cover { max-height: 172px; }
}

@media (max-width: 1024px) {
  .wrap { width: calc(100% - 48px); }
  .header-top { gap: 24px 32px; }
  .header-shell { padding-top: 16px; }
  .news-hero { gap: 0 24px; }
  .lead-story .cover { max-height: min(46vh, 440px); }
  .lead-story h2 { font-size: 34px; }
  .side-story h2 { font-size: 19px; }
  .news-layout {
    gap: 32px;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  }
  .feed-card {
    gap: 18px 22px;
    padding: 22px 0;
  }
  .feed-card h2 { font-size: 21px; }
  .footer-inner { align-items: flex-start; }
  .footer-links { max-width: 300px; }
  .tb-footer-main {
    grid-template-columns: 1fr 1.25fr;
    gap: 48px;
  }
  .tb-footer-topics ul { gap: 0 18px; }
  .tb-footer-copyright { display: block; }
  .tb-footer-demo {
    display: block;
    margin-top: 4px;
  }
  .tb-footer-bottom { gap: 18px; }
  .tb-footer-info { gap: 16px; }
  .tb-footer-top { margin-left: 0; }
}

@media (max-width: 800px) {
  .header-top {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }
  .header-tools { max-width: 420px; }
  .header-meta { justify-content: flex-start; }
  .navigation-inner { gap: 14px; }
  .latest-link { display: none; }
  .news-hero { gap: 0 18px; }
  .lead-story h2 { font-size: 28px; }
  .side-story h2 { font-size: 17px; }
  .side-story .cover { aspect-ratio: 1.7; }
  .lead-story .cover {
    aspect-ratio: 1.9;
    max-height: min(40vh, 360px);
  }
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .headline-list { grid-row: span 2; }
  .category-section { margin-bottom: 0; }
  .section-heading > span { display: none; }
  .feed-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }
  .article-body .alignwide,
  .article-body .alignfull {
    width: 100%;
    margin-left: 0;
  }
  .footer-links { max-width: 260px; }
  .tb-footer-main {
    gap: 36px;
    grid-template-columns: 1fr 1fr;
  }
  .tb-footer-topics ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-footer-bottom { flex-wrap: wrap; }
  .tb-footer-copyright { margin-right: auto; }
  .tb-footer-info { margin-left: 0; }
  .site-footer .tb-footer-brand { font-size: 40px; }
  .archive .rss-box { margin-top: 0; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { position: static; }
  .header-shell { padding-top: 14px; }
  .header-top {
    gap: 14px;
    padding-bottom: 14px;
  }
  .brand {
    font-size: 42px;
    letter-spacing: -0.05em;
  }
  .brand-caption {
    font-size: 13px;
    max-width: none;
  }
  .header-tools { max-width: none; }
  .header-meta {
    font-size: 12px;
    gap: 14px;
  }
  .navigation-inner nav a {
    font-size: 13px;
    padding: 12px 10px 13px;
  }
  .navigation-inner nav [aria-current="page"]::after,
  .navigation-inner .current-menu-item > a::after {
    left: 10px;
    right: 10px;
    bottom: 6px;
  }
  .news-main {
    padding-bottom: 48px;
  }

  .news-main:not(:has(.news-hero)) {
    padding-top: 16px;
  }
  .news-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "copy"
      "side";
    gap: 0;
    padding-bottom: 28px;
    margin-bottom: 28px;
  }
  .lead-story .cover {
    aspect-ratio: 1.35;
    max-height: none;
  }
  .lead-story .card-content {
    padding-top: 18px;
    max-width: none;
  }
  .side-stack {
    padding-top: 28px;
    display: grid;
    gap: 24px;
  }
  .lead-story h2 {
    font-size: 30px;
    letter-spacing: -0.04em;
  }
  .lead-story .excerpt { font-size: 16px; }
  .side-story + .side-story {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    margin-top: 0;
  }
  .side-story .cover { aspect-ratio: 1.45; max-height: none; }
  .side-story h2 {
    font-size: 19px;
    line-height: 1.22;
  }
  .side-story .meta > span { display: none; }
  .feed-card {
    grid-template-columns: 1fr 100px;
    gap: 14px;
    padding: 20px 0;
  }
  .feed-card .visual-link {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }
  .feed-card .card-content {
    grid-column: 1;
    grid-row: 1;
  }
  .feed-card .cover { aspect-ratio: 1.1; }
  .feed-card h2 {
    font-size: 18px;
    line-height: 1.2;
  }
  .feed-card .excerpt { display: none; }
  .feed-card .meta > span { display: none; }
  .news-sidebar {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .headline-list { grid-row: auto; }
  .headline-list ol { margin-bottom: 0; }
  .section-heading { padding: 0 0 12px; }
  .section-heading h2 { font-size: 20px; }
  .footer-inner {
    display: block;
    padding: 28px 0;
  }
  .footer-brand { font-size: 32px; }
  .footer-links {
    margin-top: 22px;
    max-width: none;
    gap: 16px;
  }
  .article-main { padding-top: 28px; }
  .article-header h1 { font-size: 32px; }
  .article-deck { font-size: 17px; }
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 24px; }
  .post-navigation {
    font-size: 14px;
    gap: 18px;
  }
  .empty-state { padding: 22px 0; }
  .empty-state h2 { font-size: 26px; }
  .archive-heading h1 { font-size: 30px; }
  .archive-title-row { display: block; }
  .archive-count {
    display: block;
    margin-top: 10px;
  }
  .archive .archive-heading {
    padding-top: 10px;
    padding-bottom: 24px;
  }
  .archive .news-sidebar { margin-top: 8px; }
  .news-hero.one-story { display: block; }
  .tb-footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0 24px;
  }
  .site-footer .tb-footer-brand { font-size: 38px; }
  .site-footer .tb-footer-identity p { margin: 12px 0 8px; }
  .tb-footer-topics h2 { margin: 0 0 8px; }
  .tb-footer-topics ul { gap: 0 24px; }
  .tb-footer-topics a {
    font-size: 14px;
    min-height: 48px;
  }
  .tb-footer-bottom {
    gap: 6px 18px;
    padding: 12px 0 18px;
  }
  .tb-footer-info {
    order: 1;
    width: 100%;
    gap: 22px;
  }
  .tb-footer-copyright {
    order: 2;
    margin-top: 6px;
  }
  .tb-footer-top {
    order: 3;
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Bitacero identity: vector wordmark, warm paper and accessible terracotta. */
.site-header { position:relative; top:auto; }
.site-header.has-compact-nav { position:sticky; top:calc(0px - var(--masthead-height, 0px)); }
.site-header.has-compact-nav:focus-within { top:0; }
.admin-bar .site-header.has-compact-nav { top:calc(32px - var(--masthead-height, 0px)); }
.admin-bar .site-header.has-compact-nav:focus-within { top:32px; }
@media(min-width:601px) and (max-width:782px) {
  .admin-bar .site-header.has-compact-nav { top:calc(46px - var(--masthead-height, 0px)); }
  .admin-bar .site-header.has-compact-nav:focus-within { top:46px; }
}
@media(max-width:600px) {
  .admin-bar .site-header.has-compact-nav { top:calc(0px - var(--masthead-height, 0px)); }
  .admin-bar .site-header.has-compact-nav:focus-within { top:0; }
}
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body { background: var(--paper); }
.bitacero-brand { display:inline-flex; line-height:1; }
.bitacero-wordmark { display:block; width:clamp(220px, 27vw, 390px); height:auto; max-width:100%; }
.site-footer .bitacero-wordmark { width:220px; }
.site-footer { background:var(--soft); }
.article-body a { color:var(--accent-deep); text-underline-offset:3px; }
.article-body h2 { scroll-margin-top:24px; }
.bitacero-related { padding:28px 0; border-top:1px solid var(--line); margin-top:36px; }
.bitacero-related h2 { margin-top:0; }
.bitacero-reviewed { color:var(--muted); font:500 13px/1.6 var(--font-ui); }
:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
@media(max-width:560px) { .bitacero-wordmark { width:250px; } .site-footer .bitacero-wordmark { width:200px; } }
