/* VEYMEER - page components added with the product site:
   inner-page heroes, card grids, the speed replay, benchmark tables and bars,
   tiers, the memory planner, the docs layout, the account pages.
   Builds on the tokens of main.css. */

/* ==========================================================================
   BASICS
   ========================================================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: #FFFFFF;
  color: #0A0A0C;
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.section-alt {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-tight {
  padding: 5rem 0;
}

.text-emerald { color: var(--accent-emerald); }
.text-muted { color: var(--ink-muted); }

code {
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 0.08em 0.38em;
  color: var(--ink-primary);
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* ==========================================================================
   NAVIGATION ADDITIONS
   ========================================================================== */

.nav-signin {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  font-weight: 500;
  white-space: nowrap;
}

.nav-signin:hover {
  color: #FFFFFF;
}

@media (max-width: 1180px) {
  .nav-menu { gap: 1.5rem; }
  .brand-name { letter-spacing: 0.28em; }
}

@media (max-width: 1024px) {
  .nav-menu.is-open {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.5rem;
    background: rgba(10, 10, 12, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-medium);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    animation: menuDrop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-menu.is-open .nav-link {
    display: block;
    padding: 1rem 0.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
  }

  .nav-menu.is-open .nav-link::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .nav-signin { display: none; }
  .nav-container { gap: 0.75rem; }
  .nav-actions { gap: 0.4rem; }
  .nav-cta { padding: 0.5rem 0.75rem; font-size: 0.68rem; letter-spacing: 0.1em; }
  .brand-link { gap: 0.7rem; }
  .brand-name { font-size: 0.95rem; letter-spacing: 0.18em; }
  .brand-divider { display: none; }
  .mobile-nav-toggle { padding: 0.35rem; }
}

@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HEROES
   ========================================================================== */

.page-hero {
  padding-top: calc(var(--header-height) + 5.5rem);
  padding-bottom: 4rem;
}

.page-hero .section-header {
  margin-bottom: 0;
  max-width: 900px;
}

.page-hero h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  margin-bottom: 1.5rem;
}

.page-hero .lead {
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 760px;
  line-height: 1.7;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: -1.5rem;
  margin-bottom: 3.5rem;
}

.hero-kicker a {
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border-medium);
}

.hero-kicker a:hover {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.stat-value .unit {
  font-size: 1.05rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.stat-box.highlight .stat-value .unit {
  color: var(--accent-emerald);
}

/* ==========================================================================
   CARD GRIDS
   ========================================================================== */

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1.5rem;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.split > * {
  min-width: 0;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

.card-title {
  font-size: 1.22rem;
  margin-bottom: 0.7rem;
  color: #FFFFFF;
  line-height: 1.3;
}

.card-text {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.card-text + .card-text {
  margin-top: 0.75rem;
}

.card-figure {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-emerald);
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.card-figure span {
  color: var(--ink-muted);
}

a.stat-box {
  display: block;
  text-decoration: none;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border-medium);
  padding-bottom: 2px;
}

.card-link:hover {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

/* A feature row: text on one side, a figure on the other */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.split + .split {
  margin-top: 5rem;
}

.split.reverse > :first-child {
  order: 2;
}

.split h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 1rem;
}

.split p {
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.split p + p {
  margin-top: 0.9rem;
}

.split-figure {
  background: rgba(16, 16, 20, 0.86);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.85);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .split.reverse > :first-child {
    order: 0;
  }
}

.check-list {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-secondary);
  font-size: 0.97rem;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--accent-emerald);
  border-bottom: 1.5px solid var(--accent-emerald);
  transform: rotate(-45deg);
}

/* ==========================================================================
   NOTES
   ========================================================================== */

.note {
  border: 1px solid var(--border-light);
  border-left: 2px solid #FFFFFF;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.note strong {
  color: #FFFFFF;
}

.note.amber {
  border-left-color: var(--accent-amber);
}

.note.emerald {
  border-left-color: var(--accent-emerald);
}

.note + .note {
  margin-top: 1rem;
}

/* ==========================================================================
   THE SPEED REPLAY
   ========================================================================== */

.race {
  background: rgba(16, 16, 20, 0.86);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.85);
  padding: 2.25rem;
}

