/* The content of each layer. */

/* ===========================================================================
 * LAYER 01: SETUP
 * ========================================================================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  align-items: end;
  margin-bottom: var(--space-6);
}

.hero__text {
  max-width: 60rem;
}

.hero__title {
  margin: var(--space-3) 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7.2vw, 5.75rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 44rem;
  font-size: var(--text-lg);
}

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

  .hero__title {
    font-size: clamp(3rem, 5.3vw, 5rem);
  }
}

/* --- Preview stage: a live queue running on the parameters entered --- */

.stage {
  min-width: 0;
  background-color: var(--surface-sunken);
  background-image:
    linear-gradient(rgb(246 244 236 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(246 244 236 / 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--on-surface);
  border: var(--border) solid var(--ink);
  box-shadow: var(--shadow-lg) var(--pink);
}

.stage__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  background: var(--surface);
  border-bottom: var(--border-thin) solid var(--line);
}

.stage__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stage__badge i {
  width: 10px;
  height: 10px;
  background: var(--lime);
  border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}

.stage[data-playing='false'] .stage__badge i {
  background: var(--on-surface-muted);
  animation: none;
}

@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}

.stage__model {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--on-surface-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  background: transparent;
  border: var(--border-thin) solid var(--line);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--dur-fast),
    color var(--dur-fast);
}

.stage__toggle:hover {
  background: var(--lime);
  color: var(--ink);
}

.stage__toggle .icon {
  width: 16px;
  height: 16px;
}

.stage canvas {
  display: block;
  width: 100%;
}

.stage__caption {
  padding: var(--space-2) var(--space-4) var(--space-3);
  background: var(--surface);
  border-top: var(--border-thin) solid var(--line);
  color: var(--on-surface-muted);
  font-size: var(--text-sm);
}

.presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.presets__label {
  margin-right: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preset {
  min-height: 44px;
  padding: 0 var(--space-4);
  background: var(--white);
  border: var(--border-thin) solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color var(--dur-fast),
    color var(--dur-fast),
    transform var(--dur-fast) var(--ease-out);
}

.preset:hover {
  background: var(--ink);
  color: var(--yellow);
  transform: translateY(-2px);
}

.preset[aria-pressed='true'] {
  background: var(--ink);
  color: var(--yellow);
}

.setup {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.setup__fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.group {
  display: flow-root;
  padding: var(--space-5);
}

.group > * + * {
  margin-top: var(--space-5);
}

.group__legend {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.group__legend span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--pink);
  border: var(--border) solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-md);
}

.group > legend + * {
  margin-top: 0;
}

/*
 * The ticket sticks while the form scrolls, but only on screens tall enough to
 * fit it whole above the action bar. It is the ticket that sticks, not its
 * column, so the ticket can never slide over the action bar.
 */
.setup__preview {
  align-self: stretch;
}

@media (min-width: 961px) and (min-height: 860px) {
  .ticket {
    position: sticky;
    top: var(--space-4);
  }
}

/* --- Summary ticket ------------------------------------------------------ */

.ticket {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  border: var(--border) solid var(--ink);
  box-shadow: var(--shadow-lg) var(--ink);
}

.ticket > div:not(.ticket__tear) {
  padding: var(--space-4) var(--space-5);
}

