/* VYNX control room. The approved Foreman tokens (.preview/v2/handoff/tokens.css, the same
   values as packages/ui/src/tokens.css) as plain CSS, laid out like the approved desktop
   screens (DK-03 workers table, DK-05 people and access): caps line + 28 px title, white
   hairline table cards, sentence-case headers on a #FAFAF9 band, caps sub-lines, raised ink
   button, hairline banners. One deliberate difference: the rail is ink, so this room can never
   be mistaken for a factory's app. Self-hosted fonts only; no inline styles anywhere (CSP). */
@font-face {
  font-family: 'Manrope';
  font-weight: 400 800;
  font-display: block;
  src: url('/fonts/Manrope.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/GeistMono.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Poppins-devanagari-500.woff2') format('woff2');
  unicode-range:
    U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}

:root {
  --f: 'Manrope', 'Poppins', ui-sans-serif, system-ui, sans-serif;
  /* neutrals: warm paper + cool ink */
  --bg: #f3f3f1;
  --surface: #fff;
  --band: #fafaf9;
  --inset: #f7f7f5;
  --sunk: #f2f1ee;
  --soft: #efeeeb;
  --ink: #1c1c1e;
  --ink-2: #3a3a3c;
  --ink-3: #48484a;
  --muted: #6e6e73;
  --muted-2: #8e8e93;
  --faint: #aeaeb2;
  --line: #ecebe8;
  --line-strong: #d9d8d4;
  --line-input: #c9c8c4;
  /* status: mark / ink (text) / tint */
  --ok: #1f9d55;
  --ok-ink: #137336;
  --ok-tint: #e7f6ec;
  --warn: #c98a00;
  --warn-ink: #8f5606;
  --warn-tint: #fbf1d9;
  --bad: #e5484d;
  --bad-ink: #b42318;
  --bad-tint: #fde7e4;
  --info: #3e63dd;
  --info-ink: #3b5bdb;
  --info-tint: #e8eefc;
  --brand: #f26a1b;
  /* the ink rail: the raised-ink material, as a surface */
  --rail: linear-gradient(180deg, #2a2a2d 0, #1c1c1e 320px);
  --on-ink: #f4f3f1;
  --on-ink-2: rgb(244 243 241 / 0.66);
  --on-ink-3: rgb(244 243 241 / 0.44);
  /* radii */
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 13px;
  --r-xl: 16px;
  --r-2xl: 18px;
  --r-doc: 26px;
  /* shadows */
  --sh-hair: 0 0 0 1px rgb(0 0 0 / 0.05);
  --sh-xs: 0 1px 2px rgb(0 0 0 / 0.06), 0 0 0 1px rgb(0 0 0 / 0.045);
  --sh-card: 0 6px 24px -12px rgb(0 0 0 / 0.08), 0 0 0 1px rgb(0 0 0 / 0.05);
  --sh-raised-ink:
    inset 0 1px 0 rgb(255 255 255 / 0.3), inset 0 0 0 1px rgb(255 255 255 / 0.08),
    inset 0 -1px 0 rgb(0 0 0 / 0.5), 0 10px 22px -10px rgb(0 0 0 / 0.6), 0 1px 2px rgb(0 0 0 / 0.25);
  --sh-raised-ink-pressed:
    inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 4px 10px -6px rgb(0 0 0 / 0.5);
  --sh-focus: 0 0 0 1.6px var(--ink);
  --sh-error: 0 0 0 1.6px var(--bad);
  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-press: cubic-bezier(0.25, 0.1, 0.25, 1);
  --press: 120ms;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}
body {
  margin: 0;
  font: 400 14px/1.4 var(--f);
  letter-spacing: -0.011em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--bg);
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.i {
  flex: none;
  display: block;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.caps,
.mono-caps {
  /* Control room only: caps labels are Geist Mono, the room's internal-tool voice. The
     factory app keeps Manrope caps. Body text, names and numbers stay Manrope. */
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.sm {
  font-size: 12.5px;
}
.ok-ink {
  color: var(--ok-ink);
}
.warn-ink {
  color: var(--warn-ink);
}
.bad-ink {
  color: var(--bad-ink);
}
/* Serials, networks, keys: Manrope with tabular figures and a little air, never a monospace
   face (the proto-contract allows one family). */
.serial,
code {
  font-family: var(--f);
  font-variant-numeric: tabular-nums slashed-zero;
  letter-spacing: 0.02em;
  font-weight: 600;
}
td.serial {
  font-weight: 500;
  color: var(--ink-2);
}
.kbd {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--sunk);
  color: var(--ink-2);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- frame + ink rail */
.frame {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  /* the rail colour runs the full page height, also past the first screen */
  background: linear-gradient(90deg, #1c1c1e 0 232px, var(--bg) 232px);
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 12px 16px;
  background: var(--rail);
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 0.06);
  color: var(--on-ink);
}
.brand {
  display: block;
  padding: 2px 10px 0;
  width: max-content;
  border-radius: 8px;
}
.brand .wm {
  display: block;
  height: 24px;
  width: auto;
}
.brand .mk {
  display: none;
}
.tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 12px 10px 22px;
  border-radius: var(--r-sm);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14);
  overflow: hidden;
}
.tag {
  padding: 6px 8px;
}
.tag-l {
  color: var(--on-ink-2);
}
.tag {
  color: #fff;
  box-shadow: inset 0 0 0 1px #3a3a3c;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-ink-2);
  transition: background-color var(--press) var(--ease-press);
}
.nav a span {
  flex: 1;
}
.nav a .i {
  color: inherit;
}
.nav a:hover {
  background: rgb(255 255 255 / 0.05);
  color: var(--on-ink);
}
.nav a[aria-current='page'] {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    inset 0 0 0 1px rgb(255 255 255 / 0.04);
}
.nav a[aria-current='page'] .i {
  color: #fff;
}
.badge {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: var(--bad);
}
/* account card: hairline-rounded, no divider above; the log-out button sits inside it with a
   concentric radius (card 13px - 6px padding = 7px) */
.who {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 6px 6px;
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 0.03);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.who > .av {
  margin-left: 4px;
}
.who-t {
  min-width: 0;
  flex: 1;
}
.who-t b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who-t span {
  display: block;
  margin-top: 3px;
  color: var(--on-ink-3);
}
.who form {
  margin: 0;
  flex-basis: 100%;
}
.out {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-sm);
  font: 500 12.5px var(--f);
  color: var(--on-ink-2);
  background: rgb(255 255 255 / 0.06);
  cursor: pointer;
}
.out:hover {
  color: var(--on-ink);
  background: rgb(255 255 255 / 0.1);
}

