/* BareLedger — marketing & legal pages. Tokens mirror web/tailwind.config.js. */
:root {
  --brand-50: #f2fbe6;
  --brand-100: #e2f6c6;
  --brand-500: #6db105;
  --brand-600: #569004;
  --brand-700: #426d05;
  --brand-900: #2f4a0d;
  --accent-teal: #00ffb0;
  --accent-cyan: #1ab2ff;
  --ink-900: #1f2430;
  --ink-700: #3a4150;
  --ink-500: #545454;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  color: var(--ink-700);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.site-header .logo img { height: 36px; display: block; }
.site-header .logo picture { display: block; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: var(--ink-700);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--brand-600); }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--brand-500);
  color: #ffffff;
}
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary {
  background: #ffffff;
  color: var(--ink-900);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--brand-500); color: var(--brand-600); }
.btn-ghost {
  color: var(--ink-700);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--brand-600); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-on-dark {
  background: #ffffff;
  color: var(--brand-700);
}
.btn-on-dark:hover { background: var(--brand-50); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 55%, #17c78f 100%);
  color: #ffffff;
  padding: 88px 0 96px;
  text-align: center;
}
.hero h1 {
  margin: 0 auto 16px;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.hero .sub {
  margin: 0 auto 32px;
  max-width: 640px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.92);
}
.hero-ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.hero-points {
  margin: 40px auto 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.95);
}
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 10px;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.section-head p { margin: 0; font-size: 17px; color: var(--ink-500); }

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.feature-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-900);
}
.feature-card p { margin: 0 0 14px; font-size: 15px; color: var(--ink-500); }
.feature-card ul { margin: 0; padding: 0; list-style: none; }
.feature-card li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 15px;
}
.feature-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-50) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="%23569004" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" d="M3.5 8.5l3 3 6-7"/></svg>') center/10px no-repeat;
}
.icon-chip {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon-chip svg { width: 24px; height: 24px; stroke: var(--brand-600); }

/* ---------- Country / compliance strip ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-700);
}
.chip.accent { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-700); }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
  max-width: 1020px;
  margin: 0 auto;
}
.plan {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}
.pricing-footnote {
  max-width: 1020px;
  margin: 28px auto 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-500);
  text-align: center;
}
.pricing-footnote strong { color: var(--ink-700); }
.plan.popular {
  border: 2px solid var(--brand-500);
  position: relative;
}
.plan .flag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-500);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 4px 14px;
  text-transform: uppercase;
}
.plan h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--ink-900); }
.plan .tagline { font-size: 14px; color: var(--ink-500); margin: 0 0 18px; }
.plan .price { font-size: 34px; font-weight: 800; color: var(--ink-900); line-height: 1; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--ink-500); }
.plan .price-note { font-size: 13px; color: var(--ink-500); margin: 6px 0 22px; }
.plan ul { margin: 0 0 26px; padding: 0; list-style: none; flex: 1; }
.plan li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  font-size: 14.5px;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-50) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="%23569004" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" d="M3.5 8.5l3 3 6-7"/></svg>') center/10px no-repeat;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 60%, #17c78f 100%);
  border-radius: 24px;
  color: #ffffff;
  text-align: center;
  padding: 64px 32px;
}
.cta-banner h2 { color: #ffffff; }
.cta-banner p { color: rgba(255, 255, 255, 0.9); margin: 0 0 28px; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-900);
  color: #cbd5e1;
  padding: 56px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 2fr 1fr 1fr;
  margin-bottom: 40px;
}
.site-footer .logo img { height: 34px; margin-bottom: 14px; }
.site-footer .logo picture { display: block; }
.site-footer h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #ffffff; }
.footer-legal {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #94a3b8;
  font-size: 13px;
}

/* ---------- Legal (policy) pages ---------- */
.legal-hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 40px;
}
.legal-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.legal-hero .meta { color: var(--ink-500); font-size: 15px; margin: 0; }

