/* ============================================================
   CDP Docs - Shared Stylesheet
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  /* Text-safe green for links, active states and text buttons (5.1:1 on white).
     The landing green --brand-60 is 2.1:1, so it is used for fills and bars only. */
  --color-primary:        #2E7D46;
  --color-primary-dark:   #24653A;
  --color-primary-light:  #EEFAF1;
  --color-secondary:      #373737;
  --color-bg:             #FFFFFF;
  --color-surface:        #F7F9F7;
  --color-surface-2:      #F0F3F0;
  --color-border:         #ECECEC;
  --color-border-strong:  #D6DAD6;
  --color-text:           #171717;
  --color-text-body:      #373737;
  --color-text-muted:     #5A5A5A;
  --color-text-inverse:   #FFFFFF;
  --color-success:        #3D8F54;
  --color-success-bg:     #EEFAF1;
  --color-error:          #D93F3F;
  --color-error-bg:       #FDF1F1;
  --color-warning:        #D97706;
  --color-warning-bg:     #FFFBEB;
  --color-info:           #50C8E6;
  --color-info-bg:        #EEF9FC;
  --color-code-bg:        #1A1E1B;
  --color-code-text:      #E4E9E5;
  --color-tag-bg:         #EEFAF1;
  --color-tag-text:       #2E7D46;

  --brand-60:   #56C977;
  --brand-grad: linear-gradient(117deg, #BDE236 0%, #58CA5A 24.9%, #54C98F 64.8%, #52C8BE 87.3%, #50C8DB 101%, #50C8E6 112%);

  --font-sans:  "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-brand: "Poppins", "Noto Sans JP", sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --max-content-width: 1200px;
  --sidebar-width:     272px;
  --nav-height:        64px;
  --radius-sm:         4px;
  --radius-md:         10px;
  --radius-lg:         12px;
  --shadow-sm:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:         0 2px 8px rgba(51,51,51,.24);
  --shadow-card:       0 1px 2px rgba(0,0,0,.2);
  --transition:        150ms ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-body);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--color-primary-dark); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: .35rem; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal;
}
h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem;  margin-top: 2.5rem; margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 1px solid var(--color-border); }
h3 { font-size: 1.125rem; margin-top: 1.75rem; margin-bottom: .5rem; }
h4 { font-size: 1rem; margin-top: 1.25rem; margin-bottom: .35rem; }
/* Offset anchor targets so sticky header doesn't cover them */
h2[id], h3[id] { scroll-margin-top: calc(var(--nav-height) + 1.5rem); }
p  { margin-bottom: 1rem; }
strong { color: var(--color-text); font-weight: 600; }
code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--color-surface-2);
  color: var(--color-secondary);
  padding: .15em .4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
pre code { background: none; color: inherit; padding: 0; border: none; font-size: .875rem; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Site Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: none;
}
.site-nav {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-brand);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--color-text);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.logo span { color: var(--color-primary); }
.logo img { height: 28px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: .125rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.nav-links a {
  display: block;
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
  color: var(--color-text);
  font-size: 1.25rem;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--color-surface-2); }

/* ── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: .6rem 0;
}
.breadcrumbs ol {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  color: var(--color-text-muted);
}
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: '/'; margin-right: .5rem; }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs [aria-current="page"] { color: var(--color-text); font-weight: 500; }

/* ── Page Layout (sidebar + content) ────────────────────── */
.page-wrapper {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 3rem;
  align-items: start;
}
.page-wrapper.no-sidebar { grid-template-columns: 1fr; max-width: 860px; }

