/* STPMx — Editorial fintech / institutional */

:root {
  --cream: #f3ede4;
  --cream-dark: #e8e0d4;
  --forest: #0c3b2e;
  --forest-mid: #145c45;
  --forest-light: #1a7a5c;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --ink-muted: #78716c;
  --gold: #b8956b;
  --gold-light: #d4b896;
  --white: #faf9f7;
  --border: rgba(12, 59, 46, 0.12);
  --border-strong: rgba(12, 59, 46, 0.22);
  --shadow: 0 12px 40px rgba(12, 59, 46, 0.08);
  --rail-w: 220px;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--forest);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

/* Layout frame */
.page-frame {
  display: flex;
  min-height: 100vh;
}

/* Side rail */
.side-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-w);
  height: 100vh;
  background: var(--forest);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  z-index: 200;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-brand {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  color: var(--cream);
  margin-bottom: 48px;
}

.rail-mark {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-style: italic;
  color: var(--gold-light);
}

.rail-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rail-nav ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: rgba(243, 237, 228, 0.65);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.rail-link:hover,
.rail-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
}

.rail-num {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gold);
  min-width: 20px;
}

.rail-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: rgba(243, 237, 228, 0.55);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5);
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* Main column */
.main-column {
  flex: 1;
  margin-left: var(--rail-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 40px;
  background: rgba(243, 237, 228, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--forest);
}

.top-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.meta-sep {
  margin: 0 8px;
}

.top-search {
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}

.top-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  transition: border-color 0.2s;
}

.top-search input:focus {
  outline: none;
  border-color: var(--forest-mid);
}

/* Sections */
.view-section {
  padding: 48px 40px 64px;
  max-width: 1100px;
  animation: fadeIn 0.4s var(--ease);
}

.view-section[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  padding: 24px 0 48px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.eyebrow-tag {
  padding: 4px 10px;
  background: var(--forest);
  color: var(--cream);
  border-radius: 2px;
}

.eyebrow-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border-strong);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--forest);
  max-width: 14ch;
  margin-bottom: 24px;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--forest);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--forest-mid);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: var(--white);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric-cell {
  background: var(--white);
  padding: 24px 20px;
}

.metric-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Ticker */
.ticker-band {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  overflow: hidden;
}

.ticker-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  white-space: nowrap;
}

.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}

.ticker-track span {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.ticker-track span::before {
  content: "◆";
  margin-right: 12px;
  color: var(--forest-light);
  font-size: 0.5rem;
  vertical-align: middle;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Home grid */
.home-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin-bottom: 56px;
}

.home-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.card-index {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.card-body {
  padding: 28px 24px 32px;
}

.featured-article h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--forest);
  margin: 12px 0 16px;
}

.featured-article p {
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 2px;
}

.tag.category {
  background: rgba(12, 59, 46, 0.08);
  color: var(--forest);
}

.tag.keyword {
  background: rgba(184, 149, 107, 0.15);
  color: #8b6914;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.home-aside {
  padding: 28px 24px;
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius);
}

.aside-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 24px;
}

.aside-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.aside-list li {
  padding-left: 16px;
  border-left: 2px solid var(--gold);
}

.aside-list strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.aside-list span {
  font-size: 0.8125rem;
  color: rgba(243, 237, 228, 0.7);
  line-height: 1.5;
}

.aside-link {
  font-size: 0.875rem;
  color: var(--gold-light);
  text-decoration: none;
}

.aside-link:hover {
  text-decoration: underline;
}

/* Flow diagram */
.flow-diagram {
  margin-top: 16px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--forest);
  margin-bottom: 28px;
}

.label-num {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  color: var(--cream);
  border-radius: 2px;
}

.flow-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

.flow-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
}

.step-num {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--forest);
  border-radius: 50%;
  margin-bottom: 12px;
}

.flow-step strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--forest);
}

.flow-step p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.flow-connector {
  width: 24px;
  height: 2px;
  background: var(--gold);
  margin-top: 36px;
  align-self: start;
}

/* Section headers */
.section-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.section-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  color: var(--forest);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.7;
}

/* Content columns */
.content-columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--forest);
  margin: 32px 0 12px;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  line-height: 1.75;
}

.fact-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  align-self: start;
  position: sticky;
  top: 80px;
}

.fact-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 20px;
}

