/* voice-idle-cost review page. Semantic tokens only; literal values live in styles/packs/. */

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

html,
body {
  height: auto;
}

body {
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

main,
.site-header,
.site-footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

a {
  color: var(--dg-text-primary);
  text-decoration-color: var(--dg-border-selected);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--dg-text-primary);
}

code,
pre {
  font-family: var(--dg-font-code);
  font-size: 0.86em;
}

code {
  color: var(--dg-text-primary);
}

h1,
h2,
h3 {
  color: var(--dg-text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.15;
}

p {
  margin: 0 0 12px;
  max-width: 72ch;
}

section {
  padding: 40px 0 8px;
  border-top: 1px solid var(--dg-border);
}

.label,
legend.label {
  font-family: var(--dg-font-mono);
  font-weight: var(--dg-weight-medium);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-label);
}

.note,
.footnote,
.scope {
  color: var(--dg-text-label);
  font-size: 0.92rem;
}

/* ---- header ------------------------------------------------------------ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.logo-link {
  display: inline-flex;
  padding: 6px 0;
}

.logo-link img {
  height: 22px;
  width: auto;
  display: block;
}

/* ---- hero -------------------------------------------------------------- */
.hero {
  border-top: 0;
  padding-top: 32px;
}

.lede {
  font-size: 1.15rem;
  color: var(--dg-text-body);
}

.disclosure {
  color: var(--dg-text-label);
}

/* ---- lanes ------------------------------------------------------------- */
.lane-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.lane-list li {
  background: var(--dg-bg-panel);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
  padding: 14px 16px;
}

.lane-list .lane-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
  margin-bottom: 4px;
}

.lane-list p {
  font-size: 0.9rem;
  color: var(--dg-text-label);
  margin: 0;
}

/* series key: a short stroke of the lane color, the only place color carries identity */
.key {
  display: inline-block;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  flex: none;
  background: var(--dg-icon-default);
}

/* one custom property carries each series color; close-on-idle variants share their lane's */
[data-lane='A'],
[data-lane='AC'] { --c: var(--dg-series-a); }
[data-lane='B'],
[data-lane='BC'] { --c: var(--dg-series-b); }
[data-lane='C'] { --c: var(--dg-series-c); }
[data-lane='D'] { --c: var(--dg-series-d); }
[data-comp='voice'] { --c: var(--dg-component-voice); }
[data-comp='stt'] { --c: var(--dg-component-stt); }
[data-comp='tts'] { --c: var(--dg-component-tts); }
[data-comp='llm'] { --c: var(--dg-component-llm); }

.key[data-lane],
.key[data-comp] {
  background: var(--c);
}

.key.dashed {
  height: 0;
  background: none;
  border-top: 3px dashed var(--c);
  border-radius: 0;
}

.key.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.key.swatch.hatched {
  background: repeating-linear-gradient(45deg, var(--c) 0 3px, var(--dg-bg-app) 3px 5px);
}

/* ---- scenario controls ------------------------------------------------- */
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

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

.preset {
  font-family: var(--dg-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: var(--dg-shape-pill);
  border: 1px solid var(--dg-border-hover);
  background: var(--dg-bg-panel);
  color: var(--dg-text-primary);
  cursor: pointer;
  transition: border-color var(--dg-anim-fast) var(--dg-anim-ease), background var(--dg-anim-fast) var(--dg-anim-ease);
}

.preset:hover {
  border-color: var(--dg-border-selected);
}

/* fuchsia: the one accent per view is the active preset */
.preset[aria-pressed='true'] {
  background: var(--dg-accent);
  border-color: var(--dg-accent);
  color: var(--dg-text-on-accent);
}

.blurb {
  min-height: 1.55em;
  color: var(--dg-text-body);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 16px;
  align-items: end;
  margin: 16px 0 8px;
  padding: 16px;
  background: var(--dg-bg-panel);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-row input {
  flex: 1;
  min-width: 0;
  accent-color: var(--dg-text-primary);
}

.range-row output {
  font-family: var(--dg-font-mono);
  color: var(--dg-text-primary);
  min-width: 7ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.field input[type='number'],
.field select {
  width: 100%;
  padding: 8px 10px;
  background: var(--dg-bg-well);
  border: 1px solid var(--dg-border-hover);
  border-radius: var(--dg-shape-control);
  color: var(--dg-text-primary);
  font-variant-numeric: tabular-nums;
}

.segmented {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.segmented legend {
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
}

.segmented label,
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--dg-text-body);
  font-size: 0.95rem;
}

.check {
  flex-direction: row;
  align-self: end;
  grid-column: span 2;
  padding-bottom: 8px;
}

.segmented input,
.check input {
  accent-color: var(--dg-text-primary);
}

.warning {
  color: var(--dg-state-error);
  font-size: 0.92rem;
}

/* ---- headline tiles ---------------------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.tile {
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile h3 {
  font-size: 1rem;
  margin: 0;
}

.tile .value {
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  font-weight: var(--dg-weight-medium);
  color: var(--dg-text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 8px 0 2px;
  overflow-wrap: anywhere;
}

.tile .close {
  font-size: 0.9rem;
  color: var(--dg-text-body);
  margin: 0;
}

.tile .close strong {
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
}

.tag {
  font-family: var(--dg-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-disabled);
  margin: 0;
}

.summary {
  font-size: 1.05rem;
  color: var(--dg-text-body);
}

.callout {
  border-left: 2px solid var(--dg-text-primary);
  padding: 4px 0 4px 12px;
  color: var(--dg-text-body);
  font-size: 0.95rem;
}

.callout strong {
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
}

.others {
  margin-top: 16px;
}

/* ---- tables ------------------------------------------------------------ */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
}

table.data {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dg-border);
  vertical-align: top;
}