.legal-body { max-width: 820px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-body h2 {
  font-size: 22px;
  margin: 40px 0 12px;
}
.legal-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 26px 0 8px;
}
.legal-body p, .legal-body li { font-size: 15.5px; color: var(--ink-700); }
.legal-body ul { padding-left: 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--brand-600); }
.legal-body .callout {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 15px;
}
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 12px 0 20px;
}
.legal-body th, .legal-body td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.legal-body th { background: var(--bg); color: var(--ink-900); font-weight: 700; }
/* About / alternatives: the answer-first opening and the at-a-glance table. */
.legal-body .lead { font-size: 17.5px; line-height: 1.65; color: var(--ink-700); margin: 0 0 8px; }
.legal-body .lead strong { color: var(--ink-900); }
.legal-body table.facts th { width: 32%; }
.legal-body ol { padding-left: 22px; }
.legal-body ol li { margin-bottom: 8px; }
/* Comparison table: three columns read fine on a laptop but squeeze to a word
   per line on a phone, so there each row becomes a card with labelled cells. */
@media (max-width: 640px) {
  .legal-body table.compare thead { display: none; }
  .legal-body table.compare, .legal-body table.compare tbody,
  .legal-body table.compare tr, .legal-body table.compare th,
  .legal-body table.compare td { display: block; width: 100%; }
  .legal-body table.compare tr {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
  }
  .legal-body table.compare th, .legal-body table.compare td { border: 0; }
  .legal-body table.compare td { padding-top: 4px; }
  .legal-body table.compare td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 2px;
  }
}

/* ---------- Home-page FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font-size: 22px; line-height: 1; color: var(--brand-600); }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary h3 { margin: 0; font-size: 16.5px; font-weight: 700; color: var(--ink-900); }
.faq-item summary:hover h3 { color: var(--brand-700); }
.faq-item summary:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 14px; }
.faq-item p { margin: 0; padding: 0 22px 20px; font-size: 15.5px; color: var(--ink-700); }
.faq-item a { color: var(--brand-600); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .site-nav { display: none; }
  /* Header at phone width: the ghost "Sign in" moves into the menu, and the
     primary CTA must never wrap — a two-line button crowds the logo. */
  .header-actions .btn-ghost { display: none; }
  .header-actions .btn { white-space: nowrap; padding: 9px 14px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 72px; }
}

/* =====================================================================
   Support navigation (dropdown + no-JS mobile menu)
   ===================================================================== */
.nav-item { position: relative; display: flex; align-items: center; height: 64px; }
.nav-trigger { display: inline-flex; align-items: center; gap: 5px; }
.nav-trigger svg {
  width: 14px; height: 14px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.15s ease;
}
.nav-item:hover .nav-trigger svg,
.nav-item:focus-within .nav-trigger svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translate(-50%, 6px);
  min-width: 250px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
  padding: 8px; z-index: 60;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.site-nav .nav-menu a {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  color: var(--ink-900);
}
.site-nav .nav-menu a small { font-size: 12.5px; font-weight: 400; color: var(--ink-500); }
.site-nav .nav-menu a:hover { background: var(--brand-50); color: var(--brand-700); }

