/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface-1: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --series-1: #2a78d6;
  --series-1-soft: #cde2fb;
  --accent-you: #eb6834;
  --good: #0ca30c;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.04), 0 12px 32px -12px rgba(11, 11, 11, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface-1: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --series-1: #3987e5;
    --series-1-soft: #184f95;
    --accent-you: #d95926;
    --good: #0ca30c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a {
  color: var(--series-1);
}

/* --------------------------------------------------------------- progress */

.progress-rail {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grid);
  z-index: 20;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--series-1);
  border-radius: 0 2px 2px 0;
  transition: width 620ms var(--ease);
}

.progress-fill.done {
  background: var(--good);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.step {
  --size: 8px;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: var(--axis);
  transition:
    background 400ms var(--ease-soft),
    width 400ms var(--ease),
    transform 400ms var(--ease);
}

.step.filled {
  background: var(--series-1);
}

.step.current {
  width: 26px;
  background: var(--series-1);
}

.step.optional-step {
  box-shadow: inset 0 0 0 1.5px var(--axis);
  background: transparent;
}

.step.optional-step.filled,
.step.optional-step.current {
  background: var(--series-1);
  box-shadow: inset 0 0 0 1.5px var(--series-1);
}

.step.skipped {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--series-1);
}

/* ------------------------------------------------------------------ shell */

.wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.results-wrap {
  max-width: 860px;
}

.masthead {
  text-align: center;
  margin-bottom: 26px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.counter {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 0;
  font-variant-numeric: tabular-nums;
}

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

.stage {
  position: relative;
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 30px 26px;
}

.card-enter {
  animation: card-in 520ms var(--ease) both;
}

.card-enter-back {
  animation: card-in-back 520ms var(--ease) both;
}

.card-exit {
  animation: card-out 260ms var(--ease-soft) both;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.card-exit-back {
  animation: card-out-back 260ms var(--ease-soft) both;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translate3d(28px, 0, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-in-back {
  from {
    opacity: 0;
    transform: translate3d(-28px, 0, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-out {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translate3d(-28px, 0, 0) scale(0.985);
  }
}

@keyframes card-out-back {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translate3d(28px, 0, 0) scale(0.985);
  }
}

.q-index {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--series-1);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-optional {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  text-transform: none;
}

.prompt {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.011em;
}

.prompt .anchor {
  color: var(--text-secondary);
}

/* ----------------------------------------------------------------- inputs */

.readout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 26px 0 2px;
  min-height: 62px;
}

.readout-value {
  font-size: 54px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: color 200ms var(--ease-soft);
}

.readout-value.pending {
  color: var(--text-muted);
}

.readout-unit {
  font-size: 18px;
  color: var(--text-secondary);
}

.delta {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 20px;
  margin-bottom: 14px;
  transition: opacity 200ms var(--ease-soft);
}

.slider-shell {
  position: relative;
  padding: 6px 0 0;
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 0;
  height: 30px;
  cursor: grab;
}

input[type='range']:active {
  cursor: grabbing;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--series-1) 0 var(--pct, 50%),
    var(--grid) var(--pct, 50%) 100%
  );
}

input[type='range']::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--grid);
}

input[type='range']::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--series-1);
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 2px solid var(--series-1);
  box-shadow: 0 1px 6px rgba(11, 11, 11, 0.18);
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

input[type='range']::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 2px solid var(--series-1);
  box-shadow: 0 1px 6px rgba(11, 11, 11, 0.18);
}

input[type='range']:hover::-webkit-slider-thumb {
  transform: scale(1.08);
}

input[type='range']:active::-webkit-slider-thumb {
  transform: scale(1.16);
  box-shadow: 0 0 0 8px color-mix(in oklab, var(--series-1) 16%, transparent);
}

/* The thumb ring below is the focus indicator; the default box around the whole
   track reads as an error state on a card this clean. */
input[type='range']:focus {
  outline: none;
}

input[type='range']:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--series-1) 38%, transparent);
}

input[type='range']:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--series-1) 38%, transparent);
}

.baseline-row {
  position: relative;
  height: 32px;
}

.baseline-mark {
  position: absolute;
  bottom: 0;
  pointer-events: none;
  animation: fade-up 600ms 200ms var(--ease) both;
}

.baseline-mark .pin {
  position: absolute;
  bottom: 0;
  left: -1px;
  width: 2px;
  height: 9px;
  border-radius: 1px;
  background: var(--axis);
}

.baseline-mark .pin-label {
  position: absolute;
  bottom: 11px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.tick {
  position: absolute;
  white-space: nowrap;
}

.tick-row {
  position: relative;
  height: 30px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.tick-sub {
  display: block;
  font-size: 10px;
  opacity: 0.75;
  font-variant-numeric: normal;
}

/* ---------------------------------------------------------------- choices */

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 4px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font-size: 16px;
  font-weight: 450;
  color: var(--text-primary);
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 16px;
  animation: fade-up 420ms var(--ease) both;
  transition:
    border-color 160ms var(--ease-soft),
    background 160ms var(--ease-soft),
    transform 140ms var(--ease);
}

.choice:hover {
  border-color: color-mix(in oklab, var(--series-1) 45%, var(--border));
  background: color-mix(in oklab, var(--series-1) 5%, var(--page));
}

.choice:focus-visible {
  outline: none;
  border-color: var(--series-1);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--series-1) 18%, transparent);
}

