/* Transafety · PrivaSteward: Sistema Editorial del Blog Técnico ("La Bitácora Ejecutiva")
 * Contraste por capas tonales (#eef2f6 canvas / #ffffff superficie / #1a1d23 bloque inverso)
 * y grillas arquitectónicas de 1px. Cero bordes laterales de color (no side-tabs) y cero sombras flotantes.
 */

:root {
  --ps-ink: #1a1d23;
  --ps-ink-soft: #334155;
  --ps-ink-muted: #5f6980;
  --ps-line: #cbd5e1;
  --ps-line-soft: #e4e7ec;
  --ps-bg: #eef2f6;
  --ps-surface: #ffffff;
  --ps-surface-subtle: #f8f9fb;
  --ps-accent: #2563eb;
  --ps-accent-deep: #1e3a8a;
  --ps-accent-soft: #dbeafe;
  --ps-font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --ps-font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --ps-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ps-radius: 10px;
  --ps-radius-sm: 6px;
  --ps-radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body.blog-page {
  margin: 0;
  background: var(--ps-bg);
  color: var(--ps-ink);
  font-family: var(--ps-font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.blog-page ::selection {
  background: var(--ps-accent-soft);
  color: var(--ps-ink);
}

.blog-page img {
  max-width: 100%;
  height: auto;
  display: block;
}

.blog-page h1,
.blog-page h2,
.blog-page h3,
.blog-page h4 {
  font-family: var(--ps-font-display);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ps-ink);
}

.blog-page p {
  text-wrap: pretty;
}

.blog-page a {
  color: var(--ps-accent);
  text-underline-offset: 4px;
}

.blog-page :focus-visible {
  outline: 2px solid var(--ps-accent);
  outline-offset: 3px;
}

.blog-page [id] {
  scroll-margin-top: 96px;
}

.blog-page .skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ps-ink);
  color: var(--ps-surface);
  padding: 10px 16px;
  z-index: 100;
  border-radius: var(--ps-radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.blog-page .skip-link:focus {
  left: 8px;
  color: var(--ps-surface);
}

/* Container optimized for 16:9 widescreen while keeping clean margins on phones */
.blog-page .container {
  max-width: min(1440px, 94vw);
  margin: 0 auto;
  padding-inline: clamp(18px, 3vw, 40px);
}

/* ---------- Site Header ---------- */
.blog-page .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ps-surface);
  border-bottom: 1px solid var(--ps-line);
}

.blog-page .header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.blog-page .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ps-ink);
}

.blog-page .brand-mark {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}

.blog-page .brand-name {
  font-family: var(--ps-font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.blog-page .site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.blog-page .site-nav a {
  color: var(--ps-ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s;
}

.blog-page .site-nav a:hover,
.blog-page .site-nav a[aria-current="page"] {
  color: var(--ps-accent);
}

.blog-page .header-blog-link {
  font-family: var(--ps-font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ps-ink);
  background: var(--ps-surface-subtle);
  border: 1px solid var(--ps-line);
  padding: 6px 12px;
  border-radius: var(--ps-radius-sm);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.blog-page .header-blog-link:hover,
.blog-page .header-blog-link[aria-current="page"] {
  background: var(--ps-accent-soft);
  border-color: var(--ps-accent);
  color: var(--ps-accent-deep);
}

.blog-page .btn {
  display: inline-block;
  font-family: var(--ps-font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--ps-radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s;
}

.blog-page .btn-primary {
  background: var(--ps-accent);
  color: var(--ps-surface);
}

.blog-page .btn-primary:hover {
  background: var(--ps-accent-deep);
  color: var(--ps-surface);
}

/* ---------- Article Hero (Unified across all 3 blogs) ---------- */
.article-hero {
  background: var(--ps-surface);
  border-bottom: 1px solid var(--ps-line);
  padding: 28px 0 40px;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--ps-ink-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--ps-ink-soft);
  text-decoration: none;
  font-weight: 600;
}

.article-breadcrumb a:hover {
  color: var(--ps-accent);
  text-decoration: underline;
}

.article-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--ps-ink);
  max-width: 30ch;
}

.article-hero h1 span {
  color: var(--ps-accent);
}

.article-deck {
  max-width: 72ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ps-ink-soft);
  margin: 0 0 28px;
}

/* Unified Metadata & Specs Bar (replaces eyebrow labels and hero metric cards) */
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ps-line-soft);
}

.article-byline {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  color: var(--ps-ink);
}

