/*
 * The status page in the Console Monitoring language. Font, root size, colours, size tokens and the sign-in screen are
 * the Console kit (console-kit.css, linked first; source shared/console-kit/console-kit.css). Sizes follow the Console
 * reference (Microservices .claude/local/plans/console-sizing/GROUND-TRUTH-NOV7.md section A): rem as the Console
 * writes it, px x 0.8; rendered px in the comments. Breakpoints are the Console's x 0.8: md 614.4px, lg 793.58px,
 * xl 960px, xxl 1120px. No inline styles anywhere (CSP style-src 'self'): every size is a class here, every bar length
 * an SVG attribute.
 */

/* ---- base -------------------------------------------------------------------------------------------------------- */

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--gray-700);
  font-family: var(--sans);
  font-size: 1rem; /* 11.2 */
  font-weight: 400;
  line-height: 1.5; /* 16.8 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--gray-900);
  font-weight: 600;
  line-height: 1.2;
}

p,
dl,
dd {
  margin: 0;
}

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

a:hover {
  color: var(--primary-active);
}

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

/* No focus ring anywhere, as in the Console (owner, Nov 7 2026). */
:focus,
:focus-visible {
  outline: none;
}

[hidden] {
  display: none !important;
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
}

.show-sm {
  display: none;
}

/* ---- buttons (Console Button, IconButton) ------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem; /* 3.92 */
  height: var(--control-h); /* 29.9 */
  padding: 0 var(--control-btn-px);
  border: 1px solid transparent;
  border-radius: var(--control-radius); /* 4.76 */
  background: var(--light);
  color: var(--gray-700);
  font-size: var(--control-font); /* 10.64 */
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn .icon {
  font-size: 1.25rem; /* 14 */
}

.btn:hover:not(:disabled) {
  background: var(--light-active);
  color: var(--gray-800);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-inverse);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-active);
  color: var(--primary-inverse);
}

.btn-light-primary {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.btn-light-primary:hover:not(:disabled) {
  background: var(--primary);
  color: var(--primary-inverse);
}

.btn-compact {
  height: var(--compact-h); /* 24 */
  padding: 0 var(--compact-btn-px);
  font-size: var(--compact-font);
}

.btn-compact .icon {
  font-size: var(--glyph-text-compact);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: var(--control-h); /* 29.9 x 29.9 */
  padding: 0;
}

.btn-icon .icon {
  font-size: var(--glyph-icon); /* 15.12 */
}

.btn-icon-compact {
  width: var(--compact-h); /* 24 x 24 */
  height: var(--compact-h);
}

.btn-icon-compact .icon {
  font-size: 0.9rem; /* 10.08 */
}

/* ---- badges and chips (Console Badge = badge badge-chip: 17.6 high) ---------------------------------------------- */

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* 5.6 */
  height: var(--chip-h); /* 17.6 */
  padding: 0 var(--chip-px); /* 0 6.72 */
  border: var(--line) solid transparent;
  border-radius: var(--chip-radius); /* 3.2 */
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: var(--fs-8); /* 9.52 */
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.badge .icon {
  font-size: 0.85rem;
}

.badge.tone-ok {
  background: var(--success-light);
  color: var(--success-text);
}

.badge.tone-warn {
  background: var(--warning-light);
  color: var(--warning-text);
}

.badge.tone-bad {
  background: var(--danger-light);
  color: var(--danger-text);
}

.badge.tone-idle {
  background: var(--gray-100);
  color: var(--gray-600);
}

.chip {
  max-width: 100%;
  gap: 0.4rem;
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--gray-600);
}

.chip .dot {
  width: 0.5714rem; /* 6.4 */
  height: 0.5714rem;
}

.chip-area {
  flex: none;
  color: var(--gray-900);
  font-weight: 600;
}

.chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex-wrap: wrap;
}

.chips-more {
  color: var(--primary);
  font-size: var(--fs-8);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- tones ------------------------------------------------------------------------------------------------------- */

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: var(--radius); /* 5.32 */
}

.tile-sm {
  width: var(--tile-sm); /* 28 */
  height: var(--tile-sm);
  font-size: var(--fs-3); /* icon 15.12 */
}

.tile-md {
  width: var(--tile-md); /* 36 */
  height: var(--tile-md);
  font-size: var(--fs-2); /* icon 16.8 */
}

.tile.tone-ok {
  background: var(--success-light);
  color: var(--success);
}

