/* drpl. Light first, dense, flat.
   Two radii only: --r 4px for controls, --rc 6px for cards. The only other
   rounding permitted is 50% on elements that are genuinely circles (status
   dots, the step numerals), which is a shape, not a corner treatment.
   Orange is for actions, blue is for data, and they are never swapped.
   No gradients, no blur, no shadows except the one on the chart tooltip. */

:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --panel-2: #fafafa;
  --hover: #f4f5f6;
  --line: #e4e5e7;
  --line-2: #d3d5d8;
  --fg: #1c1e21;
  --fg-2: #55595f;
  --fg-3: #767b81;
  --accent: #ec6a17;
  --accent-fg: #ffffff;
  --accent-wash: #fdf1e8;
  --link: #0b5ed7;
  --chart: #2570d4;
  --chart-2: #7a8894;
  --chart-fill: rgba(37, 112, 212, 0.1);
  --ok: #17804a;
  --ok-wash: #e8f4ed;
  --warn: #8a5600;
  --warn-wash: #fdf3e3;
  --bad: #b8342a;
  --bad-wash: #fbecea;
  --r: 4px;
  --rc: 6px;
  --sidebar: 224px;
  --gutter: 16px;
  --prose: 68ch;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1011;
  --panel: #17191b;
  --panel-2: #1c1f21;
  --hover: #212426;
  --line: #292d30;
  --line-2: #383d41;
  --fg: #e7e9ea;
  --fg-2: #a6acb2;
  --fg-3: #868c92;
  --accent: #f5822c;
  --accent-fg: #17110b;
  --accent-wash: #2a1a0d;
  --link: #6ba5f5;
  --chart: #5c9ded;
  --chart-2: #8b959f;
  --chart-fill: rgba(92, 157, 237, 0.13);
  --ok: #45b177;
  --ok-wash: #12251b;
  --warn: #d09a34;
  --warn-wash: #26200f;
  --bad: #dd6a60;
  --bad-wash: #2a1615;
}

* {
  box-sizing: border-box;
}

/* Grid and flex children default to min-width:auto, which is what lets one long
   unbreakable string push the whole document wider than the viewport. */
.shell *,
.page * {
  min-width: 0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.011em;
}
h1 {
  font-size: 21px;
}
h2 {
  font-size: 14px;
}
h3 {
  font-size: 13px;
}
p {
  margin: 0;
}

/* Numbers are compared down a column, so they get tabular figures everywhere. */
.mono,
.num,
table td.r,
.tile .v,
.tile .foot {
  font-variant-numeric: tabular-nums;
}
.mono {
  font-family: var(--mono);
}
.dim {
  color: var(--fg-2);
}
.dimmer {
  color: var(--fg-3);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Prose carries a measure. Data regions do not. */
.prose,
.help,
.sub,
.empty p {
  max-width: var(--prose);
}

.eyebrow {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ============================ shell ============================ */

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100dvh;
}
@media (min-width: 900px) {
  .shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }
}