/* ---------------------------------------------------------------- avatars, tiles */
.av {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.av-0 {
  background: #e8eefc;
  color: #3b5bdb;
}
.av-1 {
  background: #fdebdd;
  color: #b23c0a;
}
.av-2 {
  background: #e7f6ec;
  color: #137336;
}
.av-3 {
  background: #fbf1d9;
  color: #8f5606;
}
.av-4 {
  background: #f1edfc;
  color: #5b3fc4;
}
.av-5 {
  background: #e3f4f7;
  color: #0e6f80;
}
.av-6 {
  background: #fde7e4;
  color: #b42318;
}
.av-7 {
  background: #eef0f3;
  color: #475467;
}
.av-grey {
  background: #f1f1f2;
  color: #52525b;
}
.av-ink {
  background: var(--ink);
  color: #fff;
}
.av-on-ink {
  width: 30px;
  height: 30px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.tl {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--sunk);
  color: var(--ink-3);
}
.tl.ok {
  background: var(--ok-tint);
  color: var(--ok-ink);
}
.tl.bad {
  background: var(--bad-tint);
  color: var(--bad-ink);
}
.tl.warn {
  background: var(--warn-tint);
  color: var(--warn-ink);
}
.tl.lg {
  width: 52px;
  height: 52px;
  border-radius: var(--r-xl);
}
.tl.ink {
  color: #fff;
  background: linear-gradient(180deg, #38383b 0%, #1c1c1e 55%, #161618 100%);
  box-shadow: var(--sh-raised-ink);
}

/* ---------------------------------------------------------------- page */
main {
  min-width: 0;
}
.frame > main {
  padding: 34px 40px 72px;
  max-width: 1280px;
  width: 100%;
}
.head {
  margin-bottom: 24px;
}
.head-r {
  display: flex;
  align-items: center;
  gap: 20px;
}
.head-r h1 {
  flex: 1;
  min-width: 0;
}
.head-t {
  flex: 1;
  min-width: 0;
}
.head-t > .caps {
  margin-bottom: 6px;
}
.head h1 {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.036em;
  overflow-wrap: anywhere;
}
.head h1 .serial {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.head .lead {
  margin-top: 8px;
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.head-a {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.head-r h1:has(.h-av) {
  display: flex;
  align-items: center;
}
.h-av {
  display: inline-flex;
  flex: none;
  margin-right: 12px;
}
.h-av .av {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.h-pill {
  display: inline-flex;
  flex: none;
  margin-left: 12px;
  letter-spacing: 0;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  text-decoration: none;
}
.crumb .caps {
  color: var(--ink-3);
}
.sq {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-xs);
  color: var(--ink);
  transition: transform var(--press) var(--ease-press);
}
.crumb:hover .caps {
  color: var(--ink);
}
.crumb:active .sq {
  transform: scale(0.97);
}
.lab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 4px 12px;
  min-height: 36px;
}
.lab:first-child,
.head + .lab {
  margin-top: 0;
}
.lab h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ct {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-3);
  background: var(--soft);
}

/* ---------------------------------------------------------------- cards + tables */
.cd {
  background: var(--surface);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-card);
}
.cd.pad {
  padding: 22px 24px 24px;
}
.cd.tw {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  height: 42px;
  padding: 0 16px;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--muted);
  background: var(--band);
  box-shadow: inset 0 -1px 0 var(--line);
}
td {
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-2);
  vertical-align: middle;
  box-shadow: inset 0 1px 0 var(--line);
}
tbody tr:first-child td {
  box-shadow: none;
}
th:first-child,
td:first-child {
  padding-left: 20px;
}
th:last-child,
td:last-child {
  padding-right: 20px;
}
td b,
td .nm {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.021em;
  color: var(--ink);
}
td .nm {
  text-decoration: none;
}
td .nm:hover {
  text-decoration: underline;
  text-decoration-color: var(--line-input);
  text-underline-offset: 3px;
}
td .sub {
  display: block;
  margin-top: 3px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0.022em;
  text-transform: uppercase;
  color: var(--muted);
}
td.num,
th.num {
  text-align: right;
}
td.num {
  font-size: 14.5px;
  color: var(--ink);
}
tr.dim td,
tr.dim td b,
tr.dim td .nm {
  color: var(--muted);
}
tr.dim .av,
tr.dim .tl {
  opacity: 0.7;
}
tr.decoy td {
  box-shadow: inset 0 1px 0 var(--line-strong);
  background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 0.018) 6px 7px);
}
tfoot td {
  font-weight: 600;
  color: var(--ink);
  background: var(--band);
  box-shadow: inset 0 1px 0 var(--line);
}
.who-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.who-cell > div {
  min-width: 0;
}
.who-cell .pill {
  margin-left: 6px;
  vertical-align: 1px;
}
table.sys .big {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-2);
  white-space: nowrap;
}
table.sys td.muted {
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- status words, pills */
/* Fine states are words with a dot; a tinted pill only when something needs a look. */
.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.st .dot {
  background: var(--faint);
}
.st.ok .dot {
  background: var(--ok);
}
.st.warn .dot {
  background: var(--warn);
}
.st.bad .dot {
  background: var(--bad);
}
.st .i {
  color: var(--muted-2);
}
.st.ok .i {
  color: var(--ok-ink);
}
.st b {
  font-weight: 500;
}
.warn-line {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--warn-ink);
}
.tfoot {
  padding: 12px 20px 14px;
  font-size: 12.5px;
  color: var(--muted);
  box-shadow: inset 0 1px 0 var(--line);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  color: var(--ink-3);
  background: var(--sunk);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.05);
}
.pill.ok {
  color: var(--ok-ink);
  background: var(--ok-tint);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ok-ink) 18%, transparent);
}
.pill.warn {
  color: var(--warn-ink);
  background: var(--warn-tint);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--warn-ink) 20%, transparent);
}
.pill.bad {
  color: var(--bad-ink);
  background: var(--bad-tint);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad-ink) 18%, transparent);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------------------------------------------------------------- hairline banners */