.race-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.75rem;
}

.race-head-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}

.race-lanes {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.race-lane {
  display: grid;
  grid-template-columns: 210px 1fr 150px;
  align-items: center;
  gap: 1.25rem;
}

.race-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  letter-spacing: 0.04em;
}

.race-name small {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
  margin-top: 0.1rem;
}

.race-lane.veymeer .race-name {
  color: var(--accent-emerald);
}

.race-track {
  position: relative;
  height: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  overflow: hidden;
}

.race-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(161, 161, 170, 0.35), #A1A1AA);
  border-radius: 9999px;
}

.race-lane.veymeer .race-fill {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.35), #10B981);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
}

.race-lane.done .race-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: raceGlint 0.8s ease-out 1;
}

@keyframes raceGlint {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.race-readout {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: right;
  white-space: nowrap;
}

.race-readout strong {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
}

.race-lane.veymeer .race-readout strong {
  color: var(--accent-emerald);
}

.race-readout .race-time {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.race-lane.done .race-time {
  color: var(--ink-secondary);
}

.race-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-light);
}

.race-pane {
  background: #0D0D10;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  min-width: 0;
}

.race-pane.veymeer {
  border-color: rgba(16, 185, 129, 0.3);
}

.race-pane-title {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.race-pane.veymeer .race-pane-title {
  color: var(--accent-emerald);
}

.race-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  height: 190px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.race-text .caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: currentColor;
  vertical-align: text-bottom;
  animation: caretBlink 0.9s steps(1) infinite;
}

@keyframes caretBlink {
  50% { opacity: 0; }
}

.race-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

.race-foot a {
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border-medium);
}

.race-foot a:hover {
  color: #FFFFFF;
}

@media (max-width: 820px) {
  .race { padding: 1.5rem 1.25rem; }
  .race-lane { grid-template-columns: 1fr auto; gap: 0.5rem 1rem; }
  .race-track { grid-column: 1 / -1; order: 3; }
  .race-panes { grid-template-columns: 1fr; }
  .race-text { height: 150px; }
}

/* ==========================================================================
   BENCHMARK TABLES AND BARS
   ========================================================================== */

.bench-card {
  margin: 0;
}

.bench-card + .bench-card,
.bars + .bench-card,
.bench-card + .bars {
  margin-top: 2rem;
}

.bench-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}

.bench-card-head h3 {
  font-size: 1.35rem;
}

.bench-unit {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.table-scroll {
  overflow-x: auto;
}

.comparison-matrix-table th small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-faint);
}

.comparison-matrix-table th.veymeer-col-head small {
  color: rgba(16, 185, 129, 0.75);
}

.comparison-matrix-table tbody th {
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  padding: 1.15rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-secondary);
}

.bench-table td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bench-table td.is-best {
  color: var(--accent-emerald);
  font-weight: 700;
}

.bench-table td:not(.veymeer-col-cell).is-best {
  color: #FFFFFF;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 4px;
}

.bench-table tr.is-total th,
.bench-table tr.is-total td {
  border-top: 1px solid var(--border-medium);
  border-bottom: 0;
  font-weight: 700;
  color: #FFFFFF;
}

.bench-table tr.is-total td.is-best.veymeer-col-cell {
  color: var(--accent-emerald);
}

.not-measured {
  color: var(--ink-faint);
}

.bench-note {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

.tier-table td .yes { color: var(--accent-emerald); font-weight: 600; }
.tier-table td .no { color: var(--ink-faint); }

.bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.bars.single {
  grid-template-columns: 1fr;
}

.bar-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}

.bar-group.is-total {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.025);
}

.bars:not(.single) .bar-group.is-total {
  grid-column: 1 / -1;
}

.bar-group-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 190px 1fr 64px;
  align-items: center;
  gap: 0.9rem;
  padding: 0.28rem 0;
}

.bar-name {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-name small {
  color: var(--ink-faint);
  font-size: 0.66rem;
}

.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9999px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: #71717A;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.bar-fill.veymeer {
  background: linear-gradient(90deg, #047857, #10B981);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

.bars.is-revealed .bar-fill {
  width: var(--w);
}

.bar-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .bars { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1fr 56px; }
  .bar-track { grid-column: 1 / -1; order: 3; }
}

.setup-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem 2.5rem;
}