.author-monogram {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--ps-radius-sm);
  background: var(--ps-ink);
  color: var(--ps-surface);
  font: 700 18px/1.3 var(--ps-font-display);
}

.article-byline strong {
  font-weight: 700;
  color: var(--ps-ink);
}

.article-byline p {
  color: var(--ps-ink-muted);
  font-size: 13.5px;
  margin: 2px 0 0;
}

.article-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-specs li,
.article-specs > div {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: var(--ps-surface-subtle);
  border: 1px solid var(--ps-line-soft);
  border-radius: var(--ps-radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ps-ink-soft);
  font-variant-numeric: tabular-nums;
}

.article-specs li strong,
.article-specs dt {
  color: var(--ps-ink);
  font-family: var(--ps-font-mono);
  font-weight: 600;
  margin: 0;
}

.article-specs dd {
  margin: 0;
  color: var(--ps-ink-soft);
}

/* ---------- 16:9 Two-Column Article Layout ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  padding-block: 44px 80px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 88px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  padding: 20px;
}

.article-index {
  border-top: 0;
  padding-top: 0;
}

.article-index summary {
  font-family: var(--ps-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ps-ink);
  cursor: pointer;
}

.article-index nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.article-index a {
  color: var(--ps-ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--ps-radius-sm);
  transition: background-color 0.15s, color 0.15s;
}

.article-index a:hover {
  color: var(--ps-ink);
  background: var(--ps-surface-subtle);
}

.article-index a.on,
.article-index a.active {
  color: var(--ps-surface);
  background: var(--ps-ink);
  font-weight: 600;
}

.sidebar-note {
  border-top: 1px solid var(--ps-line-soft);
  margin-top: 16px;
  padding-top: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ps-ink-muted);
}

/* ---------- Article Body & Section Rhythm ---------- */
.article-body {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.72;
  color: var(--ps-ink);
}

.article-body section {
  padding-top: 48px;
  border-top: 1px solid var(--ps-line);
  margin-top: 48px;
}

.article-body section:first-of-type {
  padding-top: 0;
  border-top: 0;
  margin-top: 0;
}

/* Nested sections (like principles inside translated-article) don't get outer section divider */
.article-body section section {
  padding-top: 0;
  border-top: 0;
  margin-top: 0;
}

.sec-head {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  max-width: 72ch;
}

.sec-head h2,\n.article-body h2 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 12px;
  color: var(--ps-ink);
  font-weight: 700;
  max-width: 65ch;
}

.sec-head p {
  color: var(--ps-ink-soft);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

.article-body h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin: 28px 0 10px;
  color: var(--ps-ink);
  font-weight: 700;
}

.article-body > section > p,
.article-body > section > ul,
.article-body > section > ol {
  max-width: 72ch;
}

.article-body p {
  margin: 0 0 18px;
  color: var(--ps-ink-soft);
}

.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--ps-ink-soft);
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.68;
}

.article-body strong,
.article-body b {
  color: var(--ps-ink);
  font-weight: 600;
}

.article-body a {
  color: var(--ps-accent);
  font-weight: 500;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.article-body a:hover {
  color: var(--ps-accent-deep);
  text-decoration-thickness: 2px;
}

.article-body code {
  font-family: var(--ps-font-mono);
  font-size: 0.86em;
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  color: var(--ps-ink);
  padding: 2px 6px;
  border-radius: var(--ps-radius-sm);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ---------- 1px Architectural Grids (High contrast, zero colored borders) ---------- */
.twocol,
.where,
.conv,
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--ps-line);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  overflow: hidden;
  margin: 24px 0;
}

.card,
.note,
.agent-principle {
  background: var(--ps-surface);
  padding: 24px 28px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.card h3,
.card h4,
.note h3,
.note h4,
.agent-principle h3 {
  color: var(--ps-ink);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.card p,
.card li,
.note p,
.agent-principle p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ps-ink-soft);
  margin: 0;
  max-width: 68ch;
}

.card ul {
  margin: 0;\n  padding-left: 1.2em;
  display: grid;
  gap: 8px;
}

/* ---------- Ledger-style Working Principles (2-column rows) ---------- */
.working-principles {
  margin: 24px 0 32px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  overflow: hidden;
}

.working-principles > div {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 24px;
  border-top: 1px solid var(--ps-line-soft);
  align-items: baseline;
}

.working-principles > div:first-child {
  border-top: 0;
}

.working-principles dt {
  font-family: var(--ps-font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ps-ink);
}

.working-principles dd {
  margin: 0;
  color: var(--ps-ink-soft);
  font-size: 15.5px;
  line-height: 1.68;
  max-width: 70ch;
}

