/* =========================================================
   GRC Forge — App styles
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

::selection { background: var(--gold); color: var(--text-invert); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--content-px);
}

/* ---------- Typography helpers ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 500;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: .7;
}
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  font-weight: 500;
  margin: 0;
}
.h4 {
  font-size: var(--fs-h4);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 62ch;
}
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ---------- Reveal ---------- */
/* Only hide elements once JS opts them into staged reveal. This ensures
   content is visible even if JS fails to load. */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
html.js-ready [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(var(--container) - 40px), calc(100% - 32px));
  z-index: 60;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 10px 12px 10px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: background .3s, border-color .3s;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.nav__brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  position: relative;
  overflow: hidden;
}
.nav__brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 2px;
}
.nav__links {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); background: var(--hairline-soft); }
.nav__actions { display: flex; gap: 6px; align-items: center; }
.nav__icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
}
.nav__icon-btn:hover { color: var(--text); border-color: var(--border); background: var(--hairline-soft); }
.nav__icon-btn.is-active { color: var(--gold); border-color: var(--hairline); }

@media (max-width: 780px) {
  .nav { padding: 10px 12px; }
  .nav__links { display: none; }
}

/* ---------- Button system ---------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: #0B1623;
  --btn-border: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: transform .18s var(--ease-out), background .2s, box-shadow .2s, border-color .2s, color .2s;
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -12px var(--gold); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
}
.btn--ghost:hover { --btn-border: var(--gold); box-shadow: none; }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--gold);
  --btn-border: var(--gold);
}
.btn--outline:hover { background: var(--hairline-soft); box-shadow: none; }

.btn__arrow {
  display: inline-block;
  transition: transform .2s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(3px); }
[dir="rtl"] .btn__arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .btn__arrow { transform: scaleX(-1) translateX(3px); }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--surface-2);
}
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-3);
}
.badge--live {
  border-color: rgba(60, 203, 127, 0.4);
  color: var(--success);
  background: rgba(60, 203, 127, 0.08);
}
.badge--live .badge__dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(60, 203, 127, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.badge--soon {
  border-color: var(--hairline);
  color: var(--gold);
  background: rgba(201, 163, 74, 0.06);
}
.badge--soon .badge__dot { background: var(--gold); }
.badge--beta { border-color: var(--info); color: var(--info); }
.badge--beta .badge__dot { background: var(--info); }
.badge--future { color: var(--text-2); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(60, 203, 127, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(60, 203, 127, 0.05); }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: var(--section-py);
}
.section--tight { padding-block: calc(var(--section-py) * 0.6); }
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 56px;
}
.section-head__row {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 30%, var(--hairline) 70%, transparent);
  border: 0;
  margin: 0;
}
[dir="rtl"] .hairline {
  background: linear-gradient(-90deg, transparent, var(--hairline) 30%, var(--hairline) 70%, transparent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  pointer-events: none;
  z-index: 0;
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 70%);
  pointer-events: none;
  opacity: .6;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 110px; }
}
.hero__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.hero__coord {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.14em;
}
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
  font-weight: 500;
  margin: 0;
}
.hero h1 .serif {
  color: var(--gold-light);
}
[data-mode="light"] .hero h1 .serif { color: var(--gold-deep); }
.hero__sub {
  margin-top: 28px;
  max-width: 46ch;
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-2);
  line-height: 1.55;
}
.hero__cta {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero console mock */
.console {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.console::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-glow);
  pointer-events: none;
}
.console__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  position: relative;
}
.console__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.console__title strong { color: var(--text); font-weight: 600; }
.console__dots { display: flex; gap: 6px; }
.console__dots span {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--border-strong);
}
.console__dots span:first-child { background: var(--gold); }
.console__body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
}
.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.stat__value {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.stat__delta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--success);
  letter-spacing: 0.06em;
}
.stat__delta--neg { color: var(--danger); }
.stat__delta--flat { color: var(--text-2); }

.console__row {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.console__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.console__list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.console__list-item strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* Sparkline / mini chart */
.mini-chart {
  height: 100%;
  min-height: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.mini-chart__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
}
.mini-chart svg { width: 100%; height: 40px; }
.mini-chart__value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold-light);
}
[data-mode="light"] .mini-chart__value { color: var(--gold-deep); }