.nav-mobile { display: none; }
.nav-mobile summary {
  list-style: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; background: #fff;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary svg { width: 22px; height: 22px; fill: none; stroke: var(--ink-900); stroke-width: 2; stroke-linecap: round; }
.nav-mobile .icon-close { display: none; }
.nav-mobile[open] .icon-open { display: none; }
.nav-mobile[open] .icon-close { display: block; }
.nav-mobile-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #ffffff; border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.12);
  padding: 12px 24px 20px; display: flex; flex-direction: column; gap: 2px;
}
.nav-mobile-panel a {
  padding: 10px 8px; border-radius: 8px; font-size: 15px; font-weight: 500;
  color: var(--ink-700); text-decoration: none;
}
.nav-mobile-panel a:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-mobile-panel .group {
  margin-top: 10px; padding: 10px 8px 4px; border-top: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500);
}
.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 860px) {
  .nav-mobile { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .header-actions .btn-ghost { display: none; }
}

/* =====================================================================
   Guides hub
   ===================================================================== */
.guides-hero {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 60%, #17c78f 100%);
  color: #ffffff; padding: 72px 0 64px;
}
.guides-hero .container { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.guides-hero .eyebrow,
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.guides-hero h1 {
  margin: 0 0 14px; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.1;
  font-weight: 800; letter-spacing: -0.02em; color: #ffffff;
}
.guides-hero .sub { margin: 0 0 22px; font-size: 18px; color: rgba(255, 255, 255, 0.92); max-width: 560px; }
.guides-hero .illustration svg { width: 100%; height: auto; display: block; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.stat {
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px; padding: 14px 16px;
}
.stat b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; color: #ffffff; }
.stat span { font-size: 13px; color: rgba(255, 255, 255, 0.88); }
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.jump a {
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff; text-decoration: none; font-size: 13.5px; font-weight: 600;
  border-radius: 999px; padding: 7px 14px;
}
.jump a:hover { background: rgba(255, 255, 255, 0.28); }

.category { padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.category.alt { background: var(--bg); }
.category-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.category-head .lead { display: flex; gap: 16px; align-items: flex-start; max-width: 760px; }
.category-head .icon-chip { margin: 4px 0 0; flex: 0 0 44px; }
.category-head h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 6px; }
.category-head p { margin: 0; color: var(--ink-500); font-size: 16px; }
.see-all { white-space: nowrap; font-weight: 600; color: var(--brand-600); text-decoration: none; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.see-all:hover { color: var(--brand-700); text-decoration: underline; }

.guide-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.guide-card {
  display: flex; flex-direction: column; position: relative;
  background: #ffffff; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: var(--card-shadow); text-decoration: none; color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.guide-card:hover { transform: translateY(-3px); border-color: var(--brand-100); box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1); }
.guide-card .icon-chip { margin-bottom: 14px; }
.guide-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--ink-900); }
.guide-card p { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-500); flex: 1; }
.guide-card .read { font-size: 14px; font-weight: 600; color: var(--brand-600); display: inline-flex; align-items: center; gap: 6px; }
svg.inline { width: 16px; height: 16px; stroke: currentColor; vertical-align: -3px; flex: 0 0 auto; }
.guide-card .tag {
  position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-500);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px;
}
.guide-card.current { border-color: var(--brand-500); }

.diagram {
  container-type: inline-size;
  margin: 0 0 32px; background: #ffffff; border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 24px 20px; box-shadow: var(--card-shadow);
}
.diagram figcaption { text-align: center; font-size: 13.5px; color: var(--ink-500); margin-top: 16px; }
.diagram h3 { margin: 0 0 18px; text-align: center; font-size: 15px; font-weight: 700; color: var(--ink-900); letter-spacing: 0.02em; }

.resources { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.resource-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  text-decoration: none; color: inherit; box-shadow: var(--card-shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.resource-card:hover { border-color: var(--brand-100); transform: translateY(-2px); }
.resource-card .icon-chip { margin: 0; flex: 0 0 44px; }
.resource-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--ink-900); }
.resource-card p { margin: 0; font-size: 14px; color: var(--ink-500); }

/* ---------- Infographic: flows & steps ---------- */
.flow { display: flex; align-items: stretch; justify-content: center; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.flow-step {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px;
  flex: 1 1 0; min-width: 0; box-shadow: var(--card-shadow);
}
.flow-step .n {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700);
  font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.flow-step .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-50); display: flex; align-items: center; justify-content: center; }