aside {
  background: var(--panel);
  border-right: 1px solid var(--line);
}
@media (min-width: 900px) {
  aside {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.brand .mark {
  width: 22px;
  height: 22px;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  font: 600 12px var(--sans);
  flex: none;
}
.brand b {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.015em;
}
.brand .ver {
  font: 400 10.5px var(--mono);
  color: var(--fg-3);
  margin-left: auto;
}

nav {
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
nav .eyebrow {
  padding: 12px 10px 6px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: var(--fg-2);
  font-size: 13.5px;
}
nav a:hover {
  background: var(--hover);
  color: var(--fg);
  text-decoration: none;
}
nav a[aria-current="page"] {
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 500;
}
nav a i {
  width: 15px;
  font-size: 13px;
  text-align: center;
  flex: none;
}
nav a .count {
  margin-left: auto;
  font: 400 11px var(--mono);
  color: var(--fg-3);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1px 5px;
}

.side-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 8px;
}
.side-foot button {
  width: 100%;
  justify-content: flex-start;
  background: none;
  border: 0;
  color: var(--fg-2);
  padding: 7px 10px;
  border-radius: var(--r);
  font: 400 13.5px var(--sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-foot button:hover {
  background: var(--hover);
  color: var(--fg);
}
.side-foot button i {
  width: 15px;
  font-size: 13px;
  text-align: center;
}

.topbar {
  min-height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  min-width: 0;
}
.crumb .sep {
  color: var(--fg-3);
}
.crumb a {
  color: var(--fg-2);
}
.crumb b {
  font-weight: 500;
}
.topbar .facts {
  display: none;
  gap: 18px;
  font: 400 11.5px var(--mono);
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.topbar .facts span {
  white-space: nowrap;
}
@media (min-width: 900px) {
  .topbar {
    padding: 0 24px;
  }
  .topbar .facts {
    display: flex;
  }
}
@media (min-width: 2560px) {
  .topbar {
    padding: 0 32px;
  }
}

/* The gutter steps three times. There is deliberately no max-width here: a cap
   on the page applies a prose constraint to tables and charts, which is the
   whole reason a 4K display used to be 63 percent empty. */
.page {
  padding: 22px 16px 64px;
}
@media (min-width: 900px) {
  .page {
    padding: 22px 24px 64px;
  }
}
@media (min-width: 2560px) {
  .page {
    padding: 26px 32px 72px;
  }
}

.pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pagehead .sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--fg-2);
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================ controls ============================ */

button,
.btn {
  font: 400 13px var(--sans);
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 6px 11px;
  min-height: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
button:hover,
.btn:hover {
  background: var(--hover);
  text-decoration: none;
}
/* One focus mechanism, not an outline and a shadow doing the same job. */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
}
button.primary:hover {
  background: var(--accent);
  filter: brightness(1.06);
}
button.ghost {
  border-color: transparent;
  background: none;
  color: var(--fg-2);
}
button.ghost:hover {
  background: var(--hover);
  color: var(--fg);
}
button.danger {
  color: var(--bad);
}
button.danger:hover {
  background: var(--bad-wash);
}
button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
button i {
  font-size: 12px;
}
button.sm {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 12.5px;
}

input,
select,
textarea {
  font: 400 13px var(--sans);
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 7px 9px;
  min-height: 32px;
  width: 100%;
}
input.mono,
select.mono,
textarea.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}
input::placeholder {
  color: var(--fg-3);
}
input[type="number"] {
  max-width: 130px;
}

.field {
  display: block;
}
.field > .lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
}
.field .help {
  margin-top: 5px;
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.45;
}

/* auto-fill, never auto-fit: auto-fit collapses the empty tracks and inflates
   the surviving item to the full row, so filtering twelve projects down to one
   would produce a single card 3536px wide. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
/* Form fields flow into as many columns as fit, rather than being pinned to a
   single narrow measure inside a full width card, which left the whole of
   Settings hugging the left edge on a wide screen. The panel itself carries the
   cap (see .panel.form below) so the empty space ends up outside the card
   instead of inside it. */
.form-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
/* A card that is only a form does not need to be 3500px wide. Capping the card
   puts the empty space outside it, which reads as deliberate, instead of inside
   it, which reads as broken. */
.panel:has(.form-grid) {
  max-width: 1180px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.stack > * + * {
  margin-top: 16px;
}

/* ============================ panels ============================ */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rc);
}
/* Stacked panels in normal flow need separating. Panels that are grid items
   already have a gap, and this margin would push every panel after the first
   16px down from its own row, so it is reset inside any grid. */
.panel + .panel {
  margin-top: 16px;
}
.charts > .panel + .panel,
.grid > .panel + .panel,
.cards > .panel + .panel {
  margin-top: 0;
}
.panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
  flex-wrap: wrap;
}
.panel > .in {
  padding: 16px;
}
.panel > .flush {
  padding: 0;
}
.section {
  margin-top: 16px;
}

/* ============================ tabs ============================ */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--fg-2);
  padding: 9px 13px;
  min-height: 38px;
  font-size: 13.5px;
}
.tabs button:hover {
  background: none;
  color: var(--fg);
  border-bottom-color: var(--line-2);
}
.tabs button[aria-selected="true"] {
  color: var(--fg);
  font-weight: 500;
  border-bottom-color: var(--accent);
}

/* ============================ status ============================ */

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-3);
  flex: none;
}
.dot.live {
  background: var(--ok);
}
.dot.building {
  background: var(--warn);
}
.dot.crashed {
  background: var(--bad);
}
.dot.stopped,
.dot.new {
  background: var(--fg-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 11.5px/1 var(--sans);
  padding: 4px 7px;
  border-radius: var(--r);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
  white-space: nowrap;
}
.badge.live {
  background: var(--ok-wash);
  border-color: transparent;
  color: var(--ok);
}
.badge.crashed {
  background: var(--bad-wash);
  border-color: transparent;
  color: var(--bad);
}
.badge.building {
  background: var(--warn-wash);
  border-color: transparent;
  color: var(--warn);
}
.badge.plain {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
}

/* ============================ verdict ============================ */

/* The one thing the dashboard exists to answer, so it is the first thing on
   the page and it is a sentence, not a gauge. */
.verdict {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--rc);
  background: var(--panel);
  padding: 14px 16px;
}
.verdict.warn {
  border-left-color: var(--warn);
}
.verdict.bad {
  border-left-color: var(--bad);
}
.verdict h2 {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.verdict .when {
  font: 400 11.5px var(--mono);
  color: var(--fg-3);
}
.verdict ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.verdict li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13px;
  padding: 6px 0 0;
  border-top: 1px solid var(--line);
}
.verdict li .what {
  font-weight: 500;
}
.verdict li .reading {
  font: 400 12.5px var(--mono);
  font-variant-numeric: tabular-nums;
}
.verdict li .threshold {
  font: 400 12px var(--mono);
  color: var(--fg-3);
}
.verdict .unknown {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--fg-2);
}

