/* ========================================================================
   APEX G-SCORE — ARTICLE STYLES
   For individual research notes and case studies.
   Shares design tokens with /research index page.
   ======================================================================== */

:root {
  /* Color — navy */
  --navy-950: #061829;
  --navy-900: #0A2540;

  /* Color — gold */
  --gold-500: #B8943D;
  --gold-400: #C9A961;
  --gold-100: rgba(184, 148, 61, 0.08);

  /* Color — paper */
  --paper:        #FBFAF6;
  --paper-tinted: #F4F1E9;

  /* Color — ink */
  --ink-900: #0F1419;
  --ink-700: #2A3340;
  --ink-500: #5A6470;
  --ink-300: #9CA4B0;

  /* Rules */
  --rule-std:  rgba(10, 37, 64, 0.14);
  --rule-soft: rgba(10, 37, 64, 0.06);
  --rule-dark: rgba(251, 250, 246, 0.15);
  --rule-dark-soft: rgba(251, 250, 246, 0.06);

  /* Signals */
  --signal-green: #4DAA70;
  --signal-amber: #D4A84F;

  /* Type families */
  --ff-serif: 'IBM Plex Serif', 'Noto Serif KR', Georgia, serif;
  --ff-sans:  'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-mono:  'IBM Plex Mono', 'SF Mono', Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 640px) { .container { padding: 0 20px; } }

/* ========================================================================
   NAV — site-wide standard (matches /about, /services, /contact, etc.)
   ======================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  border-bottom: 1px solid var(--rule-dark-soft);
  padding: 22px 0;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 24px;
}

.brand {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
}

.brand sup {
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: 9px;
  color: var(--ink-300);
  margin-left: 2px;
  vertical-align: super;
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  list-style: none;
}

.nav-link {
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: 14px;
  color: rgba(251, 250, 246, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:link,
.nav-link:visited { color: rgba(251, 250, 246, 0.7); }
.nav-link:hover,
.nav-link:focus,
.nav-link:active { color: var(--gold-400); }
.nav-link.current,
.nav-link.current:link,
.nav-link.current:visited,
.nav-link.current:hover,
.nav-link.current:focus,
.nav-link.current:active {
  color: var(--paper);
  border-bottom: 1px solid var(--gold-400);
  padding-bottom: 4px;
}

.nav-cta {
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--gold-400);
  background: transparent;
  border: 1px solid var(--gold-400);
  padding: 8px 17px;
  border-radius: 2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-cta::after {
  content: "→";
  display: inline-block;
  transition: transform 0.25s ease;
}
.nav-cta:hover { background: var(--gold-400); color: var(--navy-950); }
.nav-cta:hover::after { transform: translateX(4px); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--paper);
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav { padding: 14px 0; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 16px;
    border-bottom: 1px solid rgba(251, 250, 246, 0.08);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link {
    padding: 14px 40px;
    font-size: 15px;
    color: var(--paper);
    border-top: 1px solid rgba(251, 250, 246, 0.06);
  }
  .nav-links .nav-link:first-child { border-top: none; }
  .nav-links .nav-link.current {
    border-bottom: none;
    padding-bottom: 14px;
    color: var(--gold-400);
  }
  .nav-links .nav-cta {
    margin: 16px 40px 0;
    padding: 14px 20px;
    background: var(--gold-400);
    color: var(--navy-950);
    border-radius: 2px;
    justify-content: center;
    font-size: 14px;
  }
  .nav-links .nav-cta::after { color: var(--navy-950); }
  .nav-links .nav-cta:hover { background: var(--gold-500); color: var(--navy-950); }
  .nav-links .nav-cta:hover::after { color: var(--navy-950); }
}

/* ========================================================================
   ARTICLE HEADER (D)
   ======================================================================== */
.article-header {
  background: var(--paper);
  border-top: 3px solid var(--ink-900);
  border-bottom: 1px solid var(--rule-std);
  padding: 10px 0;
}

.article-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.article-header-pub {
  font-family: var(--ff-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-900);
  text-decoration: none;
}
.article-header-pub:hover { color: var(--gold-500); }

.article-header-series {
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
}

.article-eyebrow {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.article-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold-400);
}

