/* COGEEP — component styles. Every value comes from tokens.css.
   Fonts are self-hosted (fonts/, declared in tokens.json → @font-face in tokens.css): no request to a third-party font service. */
body { margin: 0; background: var(--surface-0); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
.cg-on-dark { display: none; }
[data-theme="dark"] .cg-on-light { display: none; }
[data-theme="dark"] .cg-on-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cg-on-light { display: none; }
  :root:not([data-theme="light"]) .cg-on-dark { display: inline-block; }
}

.cg-focus:focus-visible, .cg-btn:focus-visible, .cg-field__input:focus-visible, .cg-nav__link:focus-visible, .cg-nav__brand:focus-visible {
  outline: none; box-shadow: 0 0 0 2px var(--surface-0), 0 0 0 4px var(--focus);
}

.cg-eyebrow { margin: 0 0 var(--space-4); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green-text); }

/* Icon */
.cg-icon { display: inline-block; flex: none; vertical-align: middle; }

/* Button */
.cg-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); border-radius: var(--radius-pill); border: 2px solid transparent; font-family: var(--font-sans); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.cg-btn--md { padding: 10px 20px; font-size: 16px; line-height: 24px; }
.cg-btn--lg { padding: var(--space-3) 28px; font-size: 18px; line-height: 26px; }
.cg-btn--primary { background: var(--action); color: var(--on-action); }
.cg-btn--primary:hover { background: var(--action-hover); }
.cg-btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.cg-btn--secondary:hover { background: var(--ink); color: var(--surface-0); }
.cg-btn--ghost { background: transparent; color: var(--green-text); padding-left: var(--space-2); padding-right: var(--space-2); }
.cg-btn--ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.cg-btn:hover .cg-icon { transform: translateX(2px); }
.cg-btn .cg-icon { transition: transform .15s ease; }
.cg-btn:disabled { opacity: .45; cursor: not-allowed; }
.cg-hero--inverse .cg-btn--secondary { color: var(--on-inverse); border-color: var(--on-inverse); }
.cg-hero--inverse .cg-btn--secondary:hover { background: var(--on-inverse); color: var(--surface-inverse); }

/* Badge */
.cg-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px 10px; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 13px; line-height: 20px; font-weight: 600; white-space: nowrap; }
.cg-badge--brand { background: var(--green-tint); color: var(--green-text); }
.cg-badge--neutral { background: var(--surface-200); color: var(--ink-muted); }
.cg-badge--ink { background: var(--ink); color: var(--surface-0); }
.cg-badge--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* TextField */
.cg-field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.cg-field__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.cg-field__input { font: inherit; font-size: 16px; line-height: 24px; color: var(--ink); background: var(--surface-0); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); padding: 10px 14px; }
.cg-field__input::placeholder { color: var(--ink-muted); }
.cg-field__input:hover { border-color: var(--ink); }
.cg-field__msg { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.cg-field--error .cg-field__input { border-color: var(--danger); }
.cg-field__msg--error { color: var(--danger); font-weight: 600; }

/* KpiStat */
.cg-kpi { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); max-width: 260px; }
.cg-kpi__value { font-family: var(--font-display); font-size: 64px; line-height: 64px; font-weight: 800; letter-spacing: -0.02em; color: var(--green-text); font-variant-numeric: tabular-nums; }
.cg-kpi__mark { font-size: 28px; vertical-align: top; position: relative; top: 4px; margin-left: 2px; color: var(--ink-muted); font-weight: 600; }
.cg-kpi figcaption { display: flex; flex-direction: column; gap: var(--space-1); }
.cg-kpi__label { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--ink); }
.cg-kpi__source { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* FeatureCard */
.cg-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: box-shadow .2s ease, transform .2s ease; }
.cg-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.cg-card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--green-tint); color: var(--green-text); }
.cg-card__badge { position: absolute; top: var(--space-6); right: var(--space-6); }
.cg-card__title { margin: var(--space-2) 0 0; font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 700; color: var(--ink); }
.cg-card__body { font-size: 16px; line-height: 26px; color: var(--ink-muted); }
.cg-card__body p { margin: 0; }

/* Quote */
.cg-quote { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); max-width: 720px; }
.cg-quote__text { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.cg-quote__text::before { content: "“"; color: var(--brand-green); }
.cg-quote__text::after { content: "”"; color: var(--brand-green); }
.cg-quote__cite { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }
.cg-quote__author { font-weight: 600; color: var(--ink); }
.cg-quote__role { color: var(--ink-muted); }
.cg-quote--inverse { background: var(--surface-inverse); padding: var(--space-12); border-radius: var(--radius-lg); }
.cg-quote--inverse .cg-quote__text, .cg-quote--inverse .cg-quote__author { color: var(--on-inverse); }
.cg-quote--inverse .cg-quote__role { color: var(--on-inverse-muted); }

/* Shift */
.cg-shift { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: var(--space-4); }
.cg-shift__side { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-6); border-radius: var(--radius-lg); }
.cg-shift__from { background: var(--surface-100); }
.cg-shift__from .cg-shift__text { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--line-strong); text-decoration-thickness: 2px; }
.cg-shift__to { background: var(--green-tint); }
.cg-shift__to .cg-shift__text { color: var(--ink); }
.cg-shift__tag { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.cg-shift__to .cg-shift__tag { color: var(--green-text); }
.cg-shift__text { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 700; }
.cg-shift__arrow { display: grid; place-items: center; color: var(--green-text); }
@media (max-width: 560px) { .cg-shift { grid-template-columns: 1fr; } .cg-shift__arrow { transform: rotate(90deg); } }

/* Hero */
.cg-hero { display: grid; gap: var(--space-12); padding: var(--space-24) var(--space-12); background: var(--surface-0); }
.cg-hero--split { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; }
.cg-hero__main { max-width: var(--measure); }
.cg-hero__title { margin: 0; font-family: var(--font-display); font-size: 72px; line-height: 76px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.cg-hero__title em { font-style: normal; color: var(--green-text); }
.cg-hero__lead { margin: var(--space-6) 0 0; font-size: 20px; line-height: 30px; color: var(--ink-muted); }
.cg-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.cg-hero--inverse { background: var(--surface-inverse); }
.cg-hero--inverse .cg-hero__title { color: var(--on-inverse); }
.cg-hero--inverse .cg-hero__title em { color: var(--brand-green); }
.cg-hero--inverse .cg-hero__lead { color: var(--on-inverse-muted); }
.cg-hero--inverse .cg-eyebrow { color: var(--brand-green); }
@media (max-width: 760px) {
  .cg-hero { padding: var(--space-16) var(--space-4); }
  .cg-hero--split { grid-template-columns: 1fr; }
  .cg-hero__title { font-size: 44px; line-height: 48px; }
}

/* NavBar */
.cg-nav { display: flex; align-items: center; gap: var(--space-8); height: var(--nav-height); padding: 0 var(--space-6); background: var(--surface-0); border-bottom: 1px solid var(--line); }
.cg-nav__brand { display: inline-flex; align-items: center; border-radius: var(--radius-sm); }
.cg-nav__brand img { height: 36px; width: auto; vertical-align: middle; }
.cg-nav__links { display: flex; gap: var(--space-1); flex: 1; }
.cg-nav__link { padding: 6px var(--space-3); border-radius: var(--radius-pill); font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink-muted); text-decoration: none; }
.cg-nav__link:hover { background: var(--surface-200); color: var(--ink); }
.cg-nav__link.is-current { color: var(--ink); background: var(--surface-100); }
@media (max-width: 760px) { .cg-nav__links { display: none; } .cg-nav { justify-content: space-between; } }