/* ---------- Metric bar ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-top: 40px;
}
.metrics__cell {
  padding: 26px var(--content-px);
  border-inline-end: 1px solid var(--hairline-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.metrics__cell:last-child { border-inline-end: 0; }
.metrics__value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 42px);
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.metrics__label {
  font-size: 13.5px;
  color: var(--text-2);
  max-width: 30ch;
  line-height: 1.4;
}
@media (max-width: 780px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics__cell:nth-child(2) { border-inline-end: 0; }
  .metrics__cell:nth-child(1), .metrics__cell:nth-child(2) { border-bottom: 1px solid var(--hairline-soft); }
}

/* ---------- Platform pillars grid ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.pillar {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  transition: border-color .3s, transform .3s var(--ease-out);
  display: flex;
  flex-direction: column;
  min-height: 460px;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--card-glow);
  opacity: 0;
  transition: opacity .4s var(--ease-out);
  pointer-events: none;
}
.pillar:hover { border-color: var(--hairline); transform: translateY(-2px); }
.pillar:hover::before { opacity: 1; }
.pillar__head {
  display: flex;
  justify-content: flex-end;
  align-items: start;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
}
.pillar__meta {
  text-align: end;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: end;
}
.pillar__title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 10px;
  position: relative;
}
.pillar__desc {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  max-width: 44ch;
  position: relative;
}
.pillar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0;
  position: relative;
}
.tag {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.pillar__preview {
  margin-top: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: relative;
  min-height: 140px;
}
.pillar__cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  transition: gap .2s var(--ease-out);
  position: relative;
}
.pillar__cta:hover { gap: 14px; }
[data-mode="light"] .pillar__cta { color: var(--gold-deep); }

@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { min-height: 0; }
}

/* Pillar preview mocks (per-pillar variants) */
.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mock-cell {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.mock-cell strong {
  display: block;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-top: 4px;
  font-weight: 500;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}
.mock-bar__prog {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.mock-bar__prog::before {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--v, 60%);
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: 2px;
}

/* ---------- Featured (Gold Intelligence) ---------- */
.featured {
  position: relative;
}
.featured__header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 44px;
}
@media (max-width: 780px) {
  .featured__header { grid-template-columns: 1fr; }
}

.planner {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.planner__head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
}
.planner__title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.planner__title strong {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.planner__title span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.14em;
}
.planner__body {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  min-height: 520px;
}
@media (max-width: 900px) {
  .planner__body { grid-template-columns: 1fr; }
}
.planner__inputs {
  padding: 32px 28px;
  border-inline-end: 1px solid var(--border);
  background: var(--bg);
}
@media (max-width: 900px) {
  .planner__inputs { border-inline-end: 0; border-bottom: 1px solid var(--border); }
}
.planner__outputs {
  padding: 32px 28px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.field { margin-bottom: 24px; }
.field:last-child { margin-bottom: 0; }
.field__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.field__label span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.field__label strong {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
}
[data-mode="light"] .field__label strong { color: var(--gold-deep); }

.slider {
  --v: 50%;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) var(--v), var(--border) var(--v), var(--border) 100%);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
[dir="rtl"] .slider {
  background: linear-gradient(-90deg, var(--gold) 0%, var(--gold) var(--v), var(--border) var(--v), var(--border) 100%);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--gold), 0 4px 10px rgba(0,0,0,0.4);
  cursor: grab;
  transition: transform .18s var(--ease-out);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--gold);
  border: 3px solid var(--bg);
  cursor: grab;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.segmented button {
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  border-inline-end: 1px solid var(--border);
  transition: color .2s, background .2s;
}
.segmented button:last-child { border-inline-end: 0; }
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
}
[data-mode="light"] .segmented button[aria-pressed="true"] { color: var(--gold-deep); box-shadow: inset 0 -2px 0 var(--gold-deep); }