.setup-list li {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  padding-left: 1.1rem;
  position: relative;
}

.setup-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-muted);
}

.setup-list strong {
  color: #FFFFFF;
  font-weight: 600;
}

@media (max-width: 820px) {
  .setup-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   TIERS
   ========================================================================== */

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.tier-card {
  display: flex;
  flex-direction: column;
  background: rgba(16, 16, 20, 0.86);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tier-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.85);
}

.tier-card.featured {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), rgba(16, 16, 20, 0.86) 45%);
}

.tier-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.tier-card.featured .tier-tag {
  color: var(--accent-emerald);
}

.tier-name {
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.tier-for {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.55;
  min-height: 3.1em;
}

.tier-price {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 1.5rem;
}

.tier-billing {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.tier-points {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.tier-points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.tier-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--accent-emerald);
  border-bottom: 1.5px solid var(--accent-emerald);
  transform: rotate(-45deg);
}

@media (max-width: 1100px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tier-grid { grid-template-columns: 1fr; }
  .tier-for { min-height: 0; }
}

/* Numbered steps */
.steps {
  counter-reset: step;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.steps.four {
  grid-template-columns: repeat(4, 1fr);
}

.steps li {
  counter-increment: step;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem 1.6rem;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-emerald);
  margin-bottom: 0.9rem;
}

.steps h4 {
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.steps p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .steps,
  .steps.four { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .steps,
  .steps.four { grid-template-columns: 1fr; }
}

/* Questions */
.faq {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.faq details[open] {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 3rem 1.25rem 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--ink-muted);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  padding: 0 1.5rem 1.4rem;
  font-size: 0.96rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ==========================================================================
   HARDWARE
   ========================================================================== */

.device-class .stat-label {
  min-height: 2.4em;
  align-items: flex-start;
  line-height: 1.5;
}

.device-status {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-light);
}

.device-status p {
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.platform-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.platform-list li {
  display: grid;
  grid-template-columns: 240px 220px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.platform-list li:last-child {
  border-bottom: 0;
}

.platform-name {
  font-weight: 600;
  color: #FFFFFF;
}

.platform-text {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.platform-list .luxury-badge {
  justify-self: start;
}

@media (max-width: 820px) {
  .platform-list li { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* The memory planner (styles on top of .hardware-calculator-card) */
.calc-controls-4 {
  grid-template-columns: repeat(4, 1fr);
}

.segment-vram { background: linear-gradient(90deg, #047857, #10B981); }
.segment-ram { background: #0369A1; }
.segment-disk { background: #7C3AED; }
.segment-cache { background: #334155; }

.planner-bars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2.5rem 0 0;
}

.planner-verdict {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-light);
  border-left: 2px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.planner-verdict.is-ram { border-left-color: #38BDF8; }
.planner-verdict.is-disk { border-left-color: #A78BFA; }
.planner-verdict.is-cpu { border-left-color: var(--accent-amber); }

.planner-verdict h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.planner-verdict p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

@media (max-width: 1000px) {
  .calc-controls-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .calc-controls-4 { grid-template-columns: 1fr; }
  .hardware-calculator-card { padding: 1.5rem 1.25rem; }
  .calc-results-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DOCS
   ========================================================================== */

.doc-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.doc-nav {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-left: 1px solid var(--border-light);
}

.doc-nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 0.45rem 0 0.45rem 1.1rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.doc-nav a:hover {
  color: #FFFFFF;
}

.doc-nav a.active {
  color: #FFFFFF;
  border-left-color: #FFFFFF;
}

.doc-body > section {
  padding: 0 0 4rem;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.doc-body h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 1rem;
}

.doc-body h3 {
  font-size: 1.2rem;
  margin: 2.25rem 0 0.75rem;
}

.doc-body p {
  font-size: 1rem;
  color: var(--ink-secondary);
  max-width: 780px;
}

.doc-body p + p {
  margin-top: 0.9rem;
}

.doc-body .data-table-card {
  margin-top: 1.5rem;
  padding: 0.5rem 1.25rem;
  box-shadow: none;
}

.doc-body .data-table-card table {
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.doc-body .data-table-card th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.doc-body .data-table-card td {
  vertical-align: top;
  line-height: 1.55;
}

.doc-body .data-table-card td:first-child {
  white-space: nowrap;
}

.doc-body .data-table-card tr:last-child td {
  border-bottom: 0;
}

.doc-body .note {
  margin-top: 1.5rem;
  max-width: 780px;
}

@media (max-width: 960px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .doc-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-left: 0;
  }
  .doc-nav a {
    border: 1px solid var(--border-light);
    border-radius: 9999px;
    padding: 0.35rem 0.85rem;
    margin: 0;
  }
  .doc-nav a.active { border-color: #FFFFFF; }
  .doc-body .data-table-card td:first-child { white-space: normal; }
}

.code-block {
  position: relative;
  margin-top: 1.25rem;
  background: #08080A;
  border: 1px solid var(--border-light);
  border-left: 2px solid #FFFFFF;
  border-radius: var(--radius-sm);
  max-width: 100%;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #FAFAFA;
  padding: 1.25rem 4.5rem 1.25rem 1.25rem;
  overflow-x: auto;
  white-space: pre;
  tab-size: 4;
}

.code-block .c { color: #71717A; }
.code-block .k { color: #38BDF8; }
.code-block .s { color: #34D399; }

.code-block-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  padding: 0.6rem 1.25rem 0;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.copy-btn.copied {
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.4);
}

.term-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.term-dim { color: #71717A; }
.term-ok { color: #34D399; }
.term-note { color: #F59E0B; }

/* ==========================================================================
   CALL TO ACTION BAND
   ========================================================================== */

.cta-band {
  text-align: center;
  padding: 6rem 0;
}

.cta-band h2 {
  max-width: 820px;
  margin: 0 auto 1.25rem;
}

.cta-band p {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  color: var(--ink-muted);
}

.cta-band .hero-actions {
  margin-bottom: 0;
}

/* ==========================================================================
   STRADA
   ========================================================================== */

.install-flow {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.install-step {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.install-step .n {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.install-step .s {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.reveal-on-scroll.is-revealed .install-step {
  animation: stepIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-on-scroll.is-revealed .install-step:nth-child(2) { animation-delay: 0.15s; }
.reveal-on-scroll.is-revealed .install-step:nth-child(3) { animation-delay: 0.3s; }
.reveal-on-scroll.is-revealed .install-step:nth-child(4) { animation-delay: 0.45s; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   ACCOUNT AND DEVICE PAGES
   ========================================================================== */

.account-shell {
  max-width: 560px;
  margin: 0 auto;
}

.account-card {
  background: rgba(16, 16, 20, 0.9);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.9);
}

.account-card h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.account-card > p {
  font-size: 0.96rem;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
}

.account-card .form-group label {
  display: block;
}

.code-input {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
  padding: 1rem;
}

.device-facts {
  list-style: none;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
}

.device-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.device-facts li:last-child {
  border-bottom: 0;
}

.device-facts span:first-child {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.device-facts span:last-child {
  color: #FFFFFF;
  text-align: right;
}

.account-actions {
  display: flex;
  gap: 0.85rem;
}

.account-actions .btn-luxury {
  flex: 1;
}

.account-error {
  margin-bottom: 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.06);
  border-radius: var(--radius-sm);
  color: #FDA4AF;
  font-size: 0.88rem;
}

.account-preview-flag {
  margin-bottom: 1.25rem;
  padding: 0.7rem 1rem;
  border: 1px dashed rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-sm);
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.account-done {
  text-align: center;
}

.account-done .mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-emerald);
  font-size: 1.6rem;
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.25);
  animation: acceptFlash 0.6s ease;
}

.account-done.declined .mark {
  border-color: var(--ink-muted);
  color: var(--ink-muted);
  box-shadow: none;
}

.account-small {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

.account-small a {
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border-medium);
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   FOOTER ADDITIONS
   ========================================================================== */

.footer-status {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.footer-status .pulse-live {
  width: 6px;
  height: 6px;
}

@media (max-width: 600px) {
  .footer-status { flex-direction: column; gap: 0.5rem; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker-track,
  .pulse-live::after,
  .race-text .caret,
  .curtain-logo-svg {
    animation: none;
  }

  .bar-fill {
    transition: none;
    width: var(--w);
  }

  #ambient-bg-canvas {
    display: none;
  }
}

.platform-list.stacked li {
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.calc-result-item .item-value small {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

:not(pre) > code {
  white-space: nowrap;
}

@media (max-width: 960px) {
  :not(pre) > code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.account-card [data-state] > p:not(.account-small) {
  font-size: 0.96rem;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
}

.account-card [data-state] > p strong {
  color: #FFFFFF;
}

.nav-mobile-only {
  display: none;
}

@media (max-width: 520px) {
  .nav-menu.is-open .nav-mobile-only {
    display: block;
  }
}

/* ==========================================================================
   MODELS PAGE: the family grid and its filter, formats, chips
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.model-stats {
  margin-top: 3rem;
}

.family-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.family-search {
  flex: 1 1 280px;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--ink-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.85rem 1.1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.family-search::placeholder {
  color: var(--ink-faint);
}

.family-search:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.family-kind-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kind-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--ink-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.95rem;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.kind-btn:hover {
  color: var(--ink-primary);
  border-color: var(--border-medium);
}

.kind-btn.active {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0A0A0C;
}

.kind-btn:focus-visible,
.family-search:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.family-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.35rem 1.35rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

/* a hairline that sweeps across the top edge on hover */
.family-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.family-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.family-card:hover::before {
  transform: translateX(100%);
}

.family-card.is-hidden {
  display: none;
}

.family-card.is-match {
  animation: family-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes family-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.family-maker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.family-names {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.family-names li {
  color: var(--ink-primary);
  font-size: 1.02rem;
  font-weight: 500;
}

.family-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.family-kind {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.family-kind.kind-moe { color: var(--accent-cyan); border-color: rgba(56, 189, 248, 0.25); }
.family-kind.kind-code { color: var(--accent-emerald); border-color: rgba(16, 185, 129, 0.25); }
.family-kind.kind-open { color: var(--accent-amber); border-color: rgba(245, 158, 11, 0.25); }

.family-empty {
  margin-top: 1.5rem;
  color: var(--ink-muted);
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.format-group {
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.format-group-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 1rem;
}

.format-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.format-group .chips {
  margin-top: 0;
}

.chip {
  display: inline-block;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chip.mono {
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.chip:hover {
  border-color: var(--border-focus);
  color: #FFFFFF;
}

.reveal-on-scroll.is-revealed .chips .chip {
  animation: chip-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal-on-scroll.is-revealed .chips .chip:nth-child(2) { animation-delay: 0.04s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(3) { animation-delay: 0.08s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(4) { animation-delay: 0.12s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(5) { animation-delay: 0.16s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(6) { animation-delay: 0.2s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(7) { animation-delay: 0.24s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(8) { animation-delay: 0.28s; }
.reveal-on-scroll.is-revealed .chips .chip:nth-child(9) { animation-delay: 0.32s; }

@keyframes chip-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.plain-list {
  margin: 0.75rem 0 0 1.1rem;
  display: grid;
  gap: 0.3rem;
}

@media (prefers-reduced-motion: reduce) {
  .family-card,
  .family-card::before,
  .family-card.is-match,
  .reveal-on-scroll.is-revealed .chips .chip {
    animation: none;
    transition: none;
  }
}

/* ==========================================================================
   THE STATEMENT (home, under the hero): one paragraph, set large, lit word
   by word as it scrolls in; its comparisons drawn as bars beneath it
   ========================================================================== */

.statement-section {
  padding: 8rem 0 7rem;
  border-top: 1px solid var(--border-light);
  background:
    radial-gradient(ellipse 55% 60% at 12% 20%, rgba(16, 185, 129, 0.07), transparent 70%),
    radial-gradient(ellipse 40% 50% at 95% 90%, rgba(255, 255, 255, 0.035), transparent 70%);
  /* no overflow: hidden here: it would make the section the box the rail sticks in */
}

/* a hairline of light along the top edge */
.statement-section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(720px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}

.statement-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.statement-rail {
  position: sticky;
  top: calc(var(--header-height) + 3rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.statement-index {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.28);
  margin-bottom: 1.25rem;
}

.statement-rule {
  width: 1px;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent);
  margin-left: 0.4rem;
}

.statement-text {
  font-size: clamp(1.45rem, 2.7vw, 2.35rem);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--ink-secondary);
  max-width: 30em;
  text-wrap: pretty;
}

.st-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #FFFFFF;
}

.st-em {
  color: #FFFFFF;
  font-weight: 400;
}

.st-true {
  color: var(--accent-emerald);
  font-weight: 400;
}

/* the comparisons: white, with an underline drawn once their words are lit.
   A background, not a pseudo-element, so it follows the phrase across a line
   break, sweeping the first line and then the next. */
.st-mark {
  color: #FFFFFF;
  font-weight: 400;
  padding-bottom: 0.06em;
  background-image: linear-gradient(90deg, rgba(16, 185, 129, 0.95), rgba(255, 255, 255, 0.75));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: calc(var(--u, 1) * 100%) 2px;
}

/* lit by scrolling: --p runs 0 to 1, and each word turns on a little after the
   one before it. Without the script, or with less motion asked for, it is all lit. */
.statement-text.is-scrubbed .st-word {
  opacity: clamp(0.14, calc((var(--p, 1) * (var(--n) + 8) - var(--i)) / 8), 1);
  transition: opacity 0.12s linear;
}

.statement-text.is-scrubbed .st-mark {
  --u: clamp(0, calc((var(--p, 1) * (var(--n) + 8) - var(--ie)) / 5), 1);
}

/* the bars */
.statement-proof {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-light);
  display: grid;
  gap: 1.6rem;
  max-width: 920px;
}

.proof-row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 4.5rem;
  grid-template-areas:
    "label track value"
    "label sub   value";
  column-gap: 1.5rem;
  row-gap: 0.4rem;
  align-items: center;
}

.proof-label {
  grid-area: label;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  line-height: 1.5;
}

.proof-track {
  grid-area: track;
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

/* the scale runs to 4.4x; the other engine is the mark at 1x */
.proof-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--r) / 4.4 * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #FFFFFF);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
  transform-origin: left;
  transform: scaleX(1);
}

.proof-row.accent .proof-fill {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.45), var(--accent-emerald));
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.proof-base,
.proof-tick-key {
  width: 2px;
  height: 16px;
  border-radius: 1px;
  background: var(--ink-muted);
}

.proof-base {
  position: absolute;
  top: -5px;
  left: calc(1 / 4.4 * 100%);
  z-index: 1;
  box-shadow: 0 0 0 2px var(--bg-primary);
}

.proof-value {
  grid-area: value;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #FFFFFF;
  text-align: right;
}

.proof-row.accent .proof-value {
  color: var(--accent-emerald);
}

.proof-sub {
  grid-area: sub;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.proof-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 0.4rem;
}

.proof-tick-key {
  display: inline-block;
  height: 12px;
  flex: none;
}

/* the bars grow when the block comes into view, one after another */
.statement-proof.reveal-on-scroll .proof-fill {
  transform: scaleX(0);
  transition: transform 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.statement-proof.is-revealed .proof-fill { transform: scaleX(1); }
.statement-proof.is-revealed .proof-row:nth-child(2) .proof-fill { transition-delay: 0.15s; }
.statement-proof.is-revealed .proof-row:nth-child(3) .proof-fill { transition-delay: 0.3s; }

@media (max-width: 900px) {
  .statement-section { padding: 5.5rem 0 5rem; }
  .statement-grid { grid-template-columns: 1fr; gap: 2rem; }
  .statement-rail { position: static; flex-direction: row; align-items: center; gap: 1rem; }
  .statement-index { font-size: 3rem; margin-bottom: 0; }
  .statement-rail .section-tag { margin-bottom: 0; }
  .statement-rule { width: auto; height: 1px; flex: 1; margin: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent); }
  .proof-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label value"
      "track track"
      "sub   sub";
  }
}

@media (prefers-reduced-motion: reduce) {
  .statement-proof.reveal-on-scroll .proof-fill { transform: scaleX(1); transition: none; }
}