/* ── Sidebar ToC ─────────────────────────────────────────── */
.sidebar-toc {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
  padding-left: 1.25rem;
  border-left: 3px solid var(--brand-60);
  font-size: .875rem;
}
.sidebar-toc h4 {
  font-size: .9375rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-text);
  margin: 0 0 .875rem 0;
}
.sidebar-toc ol { list-style: none; padding: 0; }
.sidebar-toc li { margin: 0; }
.sidebar-toc a {
  display: block;
  padding: .3rem 0;
  color: var(--color-text-muted);
  font-weight: 400;
  transition: color var(--transition);
}
.sidebar-toc a:hover { color: var(--color-text); text-decoration: none; }
.sidebar-toc a.active {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}
.sidebar-toc .toc-sub {
  padding-left: 1rem;
  margin-top: .15rem;
  font-size: .8125rem;
  font-weight: 400;
}

/* ── Article Content ─────────────────────────────────────── */
.article { min-width: 0; }
.article-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); }
.article-header .tag {
  display: inline-block;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .7rem;
  border-radius: 999px;
  margin-bottom: .75rem;
  letter-spacing: .03em;
}
.article-header p { font-size: 1.0625rem; color: var(--color-text-muted); margin-bottom: 0; }

/* ── Code Blocks ─────────────────────────────────────────── */
.code-block {
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  background: #222823;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-lang {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  color: #A3ADA5;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.copy-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  color: #A3ADA5;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 500;
  padding: .25rem .6rem;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font-sans);
}
.copy-btn:hover { background: rgba(255,255,255,.18); color: #E2E8F0; }
.copy-btn.copied { color: #A9E2B8; border-color: rgba(169,226,184,.3); }
.code-block pre {
  background: var(--color-code-bg);
  /* Fallback for languages the highlight.js common bundle lacks (http, csv) */
  color: var(--color-code-text);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0;
  line-height: 1.6;
}
/* Let the <pre> background show through the highlight.js theme */
.hljs { background: transparent; }

/* Code tab switcher */
.code-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: -1px;
  padding: .75rem 1rem .75rem;
  background: #222823;
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.code-tab-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: #A3ADA5;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .75rem;
  padding: .25rem .75rem;
  transition: background var(--transition), color var(--transition);
}
.code-tab-btn:hover { background: rgba(255,255,255,.12); color: #E2E8F0; }
.code-tab-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.code-panel { display: none; }
.code-panel.active { display: block; }
.code-panel .code-block { border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-top: none; margin-top: 0; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; margin: 1.25rem 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead { background: var(--color-surface-2); }
th {
  text-align: left;
  padding: .75rem 1rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  color: var(--color-text-body);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-surface); }
td code { font-size: .8125rem; }

/* ── Callout Boxes ───────────────────────────────────────── */
.callout {
  display: flex;
  gap: .875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.25rem 0;
  border-left: 3px solid;
  font-size: .9375rem;
}
.callout-icon { font-size: 1.125rem; flex-shrink: 0; margin-top: .1rem; }
.callout-content { flex: 1; }
.callout-content p { margin-bottom: 0; }
.callout-content strong { display: block; margin-bottom: .25rem; }
.callout.info    { background: var(--color-info-bg);    border-color: var(--color-info);    color: #1F3B44; }
.callout.success { background: var(--color-success-bg); border-color: var(--color-success); color: #14532D; }
.callout.warning { background: var(--color-warning-bg); border-color: var(--color-warning); color: #78350F; }
.callout.danger  { background: var(--color-error-bg);   border-color: var(--color-error);   color: #7F1D1D; }

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge.get    { background: #DCFCE7; color: #15803D; }
.badge.post   { background: #DBEAFE; color: #1D4ED8; }
.badge.put    { background: #FEF9C3; color: #A16207; }
.badge.patch  { background: #F3E8FF; color: #7C3AED; }
.badge.delete { background: #FEE2E2; color: #B91C1C; }
.badge.req    { background: #FEE2E2; color: #B91C1C; }
.badge.opt    { background: var(--color-surface-2); color: var(--color-text-muted); }

/* ── Hero (index only) ───────────────────────────────────── */
.hero {
  background: var(--brand-grad);
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* A soft dark-green glow behind the centered text keeps it readable on the gradient */
  background: radial-gradient(ellipse 60% 75% at 50% 50%, rgba(14,52,30,.30) 0%, rgba(14,52,30,.12) 60%, transparent 100%);
}
.hero-inner { position: relative; max-width: 780px; margin: 0 auto; }
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,.92);
  border: 1px solid transparent;
  color: var(--color-primary);
  font-size: .8125rem;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
}
.hero h1 { font-size: 3rem; color: #FFFFFF; margin-bottom: 1.25rem; line-height: 1.15; text-shadow: 0 1px 2px rgba(10,40,20,.18); }
.hero h1 span { color: #FFFFFF; }
.hero p  { font-size: 1.125rem; color: #FFFFFF; text-shadow: 0 1px 2px rgba(10,40,20,.25); margin-bottom: 2.25rem; max-width: 580px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.hero .btn-primary { background: #FFFFFF; color: var(--color-primary); box-shadow: var(--shadow-md); }
.hero .btn-primary:hover { background: #FFFFFF; color: var(--color-primary-dark); }
.btn-outline { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,.85); }
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #FFFFFF; text-decoration: none; }
.btn-sm { padding: .45rem 1rem; font-size: .875rem; }

/* ── Feature Rows (index): text beside a line illustration, sides alternating ── */
.features-section { padding: 4.5rem 1.5rem; background: var(--color-bg); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { border: none; margin-top: 0; font-size: 1.875rem; }
.section-title p  { color: var(--color-text-muted); font-size: 1.0625rem; margin-bottom: 0; }
.feature-rows { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 4.5rem; }
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.feature-row:nth-child(even) .feature-art { order: -1; }
.feature-text h3 { margin-top: 0; margin-bottom: .75rem; font-size: 1.375rem; }
.feature-text p  { margin-bottom: 1.25rem; }
.feature-art { display: flex; justify-content: center; }
.feature-art svg { width: 100%; max-width: 360px; height: auto; }
.pill-link {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1.1rem;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: .875rem;
  font-weight: 700;
  transition: background var(--transition);
}
.pill-link:hover { background: #DDF3E3; color: var(--color-primary-dark); text-decoration: none; }

/* Illustration strokes and fills (inline SVG in .feature-art) */
.art-blob   { fill: #EEFAF1; }
.art-accent { fill: var(--brand-60); opacity: .5; }
.art-line   { fill: #FFFFFF; stroke: #2B2B2B; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.art-thin   { fill: none; stroke: #2B2B2B; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.art-dots   { fill: none; stroke: #A3ADA5; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 7; }
.art-dash   { fill: none; stroke: #2B2B2B; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 4 7; }
.art-green  { fill: var(--brand-60); stroke: #2B2B2B; stroke-width: 2.5; }
.art-ink    { fill: #2B2B2B; }

/* ── Feature Cards (getting-started audience grid) ───────── */
.feature-card {
  background: var(--color-bg);
  border: none;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  transition: box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--brand-60);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  color: #FFFFFF;
  flex-shrink: 0;
}
.feature-card h3 { margin-top: 0; font-size: 1rem; margin-bottom: .5rem; }
.feature-card p  { font-size: .9rem; color: var(--color-text-muted); margin-bottom: 1rem; flex: 1; }
.feature-card a  { font-size: .875rem; font-weight: 600; margin-top: auto; }

/* ── Audience Cards (index) ──────────────────────────────── */
.audience-section { padding: 4rem 1.5rem; }
.audience-grid { max-width: var(--max-content-width); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.audience-card {
  background: var(--color-bg);
  border: none;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.75rem;
}
.audience-card .aud-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-primary); margin-bottom: .5rem; }
.audience-card h3 { margin-top: 0; font-size: 1.0625rem; margin-bottom: .5rem; }
.audience-card p  { font-size: .875rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.audience-card .start-link { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; font-weight: 600; color: var(--color-primary); }

/* ── Pipeline Visual (concepts page) ────────────────────── */
.pipeline-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.pipeline-stage {
  flex: 1;
  min-width: 160px;
  text-align: center;
  position: relative;
  display: flex;
  align-items: stretch;
}
.pipeline-stage:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--brand-60);
  font-weight: 700;
}
.stage-box {
  background: var(--color-primary-light);
  border: 2px solid var(--brand-60);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.stage-num { font-size: .75rem; font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35rem; }
.stage-name { font-size: .9rem; font-weight: 700; color: var(--color-text); margin-bottom: .5rem; }
.stage-store { font-size: .75rem; color: var(--color-text-muted); font-family: var(--font-mono); line-height: 1.4; }

/* ── FAQ Accordion ───────────────────────────────────────── */
.faq-group { margin-bottom: 2rem; }
.faq-group h2 { font-size: 1.125rem; }
details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: .5rem;
  overflow: hidden;
}
details[open] { border-color: var(--color-primary); }
summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  user-select: none;
  background: var(--color-bg);
  transition: background var(--transition);
}
summary:hover { background: var(--color-surface); }
summary::after { content: '+'; font-size: 1.2rem; color: var(--color-primary); flex-shrink: 0; margin-left: auto; padding-left: 1rem; }
details[open] summary::after { content: '−'; }
details[open] summary { background: var(--color-primary-light); color: var(--color-primary-dark); }
.faq-answer { padding: 1.25rem 1.25rem 1rem; background: var(--color-bg); border-top: 1px solid var(--color-border); }
.faq-answer p:last-child { margin-bottom: 0; }

/* ── Steps List ──────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: steps; }
.steps > li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .75rem;
  margin-bottom: 1.25rem;
  align-items: start;
}
.steps > li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-size: .875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .1rem;
}
.steps > li ul,
.steps > li ol {
  margin-top: .5rem;
  padding-left: 1.25rem;
}

/* ── Field Table (API schema) ────────────────────────────── */
.field-required { color: var(--color-error); font-weight: 700; }
.field-optional { color: var(--color-text-muted); }

/* ── Site Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem;
  margin-top: 5rem;
  font-size: .875rem;
}
.footer-inner {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}
.footer-brand .logo { color: var(--color-text); font-size: 1rem; }
.footer-brand .logo img { filter: none; }
.footer-brand p { margin-top: .5rem; font-size: .8125rem; color: var(--color-text-muted); }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-links h5 { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text); margin-bottom: .75rem; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: var(--color-text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--color-text); text-decoration: none; }
.footer-bottom {
  max-width: var(--max-content-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  color: var(--color-text-muted);
  font-size: .8125rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 1.25rem;
  }
  .sidebar-toc { position: static; display: none; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0; background: var(--color-bg); border-top: 1px solid var(--color-border); padding: 1.25rem; z-index: 99; overflow-y: auto; gap: .25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 320px; }
  .audience-grid { grid-template-columns: 1fr; }
  .feature-rows { gap: 3rem; }
  .feature-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .feature-row .feature-art { order: -1; }
  .feature-art svg { max-width: 280px; }
  .pipeline-flow { flex-direction: column; }
  .pipeline-stage::after { display: none; }
  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container, .site-nav { padding: 0 1rem; }
  .page-wrapper { padding: 1.25rem 1rem; }
}

/* ── Language Switcher ───────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .8125rem;
  font-weight: 500;
  margin-left: .75rem;
  padding-left: .75rem;
  border-left: 1px solid var(--color-border);
  white-space: nowrap;
}
.lang-switcher .lang-current {
  color: var(--color-primary);
  font-weight: 700;
}
.lang-switcher .lang-sep {
  color: var(--color-border-strong);
  user-select: none;
}
.lang-switcher a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.lang-switcher a:hover { color: var(--color-text); }

/* ── Utility ─────────────────────────────────────────────── */
.mt-0 { margin-top: 0 !important; }
.text-muted { color: var(--color-text-muted); }
.text-mono  { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