.article-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}

.format-label {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  padding: 5px 10px;
  border: 1px solid var(--gold-400);
  background: rgba(184, 148, 61, 0.08);
}

.market-chip {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 5px 10px;
  border: 1px solid var(--rule-dark);
  background: transparent;
  opacity: 0.85;
}

.article-title {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin-bottom: 28px;
}

.article-lede {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  color: var(--paper);
  opacity: 0.85;
  margin-bottom: 32px;
}

.article-meta-bar {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--rule-dark-soft);
}

.article-meta-item {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-400);
  opacity: 0.85;
}

.article-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--signal-green);
}

/* Data vintage line — sits below the article-meta-bar to declare
   which fiscal-year disclosures back the analysis */
.article-meta-strip {
  margin-top: 14px;
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1.6;
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  color: var(--ink-300);
  margin-bottom: 2px;
}
.meta-line strong {
  font-weight: 500;
  color: var(--ink-700);
}
.meta-sep {
  color: var(--ink-200);
}
.article-content-header .meta-line {
  color: var(--ink-500);
}
.article-content-header .meta-line strong {
  color: var(--ink-700);
}

/* ========================================================================
   ARTICLE BODY (L)
   ======================================================================== */
.article-body {
  background: var(--paper);
  padding: 32px 0 96px;
}

.article-body-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

.article-body-main {
  max-width: 720px;
  min-width: 0;
}

.article-body-inner {
  max-width: 720px;
  margin: 0;
}

@media (max-width: 980px) {
  .article-body-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .article-body-main { order: 1; }
  .article-body-sidebar {
    order: 2;
    position: static !important;
    max-height: none !important;
    margin-top: 56px;
    padding-top: 40px;
    padding-right: 0;
    border-right: none;
    border-top: 1px solid var(--rule-std);
  }
}

@media (max-width: 820px) {
  .article-body { padding: 24px 0 72px; }
}

/* ========================================================================
   ARTICLE CONTENT HEADER — sits at top of body on paper background,
   carries the article-specific identity (title, meta, vintage)
   ======================================================================== */
.article-content-header {
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule-std);
}

/* Paper-context overrides for shared header classes */
.article-content-header .article-eyebrow {
  color: var(--gold-500);
  margin-bottom: 20px;
}
.article-content-header .article-eyebrow::before {
  background: var(--gold-500);
}

.article-content-header .article-meta-row {
  margin-bottom: 22px;
}

.article-content-header .format-label {
  color: var(--gold-500);
  border-color: var(--gold-500);
  background: rgba(184, 148, 61, 0.06);
}

.article-content-header .market-chip {
  color: var(--ink-700);
  border-color: var(--rule-std);
  opacity: 1;
}

.article-content-header .article-title {
  font-size: clamp(26px, 3vw, 36px);
  color: var(--ink-900);
  margin-bottom: 22px;
}

.article-content-header .article-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  opacity: 1;
  margin-bottom: 28px;
}

.article-content-header .article-meta-bar {
  border-top: 1px solid var(--rule-std);
}

.article-content-header .article-meta-item {
  color: var(--gold-500);
  opacity: 1;
}

/* ========================================================================
   ARTICLE SIDEBAR — series navigation
   ======================================================================== */
.article-body-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-family: var(--ff-sans);
  border-right: 1px solid var(--rule-std);
  padding-right: 32px;
}

.sidebar-series-label {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sidebar-series-label::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--gold-500);
}

.sidebar-section {
  margin-top: 28px;
}
.sidebar-section:first-child {
  margin-top: 6px;
}

.sidebar-section-label {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 12px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li {
  margin: 0;
}

.sidebar-link {
  display: block;
  padding: 8px 0 8px 14px;
  border-left: 2px solid transparent;
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-700);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.sidebar-link:hover {
  color: var(--ink-900);
  border-left-color: var(--rule-std);
}
.sidebar-link.current {
  color: var(--ink-900);
  font-weight: 500;
  border-left-color: var(--gold-500);
}

.sidebar-link-num {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-500);
  margin-right: 6px;
  letter-spacing: 0.04em;
}
.sidebar-link.current .sidebar-link-num {
  color: var(--gold-500);
  font-weight: 500;
}