.tile.tone-warn {
  background: var(--warning-light);
  color: var(--warning);
}

.tile.tone-bad {
  background: var(--danger-light);
  color: var(--danger);
}

.tile.tone-idle {
  background: var(--gray-100);
  color: var(--gray-500);
}

.tile.tone-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.dot {
  display: inline-block;
  flex: none;
  width: var(--dot); /* 8 */
  height: var(--dot);
  border-radius: 50%;
  background: var(--gray-400);
}

.dot.tone-ok {
  background: var(--success);
}

.dot.tone-warn {
  background: var(--warning);
}

.dot.tone-bad {
  background: var(--danger);
}

.empty-value {
  color: var(--gray-500);
}

/* ---- top bar (59.2 high, mark 24, brand 15.12 / 600) ------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header);
  box-shadow: var(--header-shadow);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
  padding: 0 var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand img {
  flex: none;
  width: 2.1429rem; /* 24 */
  height: 2.1429rem;
}

.brand-name {
  overflow: hidden;
  color: var(--gray-900);
  font-size: var(--fs-3); /* 15.12 */
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who,
.who-person {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.who {
  margin-left: auto;
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--gray-600);
  font-size: var(--fs-7);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--control-h);
  height: var(--control-h);
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  font-size: var(--fs-6);
  font-weight: 600;
}

.theme {
  position: relative;
}

.menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 10.7143rem; /* 120 */
  padding: 0.5rem;
  border: var(--line) solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--dropdown-shadow);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: var(--control-radius);
  background: none;
  color: var(--gray-700);
  font-size: var(--fs-7);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.menu-item .icon {
  font-size: 1.15rem;
}

.menu-item:hover,
.menu-item.is-active {
  background: var(--gray-100);
  color: var(--primary);
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gray-700);
  font-size: var(--fs-7); /* 10.64 / 500 */
  font-weight: 500;
  white-space: nowrap;
}

.live.tone-warn {
  color: var(--warning-text);
}

/* ---- page frame: toolbar, full-width content --------------------------------------------------------------------- */

.main {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap); /* 16.8 */
  padding: 0 var(--gutter) var(--gutter); /* 0 24, bottom 24 */
}

.skeleton {
  display: contents;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1.5rem; /* 16.8; the main gap is the bottom */
}

.page-title {
  font-size: var(--fs-3); /* 15.12 / 600 / 18.14 */
  font-weight: 600;
  line-height: 1.2;
}

.page-sub {
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 / 500 */
  font-weight: 500;
}

.group-label {
  margin-bottom: calc(var(--card-gap) * -0.5);
  color: var(--gray-500);
  font-size: var(--fs-label); /* 8.96 / 600 */
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.card {
  min-width: 0;
  background: var(--surface);
  border: var(--line) solid var(--border-strong); /* gray-300, rule 6.11 */
  border-radius: var(--radius-lg); /* 8.4 */
  box-shadow: var(--surface-shadow);
}

.card.edge-warn {
  border-left: 3.2px solid var(--warning);
}

.card.edge-bad {
  border-left: 3.2px solid var(--danger);
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--card-gap);
}

/* A fact: label 9.52 / 600 gray-500 over a value 14 / 600 (or 11.2 / 600 in card footers). */
.fact {
  min-width: 0;
}

.fact-label {
  margin-bottom: 0.25rem; /* 2.8 */
  color: var(--gray-500);
  font-size: var(--fs-8);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.fact-value {
  color: var(--gray-900);
  font-size: var(--fs-4); /* 14 / 600 / 21 */
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.fact-value-sm {
  overflow: hidden;
  color: var(--gray-900);
  font-size: 1rem; /* 11.2 / 600 */
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fact.is-bad .fact-value,
.fact.is-bad .fact-value-sm {
  color: var(--danger-text);
}

.nu,
.headline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.nu-unit {
  color: var(--gray-600);
  font-weight: 400;
}

.headline .nu-value {
  color: var(--gray-900);
  font-size: var(--fs-2); /* 16.8 / 700 / 1 */
  font-weight: 700;
  line-height: 1;
}

.headline .nu-unit {
  margin-left: 0.25rem; /* with the gap: ms-2 5.6 */
  font-size: var(--fs-7); /* 10.64 / 400 */
}

.headline-word {
  color: var(--gray-900);
  font-size: var(--fs-4); /* 14 / 700 */
  font-weight: 700;
  line-height: 1.2;
}

/* Console CardNote: tile, title 12.04 / 600, one line 10.64, optional action. */
.card-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.card-note-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.card-note-title {
  color: var(--gray-900);
  font-size: var(--fs-6);
  font-weight: 600;
}

.card-note-line {
  color: var(--gray-600);
  font-size: var(--fs-7);
}

.card-note .btn {
  margin-left: auto;
}

/* ---- hero (Console StatusHero, compact) -------------------------------------------------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: var(--card-pad); /* 16.8 */
}

.hero-top {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.hero-word-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 1.5rem;
}

.hero-word {
  color: var(--gray-900);
  font-size: var(--fs-4); /* 14 / 700 */
  font-weight: 700;
  line-height: 1.2;
}

.hero-summary {
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 / 400 */
}

.hero .chips {
  margin-top: 0.25rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, max-content));
  column-gap: 2.5rem;
  row-gap: 1rem;
}