.choice.chosen {
  border-color: var(--series-1);
  background: color-mix(in oklab, var(--series-1) 9%, var(--page));
}

.choice-key {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  transition:
    background 160ms var(--ease-soft),
    color 160ms var(--ease-soft);
}

.choice.chosen .choice-key {
  background: var(--series-1);
  border-color: var(--series-1);
  color: #fff;
}

.choice-label {
  flex: 1;
}

.choice-tick {
  flex: none;
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 200ms var(--ease),
    transform 260ms var(--ease);
}

.choice.chosen .choice-tick {
  opacity: 1;
  transform: none;
}

.choice-tick svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--series-1);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

input[type='text'] {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--text-primary);
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  margin: 24px 0 6px;
  transition:
    border-color 180ms var(--ease-soft),
    box-shadow 180ms var(--ease-soft);
}

input[type='text']:focus {
  outline: none;
  border-color: var(--series-1);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--series-1) 16%, transparent);
}

.charcount {
  text-align: right;
  font-size: 11px;
  color: var(--text-muted);
  min-height: 16px;
  font-variant-numeric: tabular-nums;
}

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

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.spacer {
  flex: 1;
}

button,
.btn {
  display: inline-block;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 11px 20px;
  cursor: pointer;
  transition:
    transform 140ms var(--ease),
    background 160ms var(--ease-soft),
    opacity 160ms var(--ease-soft);
}

button:active,
.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--series-1);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 11, 11, 0.1);
}

a.btn-primary,
a.btn-primary:visited {
  color: #fff;
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--series-1) 88%, #000);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

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

.btn-ghost:hover {
  background: color-mix(in oklab, var(--text-primary) 5%, transparent);
}

.btn-quiet {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: 11px 12px;
}

.btn-quiet:hover {
  color: var(--text-primary);
}

.hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin: 16px 0 0;
}

kbd {
  font: inherit;
  font-size: 11px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------- outcomes */

.center-note {
  text-align: center;
  padding: 40px 0;
  animation: fade-up 520ms var(--ease) both;
}

.big-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.sub {
  color: var(--text-secondary);
  margin: 0 auto 22px;
  max-width: 46ch;
}

.check {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--good) 14%, transparent);
  display: grid;
  place-items: center;
  animation: pop 560ms var(--ease) both;
}

.check svg {
  width: 28px;
  height: 28px;
  stroke: var(--good);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw 420ms 220ms var(--ease) forwards;
}

.lock {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--text-primary) 7%, transparent);
  display: grid;
  place-items: center;
  animation: pop 560ms var(--ease) both;
}

.lock svg {
  width: 26px;
  height: 26px;
  stroke: var(--text-secondary);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 8px 8px 14px;
  max-width: 480px;
  margin: 0 auto;
}

.linkbox input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0;
  margin: 0;
}

.linkbox input:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

/* --------------------------------------------------------------- results */

.result-block {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  animation: fade-up 620ms var(--ease) both;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
}

.result-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.result-q {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 60ch;
}

.stat-row {
  display: flex;
  gap: 26px;
  margin: 16px 0 4px;
  flex-wrap: wrap;
}

.stat {
  min-width: 74px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.stat-value.you {
  color: var(--accent-you);
}

.chart-slot {
  margin-top: 6px;
  width: 100%;
}

.chart {
  display: block;
  max-width: 100%;
  overflow: visible;
}

.chart .bar {
  fill: var(--series-1);
  transition: fill 140ms var(--ease-soft);
}

.chart .bar-hit:hover + .bar,
.chart .bar.hot {
  fill: color-mix(in oklab, var(--series-1) 80%, #000);
}

.chart .bar-you {
  fill: var(--accent-you);
}

.chart .axis-line {
  stroke: var(--axis);
  stroke-width: 1;
}

.chart .tick-text {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.chart .you-line {
  stroke: var(--accent-you);
  stroke-width: 2;
  stroke-dasharray: 3 3;
}

.chart .you-label {
  fill: var(--accent-you);
  font-size: 10px;
  font-weight: 600;
  font-family: system-ui, sans-serif;
}

.chart .base-line {
  stroke: var(--text-muted);
  stroke-width: 1.5;
  stroke-dasharray: 2 3;
}

.chart .base-label {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: system-ui, sans-serif;
}

.bar-grow {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: grow 560ms var(--ease) both;
}

.tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--text-primary);
  color: var(--page);
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -130%);
  transition: opacity 120ms var(--ease-soft);
  z-index: 40;
  font-variant-numeric: tabular-nums;
}