table.data thead th {
  font-family: var(--dg-font-mono);
  font-weight: var(--dg-weight-medium);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-label);
  white-space: nowrap;
}

table.data tbody th {
  font-weight: var(--dg-weight-regular);
}

table.data td.nowrap,
.nowrap {
  white-space: nowrap;
}

table.data td.num,
table.data th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.data td.num strong {
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
}

table.data .lane-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dg-text-primary);
  white-space: nowrap;
}

table.data .sub {
  display: block;
  font-size: 0.8rem;
  color: var(--dg-text-label);
}

table.data tr.total td {
  border-top: 1px solid var(--dg-border-selected);
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
}

table.data tr.check td {
  color: var(--dg-text-label);
  font-size: 0.85rem;
}

/* ---- charts ------------------------------------------------------------ */
.chart-card {
  margin: 16px 0 24px;
  padding: 16px;
  background: var(--dg-bg-panel);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
}

.chart-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.chart-title {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: 1.1rem;
  color: var(--dg-text-primary);
}

.chart-sub {
  font-size: 0.88rem;
  color: var(--dg-text-label);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--dg-text-body);
}

.legend span.item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart {
  position: relative;
  width: 100%;
  min-height: 240px;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart svg:focus {
  outline: none;
}

.chart svg:focus-visible {
  outline: 2px solid var(--dg-focus-ring);
  outline-offset: 4px;
}

.chart .grid {
  stroke: var(--dg-border);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .axis {
  stroke: var(--dg-divider-strong);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .tick {
  fill: var(--dg-text-label);
  font-family: var(--dg-font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart .axis-title {
  fill: var(--dg-text-label);
  font-family: var(--dg-font-ui);
  font-size: 12px;
}

.chart .line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart .line { stroke: var(--c); }
.chart circle.dot { fill: var(--c); }
.chart .seg { fill: var(--c); }

.chart .line-label {
  fill: var(--dg-text-primary);
  font-family: var(--dg-font-mono);
  font-size: 10.5px;
  font-weight: var(--dg-weight-medium);
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: var(--dg-bg-app);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.chart .labels.narrow .line-label {
  font-size: 10px;
}

.chart .label-key {
  stroke-width: 3;
  stroke-linecap: butt;
}

.chart .leader {
  fill: none;
  stroke: var(--dg-text-label);
  stroke-width: 1;
}

.chart .bar-label {
  fill: var(--dg-text-primary);
  font-family: var(--dg-font-ui);
  font-size: 12px;
}

.chart .bar-sublabel {
  fill: var(--dg-text-label);
  font-family: var(--dg-font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.chart .bar-total {
  fill: var(--dg-text-primary);
  font-family: var(--dg-font-mono);
  font-size: 11px;
  font-weight: var(--dg-weight-medium);
}

.chart .seg-hit {
  fill: transparent;
  cursor: default;
}

/* lines draw in from the left, whole series at once; reduced motion zeroes the duration */
.chart .draw {
  animation: dg-draw calc(var(--dg-anim-base) * 3) var(--dg-anim-ease) both;
}

@keyframes dg-draw {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.chart circle.dot {
  stroke: var(--dg-bg-app);
  stroke-width: 2;
}

.chart .end-label {
  fill: var(--dg-text-primary);
  font-family: var(--dg-font-mono);
  font-size: 11px;
  font-weight: var(--dg-weight-medium);
}

.chart .marker {
  stroke: var(--dg-text-label);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart .marker-label {
  fill: var(--dg-text-label);
  font-family: var(--dg-font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chart .crosshair {
  stroke: var(--dg-text-primary);
  stroke-width: 1;
  shape-rendering: crispEdges;
  pointer-events: none;
}

.chart .hit {
  fill: transparent;
  cursor: crosshair;
}

.tooltip {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  background: var(--dg-bg-overlay);
  backdrop-filter: blur(var(--dg-glass-blur));
  border: 1px solid var(--dg-border-hover);
  border-radius: var(--dg-shape-control);
  padding: 8px 10px;
  font-size: 0.82rem;
  min-width: 170px;
  z-index: 2;
}

.tooltip .tt-x {
  font-family: var(--dg-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-label);
  margin-bottom: 4px;
}

.tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tooltip .tt-row strong {
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
  font-variant-numeric: tabular-nums;
  min-width: 6ch;
}

.tooltip .tt-row span.name {
  color: var(--dg-text-label);
}

.table-view summary,
details summary {
  cursor: pointer;
  font-family: var(--dg-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-label);
  margin-top: 8px;
}

/* ---- formulas ---------------------------------------------------------- */
.formula-block {
  background: var(--dg-bg-well);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
  padding: 16px;
  margin: 12px 0 20px;
}

.formula-block pre {
  margin: 6px 0 16px;
  overflow-x: auto;
  color: var(--dg-text-primary);
  line-height: 1.7;
}

.formula-block pre:last-child {
  margin-bottom: 0;
}

.plugged {
  padding-left: 18px;
  margin: 8px 0 12px;
}

.plugged li {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

/* ---- measured ---------------------------------------------------------- */
.source-key {
  list-style: none;
  padding: 0;
  margin: 12px 0 20px;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.source-key li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.pill {
  display: inline-block;
  font-family: var(--dg-font-mono);
  font-weight: var(--dg-weight-medium);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--dg-shape-pill);
  border: 0.5px solid var(--dg-border-hover);
  background: var(--dg-bg-panel);
  color: var(--dg-text-primary);
  white-space: nowrap;
  flex: none;
}

.pill[data-source='provider'] {
  border: 1px solid var(--dg-text-primary);
}

.pill[data-source='client'] {
  color: var(--dg-text-body);
}

.pill[data-source='modeled'] {
  border-style: dashed;
  color: var(--dg-text-label);
}

.pill[data-source='missing'],
.pill[data-source='unknown'] {
  color: var(--dg-state-error);
  border-color: var(--dg-state-error);
}

.run {
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
  padding: 12px 16px;
  margin: 12px 0;
  background: var(--dg-bg-panel);
}

.run > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0;
  list-style: none;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--dg-font-ui);
  font-size: 0.95rem;
  color: var(--dg-text-primary);
}

.run > summary::-webkit-details-marker {
  display: none;
}

.run > summary::before {
  content: '+';
  font-family: var(--dg-font-mono);
  color: var(--dg-text-label);
  width: 1ch;
}

.run[open] > summary::before {
  content: '\2212';
}

.run .run-file {
  font-family: var(--dg-font-mono);
  font-size: 0.75rem;
  color: var(--dg-text-label);
  overflow-wrap: anywhere;
}

.run ul.notes {
  font-size: 0.88rem;
  color: var(--dg-text-label);
  padding-left: 18px;
}

.tf-block {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--dg-border-hover);
  border-radius: var(--dg-shape-panel);
}

/* ---- footer ------------------------------------------------------------ */
.site-footer {
  padding-top: 40px;
  padding-bottom: 64px;
  border-top: 1px solid var(--dg-border);
  margin-top: 40px;
}

.caveats {
  padding-left: 18px;
  display: grid;
  gap: 10px;
  max-width: 80ch;
}

.caveats strong {
  color: var(--dg-text-primary);
  font-weight: var(--dg-weight-medium);
}

/* ---- one-day page: compact hero, slim controls, bar groups -------------- */
.site-header .product {
  text-decoration: none;
  color: var(--dg-text-primary);
}

.site-header .product:hover {
  text-decoration: underline;
}

.hero.compact {
  padding-top: 8px;
  padding-bottom: 0;
}

.hero.compact h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1;
  max-width: 22ch;
  margin-bottom: 12px;
}

.controls.slim {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  margin-top: 12px;
}

.assumptions {
  grid-column: 1 / -1;
  border-top: 1px solid var(--dg-border);
  padding-top: 4px;
}

.assumptions > summary {
  margin: 4px 0;
}

.assumption-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px 16px;
  align-items: end;
  margin: 12px 0;
}

.assumption-grid .check {
  grid-column: auto;
}

.assumptions .sub-label {
  margin: 14px 0 0;
  color: var(--dg-text-primary);
}

.reset {
  font-family: var(--dg-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  margin: 4px 0 8px;
  border-radius: var(--dg-shape-pill);
  border: 1px solid var(--dg-border-hover);
  background: var(--dg-bg-panel);
  color: var(--dg-text-primary);
  cursor: pointer;
}

.reset:hover {
  border-color: var(--dg-border-selected);
}

.groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 24px;
  border-top: 0;
}

.group {
  background: var(--dg-bg-panel);
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
  padding: 16px;
  min-width: 0;
}

.group-title {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.group-sub {
  font-size: 0.88rem;
  color: var(--dg-text-label);
  margin-bottom: 8px;
}

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

.bar-row {
  padding: 12px 0;
  border-top: 1px solid var(--dg-border);
}

.bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bar-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dg-text-primary);
  min-width: 0;
}

.bar-name .key {
  align-self: center;
}

.bar-value {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: var(--dg-weight-medium);
  color: var(--dg-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.bar-track {
  display: block;
  height: 10px;
  margin: 8px 0 6px;
}

/* bar marks: square at the baseline, 4px rounded data end */
.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
  background: var(--dg-icon-default);
  transition: width var(--dg-anim-base) var(--dg-anim-ease);
}

.bar-fill[data-lane] { background: var(--c); }

.bar-sub {
  font-size: 0.85rem;
  color: var(--dg-text-label);
  margin: 0;
}

.group .footnote {
  margin: 8px 0 0;
  font-size: 0.85rem;
}

.chart-section {
  border-top: 0;
  padding-top: 8px;
}

.provenance {
  color: var(--dg-text-body);
  font-size: 0.95rem;
}

.learn-more {
  font-family: var(--dg-font-mono);
  font-weight: var(--dg-weight-medium);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.caveats.short {
  list-style: none;
  padding: 0;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--dg-text-label);
}

.site-footer:has(.caveats.short) {
  padding-top: 24px;
  margin-top: 24px;
}

/* ---- landing: 2x2 cost grid (phone first) ------------------------------- */
.lede-sm {
  font-size: 1.05rem;
  color: var(--dg-text-body);
  margin-bottom: 4px;
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 8px;
}

.cost-grid .corner {
  display: none;
}

.col-head {
  padding: 0 2px 2px;
  min-width: 0;
}

.col-title.label {
  display: block;
  color: var(--dg-text-primary);
  font-size: 0.74rem;
  line-height: 1.3;
  margin-bottom: 2px;
}

.col-sub {
  display: block;
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--dg-text-label);
}

.row-label {
  grid-column: 1 / -1;
  margin-top: 8px;
  font-family: var(--dg-font-mono);
  font-weight: var(--dg-weight-medium);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dg-text-label);
}

/* glass informational panels: panel fill + blur + hairline, no shadow or gradient */
.cost-cell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 12px 14px 14px;
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-panel);
}

/* vinyl material grain on the glass: texture, not noise */
.cost-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/brand/vinyl-grain-420.webp') center / 420px auto repeat;
  opacity: 0.08;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ---- textured hero: Voice Texture A under the kit's black 40% scrim -------
   One 40% layer let off-white text drop to about 2.9:1 on the texture's
   brightest patches, so the scrim is applied twice (about 64% darker) and
   the tiles over it use the darker glass surface. Fades out at the bottom. */
html {
  overflow-x: clip;
}

.hero.textured {
  position: relative;
}

.hero.textured::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -140px;
  bottom: -24px;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background:
    linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
    linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
    url('assets/brand/hero-texture.webp') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent);
  mask-image: linear-gradient(to bottom, black 78%, transparent);
  pointer-events: none;
}

.hero.textured .cost-cell {
  background: var(--dg-bg-overlay);
}

.hero.textured .scope,
.hero.textured .footnote,
.hero.textured .col-sub,
.hero.textured .row-label,
.hero.textured .ratio .label {
  color: var(--dg-text-body);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.hero-art {
  display: block;
  width: auto;
  height: 180px;
  margin-right: 8px;
}

@media (max-width: 680px) {
  .hero.textured::before {
    background:
      linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
      linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
      url('assets/brand/hero-texture-640.webp') center / cover no-repeat;
  }

  .hero-art {
    height: 88px;
    margin-right: 0;
  }
}

.takeaway {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: clamp(1.4rem, 4.6vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--dg-text-primary);
  margin: 8px 0 14px;
  max-width: 24ch;
}

.post-art {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin: 0 0 18px;
}

/* display type: Work Sans Medium, tight leading and tracking */
.cell-value {
  display: flex;
  align-items: flex-start;
  color: var(--dg-text-primary);
  font-family: var(--dg-font-display);
  font-size: clamp(2.35rem, 10.4vw, 4.5rem);
  font-weight: var(--dg-weight-medium);
  letter-spacing: -0.03em;
  line-height: 0.9;
  font-variant-numeric: proportional-nums;
}

.cell-value .v.long {
  font-size: 0.78em;
}

/* the one fuchsia accent on the page: Deepgram's quiet-when-idle number */
.cost-cell.accent .cell-value {
  color: var(--dg-accent);
}

.cell-value .dagger {
  font-size: 0.42em;
  margin-left: 2px;
  color: var(--dg-text-label);
}

.cost-cell .per.label {
  color: var(--dg-text-label);
  font-size: 0.68rem;
}

.cost-cell .per .dot {
  color: var(--c);
}

.cost-cell .cell-what {
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--dg-text-body);
}

/* per-day inset, lower right of each tile, muted */
.cost-cell .inset {
  margin-top: auto;
  padding-top: 4px;
  align-self: flex-end;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--dg-font-mono);
  font-size: 0.8rem;
  color: var(--dg-text-label);
  white-space: nowrap;
}

.cost-cell .inset .label {
  font-size: 0.64rem;
}

.cost-cell .inset .day {
  color: var(--dg-text-body);
  font-variant-numeric: tabular-nums;
}

.ratio {
  margin: 14px 0 6px;
  font-size: 1.06rem;
  line-height: 1.45;
  color: var(--dg-text-primary);
}

.ratio .ratio-part {
  display: block;
}

.ratio .label {
  color: var(--dg-text-label);
  margin-right: 4px;
}

#close-note {
  font-size: 0.82rem;
}