.sidebar-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-std);
}

.sidebar-footer-link {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-500);
  padding-bottom: 2px;
  transition: color 0.15s;
}
.sidebar-footer-link:hover { color: var(--gold-500); }

.article-body p {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink-900);
  margin-bottom: 22px;
}

.article-body em {
  font-style: italic;
}

.article-body strong {
  font-weight: 500;
}

.article-body h2 {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink-900);
  margin-top: 56px;
  margin-bottom: 24px;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin-top: 36px;
  margin-bottom: 18px;
}

.article-body ul, .article-body ol {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink-900);
  margin-bottom: 22px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-700);
  margin: 28px 0;
  padding-left: 24px;
  border-left: 3px solid var(--gold-500);
}

.article-body hr {
  border: 0;
  height: 1px;
  background: var(--rule-std);
  margin: 48px 0;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-family: var(--ff-sans);
  font-size: 14px;
}

.article-body thead {
  background: var(--paper-tinted);
  border-bottom: 2px solid var(--navy-900);
}

.article-body th {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-700);
  padding: 12px 14px;
  text-align: left;
  vertical-align: bottom;
}

.article-body tbody tr {
  border-bottom: 1px solid var(--rule-std);
}

.article-body tbody tr:last-child {
  border-bottom: 0;
}

.article-body td {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-900);
  padding: 12px 14px;
  vertical-align: top;
}

.article-body td strong {
  font-weight: 500;
}

@media (max-width: 640px) {
  .article-body table { font-size: 12px; }
  .article-body th, .article-body td { padding: 10px 8px; }
}

.article-body a {
  color: var(--ink-900);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-500);
  transition: color 0.2s, border-color 0.2s;
}

.article-body a:hover {
  color: var(--gold-500);
  border-color: var(--gold-500);
}

/* References styling */
.article-body .references {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--rule-std);
}

.article-body .references h2 {
  font-size: 22px;
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 20px;
}

.article-body .references ul {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-700);
  list-style: none;
  padding-left: 0;
}

.article-body .references li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 10px;
}

.article-body .references li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold-500);
  font-weight: 600;
}

/* Footnotes — matching Korean Foundation Series style */
.footnotes {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(10, 37, 64, 0.14);
}
.footnotes h2 {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 0 0 24px 0;
}
.footnotes ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: fn-counter;
}
.footnotes ol li {
  counter-increment: fn-counter;
  font-family: var(--ff-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-700);
  padding: 12px 0 12px 36px;
  position: relative;
  border-bottom: 1px solid rgba(10, 37, 64, 0.06);
  scroll-margin-top: 100px;
}
.footnotes ol li:last-child { border-bottom: none; }
.footnotes ol li::before {
  content: counter(fn-counter);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--gold-500);
  letter-spacing: 0.04em;
  width: 24px;
  text-align: right;
}
.footnotes ol li:target {
  background: rgba(184, 148, 61, 0.08);
  border-left: 2px solid var(--gold-500);
  padding-left: 34px;
  margin-left: -2px;
}
.fn-back {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--gold-500);
  text-decoration: none;
  margin-left: 6px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.fn-back:hover { opacity: 1; }

/* Methodology footnote (italic block before brand footer) */
.article-body .methodology-note {
  font-family: var(--ff-sans);
  font-weight: 300;
  font-style: italic;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-500);
  background: var(--paper-tinted);
  padding: 28px 32px;
  margin-top: 56px;
  border-left: 3px solid var(--gold-500);
}

.article-body .methodology-note p {
  font-family: inherit;
  font-style: italic;
  font-size: 13px;
  line-height: 1.65;
  color: inherit;
  margin-bottom: 0;
}

/* Brand footer line in article */
.article-body .brand-footer {
  font-family: var(--ff-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  margin-top: 36px;
  text-align: left;
}

.article-body .brand-footer p {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.6;
  color: inherit;
  margin-bottom: 6px;
}

/* ========================================================================
   ARTICLE CODA — citation + continue links at end of article
   ======================================================================== */
.article-coda {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--rule-std);
}

