/* MAXIMUX 0 control room — brutal claymorphism, pure black & white. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --muted: rgba(0, 0, 0, 0.55);
  --grid: rgba(0, 0, 0, 0.06);
  --spot: rgba(0, 0, 0, 0.14);
  --clay-hi: rgba(255, 255, 255, 0.95);
  --clay-lo: rgba(0, 0, 0, 0.12);
  --border: 3px solid var(--ink);
  --radius-plate: 20px;
  --radius-btn: 12px;
  --offset: 4px;
  --gutter: 16px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --paper: #000000;
    --muted: rgba(255, 255, 255, 0.55);
    --grid: rgba(255, 255, 255, 0.07);
    --spot: rgba(255, 255, 255, 0.12);
    --clay-hi: rgba(255, 255, 255, 0.08);
    --clay-lo: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(720px 420px at 92% -10%, rgba(0, 0, 0, 0.04), transparent 55%),
    radial-gradient(640px 380px at -8% 100%, rgba(0, 0, 0, 0.05), transparent 50%);
  background-attachment: fixed;
  font-size: 14px;
  line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
  body {
    background-image:
      radial-gradient(720px 420px at 92% -10%, rgba(255, 255, 255, 0.06), transparent 55%),
      radial-gradient(640px 380px at -8% 100%, rgba(255, 255, 255, 0.05), transparent 50%);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: -48px;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 50%, var(--spot) 0 1.5px, transparent 2px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 48px 48px;
  animation: drift 40s linear infinite;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(48px, 48px); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.muted { color: var(--muted); }
.small-note { font-size: 12px; margin: 0; }
.small { font-size: 12px; }

h1, h2, h3 { margin: 0; font-weight: 700; }
h1 { font-size: 18px; letter-spacing: 0.02em; color: var(--paper); }
h2 { font-size: 15px; color: var(--ink); }
h3 {
  font-size: 13px;
  margin: 16px 0 6px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

/* ---- chassis ---- */
.chassis {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--gutter);
  background: #000000;
  color: #ffffff;
  border-bottom: var(--border);
  box-shadow:
    0 var(--offset) 0 0 #000000,
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 5;
}

.chassis .sub,
.chassis .link-state,
.chassis h1 {
  color: #ffffff;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand .sub { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.65); }

.rivet {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow: inset 0 0 0 3px #000000;
}

.link-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ffffff;
}

.auth { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.logo-header { display: block; width: 150px; height: auto; max-width: 100%; }
.guide-link { text-decoration: none; display: inline-flex; align-items: center; }

/* ---- lamps (B&W states) ---- */
.lamp {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  background: #ffffff;
  border: 2px solid #000000;
  box-shadow:
    inset -2px -2px 4px rgba(0, 0, 0, 0.2),
    inset 2px 2px 4px rgba(255, 255, 255, 0.9);
}

.lamp.green {
  background: #000000;
  box-shadow:
    inset 0 0 0 3px #ffffff,
    0 0 0 2px #000000;
}

.lamp.blue {
  background: #ffffff;
  border-width: 3px;
}

.lamp.red {
  background: #000000;
  border-width: 3px;
}

.lamp.amber {
  background: #ffffff;
  border-style: dashed;
}

.lamp.off {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}

.chassis .lamp.off {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
}

.lamp.pulse { animation: lamp-pulse 1.6s ease-in-out infinite; }

@keyframes lamp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.75; }
}

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

/* ---- clay surfaces ---- */
.clay-raised {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-plate);
  box-shadow:
    -6px -6px 14px var(--clay-hi),
    6px 6px 14px var(--clay-lo),
    var(--offset) var(--offset) 0 0 var(--ink);
}

.clay-inset {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow:
    inset 4px 4px 10px rgba(0, 0, 0, 0.18),
    inset -3px -3px 8px rgba(255, 255, 255, 0.85);
}

@media (prefers-color-scheme: dark) {
  .clay-inset {
    box-shadow:
      inset 4px 4px 12px rgba(0, 0, 0, 0.65),
      inset -2px -2px 6px rgba(255, 255, 255, 0.06);
  }
}

/* ---- buttons ---- */
.btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  border: var(--border);
  background: var(--paper);
  box-shadow:
    -4px -4px 10px var(--clay-hi),
    4px 4px 10px var(--clay-lo),
    var(--offset) var(--offset) 0 0 var(--ink);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.btn:hover { filter: contrast(1.05); }

.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.2),
    1px 1px 0 0 var(--ink);
}

.btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.btn:disabled { opacity: 0.45; cursor: default; }

.btn.primary {
  color: #ffffff;
  background: #000000;
  box-shadow:
    inset -2px -2px 6px rgba(255, 255, 255, 0.15),
    inset 3px 3px 8px rgba(0, 0, 0, 0.5),
    var(--offset) var(--offset) 0 0 #000000;
}

.btn.primary:active:not(:disabled) {
  box-shadow:
    inset 3px 3px 10px rgba(0, 0, 0, 0.65),
    1px 1px 0 0 #000000;
}

.btn.danger {
  color: #ffffff;
  background: #000000;
  border-style: double;
  border-width: 4px;
}