.same-price {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
}

/* chart tabs */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 10px;
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-pill);
  background: var(--dg-bg-panel);
}

.tabs [role='tab'] {
  font-family: var(--dg-font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--dg-shape-pill);
  background: transparent;
  color: var(--dg-text-label);
  cursor: pointer;
}

.tabs [role='tab'][aria-selected='true'] {
  background: var(--dg-text-primary);
  color: var(--dg-text-on-accent);
}

/* motion: whole blocks enter with a short blur and fade, expo-out */
.enter {
  animation: dg-enter calc(var(--dg-anim-base) * 2) var(--dg-anim-ease) both;
}

.cost-cell.enter[data-cell='C'] { animation-delay: calc(var(--dg-anim-fast) * 0.5); }
.cost-cell.enter[data-cell='AC'] { animation-delay: var(--dg-anim-fast); }
.cost-cell.enter[data-cell='D'] { animation-delay: calc(var(--dg-anim-fast) * 1.5); }
.ratio.enter { animation-delay: calc(var(--dg-anim-fast) * 2); }

@keyframes dg-enter {
  from {
    opacity: 0;
    filter: blur(8px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .enter,
  .chart .draw {
    animation: none;
  }
}

.settings {
  border-top: 0;
  padding-top: 8px;
}

@media (min-width: 720px) {
  .cost-grid {
    grid-template-columns: 170px repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cost-grid .corner {
    display: block;
  }

  .row-label {
    grid-column: auto;
    align-self: center;
    margin: 0;
  }

  .cost-cell {
    padding: 18px 20px;
  }
}

@media (max-width: 520px) {
  .legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
  }

  .legend span.item {
    align-items: baseline;
  }

  .legend .key {
    transform: translateY(-3px);
  }
}

/* ---- phone width ------------------------------------------------------- */
@media (max-width: 680px) {
  .groups {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .controls.slim .field-hours {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .tile {
    padding: 12px;
  }

  table.data th,
  table.data td {
    padding: 8px 6px;
  }

  table.data .lane-cell {
    white-space: normal;
    align-items: baseline;
  }

  table.data thead th {
    white-space: normal;
  }

  .site-header {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---- where a day's money goes: silence vs talk -------------------------- */
.split {
  display: grid;
  gap: 18px;
  margin-top: 6px;
}

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.split-name {
  font-size: 0.92rem;
  color: var(--dg-text-body);
}

.split-total {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--dg-text-primary);
  font-variant-numeric: tabular-nums;
}

.split-row[data-lane='D'] .split-total {
  color: var(--dg-accent);
}

.split-track {
  display: flex;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--dg-bg-panel);
}

.split-track .seg {
  display: block;
  height: 100%;
  min-width: 0;
  transition: width var(--dg-anim-base) var(--dg-anim-ease);
}

/* silence: the lane's color, hatched and dimmed; talk: the lane's color, solid */
.split-track .seg.silence,
.key.swatch.silence {
  background: repeating-linear-gradient(45deg, var(--c, var(--dg-text-label)) 0 3px, transparent 3px 7px);
  opacity: 0.7;
}

.split-track .seg.talk {
  background: var(--c);
}

.key.swatch.talk {
  background: var(--dg-text-primary);
}

.split-vals {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font-family: var(--dg-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--dg-text-label);
  font-variant-numeric: tabular-nums;
}

.split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 10px;
  font-size: 0.8rem;
  color: var(--dg-text-label);
}

.split-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lede {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  letter-spacing: -0.02em;
}

/* ---- live, simulated room ------------------------------------------------ */
.live {
  margin: 28px 0;
  padding: 18px 16px;
  border: 1px solid var(--dg-border);
  border-radius: 14px;
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
}

.live-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.live-title {
  margin: 0;
  font-size: 0.78rem;
  color: var(--dg-text-primary);
}

.live-dot {
  color: var(--dg-accent);
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  50% { opacity: 0.35; }
}

.loop-clock {
  font-size: 0.72rem;
  color: var(--dg-text-label);
  font-variant-numeric: tabular-nums;
}

/* scrolling waveform of the scripted loop; the playhead sits at 70% */
.wave {
  display: block;
  width: 100%;
  height: 72px;
  margin: 14px 0 8px;
}

.caption {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-height: 2.8em;
  margin: 0 0 12px;
}

.caption-who {
  flex: 0 0 auto;
  font-size: 0.7rem;
  color: var(--dg-text-label);
}

.caption-who[data-who='user'] { color: var(--dg-text-primary); }
.caption-who[data-who='agent'] { color: var(--dg-accent); }

.caption-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--dg-text-body);
}

/* primary button: glass, per the brand rules */
.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.play,
.chime {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-pill);
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
  color: var(--dg-text-primary);
  font-family: var(--dg-font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid var(--dg-accent);
}

.play[aria-pressed='true'] .play-icon {
  width: 10px;
  height: 12px;
  border: 0;
  border-left: 3px solid var(--dg-accent);
  border-right: 3px solid var(--dg-accent);
}

.meters {
  display: grid;
  gap: 8px;
}

.meter {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'name total' 'name mode';
  row-gap: 2px;
  align-items: center;
  column-gap: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--c);
  border-radius: 6px;
  background: color-mix(in srgb, var(--dg-bg-app) 55%, transparent);
}

