/* app.css - the public site.
 *
 * An editorial layout: one column of text at a comfortable measure, a wide
 * container for data, and no decorative noise. The reader is here for findings,
 * so chrome stays quiet and every commercial link is visibly labelled.
 */

/* Off-screen but focusable: used for the survey trap field. A class in an
   external stylesheet, not an inline style attribute, because a Content-Security
   Policy that rejects inline styles would otherwise make the trap field visible
   - and a visible trap field is answered by honest people and then punished. */
.visually-hidden-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: var(--leading-tight);
  font-weight: 660;
  letter-spacing: -0.011em;
}

p {
  margin: 0 0 var(--space-4);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-6) 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.wrap--narrow {
  max-width: 780px;
}

.stack > * + * {
  margin-top: var(--space-4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-2);
}

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-weight: 700;
  font-size: var(--step-0);
  letter-spacing: -0.015em;
}

.brand__tag {
  font-size: var(--step--2);
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: var(--step--1);
  font-weight: 520;
  white-space: nowrap;
}

.site-nav a:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.site-nav a[aria-current='page'] {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  cursor: pointer;
  color: var(--text);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.08s var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.btn--quiet {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  padding-inline: var(--space-3);
}

.btn--quiet:hover {
  background: var(--surface-inset);
  color: var(--text);
}

.btn--sm {
  padding: 0.4rem 0.7rem;
  font-size: var(--step--2);
}

.btn--lg {
  padding: 0.8rem 1.4rem;
  font-size: var(--step-0);
}

.btn--block {
  width: 100%;
}

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  cursor: pointer;
  color: var(--text-soft);
  display: inline-flex;
}

.icon-btn:hover {
  background: var(--surface-inset);
  color: var(--text);
}

/* ------------------------------------------------------------------ main */

main {
  min-height: 60vh;
  padding-bottom: var(--space-9);
}

.section {
  padding-block: var(--space-8);
}

.section--tight {
  padding-block: var(--space-6);
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.section__title {
  font-size: var(--step-3);
}

.section__note {
  color: var(--muted);
  font-size: var(--step--1);
  margin: var(--space-2) 0 0;
  max-width: var(--measure);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: var(--step--2);
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 var(--space-2);
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding-block: var(--space-8) var(--space-7);
  border-bottom: 1px solid var(--border);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--space-7);
  align-items: start;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, var(--step-6));
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.hero__lede {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: 54ch;
  margin-bottom: var(--space-5);
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero__proof {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.proof {
  min-width: 96px;
}

.proof__value {
  font-size: var(--step-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.proof__label {
  font-size: var(--step--2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------- hero aside */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.panel--inset {
  background: var(--surface-inset);
  box-shadow: none;
}

.panel__title {
  font-size: var(--step-1);
  margin-bottom: var(--space-2);
}

.panel__note {
  color: var(--muted);
  font-size: var(--step--1);
  margin-bottom: var(--space-4);
}

.study-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.study-list li + li {
  border-top: 1px solid var(--border);
}

.study-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  text-decoration: none;
  color: var(--text);
}

.study-list__item:hover .study-list__title {
  color: var(--accent);
}

.study-list__title {
  font-weight: 570;
  font-size: var(--step--1);
  line-height: 1.35;
}

.study-list__meta {
  font-size: var(--step--2);
  color: var(--muted);
  margin-top: 2px;
}

/* ----------------------------------------------------------------- cards */

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--sidebar {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-7);
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--step--2);
  color: var(--muted);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.card__title {
  font-size: var(--step-2);
  margin-bottom: var(--space-3);
  letter-spacing: -0.015em;
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover {
  color: var(--accent);
}

.card__deck {
  color: var(--text-soft);
  font-size: var(--step--1);
  margin: 0;
  flex: 1;
}

.card__footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--step--2);
  color: var(--muted);
}

.card--feature {
  grid-column: span 2;
}

.card--feature .card__title {
  font-size: var(--step-3);
}

.card--flat {
  border: 0;
  background: none;
  border-radius: 0;
}

.card--flat:hover {
  box-shadow: none;
}

/* --------------------------------------------------------------- tag/chip */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--surface-inset);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--step--2);
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.tag--accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.tag--ok {
  background: var(--ok-soft);
  border-color: transparent;
  color: var(--ok);
}

.tag--warn {
  background: var(--warn-soft);
  border-color: transparent;
  color: var(--warn);
}

.tag--danger {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger);
}

.tag--info {
  background: var(--info-soft);
  border-color: transparent;
  color: var(--info);
}

.tag--commercial {
  background: var(--accent-2-soft);
  border-color: transparent;
  color: var(--accent-2);
  font-weight: 650;
}

.tag-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------------------------------------------------- disclosure notice */

.disclosure {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  background: var(--accent-2-soft);
  border: 1px solid color-mix(in srgb, var(--accent-2) 24%, transparent);
  border-radius: var(--radius);
  font-size: var(--step--1);
  color: var(--text-soft);
  margin-bottom: var(--space-5);
}