/* ============================ stat tiles ============================ */

/* Fixed cardinality, so the row stops rather than stretching, and the space to
   its right becomes a second zone at 2560. */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 1760px;
}
@media (min-width: 600px) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1440px) {
  .tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rc);
  padding: 13px 15px;
}
.tile .k {
  font-size: 12px;
  color: var(--fg-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.tile .v {
  font: 400 22px/1.15 var(--mono);
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.tile .v.ok {
  color: var(--ok);
}
.tile .v.bad {
  color: var(--bad);
}
.tile .v.warn {
  color: var(--warn);
}
.tile .v.none {
  color: var(--fg-3);
  font-size: 15px;
}
.tile .foot {
  margin-top: 5px;
  font: 400 11.5px var(--mono);
  color: var(--fg-3);
  overflow-wrap: anywhere;
}
/* The threshold sits under the value, because a number without the line it has
   to stay under is not actionable. */
.tile .limit {
  margin-top: 6px;
  height: 3px;
  background: var(--line);
  border-radius: 0;
  overflow: hidden;
}
.tile .limit i {
  display: block;
  height: 100%;
  background: var(--chart);
}
.tile .limit i.warn {
  background: var(--warn);
}
.tile .limit i.bad {
  background: var(--bad);
}

/* ============================ project cards ============================ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
@media (min-width: 1920px) {
  .cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (min-width: 2560px) {
  .cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
/* 3200 rather than 3840: a 4K panel at 125 percent scaling is a 3072 CSS px
   viewport, which should stay on the six column rung. */
@media (min-width: 3200px) {
  .cards {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rc);
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}
.card:hover {
  border-color: var(--line-2);
}
.card .top {
  padding: 14px 16px 12px;
}
.card .title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .title h2 {
  font-size: 15px;
}
.card .title a {
  color: inherit;
}
.card .host {
  margin-top: 3px;
  font: 400 12.5px var(--mono);
  color: var(--fg-2);
  overflow-wrap: anywhere;
}
.card .host.none {
  color: var(--fg-3);
}
.card .facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 14px;
  padding: 0 16px 12px;
}
@container (min-width: 340px) {
  .card .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container (min-width: 420px) {
  .card .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.card .facts .k {
  font-size: 11.5px;
  color: var(--fg-3);
}
.card .facts .v {
  font: 400 12.5px var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card .strip-wrap {
  border-top: 1px solid var(--line);
  padding: 10px 16px 12px;
}
.card .bottom {
  border-top: 1px solid var(--line);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--panel-2);
  border-radius: 0 0 var(--rc) var(--rc);
  margin-top: auto;
}
.card .bottom .metrics {
  display: flex;
  gap: 14px;
  font: 400 11.5px var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--fg-2);
}

/* health strip: one bar per recent check, oldest on the left. A missing bar is
   a check that could not be made, and is drawn differently from a failure. */
.strip {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 20px;
}
.strip i {
  flex: 1;
  min-width: 2px;
  max-width: 5px;
  height: 7px;
  border-radius: 0;
  background: var(--line-2);
}
.strip i.ok {
  height: 15px;
  background: var(--ok);
}
.strip i.bad {
  height: 20px;
  background: var(--bad);
}
.strip i.unmeasured {
  height: 4px;
  background: var(--line-2);
}

/* ============================ charts ============================ */

.charts {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1440px) {
  .charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 2560px) {
  .charts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 3200px) {
  .charts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.chartbox {
  position: relative;
  min-height: 150px;
}
.chart-empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--fg-2);
  font-size: 12.5px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  padding: 16px;
  min-height: 150px;
}

/* uPlot is themed by reading these custom properties with getComputedStyle and
   passing real colour strings in; a var() reference would silently no-op on a
   canvas context. These rules only cover the DOM parts uPlot renders. */
.u-legend {
  font: 400 11.5px var(--mono) !important;
  color: var(--fg-2);
}
.u-legend .u-marker {
  border-radius: 0;
}
.u-select {
  background: var(--accent-wash);
}
.u-cursor-x,
.u-cursor-y {
  border-color: var(--fg-3) !important;
}
.u-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  background: var(--fg);
  color: var(--panel);
  font: 400 11px var(--mono);
  font-variant-numeric: tabular-nums;
  padding: 5px 7px;
  border-radius: var(--r);
  white-space: pre;
  transform: translate(-50%, calc(-100% - 8px));
  /* The single permitted shadow in the whole stylesheet: a tooltip floats over
     content and needs to detach from it. */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* ============================ tables ============================ */

.tablebox {
  container-type: inline-size;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  text-align: left;
  padding: 9px 16px;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-2);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  white-space: nowrap;
}
tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr.click {
  cursor: pointer;
}
tbody tr.click:hover {
  background: var(--hover);
}
td.r,
th.r {
  text-align: right;
}
td .sub {
  margin-top: 2px;
  font: 400 11.5px var(--mono);
  color: var(--fg-3);
}

/* Columns are revealed by priority as the table's own container grows, so a
   wide screen gains information instead of gaining whitespace. The query is on
   the wrapper, not the viewport, so a table in a narrow pane behaves too. */
.tablebox [data-p="1"],
.tablebox [data-p="2"],
.tablebox [data-p="3"],
.tablebox [data-p="4"],
.tablebox [data-p="5"],
.tablebox [data-p="6"] {
  display: none;
}
@container (min-width: 420px) {
  .tablebox [data-p="1"] {
    display: table-cell;
  }
}
@container (min-width: 560px) {
  .tablebox [data-p="2"] {
    display: table-cell;
  }
}
@container (min-width: 760px) {
  .tablebox [data-p="3"] {
    display: table-cell;
  }
}
@container (min-width: 1000px) {
  .tablebox [data-p="4"] {
    display: table-cell;
  }
}
@container (min-width: 1280px) {
  .tablebox [data-p="5"] {
    display: table-cell;
  }
}
@container (min-width: 1700px) {
  .tablebox [data-p="6"] {
    display: table-cell;
  }
}

/* ============================ logs ============================ */

pre.log {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--rc) var(--rc);
  font: 400 12px/1.7 var(--mono);
  color: var(--fg-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 420px;
  overflow: auto;
}
pre.log b {
  color: var(--fg);
  font-weight: 400;
}
pre.log s {
  color: var(--bad);
  text-decoration: none;
}
pre.log em {
  color: var(--ok);
  font-style: normal;
}

/* ============================ misc ============================ */

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--panel-2);
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.55;
}
.note b {
  color: var(--fg);
  font-weight: 600;
}
.note code,
.note kbd {
  font: 400 12px var(--mono);
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1px 4px;
  overflow-wrap: anywhere;
}
.note.ok {
  border-left-color: var(--ok);
}
.note.bad {
  border-left-color: var(--bad);
}