.meter-name {
  grid-area: name;
  font-size: 0.86rem;
  color: var(--dg-text-body);
}

/* the billing state right now, under the running price */
.meter-mode {
  grid-area: mode;
  justify-self: end;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  color: var(--dg-text-label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.meter.billing .meter-mode { color: var(--c); }

.meter-total {
  grid-area: total;
  justify-self: end;
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--dg-text-primary);
  font-variant-numeric: tabular-nums;
}

.meter.accent .meter-total { color: var(--dg-accent); }

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none !important; }
}

/* secondary action: outline pill, so Play stays the primary glass button */
.chime {
  padding: 10px 16px;
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-pill);
  background: transparent;
  color: var(--dg-text-primary);
  font-family: var(--dg-font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.chime-icon {
  color: var(--dg-accent);
  font-size: 1rem;
  line-height: 1;
}

.chime:disabled {
  cursor: default;
  color: var(--dg-text-label);
  opacity: 0.7;
}

.chime:disabled .chime-icon { color: var(--dg-text-label); }

/* queued speakers: a slot fills on each press, pulses while its speaker talks, clears after */
.cue-slots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cue-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px dashed var(--dg-border);
  border-radius: 50%;
  transition: border-color var(--dg-anim-fast) var(--dg-anim-ease), background var(--dg-anim-fast) var(--dg-anim-ease);
}