.result-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}
@media (max-width: 1080px) {
  .result-grid { grid-template-columns: 1fr; }
}
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.result-card__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.result-card__value {
  font-family: var(--font-mono);
  font-size: 32px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.result-card__unit {
  font-size: 14px;
  color: var(--text-2);
  margin-inline-start: 4px;
}

.scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.scenario {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.scenario__name {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.scenario__value {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text);
  font-weight: 500;
}
.scenario--worst .scenario__value { color: var(--danger); }
.scenario--best .scenario__value { color: var(--success); }
.scenario__pct {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 4px;
  color: var(--text-2);
}

.disclaimer {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: start;
}
.disclaimer strong { color: var(--warning); font-weight: 600; }

.donut-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
}
@media (max-width: 480px) {
  .donut-block { grid-template-columns: 1fr; }
}
.donut { position: relative; }
.donut svg { width: 100%; height: auto; display: block; }
.donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.donut__center strong {
  font-family: var(--font-mono);
  font-size: 32px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.donut__center span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.legend { display: grid; gap: 10px; }
.legend__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.legend__value {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 13px;
}

.chart-line {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.chart-line__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.chart-line__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.chart-line__legend {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.chart-line__legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-inline-end: 6px;
  vertical-align: middle;
}
.chart-line__legend .l-best::before { background: var(--success); }
.chart-line__legend .l-base::before { background: var(--gold); }
.chart-line__legend .l-worst::before { background: var(--danger); }

/* ---------- Coming soon cards row (Gold roadmap) ---------- */
.futures {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 780px) { .futures { grid-template-columns: repeat(2, 1fr); } }
.future {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .3s;
}
.future:hover { border-color: var(--hairline); }
.future__icon {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--gold);
}
[data-mode="light"] .future__icon { color: var(--gold-deep); }
.future__title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.future__desc {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---------- GRC dashboard mock ---------- */
.grc-dashboard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.grc-dashboard__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.grc-dashboard__body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.grc-stat {
  padding: 22px 24px;
  border-inline-end: 1px solid var(--border);
}
.grc-stat:last-child { border-inline-end: 0; }
.grc-stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.grc-stat__value {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--text);
  font-weight: 500;
}
.grc-stat__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
}
.grc-tables {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  min-height: 260px;
}
@media (max-width: 900px) {
  .grc-tables { grid-template-columns: 1fr; }
  .grc-dashboard__body { grid-template-columns: repeat(2, 1fr); }
  .grc-stat:nth-child(2) { border-inline-end: 0; }
  .grc-stat:nth-child(1), .grc-stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}
.grc-table {
  padding: 20px 24px;
  border-inline-end: 1px solid var(--border);
}
.grc-table:last-child { border-inline-end: 0; }
.grc-table__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
  align-items: center;
}
.grc-table__row:last-child { border-bottom: 0; }
.grc-table__row .mono { font-size: 11px; color: var(--text-2); }

.grc-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 780px) { .grc-tools { grid-template-columns: 1fr; } }
.grc-tool {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.grc-tool__num {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 12px;
  letter-spacing: 0.14em;
}
[data-mode="light"] .grc-tool__num { color: var(--gold-deep); }
.grc-tool h4 { margin-bottom: 6px; }
.grc-tool p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

/* ---------- Research Hub ---------- */
.research-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.research-cat {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-2);
  transition: all .2s;
}
.research-cat:hover { border-color: var(--hairline); color: var(--text); }
.research-cat.is-active {
  background: var(--surface-2);
  color: var(--gold);
  border-color: var(--hairline);
}
[data-mode="light"] .research-cat.is-active { color: var(--gold-deep); }

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) { .research-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .research-grid { grid-template-columns: 1fr; } }

.research {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .3s, transform .3s var(--ease-out);
  min-height: 260px;
}
.research:hover { border-color: var(--hairline); transform: translateY(-2px); }
.research__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.research__title {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}
.research__brief {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.research__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- Why GRC Forge ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .why-grid { grid-template-columns: 1fr; } }
.why {
  padding: 28px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.why__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.14em;
  margin-bottom: 20px;
}
[data-mode="light"] .why__num { color: var(--gold-deep); }
.why__title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.why__desc {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}

/* ---------- Updates ---------- */
.updates {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}
.update {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
@media (max-width: 780px) {
  .update { grid-template-columns: 1fr; gap: 8px; }
}
.update__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}
.update__body h4 { margin: 0 0 6px; font-size: 17px; }
.update__body p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; max-width: 62ch; }

/* ---------- CTA Panel ---------- */
.cta-panel {
  position: relative;
  padding: 60px 40px;
  background:
    radial-gradient(circle at 20% 100%, rgba(201,163,74,0.15) 0%, transparent 50%),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-align: center;
}
.cta-panel__actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Design system doc ---------- */
.ds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .ds-grid { grid-template-columns: 1fr; } }
.ds-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.ds-card h4 { margin: 0 0 20px; }
.color-swatch {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.color-swatch:last-child { border-bottom: 0; }
.color-swatch__chip {
  width: 44px; height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.color-swatch__name { font-size: 13px; }
.color-swatch__hex {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}
.type-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  gap: 20px;
}
.type-row:last-child { border-bottom: 0; }
.type-row__sample { color: var(--text); }
.type-row__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
  margin-top: 40px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer__brand {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  font-size: 12px;
  margin-bottom: 16px;
}
.footer__tag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.01em;
  max-width: 32ch;
  line-height: 1.3;
}
.footer__col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__col a { font-size: 14px; color: var(--text-2); transition: color .2s; }
.footer__col a:hover { color: var(--gold); }
[data-mode="light"] .footer__col a:hover { color: var(--gold-deep); }
.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}