.alert {
  --c: var(--warn);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--r-xl);
  font-size: 13.5px;
  line-height: 1.45;
  background: color-mix(in oklab, var(--c) 7%, #fff);
  color: color-mix(in oklab, var(--c) 55%, var(--ink));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 30%, transparent);
}
.alert .i {
  margin-top: 0.5px;
  color: var(--c);
}
.alert b {
  font-weight: 600;
  color: color-mix(in oklab, var(--c) 72%, var(--ink));
}
.alert.red {
  --c: var(--bad);
}
.alert.green {
  --c: var(--ok);
}
.alert.blue {
  --c: var(--info);
}
.cd .alert {
  margin: 16px 0;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: 600 15px/1 var(--f);
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform var(--press) var(--ease-press),
    background-color var(--press) var(--ease-press);
}
.btn:active {
  transform: scale(0.97);
}
.btn.ink {
  color: #fff;
  background: linear-gradient(180deg, #38383b 0%, #1c1c1e 55%, #161618 100%);
  box-shadow: var(--sh-raised-ink);
}
.btn.ink:active {
  box-shadow: var(--sh-raised-ink-pressed);
}
.btn.soft {
  color: var(--ink);
  background: var(--soft);
}
.btn.soft:hover {
  background: #e7e6e2;
}
.btn.line {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--sh-xs);
}
.btn.line:hover {
  background: var(--inset);
}
.btn.line.done {
  color: var(--ok-ink);
}
.btn.sm {
  height: 34px;
  padding: 0 14px;
  gap: 6px;
  font-size: 13px;
}
.btn.danger {
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink-3);
  background: transparent;
}
/* Quiet in a list of many rows; it turns red only when reached for, and the dialog says why. */
.btn.danger:hover,
.btn.danger:focus-visible {
  color: var(--bad-ink);
  background: var(--bad-tint);
}
.btn.wide {
  width: 100%;
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
:focus-visible {
  outline: none;
  box-shadow: var(--sh-focus) !important;
}
.nav a:focus-visible,
.out:focus-visible,
.brand:focus-visible {
  box-shadow: 0 0 0 2px var(--on-ink) !important;
}
.row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}
.row-actions form {
  margin: 0;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ---------------------------------------------------------------- forms */
.narrow {
  max-width: 760px;
}
.part {
  padding: 22px 24px 24px;
  margin-bottom: 14px;
}
.part-h {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.part-h h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 24px;
}
.part-h p {
  font-size: 12.5px;
  color: var(--muted);
}
.sn {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--soft);
}
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 16px;
}
.form .full {
  grid-column: 1 / -1;
}
.form.lic {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.form.lic .c3 {
  grid-column: span 3;
}
.form.lic .c2 {
  grid-column: span 2;
}
label.f,
div.f {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
label.f > span,
.fl {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-3);
}
label.f em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted-2);
}
input[type='text'],
input[type='tel'],
input[type='number'],
input[type='date'],
select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  font: 500 15px var(--f);
  letter-spacing: -0.015em;
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow var(--press) var(--ease-press);
}
input::placeholder {
  color: var(--faint);
}
input:hover,
select:hover {
  box-shadow: inset 0 0 0 1px var(--line-input);
}
input:focus,
select:focus {
  outline: none;
  box-shadow: var(--sh-focus);
}
label.f.bad > span:first-child {
  color: var(--bad-ink);
}
label.f.bad input {
  box-shadow: var(--sh-error);
}
.pfx {
  position: relative;
  display: block;
}
.pfx-t {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  pointer-events: none;
}
.pfx input {
  padding-left: 50px;
}
label.f > .ferr {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bad-ink);
}
input[type='date']::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: url('/brand/chev.svg');
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input.code {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3em;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 8px;
}
/* feature chips: a real checkbox inside a pill */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  align-items: center;
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip .i {
  opacity: 0.25;
}
.chip:has(input:checked) {
  color: #fff;
  background: var(--ink);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.22),
    0 4px 10px -4px rgb(0 0 0 / 0.35);
}
.chip:has(input:checked) .i {
  opacity: 1;
}
.chip:has(input:disabled) {
  cursor: default;
  color: var(--ink-3);
  background: var(--soft);
  box-shadow: none;
}
.chip:has(input:disabled) .i {
  opacity: 0.7;
}
.chip:has(input:focus-visible) {
  box-shadow: var(--sh-focus);
}
/* protocol option cards */
.opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.opt {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.rd {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-input);
}
.opt-t b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.opt-t span {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.opt:has(input:checked) {
  box-shadow:
    0 0 0 1.6px var(--ink),
    0 10px 24px -12px rgb(0 0 0 / 0.2);
}
.opt:has(input:checked) .rd {
  color: #fff;
  background: var(--ink);
  box-shadow: none;
}
.opt:has(input:focus-visible) {
  box-shadow: 0 0 0 2.5px var(--ink);
}
.err {
  font-size: 13px;
  font-weight: 600;
  color: var(--bad-ink);
}

/* ---------------------------------------------------------------- one company: main + record panel */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.split-m {
  min-width: 0;
}
.rec {
  padding: 20px;
  position: sticky;
  top: 24px;
  /* line its top up with the devices table, under the section label */
  margin-top: 48px;
}
.rec-s > .caps {
  margin-bottom: 10px;
}
.rec-s + .rec-s {
  margin-top: 18px;
  padding-top: 18px;
  box-shadow: inset 0 1px 0 var(--line);
}
.rec-big {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.rec-big span {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.stats div {
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--inset);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.04);
}
.stats span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.stats b {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.stats .full b,
.stats .full small {
  color: var(--warn-ink);
}
.stats small {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.rec-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 0;
}
.rec-row + .rec-row {
  margin-top: 8px;
}
.rec-row b {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.021em;
}
.rec-row .sub {
  display: block;
  margin-top: 2px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.022em;
  text-transform: uppercase;
  color: var(--muted);
}
p.now {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
p.now b {
  font-weight: 600;
  color: var(--ink);
}

/* ---------------------------------------------------------------- key shown once */
.keyc {
  padding: 24px;
}
.key-h {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.key-h .caps {
  color: var(--ink-3);
  font-weight: 600;
}
.key-h .muted {
  margin-top: 3px;
  font-size: 13.5px;
}
.key {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 18px 20px;
  margin: 10px 0 16px;
  border-radius: var(--r-xl);
  background: var(--inset);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}
.key code {
  flex: 1;
  min-width: 0;
  /* The one exception to "Manrope only": a key is typed into a device by hand, so l, 1, I, 0
     and O must never be confused. Geist Mono, self-hosted (same face as the caps labels). */
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--ink);
  word-break: break-all;
  user-select: all;
}

/* ---------------------------------------------------------------- money (costs) */
.money {
  text-align: right;
}
.money strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.04em;
}

/* ---------------------------------------------------------------- empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 24px 46px;
  text-align: center;
}
.esq {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: var(--r-lg);
  color: var(--ink-3);
  background: var(--sunk);
}
.esq.ok {
  color: var(--ok-ink);
  background: var(--ok-tint);
}
.empty b {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.empty p {
  max-width: 300px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.empty .btn {
  margin-top: 12px;
}

/* ---------------------------------------------------------------- confirm dialog (DK-04 dialog) */
.confirm {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--r-doc);
  background: var(--surface);
  color: var(--ink);
  box-shadow:
    0 30px 60px -20px rgb(0 0 0 / 0.35),
    0 0 0 1px rgb(0 0 0 / 0.05);
}
.confirm[open] {
  animation: fm-pop 200ms var(--ease-out);
}
.confirm::backdrop {
  background: rgb(20 20 22 / 0.38);
  animation: fm-fade 220ms cubic-bezier(0, 0, 0.58, 1);
}
.confirm form {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 24px;
  text-align: center;
}
.confirm .tl {
  margin-bottom: 16px;
}
.confirm[data-ic='revoke'] .tl {
  color: var(--bad-ink);
  background: var(--bad-tint);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad-ink) 18%, transparent);
}
.confirm [data-for] {
  display: none;
}
.confirm[data-ic='key'] [data-for='key'],
.confirm[data-ic='revoke'] [data-for='revoke'] {
  display: block;
}
.confirm h2 {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.confirm-p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.confirm-b {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 24px;
}
.confirm-b .btn {
  flex: 1;
}
@keyframes fm-pop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}
@keyframes fm-fade {
  from {
    opacity: 0;
  }
}