.cue-slot svg {
  width: 14px;
  height: 14px;
  fill: var(--dg-text-label);
  opacity: 0.35;
}

.cue-slot[data-state='queued'] {
  border-style: solid;
  border-color: var(--dg-accent);
}

.cue-slot[data-state='queued'] svg {
  fill: var(--dg-accent);
  opacity: 1;
}

.cue-slot[data-state='playing'] {
  border-style: solid;
  border-color: var(--dg-accent);
  background: var(--dg-accent);
  animation: cue-pulse 1s var(--dg-anim-ease) infinite alternate;
}

.cue-slot[data-state='playing'] svg {
  fill: var(--dg-text-on-accent);
  opacity: 1;
}

@keyframes cue-pulse {
  to { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .cue-slot[data-state='playing'] { animation: none; }
}

/* ---- lifecycle: one minute, four ways ----------------------------------- */
.lifecycle {
  margin: 28px 0 8px;
  padding: 18px 16px;
  border: 1px solid var(--dg-border);
  border-radius: 14px;
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
}

.lifecycle figcaption {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.lc-phases,
.lc-track {
  display: flex;
  gap: 4px;
}

.lc-phases {
  margin-bottom: 8px;
}

.lc-phase,
.lc-seg {
  flex-basis: 0;
  min-width: 0;
}

.lc-phase {
  display: grid;
  gap: 2px;
}

.lc-phase .label {
  font-size: 0.66rem;
  color: var(--dg-text-primary);
}

.lc-len {
  font-family: var(--dg-font-mono);
  font-size: 0.64rem;
  color: var(--dg-text-label);
}

.lc-rows {
  display: grid;
  gap: 14px;
}

.lc-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.lc-title {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: 0.95rem;
  color: var(--dg-text-primary);
}

.lc-sub {
  font-size: 0.8rem;
  color: var(--dg-text-label);
}

.lc-seg {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 6px;
  overflow: hidden;
}

.lc-rate {
  font-family: var(--dg-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lc-note {
  font-size: 0.72rem;
  color: var(--dg-text-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* talking rate: the lane color, solid; waiting rate: the lane color, hatched; not billed: dashed */
.lc-seg.talk {
  background: var(--c);
  color: var(--dg-text-on-accent);
}

.lc-seg.talk .lc-note { color: var(--dg-text-on-accent); }

.lc-seg.wait {
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 55%, transparent) 0 3px, transparent 3px 7px);
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  color: var(--dg-text-primary);
}

.lc-seg.off {
  border: 1px dashed var(--dg-border);
  color: var(--dg-text-label);
}

.lc-row[data-lane='D'] .lc-seg.off { border-color: var(--dg-accent); }
.lc-row[data-lane='D'] .lc-seg.off .lc-rate { color: var(--dg-accent); }

.lc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--dg-text-label);
}

.lc-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lc-key.talk { background: var(--dg-text-primary); }
.lc-key.wait { background: repeating-linear-gradient(45deg, var(--dg-text-label) 0 2px, transparent 2px 5px); border: 1px solid var(--dg-text-label); }
.lc-key.off { border: 1px dashed var(--dg-text-label); background: transparent; }

@media (max-width: 520px) {
  .lc-seg { padding: 6px 5px; }
  .lc-rate { font-size: 0.64rem; }
  .lc-note { display: none; }
}

/* text on hatched segments sits on a small solid chip so it stays readable */
.lc-seg.wait .lc-rate,
.lc-seg.wait .lc-note {
  align-self: flex-start;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--dg-bg-app);
  color: var(--dg-text-primary);
}

/* ---- how it's built: Pipecat + Deepgram ---------------------------------- */
.built {
  margin: 20px 0 8px;
  padding: 18px 16px;
  border: 1px solid var(--dg-border);
  border-radius: 14px;
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
}

.built-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--dg-text-primary);
}