/* ---------- Tweaks panel ---------- */
.tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  width: 300px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  font-size: 13px;
}
.tweaks.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
[dir="rtl"] .tweaks { right: auto; left: 20px; }
.tweaks__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.tweaks__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.tweaks__close {
  color: var(--text-3);
  transition: color .2s;
  padding: 4px;
}
.tweaks__close:hover { color: var(--text); }
.tweaks__group { margin-bottom: 14px; }
.tweaks__group:last-child { margin-bottom: 0; }
.tweaks__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  display: block;
}
.tweak-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.tweak-seg button {
  padding: 8px 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  border-inline-end: 1px solid var(--border);
}
.tweak-seg button:last-child { border-inline-end: 0; }
.tweak-seg button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--gold);
}
[data-mode="light"] .tweak-seg button[aria-pressed="true"] { color: var(--gold-deep); }
.tweak-swatches {
  display: flex;
  gap: 8px;
}
.tweak-swatch {
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .18s var(--ease-out), border-color .2s;
  position: relative;
}
.tweak-swatch:hover { transform: scale(1.06); }
.tweak-swatch[aria-pressed="true"] {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold);
}

/* ---------- Section number & label helpers ---------- */
.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.14em;
}

/* Utility scroll-anchor offset */
[id] { scroll-margin-top: 100px; }

/* ---------- Live ticker ---------- */
.ticker {
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 0;
  overflow: hidden;
  position: relative;
  margin-top: 24px;
}
.ticker__track {
  display: flex;
  gap: 60px;
  animation: ticker 40s linear infinite;
  width: max-content;
}
[dir="rtl"] .ticker__track { animation-direction: reverse; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ticker__item strong {
  color: var(--text);
  font-weight: 500;
}
.ticker__item .up { color: var(--success); }
.ticker__item .down { color: var(--danger); }
.ticker__dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ========================================================================
 * GRC Forge — v2 additions: submodule lists, resources grid, wide footer
 * ======================================================================== */

/* Pillar submodules list (replaces the tags row for category cards) */
.pillar__submodules {
  list-style: none;
  padding: 0;
  margin: 18px 0 20px;
  display: grid;
  gap: 6px;
  position: relative;
}
.pillar__submodules li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}
.pillar__submodules li:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}
.pillar__sub-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.pillar__sub-name {
  color: var(--text);
  font-weight: 400;
}
.pillar__sub-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
[data-mode="light"] .pillar__sub-link { color: var(--gold-deep); }
.pillar__sub-link:hover { color: var(--text); }

/* Flat pillar variant — no preview mock, list-only */
.pillar--flat .pillar__preview { display: none; }
.pillar--flat .pillar__submodules { margin-bottom: 8px; }

/* Resources grid — templates and downloads */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
@media (max-width: 900px) { .resources-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .resources-grid { grid-template-columns: 1fr; } }

.resource {
  display: block;
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease-out), transform .25s var(--ease-out), background .25s;
  position: relative;
}
.resource:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  background: var(--surface-2);
}
[data-mode="light"] .resource:hover { border-color: var(--gold-deep); }
.resource__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
}
.resource__desc {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  margin: 8px 0 16px;
}
.resource__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  transition: gap .2s var(--ease-out);
}
.resource:hover .resource__cta { gap: 12px; }
[data-mode="light"] .resource__cta { color: var(--gold-deep); }

/* Wide 7-column footer for the full pillar taxonomy */
.footer__grid--wide {
  grid-template-columns: 1.8fr repeat(6, 1fr);
  gap: 32px;
}
@media (max-width: 1200px) {
  .footer__grid--wide { grid-template-columns: 1.6fr repeat(3, 1fr); }
}
@media (max-width: 780px) {
  .footer__grid--wide { grid-template-columns: 1fr 1fr; }
}

/* Nav — more items = tighter gap + horizontal scroll fallback on small screens */
.nav__links { gap: 22px; }
@media (max-width: 1100px) {
  .nav__links { gap: 16px; font-size: 13px; }
}
@media (max-width: 960px) {
  .nav__links {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    max-width: 60vw;
    white-space: nowrap;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
  .nav__links::-webkit-scrollbar { display: none; }
}