.tooltip.on {
  opacity: 1;
}

.stat-note {
  font-size: 11px;
  color: var(--text-muted);
  margin: 1px 0 0;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------- choice-question results */

.opts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opt-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) 2fr auto;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.opt-name {
  color: var(--text-secondary);
}

.opt-row.yours .opt-name {
  color: var(--text-primary);
  font-weight: 500;
}

.opt-you {
  color: var(--accent-you);
  font-weight: 600;
  font-size: 12px;
}

.opt-track {
  height: 14px;
  background: var(--grid);
  border-radius: 4px;
  overflow: hidden;
}

.opt-bar {
  height: 100%;
  background: var(--series-1);
  border-radius: 4px;
  transform-origin: left;
  animation: grow-x 620ms var(--ease) both;
}

.opt-row.yours .opt-bar {
  background: var(--accent-you);
}

.opt-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 62px;
  text-align: right;
}

.opt-pct {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12px;
}

@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* -------------------------------------------------------------- scenarios */

.method {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.method p {
  margin: 0 0 8px;
}

.method-warn {
  color: var(--text-muted);
}

.scenario {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  animation: fade-up 620ms var(--ease) both;
}

.scenario-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.scenario-p {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  padding: 0 8px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--series-1) 12%, transparent);
  color: var(--series-1);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.scenario-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

.scenario-blurb {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.fig-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--grid);
  border-bottom: 1px solid var(--grid);
}

.fig-label {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 3px;
}

.fig-value {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.fig-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin: 1px 0 0;
}

.scenario-prose {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 6px;
}

.scenario-prose .sec {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--grid);
}

.scenario-prose .sec:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.scenario-prose h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 3px 0 0;
}

.scenario-prose p {
  margin: 0;
  max-width: 62ch;
}

/* ------------------------------------------- growth-in-context bar chart */

.gchart {
  margin: 16px 0 0;
  padding: 14px 16px 12px;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.gchart figcaption {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.grow-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(60px, 1.7fr) 46px;
  align-items: center;
  gap: 12px;
  padding: 3px 0;
  font-size: 12.5px;
}

.grow-name {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grow-period {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.grow-track {
  height: 12px;
  background: var(--grid);
  border-radius: 3px;
  overflow: hidden;
}

.grow-fill {
  height: 100%;
  background: var(--series-1);
  border-radius: 3px;
  transform-origin: left;
  animation: grow-x 620ms var(--ease) both;
}

.grow-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-size: 12px;
}

.grow-row.is-scenario .grow-name,
.grow-row.is-scenario .grow-val {
  color: var(--accent-you);
  font-weight: 650;
}

.grow-row.is-scenario .grow-period {
  color: var(--accent-you);
  opacity: 0.75;
}

.grow-row.is-scenario .grow-fill {
  background: var(--accent-you);
}

.gchart-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 12px 0 0;
  max-width: none;
}

@media (max-width: 640px) {
  .grow-row {
    grid-template-columns: 1fr 44px;
    gap: 4px 8px;
    padding: 5px 0;
  }
  .grow-track {
    grid-column: 1 / -1;
    height: 10px;
  }
}

@media (max-width: 640px) {
  .scenario-prose .sec {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }
}

.scenario-prose b {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .fig-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 12px;
  }
  .fig-value {
    font-size: 19px;
  }
  .scenario {
    padding: 20px 16px 16px;
  }
}

/* --------------------------------------------------- withheld free text */

.private {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.private-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  margin-top: 1px;
}

.empty {
  color: var(--text-muted);
  font-size: 14px;
  padding: 18px 0;
  text-align: center;
}

.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}

details.table-view {
  margin-top: 12px;
  font-size: 13px;
}

details.table-view summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
}

details.table-view table {
  border-collapse: collapse;
  margin-top: 10px;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

details.table-view th,
details.table-view td {
  text-align: left;
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid var(--grid);
  color: var(--text-secondary);
  font-weight: 400;
}

details.table-view th {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------- keyframes */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 30;
}

.confetti i {
  position: absolute;
  width: 7px;
  height: 11px;
  border-radius: 1px;
  opacity: 0;
  animation: fall 1500ms var(--ease-soft) forwards;
}

@keyframes fall {
  0% {
    opacity: 1;
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0), 88vh, 0) rotate(var(--rot, 540deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .confetti {
    display: none;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 28px 14px 60px;
  }
  .card {
    padding: 26px 20px 22px;
  }
  .result-block {
    padding: 20px 16px 16px;
  }
  .prompt {
    font-size: 18px;
  }
  .readout-value {
    font-size: 44px;
  }
  .stat-row {
    gap: 8px 18px;
  }
  .stat {
    min-width: 62px;
  }
  .stat-value {
    font-size: 18px;
  }
  .actions {
    gap: 6px;
  }
  button,
  .btn {
    padding: 11px 15px;
  }
}
