/* The count grid (src/count_grid.rs; docs/decisions.md, 3 Nov 2026, "Choices where people see
   them…", (4)): a home's rows as blocks of counts. Each block a quiet rim on the shell, its head a
   line of the other choices' cells, a table of boxes beneath: on the orders site a line per size
   and a column per value, on HQ (`count-grid-across`) the other way round. *Not sure* is dashed, as
   to come is everywhere. Square boxes: they are cut from the shell (the corners rule). */
.count-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.count-grid-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: var(--hairline) solid var(--color-line);
  min-width: 0;
  overflow-x: auto;
}

.count-grid-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.count-grid-head-choice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.count-grid-head-label,
.count-grid-size,
.count-grid-how-many,
.count-grid-run {
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--color-muted);
}

.count-grid-child {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
}

.count-grid-table {
  align-self: flex-start;
  border-collapse: separate;
  border-spacing: var(--space-2);
  margin: calc(-1 * var(--space-2));
}

.count-grid-table th {
  text-align: left;
}

.count-grid-value {
  text-align: center;
  font-weight: var(--weight-strong);
}

.count-grid-value .tile-named {
  justify-content: center;
}

.count-grid-size {
  width: var(--grid-size-column);
  white-space: nowrap;
}

.count-grid-box {
  box-sizing: border-box;
  width: 100%;
  min-width: var(--grid-box-least);
  max-width: var(--grid-box-most);
  height: var(--grid-box-height);
  border: var(--hairline) solid var(--color-field-line);
  border-radius: 0;
  background: var(--color-surface);
  font: inherit;
  font-size: var(--text-control);
  color: var(--color-ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.count-grid-box:focus-visible {
  outline: var(--focus-width) solid var(--color-ink);
  outline-offset: var(--focus-offset);
}

.count-grid-box[disabled] {
  background: transparent;
  border-color: var(--color-line);
  color: var(--color-muted);
}

.count-grid-box.count-grid-unsure {
  border-style: dashed;
}

th.count-grid-unsure {
  font-style: italic;
}

.count-grid-total {
  text-align: center;
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}

.count-grid-all .count-grid-size {
  color: var(--color-muted);
}

.count-grid-link {
  align-self: flex-start;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--text-quiet);
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: var(--underline-offset);
  cursor: pointer;
}

.count-grid-another {
  margin-left: 0;
  font-size: var(--text-md);
}

.count-grid-link[disabled] {
  color: var(--color-muted);
  cursor: default;
}

/* HQ's: the boxes the compact control's height, a size's column narrower. */
.count-grid-across .count-grid-box {
  height: var(--control-height-compact);
}

/* **What the customer's save moved** (count_grid.rs, `was`; HQ's): the box in their blue, bold, and
   what it was under it, small. */
.count-grid-theirs .count-grid-box {
  color: var(--color-answer);
}

.count-grid-theirs-new .count-grid-box {
  font-weight: var(--weight-strong);
}

.count-grid-was {
  display: block;
  color: var(--color-answer);
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  text-align: center;
}