.chassis .btn {
  padding: 7px 12px;
  color: #000000;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow:
    -3px -3px 8px rgba(255, 255, 255, 0.25),
    3px 3px 8px rgba(0, 0, 0, 0.45),
    3px 3px 0 0 #ffffff;
}

.chassis .btn.primary {
  color: #000000;
  background: #ffffff;
  border: 3px solid #ffffff;
}

.chassis .btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.25);
}

.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.ghost-dark {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: none;
}

/* ---- inputs ---- */
input, select, textarea {
  font: inherit;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 7px 9px;
  min-width: 0;
  width: 100%;
  box-shadow:
    inset 3px 3px 8px rgba(0, 0, 0, 0.16),
    inset -2px -2px 6px rgba(255, 255, 255, 0.9);
}

.chassis input {
  width: min(240px, 60vw);
  background: #000000;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow:
    inset 3px 3px 10px rgba(0, 0, 0, 0.8),
    inset -1px -1px 4px rgba(255, 255, 255, 0.08);
}

.chassis input::placeholder { color: rgba(255, 255, 255, 0.45); }

input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
}

select { width: auto; padding-right: 26px; }

label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}

.grid2, .grid3 {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

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

/* ---- notice ---- */
.notice {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: var(--border);
  color: var(--ink);
  box-shadow: var(--offset) var(--offset) 0 0 var(--ink);
}

.notice.ok {
  background: #000000;
  color: #ffffff;
}

/* ---- plates ---- */
main { padding: 18px var(--gutter) 40px; max-width: 1240px; margin: 0 auto; }

.plate {
  position: relative;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-plate);
  box-shadow:
    -8px -8px 18px var(--clay-hi),
    8px 8px 18px var(--clay-lo),
    var(--offset) var(--offset) 0 0 var(--ink);
  padding: 16px;
  margin-bottom: 16px;
}

/* Rivets: solid dots, not close icons */
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 0 2px var(--paper),
    1px 1px 0 0 var(--ink);
}

.plate::before { left: 10px; }
.plate::after { right: 10px; }

.plate-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-right: 14px;
}

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar select { width: auto; }

.form { display: grid; gap: 12px; }
.form.narrow { max-width: 640px; }
.form h2 { margin-bottom: 0; }

.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 0; align-content: start; }

/* ---- segmented ---- */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  margin: 4px 0 14px;
  border-radius: 16px;
  background: #000000;
  border: var(--border);
  box-shadow:
    inset 3px 3px 8px rgba(0, 0, 0, 0.45),
    var(--offset) var(--offset) 0 0 var(--ink);
}

.segmented button {
  appearance: none;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  padding: 8px 14px;
  font: inherit;
  font-weight: 500;
  color: #ffffff;
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease;
}

.segmented button[aria-selected="true"] {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  box-shadow:
    -3px -3px 8px rgba(255, 255, 255, 0.35),
    3px 3px 8px rgba(0, 0, 0, 0.35);
}

.segmented button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 1px;
}

@media (prefers-color-scheme: dark) {
  .segmented {
    background: var(--paper);
    border-color: var(--ink);
  }
  .segmented button { color: var(--ink); }
  .segmented button[aria-selected="true"] {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
  }
}

/* ---- views ---- */
.view[hidden] { display: none !important; }

.layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 980px) {
  .layout[data-open="true"] {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
  }
  .split {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.layout .plate,
.split .plate { margin-bottom: 0; }

.detail[hidden] { display: none; }
.detail { position: relative; align-self: start; }

/* ---- gauges ---- */
.gauges {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 16px;
}

@media (min-width: 720px) {
  .gauges { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.gauge-plate { text-align: center; }

.gauge-plate svg {
  width: min(300px, 100%);
  height: auto;
  display: block;
  margin: 6px auto 0;
}

#gauge-fill stop:nth-child(1) { stop-color: rgba(0, 0, 0, 0.35); }
#gauge-fill stop:nth-child(2) { stop-color: rgba(0, 0, 0, 0.65); }
#gauge-fill stop:nth-child(3) { stop-color: #000000; }

@media (prefers-color-scheme: dark) {
  #gauge-fill stop:nth-child(1) { stop-color: rgba(255, 255, 255, 0.35); }
  #gauge-fill stop:nth-child(2) { stop-color: rgba(255, 255, 255, 0.65); }
  #gauge-fill stop:nth-child(3) { stop-color: #ffffff; }
}

.gauge-value {
  font-size: 30px;
  font-weight: 700;
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
}

.lamps { display: grid; gap: 10px; align-content: start; }
.lamps-head { margin-bottom: 4px; }

@media (min-width: 720px) {
  .lamps { grid-template-columns: 1fr 1fr; }
}

.lamp-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow:
    inset 3px 3px 8px rgba(0, 0, 0, 0.12),
    inset -2px -2px 6px rgba(255, 255, 255, 0.85);
}

.lamp-row strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ---- lists & tables ---- */
.list { display: grid; gap: 8px; }

.row-card {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  border: var(--border);
  background: var(--paper);
  box-shadow:
    -4px -4px 10px var(--clay-hi),
    4px 4px 10px var(--clay-lo),
    2px 2px 0 0 var(--ink);
}

.row-card:hover {
  transform: translateY(-1px);
}

.row-card:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.row-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.row-main .target { overflow-wrap: anywhere; color: var(--muted); font-size: 13px; }

.empty {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  border-radius: 14px;
  border: 2px dashed var(--ink);
  background: var(--paper);
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.08);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: var(--border);
  box-shadow: inset 3px 3px 10px rgba(0, 0, 0, 0.12);
  background: var(--paper);
}

table { width: 100%; border-collapse: collapse; }

th, td { text-align: left; padding: 9px 10px; vertical-align: top; }

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink);
  background: var(--paper);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
}