.built-lede {
  margin: 0 0 14px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--dg-text-body);
  max-width: 68ch;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.flow li {
  display: inline-flex;
  flex-direction: column;
  padding: 6px 12px;
  border: 0.5px solid var(--dg-border);
  border-radius: var(--dg-shape-pill);
  background: color-mix(in srgb, var(--dg-text-primary) 12%, transparent);
  font-family: var(--dg-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dg-text-primary);
}

.flow li {
  position: relative;
}

.flow li:not(:last-child) {
  margin-right: 18px;
}

/* an arrow between steps, outside each pill */
.flow li:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dg-text-label);
  font-size: 0.8rem;
}

.flow .flow-key {
  border-color: var(--dg-accent);
  color: var(--dg-accent);
}

.flow .flow-key span {
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--dg-text-label);
}

.code {
  margin: 0 0 10px;
  padding: 14px;
  border-radius: 10px;
  background: var(--dg-bg-app);
  border: 1px solid var(--dg-border);
  overflow-x: auto;
  font-family: var(--dg-font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--dg-text-primary);
}

.code .c { color: var(--dg-text-label); }

.disclaimer {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--dg-text-label);
}

/* ---- live 2x2: the running cost, ticking --------------------------------- */
.live-grid {
  margin-top: 6px;
}

.live-grid .cell-value {
  font-size: clamp(1.7rem, 7.2vw, 3.1rem);
  font-variant-numeric: tabular-nums;
}

.live-cell .meter-mode {
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  color: var(--dg-text-label);
  white-space: nowrap;
}

.live-cell.billing .meter-mode { color: var(--dg-text-label); }

.live-cell .cell-what {
  margin-top: auto;
}

.section-title {
  margin: 8px 0 10px;
  font-size: 0.78rem;
  color: var(--dg-text-primary);
}