/* ---------- Inverted Dark Callout & Banner (High contrast without colored borders) ---------- */
.article-callout {
  margin: 24px 0;
  padding: 24px 28px;
  background: var(--ps-ink);
  color: var(--ps-surface);
  border-radius: var(--ps-radius);
  font-size: 16px;
  line-height: 1.7;
  max-width: 100%;
}

.article-callout strong {
  color: var(--ps-surface);
  font-weight: 700;
}

.article-callout a {
  color: var(--ps-accent-soft);
}

.article-callout code {
  background: var(--ps-ink-soft);
  border-color: var(--ps-ink-muted);
  color: var(--ps-surface);
}

.translation-header {
  margin: 0 0 24px;
  padding: 28px 32px;
  background: var(--ps-ink);
  color: var(--ps-surface);
  border-radius: var(--ps-radius);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 24px;
}

.translation-header h2 {
  margin: 0 0 6px;
  color: var(--ps-surface);
  font-size: 1.65rem;
}

.translation-header p {
  font-size: 15px;
  margin: 0;
  color: var(--ps-line);
}

.translation-header a {
  color: var(--ps-accent-soft);
  font-weight: 600;
}

.translation-header .source-link {
  display: inline-block;
  background: var(--ps-surface);
  color: var(--ps-ink);
  padding: 8px 14px;
  border-radius: var(--ps-radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.translation-header .source-link:hover {
  background: var(--ps-accent-soft);
}

/* ---------- Quotes (Clean surface + footer band, NO colored side-tab) ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

blockquote.pull,
.article-quote {
  margin: 0;
  padding: 22px 24px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  display: grid;
  gap: 12px;
  align-content: space-between;
}

.article-quote {
  margin: 24px 0;
}

blockquote.pull p,
.article-quote p {
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--ps-ink);
  margin: 0;
  max-width: 70ch;
}

blockquote.pull cite,
.article-quote footer {
  font-style: normal;
  font-family: var(--ps-font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ps-ink-muted);
  padding-top: 12px;
  border-top: 1px solid var(--ps-line-soft);
}

/* ---------- Figures, Charts & Data Tables ---------- */
.article-figure {
  margin: 28px 0 36px;
  padding: 24px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
}

.article-figure--flush {
  padding: 20px;
}

.article-figure-head {
  margin-bottom: 18px;
}

.article-figure-head h3 {
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--ps-ink);
}

.article-figure-head p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ps-ink-muted);
  margin: 0;
  max-width: 72ch;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--ps-radius-sm);
  border: 1px solid var(--ps-line-soft);
}

.article-figure figcaption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ps-ink-muted);
  max-width: 75ch;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--ps-ink-soft);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.chart-swatch {
  width: 10px;
  height: 10px;
  border-radius: var(--ps-radius-sm);
  display: inline-block;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-variant-numeric: tabular-nums;
}

.bar-row {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr) 115px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.bar-label {
  font-weight: 600;
  color: var(--ps-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-label small {
  font-weight: 500;
  color: var(--ps-ink-muted);
  font-size: 12.5px;
  margin-left: 4px;
}

.bar-track {
  height: 22px;
  background: var(--ps-bg);
  border-radius: var(--ps-radius-sm);
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: var(--ps-radius-sm);
}

.bar-val {
  text-align: right;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ps-ink);
}

.bar-val span {
  color: var(--ps-ink-muted);
  font-weight: 500;
  margin-left: 4px;
}

.chart-svg-wrap {
  width: 100%;
  overflow-x: auto;
}

.chart-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 600px;
}

/* Padded table wrapper so children are never cramped against the border */
.data-table-wrap,
.tablewrap {
  margin: 24px 0 32px;
  padding: 12px 16px;
  overflow-x: auto;
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  background: var(--ps-surface);
}

.data-table,
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td,
.article-body th,
.article-body td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--ps-line-soft);
  color: var(--ps-ink-soft);
  vertical-align: top;
}

.data-table th,
.article-body th {
  background: var(--ps-surface-subtle);
  font-family: var(--ps-font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ps-ink);
  border-bottom: 1px solid var(--ps-line);
}

.data-table tr:last-child td,
.article-body tr:last-child td {
  border-bottom: 0;
}