.runs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.runs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.runs-caption {
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 / 500 */
  font-weight: 500;
}

.legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--gray-500);
  font-size: var(--fs-8);
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-swatch {
  width: 0.7143rem;
  height: 0.7143rem;
  border-radius: var(--bar-radius);
}

.run-bars {
  display: grid;
  grid-template-columns: repeat(96, minmax(0, 1fr));
  gap: var(--bar-gap); /* 1.6 */
  height: var(--bar-h); /* 30.8 */
}

.rbar {
  border-radius: var(--bar-radius) var(--bar-radius) 0 0; /* 2.4, top only */
}

.rb-ok {
  background: var(--success);
}

.rb-warn {
  background: var(--warning);
}

.rb-down {
  background: var(--danger);
}

.rb-none {
  background: var(--gray-400);
}

.rb-empty {
  background: var(--gray-200);
}

.axis {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.axis-tick {
  color: var(--gray-500);
  font-size: var(--fs-tick); /* 8.4 / 500 / 12.6 */
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---- group cards (Console OverviewCard) -------------------------------------------------------------------------- */

.group-card {
  display: flex;
  flex-direction: column;
  padding: var(--card-pad); /* 16.8 all sides */
}

.gc-head {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* 8.4 */
  min-height: var(--tile-sm); /* 28 */
}

.gc-title {
  font-size: var(--fs-5); /* 12.88 / 600 */
  font-weight: 600;
  line-height: 1.2;
}

.asof {
  margin-left: auto;
  color: var(--gray-500);
  font-size: var(--fs-8); /* 9.52 / 400 */
  white-space: nowrap;
}

.gc-headline {
  margin-top: 1.25rem; /* 14 mt-5 */
}

.gc-sub {
  margin-top: 0.5rem;
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 */
}

.gc-sub.text-bad {
  color: var(--danger-text);
}

.gc-sub.text-warn {
  color: var(--warning-text);
}

.gc-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0;
}

.gc-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; /* 11.2 */
  margin-top: auto; /* pinned to the bottom: all cards one height */
  padding-top: 1rem; /* 11.2 */
  border-top: var(--line) dashed var(--border-strong);
}

.spark {
  display: block;
  width: 100%;
  height: var(--chart-spark); /* 51.2 */
}

.spark-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.spark-area {
  fill: var(--primary-clarity);
  stroke: none;
}

.spark-empty {
  height: var(--chart-spark);
}

/* Console ItemBars: name, bar against the limit, printed value. */
.ibars {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.6rem 0.75rem;
}

.ibar {
  display: contents;
}

.ibar-label {
  overflow: hidden;
  max-width: 9rem;
  color: var(--gray-700);
  font-size: var(--fs-7);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ibar-value {
  color: var(--gray-900);
  font-size: var(--fs-7);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.ibar-value.is-bad {
  color: var(--danger-text);
}

.meter {
  display: block;
  width: 100%;
  height: 0.5rem; /* 5.6 */
  border-radius: var(--bar-radius);
  overflow: hidden;
}

.meter-track {
  fill: var(--gray-200);
}

.meter-fill {
  fill: var(--primary);
}

.meter-fill.tone-ok {
  fill: var(--success);
}

.meter-fill.tone-warn {
  fill: var(--warning);
}

.meter-fill.tone-bad {
  fill: var(--danger);
}

.meter-fill.tone-idle {
  fill: var(--gray-400);
}

.meter-mark {
  fill: var(--gray-600);
}

/* ---- section cards (Console SectionCard) ------------------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem; /* 11.2 */
  padding: var(--card-pad) var(--card-pad) 0; /* 16.8 16.8 0 */
}

.section-titles {
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* mt-1 */
  min-width: 0;
}

.section-titles h2 {
  font-size: var(--fs-5); /* 12.88 / 600 */
  font-weight: 600;
}

.section-sub {
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 / 500 */
  font-weight: 500;
}

.section-body {
  padding: 1.25rem var(--card-pad) var(--card-pad); /* 14 16.8 16.8 */
}

/* ---- tables (Console CrudTable sizes) ---------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-6); /* 12.04 */
  line-height: 1.5;
}