/* ---------------------------------------------------------------- solo (log in, enrol, not here) */
.solo {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 20px;
}
.sc {
  width: min(440px, 100%);
  overflow: hidden;
  border-radius: var(--r-doc);
  background: var(--surface);
  box-shadow:
    0 20px 40px -18px rgb(0 0 0 / 0.18),
    0 0 0 1px rgb(0 0 0 / 0.05);
}
.sc-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px;
  background: var(--rail);
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.4);
}
.sc-band .wm {
  display: block;
  height: 26px;
  width: auto;
}
.sc-band .tag {
  margin: 0;
}
.sc-body {
  padding: 28px 26px 26px;
}
.sc-body > .tl {
  margin-bottom: 16px;
}
.sc-body > .caps,
#enrol-step > .caps,
#totp-step > .caps:first-child {
  margin-bottom: 6px;
}
.sc-body h1 {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.sc-body .lead {
  margin: 8px 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.sc-body .key {
  margin: 8px 0 14px;
}
.sc-body .key code {
  font-size: 16px;
}
.solo-foot {
  color: var(--muted);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mt {
  margin-top: 16px;
}
details.alt {
  margin-top: 18px;
  padding-top: 16px;
  box-shadow: inset 0 1px 0 var(--line);
}
details.alt summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: 8px;
}
details.alt summary:hover {
  color: var(--ink);
}
details.alt summary::-webkit-details-marker {
  display: none;
}
details.alt summary .i {
  color: var(--muted-2);
  transition: transform 150ms var(--ease-out);
}
details.alt[open] summary .i {
  transform: rotate(90deg);
}
.uri {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  color: var(--ink-3);
  background: var(--inset);
}

/* ---------------------------------------------------------------- iPad and small laptops */
@media (max-width: 1240px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .rec {
    position: static;
    margin-top: 0;
    order: -1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 20px 4px;
  }
  .rec-s {
    padding: 0 20px;
  }
  .rec-s + .rec-s {
    margin-top: 0;
    padding-top: 0;
    box-shadow: inset 1px 0 0 var(--line);
  }
}
@media (max-width: 1120px) {
  .frame {
    grid-template-columns: 88px minmax(0, 1fr);
    background: linear-gradient(90deg, #1c1c1e 0 88px, var(--bg) 88px);
  }
  .rail {
    padding: 18px 8px 14px;
    align-items: center;
  }
  .brand {
    padding: 0;
  }
  .brand .wm {
    display: none;
  }
  .brand .mk {
    display: block;
    height: 32px;
    width: auto;
  }
  .rail .tag {
    margin: 12px 0 18px;
  }
  .rail .tag {
    padding: 5px 6px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .rail .tag-l {
    display: none;
  }
  .nav {
    width: 100%;
    align-items: center;
  }
  .nav a {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 72px;
    min-height: 58px;
    padding: 0;
    border-radius: 16px;
    position: relative;
  }
  .nav a span {
    flex: none;
    font-size: 11px;
  }
  .nav a .i {
    width: 21px;
    height: 21px;
  }
  .nav .badge {
    position: absolute;
    top: 4px;
    right: 8px;
  }
  .who {
    flex-direction: column;
    padding: 8px 4px 4px;
    width: 100%;
  }
  .who {
    flex-wrap: nowrap;
  }
  .who > .av {
    margin-left: 0;
  }
  .who form {
    flex-basis: auto;
  }
  .who-t {
    display: none;
  }
  .out span {
    display: none;
  }
  .out {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .frame > main {
    padding: 28px 28px 64px;
  }
  .rec {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 20px;
  }
  .rec-s:nth-child(3) {
    box-shadow: none;
  }
  th,
  td {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (max-width: 1240px) {
  .md-hide {
    display: none !important;
  }
  .ell {
    display: block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 760px) {
  .form,
  .form.lic,
  .opts {
    grid-template-columns: minmax(0, 1fr);
  }
  .form.lic .c2,
  .form.lic .c3 {
    grid-column: auto;
  }
  .head {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active,
  .crumb:active .sq {
    transform: none;
  }
  .confirm[open] {
    animation: fm-fade 1ms;
  }
  details.alt summary .i {
    transition: none;
  }
}