.disclosure svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-2);
}

.disclosure--inline {
  margin: 0;
  font-size: var(--step--2);
  padding: var(--space-2) var(--space-3);
}

/* -------------------------------------------------------------- article */

.article__head {
  padding-block: var(--space-7) var(--space-6);
  border-bottom: 1px solid var(--border);
}

.article__title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, var(--step-5));
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.article__deck {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}

.article__byline {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--step--1);
  color: var(--muted);
}

.article__body {
  padding-block: var(--space-7);
  max-width: var(--measure);
}

.article__body > p {
  font-size: var(--step-1);
  line-height: 1.72;
}

.article__body h2 {
  font-size: var(--step-3);
  margin: var(--space-7) 0 var(--space-4);
}

.article__body h3 {
  font-size: var(--step-2);
  margin: var(--space-6) 0 var(--space-3);
}

/* A pull stat: one number, honestly derived from the data. */
.pullstat {
  border-left: 3px solid var(--accent);
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  margin: var(--space-6) 0;
}

.pullstat__value {
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.pullstat__label {
  font-size: var(--step-1);
  margin-top: var(--space-2);
}

.pullstat__context {
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: var(--space-1);
}

.figure {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 100%;
}

.figure__title {
  font-size: var(--step-0);
  font-weight: 650;
  margin-bottom: var(--space-4);
}

.figure__caption {
  font-size: var(--step--2);
  color: var(--muted);
  margin-top: var(--space-3);
}

.methodology {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-6) 0;
  max-width: 100%;
}

.methodology__title {
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-size: var(--step--2);
  margin-bottom: var(--space-4);
}

.methodology__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.methodology__grid dt {
  font-size: var(--step--2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.methodology__grid dd {
  margin: var(--space-1) 0 0;
  font-weight: 620;
  font-size: var(--step--1);
}

.quotes {
  margin: var(--space-6) 0;
  max-width: 100%;
}

.quotes blockquote {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  border-left: 2px solid var(--border-strong);
  font-family: var(--font-serif);
  font-size: var(--step-1);
  color: var(--text-soft);
  line-height: 1.55;
}

.limitations {
  margin: var(--space-6) 0 0;
  padding: var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 100%;
}

.limitations ul {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--text-soft);
  font-size: var(--step--1);
}

.limitations li + li {
  margin-top: var(--space-2);
}

/* ----------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin: var(--space-5) 0;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-inset);
  font-weight: 640;
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: var(--surface-2);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- forms */

.field {
  margin-bottom: var(--space-4);
}

.field__label {
  display: block;
  font-size: var(--step--1);
  font-weight: 620;
  margin-bottom: var(--space-2);
}

.field__hint {
  display: block;
  font-size: var(--step--2);
  color: var(--muted);
  margin-top: var(--space-1);
  font-weight: 400;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: var(--step-0);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.input--invalid {
  border-color: var(--danger);
}

.field__error {
  color: var(--danger);
  font-size: var(--step--2);
  margin-top: var(--space-1);
}

.checkline {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-soft);
}

.checkline input {
  margin-top: 4px;
}

.form-note {
  font-size: var(--step--2);
  color: var(--muted);
  margin-top: var(--space-4);
}

/* ------------------------------------------------------------------ auth */

.auth {
  max-width: 440px;
  margin-inline: auto;
  padding-block: var(--space-8);
}

.auth__title {
  font-size: var(--step-3);
  margin-bottom: var(--space-2);
}

.auth__lede {
  color: var(--muted);
  margin-bottom: var(--space-6);
}

.auth__switch {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--step--1);
  color: var(--muted);
}

/* --------------------------------------------------------------- survey */

.survey-shell {
  max-width: 720px;
  margin-inline: auto;
  padding-block: var(--space-7);
}

.progress {
  margin-bottom: var(--space-6);
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--step--2);
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.progress__track {
  height: 6px;
  background: var(--surface-inset);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.25s var(--ease);
}

.question {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.question__prompt {
  font-size: var(--step-2);
  margin-bottom: var(--space-2);
}

.question__help {
  color: var(--muted);
  font-size: var(--step--1);
  margin-bottom: var(--space-5);
}

.question__number {
  font-size: var(--step--2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 650;
  margin-bottom: var(--space-3);
}

.question__error {
  color: var(--danger);
  font-size: var(--step--1);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--danger-soft);
  border-radius: var(--radius);
}

.cib-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cib-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.12s var(--ease), background 0.12s var(--ease);
}