.article-coda-block {
  margin-bottom: 36px;
}
.article-coda-block:last-child { margin-bottom: 0; }

.article-coda-label {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.article-coda-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold-500);
}

.article-citation {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-700);
  margin: 0;
}
.article-citation em {
  font-style: italic;
}
.article-citation-url {
  display: block;
  margin-top: 6px;
  font-family: var(--ff-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  word-break: break-all;
}

.article-coda-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.article-coda-link {
  font-family: var(--ff-sans);
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-500);
  padding-bottom: 2px;
  transition: color 0.15s;
}
.article-coda-link:hover { color: var(--gold-500); }


/* ========================================================================
   FOOTER — site-wide standard (matches /about, /services, /contact, etc.)
   ======================================================================== */
.footer {
  padding: 56px 0 32px;
  background: var(--navy-900);
  color: rgba(251, 250, 246, 0.7);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 17px;
  color: var(--paper);
  margin-bottom: 8px;
}

.footer-tagline {
  font-family: var(--ff-sans);
  font-size: 13px;
  line-height: 1.55;
  max-width: 32ch;
}

.footer-links {
  display: flex;
  flex-direction: row;
  gap: 64px;
}

.footer-col h4 {
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  font-family: var(--ff-sans);
  font-size: 13px;
  color: rgba(251, 250, 246, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--paper); }

.footer-col h4 a,
.footer-col h4 a:link,
.footer-col h4 a:visited {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col h4 a:hover { color: var(--paper); }

.footer-mobile-links { display: none; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(251, 250, 246, 0.4);
  text-transform: uppercase;
}

.footer-bottom span:nth-child(2) { color: rgba(184, 148, 61, 0.6); }

.footer-bottom a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer-bottom a:hover {
  color: var(--gold-400);
  border-bottom-color: rgba(201, 169, 97, 0.4);
}

@media (max-width: 720px) {
  .footer { padding: 28px 0 18px; }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
  }
  .footer-links { display: none; }
  .footer-tagline { font-size: 12px; max-width: 36ch; }
  .footer-mobile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-family: var(--ff-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .footer-mobile-links a {
    color: rgba(251, 250, 246, 0.7);
    text-decoration: none;
    transition: color 0.2s;
  }
  .footer-mobile-links a:hover { color: var(--paper); }
  .footer-mobile-links .sep { color: rgba(251, 250, 246, 0.3); }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding-top: 14px;
  }
}

/* ========================================================================
   PRINT — institutional readers often save/print research notes as PDF
   ======================================================================== */
@media print {
  /* Hide chrome */
  .nav,
  .article-body-sidebar,
  .article-coda-block:has(.article-coda-label:not(:first-of-type)) ~ .article-coda-block,
  footer.footer { display: none !important; }

  /* Strip dark backgrounds and effects to save ink */
  .article-header {
    background: white !important;
    color: #000 !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #888 !important;
  }
  .article-header::before,
  .article-header::after { display: none !important; }
  .article-header-pub { color: #000 !important; }
  .article-header-series { color: #444 !important; }

  /* Body */
  body, .article-body { background: white !important; }
  .article-body { padding: 24px 0 !important; }
  .article-body-grid { display: block !important; }
  .article-body-main { max-width: 100% !important; }

  /* Show URLs after links so paper readers see them */
  .article-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
    word-break: break-all;
  }
  /* But don't repeat for sidebar/coda links (sidebar hidden anyway) */
  .article-coda-link::after { content: none !important; }

  /* Page break management */
  .article-body h2, .article-body h3 {
    page-break-after: avoid;
    break-after: avoid;
  }
  .article-body p, .article-body li {
    page-break-inside: avoid;
    break-inside: avoid;
    orphans: 3;
    widows: 3;
  }
  .article-body table { page-break-inside: avoid; break-inside: avoid; }

  /* Article coda — keep citation visible for reference, drop the rest */
  .article-coda { margin-top: 36px !important; padding-top: 24px !important; }
}

/* ========================================================================
   ACCESSIBILITY — skip link for keyboard/screen-reader users
   ======================================================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--gold-500);
  color: var(--paper);
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}
