/* Sections added in the second pass: the interactive release check, the stat
   rail, the standards marquee, the evolution ladder, the pinned rollout stage.
   docs/LANDING-DESIGN-LANGUAGE.md §8. */

/* ══════════════════════════════════════════ interactive dispatch ═══ */

.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface-2);
  overflow: hidden;
}

[data-surface="night"] .demo {
  background: var(--night-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 32px 72px rgba(0, 0, 0, 0.5);
}

@media (min-width: 980px) {
  .demo {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

.demo__left {
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

@media (min-width: 980px) {
  .demo__left {
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}

.demo__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

[data-surface="night"] .demo__bar {
  background: rgba(255, 255, 255, 0.02);
}

.demo__list {
  padding: 8px;
}

.res {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 10px;
  border-radius: 7px;
  text-align: left;
  border: 1px solid transparent;
  transition:
    background-color var(--t-hover) var(--ease-out),
    border-color var(--t-hover) var(--ease-out);
}

.res:hover {
  background: rgba(14, 22, 29, 0.035);
}

[data-surface="night"] .res:hover {
  background: rgba(255, 255, 255, 0.04);
}

.res.is-on {
  background: rgba(14, 22, 29, 0.05);
  border-color: var(--line);
}

[data-surface="night"] .res.is-on {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.res__time {
  font-size: 0.75rem;
  color: var(--fg-3);
}

/* The active row sits on a lifted surface, which costs the caption tier its
   4.5:1. The row you are reading takes the body tier instead. */
.res.is-on .res__time,
.res.is-on .res__who {
  color: var(--fg-2);
}

.res__body {
  min-width: 0;
}

.res__tail {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
}

.res__who {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo__right {
  padding: 18px;
  min-width: 0;
}

/* Each check row re-enters when the pack re-evaluates, so a policy change
   visibly re-runs the rules rather than silently swapping text. */
.krow--check {
  animation: rise 380ms var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}

/* The row whose rule the slider governs gets a rail, so the cause of a block
   is attached to the control that caused it. */
.krow--check[data-blame="hundredHourMargin"],
.krow--check[data-blame="soloCeiling"] {
  position: relative;
  padding-left: 12px;
  margin-left: -12px;
}

.krow--check[data-blame="hundredHourMargin"]::before,
.krow--check[data-blame="soloCeiling"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 2px;
  background: var(--status-hold);
}

.verdict--go {
  background: var(--go-bg);
  border-color: rgba(31, 122, 85, 0.22);
}

.verdict--go .verdict__word {
  color: var(--status-go);
}

.verdict--caution {
  background: var(--caution-bg);
  border-color: rgba(169, 118, 27, 0.24);
}

.verdict--caution .verdict__word {
  color: var(--status-caution);
}

[data-surface="night"] .verdict--go {
  background: rgba(95, 211, 160, 0.1);
  border-color: rgba(95, 211, 160, 0.26);
}

[data-surface="night"] .verdict--caution {
  background: rgba(240, 192, 105, 0.1);
  border-color: rgba(240, 192, 105, 0.26);
}

/* ── policy controls ────────────────────────────────────────────────── */

.policy {
  display: grid;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

[data-surface="night"] .policy {
  background: rgba(255, 255, 255, 0.02);
}

@media (min-width: 620px) {
  .policy {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
}

.policy__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.policy__name {
  font-size: 0.8125rem;
  color: var(--fg-2);
}

.policy__val {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.policy input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: ew-resize;
}

.policy input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}

.policy input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}

.policy input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-2);
  box-shadow: 0 1px 3px rgba(14, 22, 29, 0.28);
}

.policy input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface-2);
}

.policy input[type="range"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.policy__hint {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--fg-3);
  margin-top: 6px;
}

/* ═════════════════════════════════════════════════════ stat rail ═══ */

.rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rail__n {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.rail__l {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-top: 14px;
}

.rail__q {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  margin-top: 5px;
}

/* ═════════════════════════════════════════════════ badge hairline ═══ */

.badges {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
  color: var(--fg-3);
  font-size: 0.8125rem;
}

.badges__rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  position: relative;
}



.badges__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.badges__sep {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

@media (max-width: 720px) {
  .badges__rule { display: none; }
  .badges { flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════ standards marquee ═══ */

.std {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
  color: var(--fg-3);
  white-space: nowrap;
  transition: color var(--t-hover) var(--ease-out);
}

.std:hover {
  color: var(--fg);
}

.std__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

/* ═══════════════════════════════════════════════ evolution ladder ═══ */

.ladder {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
}

.ladder__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px 18px;
  color: var(--fg-3);
}

.ladder__row + .ladder__row {
  border-top: 1px solid var(--line);
}

.ladder__row:last-child {
  color: var(--fg);
  background: var(--surface-2);
}

[data-surface="night"] .ladder__row:last-child {
  background: rgba(255, 255, 255, 0.05);
}

.ladder__n {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  /* --fg-4 is the non-text tier; this is text. Measured 2.12:1 there. */
  color: var(--fg-3);
}

.ladder__row:last-child .ladder__n {
  color: var(--accent);
}

.ladder__t {
  font-size: 0.9375rem;
}

.ladder__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}

/* ═══════════════════════════════════════════════════ pinned stage ═══ */

/* Assemble pins its `.how-stage` for eight scroll steps while the copy beside
   it advances. Cheapest way to make a page feel directed rather than stacked. */
@media (min-width: 1040px) {
  .pin {
    position: sticky;
    top: calc(var(--nav-h) + 44px);
  }
}

/* ══════════════════════════════════════════════════════ quote card ═══ */

.pull {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface-2);
  overflow: hidden;
}

@media (min-width: 860px) {
  .pull {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
}

.pull__body {
  padding: clamp(24px, 3vw, 38px);
}

.pull__q {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-wrap: pretty;
}

.pull__attr {
  font-size: 0.875rem;
  color: var(--fg-3);
  margin-top: 20px;
}

.pull__side {
  padding: clamp(24px, 3vw, 38px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 860px) {
  .pull__side {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.pull__n {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.pull__l {
  font-size: 0.875rem;
  color: var(--fg-2);
  margin-top: 12px;
  max-width: 22ch;
}
