:root {
  /* base */
  --bg: #f7f7f9;
  --bg-lighter: #fcfcfd;
  --bg-card: #ffffff;
  --ink: #121428;
  --ink-soft: #34374f;
  --muted: #666b85;
  --faint: #9296ad;

  /* alpha ladder (borders, fills) — Arrow ink at low opacity */
  --a2: rgba(18, 20, 40, 0.02);
  --a3: rgba(18, 20, 40, 0.03);
  --a4: rgba(18, 20, 40, 0.04);
  --a6: rgba(18, 20, 40, 0.06);
  --a8: rgba(18, 20, 40, 0.08);
  --a10: rgba(18, 20, 40, 0.10);
  --a12: rgba(18, 20, 40, 0.12);
  --a16: rgba(18, 20, 40, 0.16);
  --a24: rgba(18, 20, 40, 0.24);

  /* heat — Arrow orange with alpha scale */
  --heat: #ff642f;
  --heat-strong: #f26104;
  --heat-4: rgba(255, 100, 47, 0.04);
  --heat-8: rgba(255, 100, 47, 0.08);
  --heat-12: rgba(255, 100, 47, 0.12);
  --heat-20: rgba(255, 100, 47, 0.20);
  --heat-40: rgba(255, 100, 47, 0.40);

  /* pillar accents (existing Arrow coding) */
  --geo: #2563eb;
  --geo-soft: rgba(37, 99, 235, 0.10);
  --sys: #f26104;
  --sys-soft: rgba(242, 97, 4, 0.10);
  --studio: #7c3aed;
  --studio-soft: rgba(124, 58, 237, 0.10);

  /* Arrow violet family (existing brand tokens) */
  --violet-900: #1a176c;
  --violet-800: #29259a;
  --violet-700: #3a41db;
  --violet-600: #655cff;
  --lavender: #cfc8f5;

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* geometry */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --frame-w: 1120px;
  --pad-x: clamp(20px, 4vw, 40px);
}

/* ============ footer ============ */
.v5-footer {
  border-top: 1px solid var(--a8);
  background: var(--bg-lighter);
}
.v5-footer-inner {
  max-width: var(--frame-w);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) var(--pad-x) 32px;
}
.v5-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 32px;
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--a8);
}
.v5-footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 260px;
  margin-top: 14px;
}
.v5-footer-col .col-title {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 16px;
}
.v5-footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.15s ease;
}
.v5-footer-col a:hover { color: var(--heat-strong); }
.v5-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
}
.v5-footer-meta .fine {
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.6;
  max-width: 560px;
}
.v5-footer-meta .mono-note {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
@media (max-width: 960px) {
  .v5-footer-grid { grid-template-columns: 1fr 1fr; }
  .v5-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .v5-footer-grid { grid-template-columns: 1fr; }
}


/* ============ V6 reskin layer over legacy template pages ============ */
html, body { background: var(--bg) !important; }

body, .site-shell {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

main h1, main h2, main h3 {
  letter-spacing: -0.03em !important;
  font-weight: 650 !important;
  color: var(--ink);
}
main h1 { line-height: 1.06 !important; }
main h2 { line-height: 1.12 !important; }

main p, main li { color: var(--ink-soft); }

/* legacy buttons -> V6 buttons */
.button {
  border-radius: 10px !important;
  font-weight: 550 !important;
  letter-spacing: -0.01em !important;
}
.button-accent {
  background: var(--heat) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 1px 2px rgba(18,20,40,0.12) !important;
}
.button-accent:hover { background: var(--heat-strong) !important; }
.button-dark { background: var(--ink) !important; color: #fff !important; }
.button-dark:hover { background: #24263f !important; }
.button-light {
  background: var(--bg-card) !important;
  color: var(--ink) !important;
  border: 1px solid var(--a12) !important;
}

/* legacy cards/sections -> hairline V6 surfaces */
.site-shell {
  box-shadow: none !important;
}
.nutrition-share-hero,
.nutrition-share-section,
.nutrition-share-grid article,
.nutrition-share-proof,
.nutrition-share-cta,
.legal-article-section,
.legal-faq-grid article,
.quote-stat, .quote-copy,
.icon-card, .case-card, .article-card, .tech-card, .panel {
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(18, 20, 40, 0.05) !important;
  border: 1px solid var(--a10) !important;
}

.nutrition-share-cover img, main figure img { border-radius: 14px !important; }

/* meta rows -> mono micro labels */
.legal-article-meta, .nutrition-share-meta {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
}

main a:not(.button):not([class*="btn"]) { color: var(--heat-strong); }

::selection { background: var(--heat-20); }

/* ============ footer social icons ============ */
.v5-social { display: flex; gap: 8px; }
.v5-social a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--a10);
  border-radius: 9px;
  background: var(--bg-card);
  color: var(--muted);
  transition: color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.v5-social a:hover {
  color: var(--heat-strong);
  border-color: var(--heat-40);
  transform: translateY(-1px);
}