.msg {
  font-size: 12.5px;
  min-height: 18px;
}
.msg.err {
  color: var(--bad);
}
.msg.good {
  color: var(--ok);
}

.empty {
  padding: 40px 20px;
  text-align: center;
}
.empty h2 {
  font-size: 15px;
  margin-bottom: 6px;
}
.empty p {
  color: var(--fg-2);
  font-size: 13px;
  margin: 0 auto;
}
.empty .actions {
  justify-content: center;
  margin-top: 16px;
}

.step {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.step .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
  border: 1px solid var(--line-2);
  color: var(--fg-2);
  display: grid;
  place-items: center;
  font: 500 11.5px var(--mono);
}
.step.done .n {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.step .body {
  flex: 1;
  min-width: 0;
}

.codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 8px;
  font: 400 13px var(--mono);
  margin-top: 12px;
}
.codes span {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px 8px;
  background: var(--panel-2);
}
.codes span.used {
  color: var(--fg-3);
  text-decoration: line-through;
}

/* auth screens */
.auth {
  max-width: 348px;
  margin: 0 auto;
  padding: 12vh 20px 60px;
}
.auth .brand {
  border: 0;
  padding: 0;
  height: auto;
  margin-bottom: 22px;
}
.auth h1 {
  font-size: 19px;
}
.auth .stack {
  margin-top: 20px;
}
.auth button.primary {
  width: 100%;
  min-height: 36px;
}

@media (max-width: 899px) {
  aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    border-bottom: 0;
  }
  nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
  nav .eyebrow {
    display: none;
  }
  .side-foot {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 6px;
    padding: 8px;
  }
  .side-foot button {
    width: auto;
  }
}

/* Motion is limited to state changes the user caused. Anything decorative is
   dropped entirely when the user has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