td { border-bottom: 1px dashed rgba(0, 0, 0, 0.25); }

@media (prefers-color-scheme: dark) {
  td { border-bottom-color: rgba(255, 255, 255, 0.25); }
}

tbody tr { cursor: pointer; }
tbody tr:hover { background: rgba(0, 0, 0, 0.04); }
tbody tr[aria-selected="true"] { background: rgba(0, 0, 0, 0.08); outline: 2px solid var(--ink); }

@media (prefers-color-scheme: dark) {
  tbody tr:hover { background: rgba(255, 255, 255, 0.06); }
  tbody tr[aria-selected="true"] { background: rgba(255, 255, 255, 0.1); }
}

tbody tr:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}

td.target { max-width: 320px; overflow-wrap: anywhere; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- pills ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-transform: capitalize;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.pill .lamp { width: 9px; height: 9px; }

.pill.ok,
.pill.bad,
.pill.run,
.pill.warn {
  color: var(--ink);
  font-weight: 700;
}

.pill.ok { background: #000000; color: #ffffff; }
.pill.bad { border-style: double; border-width: 3px; }
.pill.run { border-width: 3px; }
.pill.warn { border-style: dashed; }

@media (prefers-color-scheme: dark) {
  .pill.ok { background: #ffffff; color: #000000; }
}

/* ---- meters ---- */
.meter { display: grid; gap: 4px; margin: 8px 0; }

.meter-track {
  height: 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 6px;
  background: #000000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.meter-fill.bad {
  background: repeating-linear-gradient(
    -45deg,
    #000000,
    #000000 4px,
    #ffffff 4px,
    #ffffff 8px
  );
}

@media (prefers-color-scheme: dark) {
  .meter-fill { background: #ffffff; }
  .meter-fill.bad {
    background: repeating-linear-gradient(
      -45deg,
      #ffffff,
      #ffffff 4px,
      #000000 4px,
      #000000 8px
    );
  }
}

.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- detail dl ---- */
dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 14px;
  margin: 0;
  align-items: baseline;
}

dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.kv-grid {
  display: grid;
  gap: 4px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kv-grid div { display: grid; }
.kv-grid strong { font-size: 18px; font-variant-numeric: tabular-nums; }

/* ---- rack ---- */
.rack { display: grid; gap: 10px; }

.unit {
  display: grid;
  gap: 8px;
  padding: 12px 14px 12px 40px;
  position: relative;
  border-radius: 14px;
  background: var(--paper);
  border: var(--border);
  box-shadow:
    -4px -4px 10px var(--clay-hi),
    4px 4px 10px var(--clay-lo),
    2px 2px 0 0 var(--ink);
}

.unit .lamp { position: absolute; left: 14px; top: 16px; }

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

.unit-head strong { font-size: 15px; }
.unit .host { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.unit .specs { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.unit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.unit.selected { outline: 3px solid var(--ink); outline-offset: 2px; }

.footnote { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; }

/* ---- tool security ---- */
.radios {
  border: var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.1);
}

.radios legend { font-weight: 700; padding: 0 6px; }
.radios label { display: flex; gap: 8px; align-items: center; }
.radios[hidden] { display: none; }

.kill {
  border-top: 2px dashed var(--ink);
  padding-top: 12px;
  margin-bottom: 14px;
}

.kill p { margin: 6px 0; }
.rate { display: grid; gap: 8px; }

.muted.ok { color: var(--ink); font-weight: 700; }

/* ---- skeleton ---- */
.skeleton {
  height: 22px;
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.12) 50%,
    rgba(0, 0, 0, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton.tall { height: 56px; }

.skel-inline:empty {
  display: inline-block;
  min-width: 3ch;
  height: 1em;
  vertical-align: -0.1em;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.06) 0%,
    rgba(0, 0, 0, 0.14) 50%,
    rgba(0, 0, 0, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .skel-inline:empty { animation: none; }
}

.card-row {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--paper);
  border: var(--border);
  border-radius: 12px;
  box-shadow: 2px 2px 0 0 var(--ink);
}

/* ---- mobile ---- */
@media (max-width: 640px) {
  .chassis { padding: 10px 12px; }
  .chassis input { width: 100%; }
  .auth { width: 100%; }
  .auth .btn { flex: 1 1 auto; }
  main { padding: 14px 12px 32px; }
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1 1 0; padding: 8px 6px; font-size: 13px; }
  .toolbar #updated { width: 100%; }
  .plate { padding: 14px; }
}