.fact-list div {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.fact-list div:last-child {
  border-bottom: none;
}

.fact-list dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.fact-list dd {
  font-size: 0.9375rem;
  color: var(--ink);
}

/* Comparison table */
.comparison-table-wrap {
  margin-top: 16px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--forest);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.8125rem;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
  background: rgba(243, 237, 228, 0.4);
}

/* STP Mexico grid */
.mx-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.mx-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.mx-card-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
}

.mx-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 12px;
}

.mx-card p {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* Timeline */
.timeline {
  margin-bottom: 48px;
}

.timeline-list {
  list-style: none;
  border-left: 2px solid var(--gold);
  margin-left: 8px;
  padding-left: 28px;
}

.timeline-list li {
  position: relative;
  padding-bottom: 28px;
}

.timeline-list li::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--forest);
  border: 2px solid var(--cream);
  border-radius: 50%;
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}

.timeline-list strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--forest);
  margin-bottom: 6px;
}

.timeline-list p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* CTA band */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 28px;
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius);
}

.cta-text h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.cta-text p {
  font-size: 0.9375rem;
  color: rgba(243, 237, 228, 0.75);
  max-width: 40ch;
}

.cta-band .btn-primary {
  background: var(--gold);
  color: var(--forest);
  flex-shrink: 0;
}

.cta-band .btn-primary:hover {
  background: var(--gold-light);
}

/* Blog */
.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}

.result-count {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: var(--white);
  cursor: pointer;
  transition: background 0.15s;
}

.blog-row:hover {
  background: rgba(243, 237, 228, 0.5);
}

.row-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}

.blog-row-content h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--forest);
  margin-bottom: 6px;
  line-height: 1.3;
}

.blog-row-content p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-row-meta {
  text-align: right;
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.blog-row-meta time {
  display: block;
  margin-bottom: 4px;
}

/* Glossary */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.glossary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.glossary-item dt {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--forest);
  margin-bottom: 8px;
}

.glossary-item dd {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.seo-block {
  padding: 28px 24px;
  background: rgba(12, 59, 46, 0.04);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.seo-block h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.seo-text {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.8;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9375rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--forest-mid);
  background: var(--white);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.form-note {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.form-status {
  margin-top: 16px;
  font-size: 0.875rem;
}

.form-status.success {
  color: var(--forest-mid);
}

.form-status.error {
  color: #b91c1c;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-block {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-block h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 14px;
}

.info-block p,
.info-block address {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  font-style: normal;
  line-height: 1.65;
}

.info-block a {
  color: var(--forest-mid);
}

.link-list {
  list-style: none;
}

.link-list li {
  margin-bottom: 8px;
}

.link-list a {
  font-size: 0.9375rem;
  color: var(--forest-mid);
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 40px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.4);
}

.footer-inner {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-mark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--forest);
  display: block;
  margin-bottom: 4px;
}

.footer-brand p {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.footer-nav a {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--forest);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: right;
}

/* Modal */
.article-modal {
  border: none;
  padding: 0;
  max-width: 720px;
  width: calc(100% - 32px);
  max-height: 90vh;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-modal::backdrop {
  background: rgba(12, 59, 46, 0.5);
  backdrop-filter: blur(4px);
}

.modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--cream);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: var(--radius);
}

.modal-close:hover {
  background: var(--cream-dark);
  color: var(--ink);
}

.modal-meta {
  margin-bottom: 12px;
}

.modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--forest);
  line-height: 1.2;
  padding-right: 40px;
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  flex: 1;
}

.modal-body p {
  margin-bottom: 16px;
  color: var(--ink-soft);
  line-height: 1.75;
}

.modal-body h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--forest);
  margin: 28px 0 12px;
}

.modal-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-grid,
  .content-columns,
  .mx-grid,
  .contact-grid,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .flow-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flow-connector {
    width: 2px;
    height: 20px;
    margin: 0 auto;
  }

  .fact-panel {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-copy {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .side-rail {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }

  .side-rail.open {
    transform: translateX(0);
  }

  .main-column {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .top-meta {
    display: none;
  }

  .view-section {
    padding: 32px 20px 48px;
  }

  .top-bar {
    padding: 14px 20px;
  }

  .hero-title {
    max-width: none;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .blog-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .blog-row-meta {
    text-align: left;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .comparison-table-wrap {
    overflow-x: auto;
  }
}