.table th {
  padding: var(--cell-py) var(--cell-p); /* 14 8.4: 44 high */
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 / 700, no case change */
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  border-bottom: var(--line) dashed var(--border-strong);
}

.table td {
  padding: var(--cell-py) var(--cell-p); /* 14 8.4 */
  color: var(--gray-600);
  font-weight: 600;
  vertical-align: middle;
  border-bottom: var(--line) dashed var(--border-strong);
}

.table th:first-child,
.table td:first-child {
  padding-left: var(--cell-p); /* 8.4: a row's hover / open background never touches its text */
}

.table th:last-child,
.table td:last-child {
  padding-right: var(--cell-p);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .fit {
  width: 1%;
  white-space: nowrap;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-name {
  color: var(--gray-900);
  font-weight: 600; /* 12.04 / 600 */
}

.cell-sub {
  color: var(--gray-600);
  font-size: var(--fs-7); /* 10.64 / 600 */
  font-weight: 600;
}

.table tr.group-row td {
  padding-top: 0.86rem; /* 34 high with its line */
  padding-bottom: 0.86rem;
  color: var(--gray-600);
  font-size: var(--fs-8); /* 9.52 / 600 */
  font-weight: 600;
  line-height: 1.5;
}

.check-row {
  cursor: pointer;
}

.check-row:hover td,
.check-row.is-open td {
  background: var(--gray-100);
}

.row-toggle {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.row-toggle:hover {
  color: var(--primary);
}

.table tr.check-row.is-open td {
  border-bottom: 0;
}

.table tr.detail-row td {
  padding-top: 0;
  background: var(--gray-100);
}

.row-detail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.25rem 0 0.5rem; /* the td's inset, as the row text */
}

.detail-facts {
  display: flex;
  gap: 1rem 2.5rem;
  flex-wrap: wrap;
}

.detail-facts .fact-value-sm {
  white-space: normal;
}

.detail-chart {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.75rem;
}

.chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: var(--chart-card); /* 96 */
  text-align: right;
}

.chart-plot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.chart {
  display: block;
  width: 100%;
  height: var(--chart-card); /* 96 */
}

.chart .grid-line {
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart .limit-line {
  stroke: var(--warning);
  stroke-width: 1;
  stroke-dasharray: 5 4;
}

/* 30 days: bars 19.6 high, gap 1.6, top corners 2.4. */
.days {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.day-bars {
  display: grid;
  grid-template-columns: repeat(30, 0.5rem);
  gap: var(--bar-gap);
  height: 1.75rem;
}

.dbar {
  border-radius: var(--bar-radius) var(--bar-radius) 0 0;
  background: var(--gray-200);
}

.dbar.d-full {
  background: var(--success);
}

.dbar.d-high {
  background: var(--success);
  opacity: 0.55;
}

.dbar.d-mid {
  background: var(--warning);
}

.dbar.d-low {
  background: var(--danger);
}

.dbar.d-before {
  background: var(--gray-200);
  opacity: 0.6;
}

.days-caption {
  color: var(--gray-500);
  font-size: var(--fs-tick);
  font-weight: 500;
}

/* ---- Backend Checks and Incidents -------------------------------------------------------------------------------- */

.bc-list {
  display: flex;
  flex-direction: column;
}

/* One row per check, columns aligned across rows: tile, name and state, summary with its finding chips, then the
   age and the Console link at the right. */
.bc-row {
  display: grid;
  grid-template-columns: var(--tile-sm) minmax(0, 17rem) minmax(0, 1fr) 11rem;
  align-items: start;
  gap: 1rem 1.5rem;
  padding: 1.25rem var(--cell-p);
  border-bottom: var(--line) dashed var(--border-strong);
}

.bc-row:first-child {
  padding-top: 0;
}

.bc-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bc-row > .tile {
  margin-right: -0.5rem;
}

.bc-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: var(--tile-sm);
  min-width: 0;
}

.bc-title {
  color: var(--gray-900);
  font-size: var(--fs-6); /* 12.04 / 600 */
  font-weight: 600;
}

.bc-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: var(--tile-sm);
}

.bc-summary {
  color: var(--gray-600);
  font-size: var(--fs-7);
}

.bc-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-height: var(--tile-sm);
}