.pricing,
.lifecycle-section {
  margin: 28px 0;
}

/* the rate for the current state, as a pill in the tile's upper-right corner */
.live-cell .meter-mode {
  order: -1;
  align-self: flex-end;
  padding: 3px 8px;
  border: 0.5px solid var(--dg-border);
  border-radius: var(--dg-shape-pill);
  background: color-mix(in srgb, var(--dg-bg-app) 60%, transparent);
  font-size: 0.62rem;
}

/* nobody talking: grey like the waveform's quiet dots, with a clear edge while it still bills */
.live-cell.billing .meter-mode {
  border-color: var(--dg-text-label);
  color: var(--dg-text-label);
}

/* ---- Pipecat up front ----------------------------------------------------- */
.eyebrow {
  margin: 0 0 10px;
  font-size: 0.74rem;
  color: var(--dg-text-primary);
}

.eyebrow .dot { color: var(--dg-accent); }
.eyebrow a { color: inherit; text-underline-offset: 3px; }

/* primary action out of the simulation: glass pill, per the brand rules */
.cta-pipeline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 12px 18px;
  border: 1px solid var(--dg-border);
  border-radius: var(--dg-shape-pill);
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
  color: var(--dg-text-primary);
  text-decoration: none;
}

.cta-pipeline .label { color: var(--dg-text-primary); font-size: 0.76rem; }
.cta-pipeline:hover,
.cta-pipeline:focus-visible { border-color: var(--dg-text-primary); }

/* combined tiles: the live loop's running total sits in the corner inset at inset size */
.cost-cell .inset .meter-total {
  font: inherit;
  letter-spacing: inherit;
  color: var(--dg-text-body);
  font-variant-numeric: tabular-nums;
}

.hero .settings,
.chart-section .settings {
  margin-top: 18px;
}

/* the scenario controls live inside the "Where a day's money goes" card: one tile, no second panel */
.split-card .settings {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--dg-border);
}

.split-card .controls {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

/* while someone talks, the pills use the waveform's speaker colors: the person is a solid white pill,
   the assistant a tinted fuchsia pill with a dashed edge; billing states keep the lane color */
.live-cell .meter-mode[data-state='user'] {
  background: var(--dg-speaker-user);
  border-color: var(--dg-speaker-user);
  color: var(--dg-speaker-on-user);
}

.live-cell .meter-mode[data-state='agent'] {
  background: color-mix(in srgb, var(--dg-speaker-agent) 22%, transparent);
  border-color: var(--dg-speaker-agent);
  border-style: dashed;
  color: var(--dg-text-primary);
}

/* usage presets above "Explore more scenarios" */
.presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.preset {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--dg-border);
  border-radius: 10px;
  background: transparent;
  color: var(--dg-text-primary);
  text-align: left;
  cursor: pointer;
}

.preset-name {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: 0.95rem;
}

.preset-sub {
  font-family: var(--dg-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dg-text-label);
}

.preset[aria-pressed='true'] {
  border-color: var(--dg-text-primary);
  background: var(--dg-bg-panel);
  color: var(--dg-text-primary);
}

@media (max-width: 520px) {
  .presets { grid-template-columns: 1fr; }
}