.badge-lab {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--ps-radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.badge-anth {
  background: var(--ps-surface-subtle);
  border: 1px solid var(--ps-line);
  color: var(--ps-ink);
}

.badge-oai {
  background: var(--ps-accent-soft);
  color: var(--ps-accent-deep);
}

.badge-other {
  background: var(--ps-bg);
  color: var(--ps-ink-soft);
}

/* ---------- Sources & Article Footer ---------- */
.article-source {
  border-top: 1px solid var(--ps-line);
  margin-top: 48px;
  padding-top: 36px;
  color: var(--ps-ink-soft);
  font-size: 15px;
  line-height: 1.75;
}

.article-source h2 {
  color: var(--ps-ink);
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.article-source p {
  margin-bottom: 16px;
  max-width: 72ch;
}

.article-end {
  border-top: 1px solid var(--ps-line);
  padding-top: 24px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14.5px;
  font-weight: 600;
}

/* ---------- Blog Listing Home ---------- */
.blog-home-hero h1 {
  margin-bottom: 16px;
}

.blog-home-hero .article-deck {
  margin-bottom: 24px;
}

.blog-listing {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 48px;
  padding-block: 56px 96px;
}

.blog-listing-intro h2 {
  font-size: 1.4rem;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--ps-ink);
}

.blog-listing-intro p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ps-ink-soft);
  margin: 0;
}

.blog-posts {
  min-width: 0;
  display: grid;
  gap: 1px;
  background: var(--ps-line);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  overflow: hidden;
}

.blog-post {
  padding: 28px 32px;
  background: var(--ps-surface);
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  color: var(--ps-ink-muted);
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

.blog-post-meta > :last-child {
  margin-left: auto;
}

.blog-post-title {
  font-size: 1.35rem;
  line-height: 1.45;
  margin: 14px 0 12px;
  letter-spacing: -0.015em;
}

.blog-post-title a {
  color: var(--ps-ink);
  text-decoration: none;
  line-height: 1.45;
}

.blog-post-title a:hover {
  color: var(--ps-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.blog-post p {
  max-width: 72ch;
  margin: 0 0 18px;
  color: var(--ps-ink-soft);
  line-height: 1.7;
  font-size: 16px;
}

.blog-read-link {
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 600;
  text-underline-offset: 4px;
}

/* ---------- Site Footer ---------- */
.blog-page .site-footer {
  background: var(--ps-ink);
  color: var(--ps-surface);
  padding: 48px 0;
  border-top: 1px solid var(--ps-line);
}

.blog-page .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.blog-page .footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-page .footer-name {
  font-family: var(--ps-font-display);
  font-weight: 700;
  font-size: 17px;
  margin: 0;
  color: var(--ps-surface);
}

.blog-page .footer-tag {
  font-size: 13.5px;
  color: var(--ps-line);
  margin: 2px 0 0;
}

.blog-page .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.blog-page .footer-nav a {
  color: var(--ps-line);
  text-decoration: none;
  font-size: 14px;
}

.blog-page .footer-nav a:hover {
  color: var(--ps-surface);
  text-decoration: underline;
}

.blog-page .footer-legal {
  width: 100%;
  margin: 16px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--ps-ink-soft);
  font-size: 13.5px;
  color: var(--ps-line);
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1080px) {
  .blog-page .site-nav {
    gap: 16px;
  }
  .blog-page .site-nav a {
    font-size: 13.5px;
  }
  .blog-page .header-inner {
    gap: 16px;
  }
  .article-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 860px) {
  .blog-page .site-nav {
    display: none;
  }
  .blog-page .header-inner .btn {
    margin-left: auto;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .article-sidebar {
    position: static;
    padding: 16px;
  }
  .article-index nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-top: 14px;
  }
  .sidebar-note {
    display: none;
  }
  .working-principles > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .blog-listing {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-block: 40px 64px;
  }
  .bar-row {
    grid-template-columns: 150px minmax(0, 1fr) 96px;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .blog-page [id] {
    scroll-margin-top: 156px;
  }
  .blog-page .container {
    padding-inline: 16px;
  }
  .blog-page .header-inner {
    gap: 8px;
  }
  .blog-page .brand {
    gap: 7px;
  }
  .blog-page .brand-name {
    font-size: 16px;
  }
  .blog-page .header-inner .btn {
    font-size: 13px;
    padding-inline: 12px;
  }
  .article-hero h1 {
    font-size: 2rem;
    line-height: 1.25;
  }
  .article-deck {
    font-size: 16px;
  }
  .article-index nav {
    grid-template-columns: 1fr;
  }
  .card,
  .note,
  .agent-principle {
    padding: 18px 20px;
  }
  .blog-post {
    padding: 20px;
  }
}