.bc-side .asof {
  margin-left: 0;
}

/* ---- sign-in form fields (the screen itself is in the Console kit) ----------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  color: var(--gray-800);
  font-size: var(--fs-6); /* 12.04 / 500 */
  font-weight: 500;
}

.input {
  width: 100%;
  height: var(--control-h);
  padding: var(--control-py) var(--control-px);
  border: 1px solid var(--gray-300);
  border-radius: var(--control-radius);
  background-color: var(--surface);
  color: var(--gray-700);
  font-size: var(--control-font);
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--text-quiet);
}

.input:focus {
  border-color: var(--gray-400);
  outline: none;
  box-shadow: 0 0 0 0.25rem var(--primary-clarity);
}

.input.is-invalid {
  border-color: var(--danger);
}

.code-input {
  color: var(--gray-900);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5em;
  text-align: center;
  text-indent: 0.5em;
}

.code-input::placeholder {
  color: var(--gray-600);
  font-weight: 500;
}

/* ---- skeleton (Console Skeleton; no spinner) --------------------------------------------------------------------- */

.sk {
  display: block;
  border-radius: var(--control-radius);
  background: var(--gray-200);
  animation: sk-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes sk-pulse {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk {
    animation: none;
  }
}

.sk-h1 {
  width: 7rem;
  height: var(--fs-3);
}

.sk-tile {
  width: var(--tile-sm);
  height: var(--tile-sm);
  border-radius: var(--radius);
}

.sk-tile-md {
  flex: none;
  width: var(--tile-md);
  height: var(--tile-md);
  border-radius: var(--radius);
}

.sk-title {
  width: 8rem;
  height: var(--fs-5);
}

.sk-word {
  width: 7rem;
  height: var(--fs-4);
}

.sk-num {
  width: 5rem;
  height: var(--fs-2);
  margin-top: 1.25rem;
}

.sk-line {
  height: var(--fs-7);
}

.group-card .sk-line {
  margin-top: 0.5rem;
}

.sk-w15 {
  width: 15%;
}

.sk-w30 {
  width: 30%;
}

.sk-w40 {
  width: 40%;
}

.sk-w60 {
  width: 60%;
}

.sk-block {
  height: var(--chart-spark);
  margin: 1.25rem 0;
}

.sk-fact {
  width: 6rem;
  height: 2.5rem;
}

.sk-bars {
  height: var(--bar-h);
}

.sk-label {
  width: 4rem;
  height: var(--fs-label);
}

.sk-row {
  display: flex;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: var(--line) dashed var(--border-strong);
}

.sk-row:last-child {
  border-bottom: 0;
}

/* ---- breakpoints ------------------------------------------------------------------------------------------------- */

@media (min-width: 614.4px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .hero-top {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .hero-facts {
    flex: none;
    column-gap: 0;
  }

  .hero-facts .fact {
    padding: 0 1.5rem;
    border-left: var(--line) dashed var(--border-strong);
  }

  .hero-facts .fact:last-child {
    padding-right: 0;
  }
}

/* Phone width (root 10.4px, gutter 16): one card per row, All Checks keeps Check and Uptime. */
@media (max-width: 793.58px) {
  .hide-sm,
  .table .hide-sm {
    display: none;
  }

  .show-sm {
    display: block;
  }

  .axis-tick .show-sm {
    display: inline;
  }

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

  .cell-badge {
    margin-top: 0.35rem;
  }

  .bc-row {
    grid-template-columns: var(--tile-sm) minmax(0, 1fr);
    gap: 0.5rem 1rem;
  }

  .bc-row > .tile {
    grid-row: span 3;
    margin-right: 0;
  }

  .bc-main,
  .bc-side {
    min-height: 0;
  }

  .bc-side {
    justify-content: space-between;
  }

  .who,
  .who-person {
    gap: 0.5rem;
  }
}