/* header: learn more, plus the console signup as the primary glass pill */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.signup {
  padding: 9px 14px;
  border: 1px solid var(--dg-text-primary);
  border-radius: var(--dg-shape-pill);
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
  color: var(--dg-text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.signup:hover,
.signup:focus-visible {
  background: var(--dg-text-primary);
  color: var(--dg-text-on-accent);
}

@media (max-width: 420px) {
  .header-actions { gap: 12px; }
  .signup { padding: 7px 12px; }
  .wide-only { display: none; }
}

/* tiles: the live running total is the big number; one day at this pace is the inset */
.cell-value .meter-total {
  font: inherit;
  letter-spacing: inherit;
  font-variant-numeric: tabular-nums;
}

.cost-cell .inset .v {
  color: var(--dg-text-primary);
  font-variant-numeric: tabular-nums;
}

.cost-cell .inset .dagger {
  font-size: 0.8em;
  color: var(--dg-text-label);
}

/* captions hold three lines of space, so a long line never pushes the tiles down */
.caption {
  min-height: 4.1rem;
  align-items: flex-start;
}

/* row labels run vertically beside the grids, so the label column stays narrow */
@media (min-width: 720px) {
  .cost-grid {
    grid-template-columns: 32px repeat(2, minmax(0, 1fr));
  }

  .cost-grid .row-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    justify-self: center;
    white-space: nowrap;
  }
}

/* the notes under the live grid fold away behind Learn more */
.notes {
  margin: 10px 0 0;
}

.notes summary {
  cursor: pointer;
  color: var(--dg-text-primary);
  font-size: 0.74rem;
  padding: 6px 0;
}

.notes[open] summary {
  margin-bottom: 6px;
}

/* where a day's money goes: the same 2x2, as donuts */
.donut-grid {
  margin-top: 6px;
}

.donut-cell {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 16px 12px;
  border: 1px solid var(--dg-border);
  border-radius: 12px;
  background: var(--dg-bg-panel);
}

.donut-wrap {
  position: relative;
  width: min(100%, 180px);
  aspect-ratio: 1;
  max-width: 100%;
}

.donut {
  display: block;
  width: 100%;
  height: 100%;
}

.donut .donut-talk {
  fill: none;
  stroke: var(--c-ink, var(--c));
  stroke-width: 16;
}

/* silence: an empty stretch of ring, drawn only as a dashed outline */
.donut .donut-silence,
.donut .donut-silence circle {
  fill: none;
  stroke: var(--c-ink, var(--c));
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.split-legend .key.swatch.silence {
  background: none;
  opacity: 1;
  border: 1.5px dashed var(--dg-text-label);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
}

.donut-total {
  font-family: var(--dg-font-display);
  font-weight: var(--dg-weight-medium);
  font-size: clamp(1.1rem, 4.4vw, 1.6rem);
  letter-spacing: -0.02em;
  color: var(--dg-text-primary);
  font-variant-numeric: tabular-nums;
}

.donut-cell[data-lane='D'] .donut-total { color: var(--c-ink, var(--dg-accent)); }

.donut-per {
  font-size: 0.6rem;
  color: var(--dg-text-label);
}

.donut-vals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  font-family: var(--dg-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--dg-text-label);
  font-variant-numeric: tabular-nums;
}

/* sound: a round mute/unmute button beside the cue button */
.play.sound {
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  color: var(--dg-accent);
}

.play.sound svg {
  width: 20px;
  height: 20px;
}

.play.sound .body { fill: currentColor; }

.play.sound .mark {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.play.sound .icon-on,
.play.sound[aria-pressed='true'] .icon-muted { display: none; }
.play.sound[aria-pressed='true'] .icon-on { display: block; }
.play.sound[aria-pressed='true'] { color: var(--dg-text-primary); border-color: var(--dg-text-primary); }

/* the hours slider's note: the quiet-when-idle row does not move with it */
.field-hint {
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--dg-text-label);
}

/* Pipecat + Deepgram tiles: the kit's light surfaces (see .dg-light in the pack) */
.cost-cell.dg-light {
  color: var(--dg-text-primary);
  box-shadow: var(--dg-elevation-panel);
}

.hero.textured .cost-cell.dg-light,
.chart-section.textured .cost-cell.dg-light {
  background: var(--dg-bg-app);
}

.cost-cell.dg-light::after {
  opacity: 0.05;
  mix-blend-mode: multiply;
}

.live-cell.dg-light .meter-mode[data-state='user'] {
  border-color: var(--dg-text-primary);
}

/* tiles size their numbers, pills and insets to their own width, so phones never clip */
.cost-cell.live-cell {
  container-type: inline-size;
}

.live-cell .cell-value {
  font-size: clamp(1.5rem, 22cqi, 4.5rem);
}

@container (max-width: 260px) {
  .live-cell .meter-mode {
    align-self: stretch;
    white-space: normal;
    text-align: left;
    border-radius: 10px;
    font-size: 0.56rem;
    line-height: 1.35;
  }

  .cost-cell .inset {
    align-self: stretch;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 2px;
    white-space: normal;
    text-align: right;
  }
}

/* the scope line now sits under the tiles, above Learn more */
.live .scope {
  margin: 4px 0 0;
}

/* paused and closed bill nothing: a dashed pill, like the dashed line on the waveform */
.live-cell .meter-mode[data-state='off'] {
  border: 1.5px dashed var(--dg-text-label);
  color: var(--dg-text-primary);
}

/* the live box has no visible title now; the loop clock sits on the right */
.live-head {
  justify-content: flex-end;
}

/* ---- where a day's money goes: the same look as the live box ------------------
   The textured band behind it, a glass panel, grain tiles, and the Pipecat +
   Deepgram column on the kit's light surfaces. */
.chart-section.textured {
  position: relative;
  margin-top: 8px;
}

.chart-section.textured::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -24px;
  bottom: -24px;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background:
    linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
    linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
    url('assets/brand/hero-texture.webp') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 82%, transparent);
  pointer-events: none;
}

@media (max-width: 680px) {
  .chart-section.textured::before {
    background:
      linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
      linear-gradient(var(--dg-bg-dim), var(--dg-bg-dim)),
      url('assets/brand/hero-texture-640.webp') center / cover no-repeat;
  }
}

.chart-section.textured .split-card {
  padding: 18px 16px;
  border-radius: 14px;
  background: var(--dg-bg-panel);
  backdrop-filter: blur(var(--dg-glass-blur));
  -webkit-backdrop-filter: blur(var(--dg-glass-blur));
}

.chart-section.textured .col-sub,
.chart-section.textured .row-label {
  color: var(--dg-text-body);
}

/* donut tiles take the counter tiles' glass and grain; keep their centered layout */
.chart-section.textured .donut-cell {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--dg-bg-overlay);
}

/* on the light tiles the thin dashed silence outline needs more weight to read */
.dg-light .donut .donut-silence,
.dg-light .donut .donut-silence circle {
  stroke-width: 2;
}

/* light tiles: solid off-white, and each lane color deepened toward the ink so the
   green and fuchsia rings and the $1.90 hold their contrast on a light ground */
.cost-cell.dg-light {
  --c-ink: color-mix(in srgb, var(--c) 58%, var(--dg-text-primary));
}

/* header: the repo link, a quiet pill beside the signup */
.gh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--dg-border-hover);
  border-radius: var(--dg-shape-pill);
  color: var(--dg-text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.gh:hover,
.gh:focus-visible {
  border-color: var(--dg-text-primary);
}

.gh svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 420px) {
  .gh { padding: 7px 10px; }
}