.flow-step .ic svg { width: 22px; height: 22px; fill: none; stroke: var(--brand-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow-step .txt { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.flow-step b { font-size: 15px; color: var(--ink-900); line-height: 1.25; }
.flow-step span { font-size: 12.5px; color: var(--ink-500); line-height: 1.4; }
.flow-step .opt {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-500); border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.flow-step.terminal { background: var(--brand-500); border-color: var(--brand-500); }
.flow-step.terminal b, .flow-step.terminal span { color: #ffffff; }
.flow-step.terminal .n { background: rgba(255, 255, 255, 0.22); color: #ffffff; }
.flow-step.terminal .ic { background: rgba(255, 255, 255, 0.22); }
.flow-step.terminal .ic svg { stroke: #ffffff; }
.flow-step.muted { background: var(--bg); border-style: dashed; box-shadow: none; }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--brand-500); flex: 0 0 auto; }
.flow-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.flow-note { text-align: center; font-size: 14px; color: var(--ink-500); margin: 18px auto 0; max-width: 720px; }
.flow-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; font-size: 13px; color: var(--ink-500); }
.flow-legend span { display: inline-flex; align-items: center; gap: 7px; }
.flow-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--line); background: #fff; }
.flow-legend i.terminal { background: var(--brand-500); border-color: var(--brand-500); }
.flow-legend i.muted { background: var(--bg); border-style: dashed; }

.role-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.role-strip div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; }
.role-strip b { display: block; color: var(--ink-900); font-size: 14.5px; margin-bottom: 4px; }
.role-strip span { font-size: 12.5px; color: var(--ink-500); line-height: 1.4; display: block; }
.role-strip .lvl { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; background: var(--brand-50); color: var(--brand-700); }
.role-strip .lvl.check { background: var(--brand-100); }
.role-strip .lvl.read { background: #e2e8f0; color: #334155; }

.api-anatomy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.api-anatomy pre {
  margin: 0; background: var(--ink-900); color: #e2e8f0; border-radius: 14px; padding: 18px 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.7; overflow-x: auto;
}
.api-anatomy pre b { color: #a6de5c; font-weight: 600; }
.api-anatomy pre i { color: #7dd3fc; font-style: normal; }
.api-anatomy ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.api-anatomy li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-700); }
.api-anatomy li .n { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-500); color: #fff; font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.api-anatomy li b { color: var(--ink-900); }
.api-anatomy .chips { justify-content: flex-start; margin-top: 4px; }

/* =====================================================================
   Guide article pages
   ===================================================================== */
.guide-hero { background: var(--bg); border-bottom: 1px solid var(--line); padding: 36px 0 34px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ink-500); margin: 0 0 14px; padding: 0; list-style: none; }
.breadcrumb a { color: var(--brand-600); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #94a3b8; }
.guide-hero h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em; color: var(--ink-900); line-height: 1.15; }
.guide-hero .lead { margin: 0 0 12px; font-size: 17px; color: var(--ink-500); max-width: 780px; }
.guide-hero .meta { font-size: 13.5px; color: var(--ink-500); display: flex; gap: 16px; flex-wrap: wrap; }
.guide-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.guide-hero .meta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.article-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 210px; gap: 44px; padding-block: 44px 56px; align-items: start; }
.article-side, .article-toc { position: sticky; top: 84px; font-size: 14px; max-height: calc(100vh - 100px); overflow: auto; }
.article-side-mobile { display: none; }
.side-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500); margin: 0 0 10px; }
.article-side ul, .article-toc ul, .article-side-mobile ul { list-style: none; margin: 0; padding: 0; }
.article-side li a, .article-toc li a, .article-side-mobile li a {
  display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink-700); text-decoration: none; line-height: 1.4;
}
.article-side li a:hover, .article-toc li a:hover, .article-side-mobile li a:hover { background: var(--brand-50); color: var(--brand-700); }
.article-side li a.current, .article-side-mobile li a.current { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.article-side .side-group { margin: 14px 0 6px; }
.article-toc { border-left: 2px solid var(--line); padding-left: 12px; }
.article-toc li a { font-size: 13.5px; }

.article-side-mobile { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.article-side-mobile summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--ink-900); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.article-side-mobile summary::-webkit-details-marker { display: none; }
.article-side-mobile summary::after { content: "▾"; color: var(--ink-500); }
.article-side-mobile[open] summary::after { content: "▴"; }
.article-side-mobile ul { padding: 0 8px 10px; }

.article-body { min-width: 0; font-size: 16px; color: var(--ink-700); }
.article-body > :first-child { margin-top: 0; }
.article-body h2 { font-size: 24px; margin: 40px 0 12px; scroll-margin-top: 84px; }
.article-body h3 { font-size: 18px; font-weight: 700; color: var(--ink-900); margin: 28px 0 8px; scroll-margin-top: 84px; }
.article-body h4 { font-size: 16px; font-weight: 700; color: var(--ink-900); margin: 22px 0 6px; }
.article-body p, .article-body li { line-height: 1.65; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--brand-600); }
.article-body strong { color: var(--ink-900); }
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink-900);
  overflow-wrap: anywhere;
}
.article-body pre {
  background: var(--ink-900); color: #e2e8f0; border-radius: 14px; padding: 18px 20px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.55; margin: 16px 0 22px;
}
.article-body pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.article-body blockquote { margin: 16px 0; padding: 12px 18px; border-left: 4px solid var(--brand-100); background: var(--bg); border-radius: 0 10px 10px 0; }
.article-body blockquote p { margin: 0; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.article-body img { border-radius: 12px; border: 1px solid var(--line); }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 12px 0 20px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.article-body th { background: var(--bg); color: var(--ink-900); font-weight: 700; }
.article-body .diagram { margin: 22px 0 28px; }

.callout {
  position: relative; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px;
  padding: 14px 18px 14px 50px; font-size: 15px; margin: 18px 0; color: var(--ink-700);
}
.callout::before {
  content: ""; position: absolute; left: 17px; top: 15px; width: 20px; height: 20px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23569004" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>') center/20px no-repeat;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

.table-scroll { overflow-x: auto; margin: 12px 0 22px; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.table-scroll table { margin: 0; }
.table-scroll table.matrix { min-width: 720px; }
table.matrix th:first-child, table.matrix td:first-child { position: sticky; left: 0; background: #ffffff; z-index: 1; }
table.matrix th:first-child { background: var(--bg); }
table.matrix td[data-level] { white-space: nowrap; }
table.matrix td[data-level] > span { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
table.matrix td[data-level="no-access"] > span { background: #f1f5f9; color: #64748b; }
table.matrix td[data-level="viewer"] > span { background: #e2e8f0; color: #334155; }
table.matrix td[data-level="preparer"] > span { background: var(--brand-50); color: var(--brand-700); }
table.matrix td[data-level="reviewer"] > span { background: var(--brand-100); color: var(--brand-700); }
table.matrix td[data-level="approver"] > span { background: #cdeea0; color: var(--brand-900); }
table.matrix td[data-level="full"] > span,
table.matrix td[data-level="manager"] > span,
table.matrix td[data-level="everyone"] > span { background: var(--brand-500); color: #ffffff; }

.steps { margin: 8px 0 24px; }
.step { position: relative; padding: 0 0 26px 62px; }
.step::before {
  content: attr(data-n); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand-500); color: #ffffff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--brand-50);
}
.step::after { content: ""; position: absolute; left: 19px; top: 48px; bottom: 0; width: 2px; background: var(--brand-100); }
.step:last-child::after { display: none; }
.step > h2 { margin: 6px 0 10px; font-size: 22px; }
.step > h2 .step-label { display: none; }

.related { padding: 0 0 64px; }
.related h2 { font-size: 22px; margin-bottom: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .article-toc { display: none; }
}
@media (max-width: 960px) {
  .guides-hero .container { grid-template-columns: 1fr; }
  .guides-hero .illustration { max-width: 420px; margin: 0 auto; }
  .article-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .article-side { display: none; }
  .article-side-mobile { display: block; }
  .api-anatomy { grid-template-columns: 1fr; }
}
@container (max-width: 720px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-step { flex-direction: row; text-align: left; align-items: center; gap: 14px; padding: 14px 16px; }
  .flow-step .txt { align-items: flex-start; gap: 2px; }
  .flow-step .opt { position: static; transform: none; margin-left: auto; }
  .flow-arrow svg { transform: rotate(90deg); }
}
@media (max-width: 640px) {
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .category { padding: 48px 0; }
  .step { padding-left: 52px; }
  .step::before { width: 34px; height: 34px; font-size: 14px; }
  .step::after { left: 16px; top: 42px; }
}

@media (max-width: 480px) {
  .header-actions .btn-primary { display: none; }
  /* Phones get the compact lockup (no slogan line, see the header <picture>)
     so the wordmark is ~24px tall instead of ~12px; the CTA is hidden, so
     the header has room for it. */
  .site-header .logo img { height: 44px; }
  /* Phones: compact footer lockup (no slogan — the tagline is printed right
     below it), sized so the wordmark stays legible. */
  .site-footer .logo img { height: 44px; }
}