.ticket__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ticket__model {
  margin: var(--space-1) 0;
  font-family: var(--font-mono);
  font-size: clamp(2.75rem, 5.2vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.ticket__sub {
  font-weight: 600;
}

/* A tear line with two half-circle notches at its edges */
.ticket__tear {
  position: relative;
  border-top: var(--border) dashed var(--ink);
}

.ticket__tear::before,
.ticket__tear::after {
  content: '';
  position: absolute;
  top: -15px;
  width: 26px;
  height: 26px;
  background: var(--surface);
  border: var(--border) solid var(--ink);
  border-radius: 50%;
}

.ticket__tear::before {
  left: -15px;
}

.ticket__tear::after {
  right: -15px;
}

.gauge__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.gauge__label {
  font-size: var(--text-sm);
  font-weight: 700;
}

.gauge__value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.gauge__track {
  position: relative;
  height: 26px;
  margin: var(--space-3) 0 var(--space-5);
  background: var(--white);
  border: var(--border) solid var(--ink);
}

.gauge__fill {
  width: 100%;
  height: 100%;
  background: var(--lime);
  border-right: var(--border) solid var(--ink);
  transform: scaleX(var(--fill, 0));
  transform-origin: left;
  transition:
    transform var(--dur-base) var(--ease-out),
    background-color var(--dur-base);
}

.gauge__fill[data-level='busy'] {
  background: var(--yellow);
}

.gauge__fill[data-level='unstable'] {
  background: var(--red);
}

/* The gauge scale ends at ρ = 1.25, so the ρ = 1 limit sits at 80%. */
.gauge__limit {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 80%;
  width: var(--border);
  background: var(--ink);
}

.gauge__limit span {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
}

.gauge__state {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
}

.ticket .banner {
  margin: 0 var(--space-5) var(--space-5);
  padding: var(--space-4);
}

.quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  margin-top: var(--space-3);
}

.quick div {
  min-width: 0;
}

.quick dt {
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
  line-height: 1.3;
}

.quick dt b {
  margin-right: 6px;
  color: var(--ink);
  font-family: var(--font-mono);
}

.quick dd {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.quick dd small {
  font-size: var(--text-sm);
  font-weight: 500;
}

.ticket__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.barcode {
  display: flex;
  align-items: stretch;
  height: 44px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.barcode i {
  flex: none;
  background: var(--ink);
}

.ticket__serial {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* --- Action bar stuck to the bottom of the layer --------------------------- */

.actionbar {
  --focus: var(--yellow);
  grid-column: 1 / -1;
  position: sticky;
  bottom: var(--space-3);
  z-index: var(--z-sticky);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-md) var(--pink);
}

.actionbar__status {
  flex: 1 1 14rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.actionbar__model {
  font-family: var(--font-mono);
  font-weight: 700;
}

.actionbar__work {
  color: #cfccbf;
  font-size: var(--text-sm);
}

.actionbar .btn--primary {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
  box-shadow: none;
}

.actionbar .btn--primary:hover {
  background: var(--paper);
  border-color: var(--paper);
}

.actionbar .btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
  box-shadow: none;
}

.progress {
  flex: 1 1 8rem;
  height: 12px;
  background: #33323b;
  overflow: hidden;
}

.progress__bar {
  width: 100%;
  height: 100%;
  background: var(--lime);
  transform: scaleX(var(--done, 0));
  transform-origin: left;
  transition: transform var(--dur-base) linear;
}

.form-error {
  grid-column: 1 / -1;
  padding: var(--space-3) var(--space-4);
  background: var(--red);
  border: var(--border) solid var(--ink);
  font-weight: 700;
}

.form-error:empty {
  display: none;
}

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

}

@media (max-width: 560px) {
  /* On phones the action bar is compacted so it does not eat the screen. */
  .actionbar {
    gap: var(--space-2);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
    box-shadow: var(--shadow-sm) var(--pink);
  }

  .actionbar__status {
    flex: 1 1 100%;
  }

  .actionbar__work {
    display: none;
  }

  .actionbar .btn--primary {
    flex: 1 1 auto;
    min-height: 48px;
  }
}

/* ===========================================================================
 * LAYER 02: RESULTS
 * ========================================================================= */

.result-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: end;
  margin-bottom: var(--space-6);
}

.result-head__title {
  margin: var(--space-2) 0 var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.result-head__lead {
  max-width: 44rem;
  font-size: var(--text-lg);
}

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

.meta li {
  padding: 4px 12px;
  background: var(--white);
  border: var(--border-thin) solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
}

.meta li:first-child {
  background: var(--yellow);
}

#results-content > .banner {
  margin-bottom: var(--space-5);
}

.compare-card,
.extra-card {
  padding: var(--space-2) var(--space-5) var(--space-4);
}

.extra-card {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
}

.compare {
  width: 100%;
  border-collapse: collapse;
}

.compare th,
.compare td {
  padding: var(--space-4) var(--space-3);
  vertical-align: middle;
  text-align: left;
}

.compare thead th {
  font-size: var(--text-sm);
  font-weight: 700;
  border-bottom: var(--border) solid var(--ink);
  white-space: nowrap;
}

.compare thead small {
  color: var(--on-raised-muted);
  font-family: var(--font-body);
  font-weight: 600;
}

.compare .num {
  text-align: right;
}

.compare tbody tr + tr {
  border-top: var(--border-thin) solid var(--ink);
}

.compare tbody th {
  font-weight: 600;
}

.metric {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.metric__symbol {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 40px;
  padding: 0 var(--space-2);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
}

.metric__name {
  line-height: 1.3;
}

.metric__name small {
  display: block;
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.value {
  font-size: var(--text-lg);
  font-weight: 600;
  white-space: nowrap;
}

.value small {
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.value__ci {
  display: block;
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.position__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

/* On wide screens, the numbers and the interval plot sit in the middle of their columns. */
@media (min-width: 861px) {
  .compare th.num,
  .compare td.num,
  .compare th.center {
    text-align: center;
  }

  .compare thead small {
    display: block;
    margin-top: 2px;
  }
}

.ciplot {
  flex: none;
  width: 150px;
  height: 30px;
  overflow: visible;
}

.ciplot__axis {
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 2 4;
}

.ciplot__band {
  fill: var(--color-simulated);
  stroke: var(--ink);
  stroke-width: 2;
}

.ciplot__mean {
  fill: var(--ink);
}

.ciplot__analytic {
  fill: var(--color-analytic);
  stroke: var(--ink);
  stroke-width: 2;
}

.compare__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding: var(--space-3) var(--space-3) 0;
  border-top: var(--border) solid var(--ink);
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
}

.compare__legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.key {
  display: inline-block;
  flex: none;
}

.key--ci {
  width: 26px;
  height: 12px;
  background: var(--color-simulated);
  border: 2px solid var(--ink);
}

.key--mean {
  width: 4px;
  height: 16px;
  background: var(--ink);
}

.key--analytic {
  width: 12px;
  height: 12px;
  background: var(--color-analytic);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.extra-card .card__note {
  margin-top: var(--space-3);
  padding: 0 var(--space-3);
}

.extra-card .card__note:empty {
  display: none;
}

.howto {
  margin-top: var(--space-6);
  box-shadow: none;
}

.howto summary {
  min-height: 52px;
  padding: var(--space-3) var(--space-5);
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.howto__body {
  padding: 0 var(--space-5) var(--space-5);
  max-width: 72ch;
}

.howto__body > * + * {
  margin-top: var(--space-3);
}

.howto__body ul {
  padding-left: var(--space-5);
  list-style: square;
}

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

@media (max-width: 860px) {
  .result-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  /* The table becomes a stack of cards: one metric per row. */
  .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .compare,
  .compare tbody,
  .compare tr,
  .compare th,
  .compare td {
    display: block;
  }

  .compare tbody tr {
    padding: var(--space-4) 0;
  }

  .compare tbody th,
  .compare tbody td {
    padding: var(--space-1) 0;
  }

  .compare tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    text-align: right;
  }

  .compare tbody td::before {
    content: attr(data-label);
    flex: none;
    color: var(--on-raised-muted);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: left;
  }

  .compare tbody td.position {
    align-items: center;
  }

  /* The interval plot and its status label drop to their own line when they do not fit. */
  .position__inner {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .compare-card,
  .extra-card {
    padding-inline: var(--space-4);
  }
}

/* ===========================================================================
 * LAYER 03: LIVE
 * ========================================================================= */

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

.live-head .eyebrow {
  color: var(--on-surface-muted);
}

.live-head__title {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  text-align: right;
}

.clock__time {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.clock__of {
  color: var(--on-surface-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.phase {
  padding: 2px 10px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phase[data-phase='observing'] {
  background: var(--lime);
}

.phase[data-phase='done'] {
  background: var(--pink);
}

#live-content > .banner {
  margin-bottom: var(--space-5);
}

.scene {
  position: relative;
  background-color: var(--surface-sunken);
  /* A faint grid, like graph paper */
  background-image:
    linear-gradient(rgb(246 244 236 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(246 244 236 / 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  border: var(--border) solid var(--line);
  box-shadow: var(--shadow-md) var(--shadow-color);
}

.scene canvas {
  display: block;
  width: 100%;
}

.scene__progress {
  height: 8px;
  border-top: var(--border-thin) solid var(--line);
}

.scene__progress i {
  display: block;
  height: 100%;
  background: var(--lime);
  transform: scaleX(var(--done, 0));
  transform-origin: left;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-5);
}

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

.layer--live .btn {
  box-shadow: var(--shadow-sm) var(--line);
}

.layer--live .btn:hover {
  box-shadow: 5px 5px 0 var(--line);
}

.layer--live .btn:active {
  box-shadow: 0 0 0 var(--line);
}

.layer--live .btn--primary {
  border-color: var(--lime);
  box-shadow: var(--shadow-sm) var(--pink);
}

.layer--live .btn--primary:hover {
  box-shadow: 5px 5px 0 var(--pink);
}

.speed {
  flex: 1 1 18rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-1) var(--space-4);
  max-width: 34rem;
}

.speed__label {
  font-weight: 700;
}

.speed input[type='range'] {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--lime);
  cursor: pointer;
}

.speed__out {
  grid-column: 2;
  color: var(--on-surface-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4);
  color: var(--on-surface-muted);
  font-size: var(--text-sm);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.dot {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--night-line);
  border-radius: 50%;
}

.dot--regular {
  background: var(--pink);
}

.dot--priority {
  background: var(--yellow);
  border-radius: 0;
  transform: rotate(45deg) scale(0.86);
}

.dot--rejected {
  background: var(--red);
  border-radius: 0;
}

.dot--ring {
  border-color: var(--lime);
  border-width: 3px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.stat {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-raised);
  border: var(--border-thin) solid var(--line);
}

.stat dt {
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
  line-height: 1.3;
}

.stat dd {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat dd small {
  display: block;
  color: var(--color-analytic);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: normal;
}

.stat--accent {
  border-color: var(--pink);
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.chart-card {
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface-raised);
  border: var(--border) solid var(--line);
}

.chart-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chart-card__sub,
.chart-card__summary {
  color: var(--on-raised-muted);
  font-size: var(--text-sm);
}

.chart-card__sub {
  min-height: 2.6em;
  margin-top: var(--space-1);
}

.chart-card__plot {
  position: relative;
  height: 320px;
  margin: var(--space-4) 0 var(--space-3);
}

.chart-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  border: var(--border-thin) dashed var(--line);
  text-align: center;
}

.datatable {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

.datatable summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
}

.datatable table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
}

.datatable th,
.datatable td {
  padding: var(--space-2);
  border-bottom: 1px solid rgb(246 244 236 / 0.25);
  text-align: left;
}

.datatable .num {
  text-align: right;
}

@media (max-width: 560px) {
  .clock {
    align-items: flex-start;
    text-align: left;
  }

  .stat {
    padding: var(--space-3);
  }

  .stat dd {
    font-size: var(--text-lg);
  }

  .chart-card {
    padding: var(--space-4);
  }

  .chart-card__plot {
    height: 280px;
  }
}