.cib-choice:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.cib-choice input {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.cib-choice--checked {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.cib-choice__label {
  font-size: var(--step-0);
  line-height: 1.45;
}

.scale-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cib-scale {
  flex: 1;
  min-width: 64px;
  text-align: center;
  padding: var(--space-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.cib-scale--checked {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--step--2);
  color: var(--muted);
  margin-top: var(--space-2);
}

.matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.matrix th {
  text-align: center;
  font-size: var(--step--2);
  padding: var(--space-2);
  background: none;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 580;
}

.matrix th:first-child {
  text-align: left;
}

.matrix td {
  padding: var(--space-2);
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.matrix td:first-child {
  text-align: left;
  font-size: var(--step--1);
  padding-right: var(--space-4);
}

.matrix input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

/* A matrix row that still needs an answer, highlighted only after the member
   has actually tried to continue. Marking rows red before they have had a
   chance to answer would read as an accusation. */
.matrix__row--missing td {
  background: var(--danger-soft);
}

.matrix__row--missing td:first-child {
  font-weight: 620;
  color: var(--danger);
  box-shadow: inset 3px 0 0 var(--danger);
}

.survey-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.survey-intro__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: grid;
  gap: var(--space-3);
}

.survey-intro__list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-soft);
}

.survey-intro__list svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
}

/* ------------------------------------------------------------- dashboard */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.kpi__label {
  font-size: var(--step--2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi__value {
  font-size: var(--step-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-top: var(--space-1);
}

.kpi__hint {
  font-size: var(--step--2);
  color: var(--muted);
  margin-top: var(--space-1);
}

.tier-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.tier-bar__step {
  flex: 1;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-inset);
  border: 1px solid var(--border);
}

.tier-bar__step--done {
  background: var(--accent);
  border-color: var(--accent);
}

.ledger {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ledger li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--step--1);
}

.ledger li:last-child {
  border-bottom: 0;
}

.ledger__delta {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}

.ledger__delta--plus {
  color: var(--ok);
}

.ledger__delta--minus {
  color: var(--danger);
}

.ledger__meta {
  color: var(--muted);
  font-size: var(--step--2);
}

.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}

.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 570;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
}

.tab[aria-selected='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------------------------------------------------------------- offers */

.cib-partner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cib-partner + .cib-partner {
  margin-top: var(--space-4);
}

.cib-partner__advertiser {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 650;
}

.cib-partner__title {
  font-size: var(--step-2);
  margin: var(--space-2) 0;
}

.cib-partner__note {
  color: var(--text-soft);
  font-size: var(--step--1);
  margin: 0 0 var(--space-3);
  max-width: 62ch;
}

.cib-partner__facts {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--step--2);
  color: var(--muted);
}

.cib-partner__cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: stretch;
  min-width: 190px;
}

.cib-partner__host {
  font-size: var(--step--2);
  color: var(--faint);
  text-align: center;
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------- states */

.empty {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.empty__title {
  font-size: var(--step-1);
  color: var(--text);
  margin-bottom: var(--space-2);
}

.loading {
  padding: var(--space-8);
  text-align: center;
  color: var(--muted);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-inset) 25%, var(--surface-2) 50%, var(--surface-inset) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
  height: 1em;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  font-size: var(--step--1);
  border: 1px solid transparent;
}

.notice--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 26%, transparent);
}

.notice--warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 26%, transparent);
}

.notice--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 26%, transparent);
}

.notice--info {
  background: var(--info-soft);
  color: var(--info);
  border-color: color-mix(in srgb, var(--info) 26%, transparent);
}

/* --------------------------------------------------------------- toasts */

.toast-host {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: min(420px, calc(100vw - 2 * var(--space-5)));
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  font-size: var(--step--1);
  animation: toast-in 0.18s var(--ease);
}

.toast--error {
  border-left-color: var(--danger);
}

.toast--ok {
  border-left-color: var(--ok);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* --------------------------------------------------------------- footer */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: var(--space-7) var(--space-5);
  margin-top: var(--space-8);
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.footer-col h3 {
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li + li {
  margin-top: var(--space-2);
}

.footer-col a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: var(--step--1);
}

.footer-col a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-about {
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 42ch;
  margin-top: var(--space-3);
}

.footer-legal {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  color: var(--muted);
  font-size: var(--step--2);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
  .hero__grid,
  .grid--sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card--feature {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wrap {
    padding-inline: var(--space-4);
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .card--feature {
    grid-column: span 1;
  }

  .brand__tag {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-3);
    box-shadow: var(--shadow);
    margin-left: 0;
  }

  .site-nav[data-open='true'] {
    display: flex;
  }

  .site-nav a {
    padding: var(--space-3);
  }

  .cib-partner {
    grid-template-columns: minmax(0, 1fr);
  }

  .cib-partner__cta {
    min-width: 0;
  }

  .question {
    padding: var(--space-5) var(--space-4);
  }

  .section {
    padding-block: var(--space-7);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .toast-host {
    left: var(--space-4);
    right: var(--space-4);
  }
}

@media (max-width: 420px) {
  .cib-scale {
    min-width: 48px;
    padding: var(--space-2);
  }

  .hero__proof {
    gap: var(--space-4);
  }

  .proof {
    min-width: 78px;
  }
}

/* ------------------------------------------------------------------ print */

@media print {
  .site-header,
  .site-footer,
  .btn,
  .toast-host,
  .disclosure {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .figure,
  .panel,
  .question {
    box-shadow: none;
    border-color: #ccc;
  }
}
