/* kin-hub, following the Machines mockup: white surfaces on a light canvas,
   one blue for actions, green/amber/red for status. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("vendor/inter/inter-latin-400.da03732a27e1.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("vendor/inter/inter-latin-500.51205681a1ba.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("vendor/inter/inter-latin-600.2ede57db1a3a.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("vendor/inter/inter-latin-700.8ca0a5155296.woff2") format("woff2"); }

:root {
  --canvas: #f8f9fb;
  --surface: #ffffff;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --row-line: #eef0f3;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #2160e0;
  --primary-hover: #1b52c4;
  --primary-soft: #eaf1fe;
  --primary-text: #1d4fbf;
  --green: #22c55e;
  --green-soft: #ecfdf3;
  --green-text: #067647;
  --amber: #f59e0b;
  --amber-soft: #fff6e5;
  --amber-text: #b54708;
  --red: #ef4444;
  --red-dot: #dc2626;
  --red-soft: #fef3f2;
  --red-text: #c01f14;
  --info-soft: #eff5ff;
  --info-border: #d1e0ff;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-2);
  font: 14px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--text); margin: 0; }
code, pre, kbd { font-family: var(--mono); }
button { font: inherit; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon.sm { width: 16px; height: 16px; }
.icon.xs { width: 14px; height: 14px; }
.icon.lg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* App frame */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 26px 16px 20px; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { padding: 0 8px 22px; display: block; color: inherit; }
.brand:hover { text-decoration: none; }
.wordmark { font-size: 29px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); line-height: 1.1; }
.tagline { margin-top: 6px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; font-size: 14.5px;
}
.nav a .icon { color: #475467; }
.nav a:hover { background: #f4f6f9; text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.nav a.active .icon { color: var(--primary-text); }
.side-card {
  margin-top: auto; padding: 20px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fafbfc;
}
.side-card .term-badge {
  width: 36px; height: 36px; border-radius: 7px; background: #111827; color: #fff;
  display: grid; place-items: center; margin-bottom: 16px;
}
.side-card h3 { font-size: 15px; line-height: 1.35; font-weight: 600; margin-bottom: 14px; }
.side-card p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.side-card a { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 70px; display: flex; align-items: center; gap: 16px;
  padding: 0 30px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border);
}
.search {
  flex: 0 1 548px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: #84adff; box-shadow: 0 0 0 3px #e0eaff; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14.5px; color: var(--text); background: transparent; }
.search input::placeholder { color: var(--muted); }
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--border);
  border-radius: 5px; font-size: 12px; color: var(--muted); background: #f9fafb;
}
.spacer { flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: #475467; cursor: pointer; position: relative;
}
.icon-btn:hover { background: #f2f4f7; }
.badge-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red-dot); border: 2px solid #fff; }

.user-menu summary {
  display: flex; align-items: center; gap: 12px; padding: 4px 6px 4px 4px; border-radius: 999px; cursor: pointer; list-style: none;
}
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #dbe7fe; color: var(--primary-text); font-weight: 600; font-size: 13.5px;
}
.user-name { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.25; }
.user-org { font-size: 12.5px; color: var(--muted); line-height: 1.25; }

/* Pop-up menus built on <details> */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px;
  background: none; color: var(--text-2); font-size: 13.5px; text-align: left; cursor: pointer;
}
.menu-pop a:hover, .menu-pop button:hover { background: #f4f6f9; text-decoration: none; }
.menu-pop .danger { color: var(--red-text); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu-head { padding: 8px 10px 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.notes { width: 360px; max-height: 440px; overflow: auto; }
.note { display: flex; gap: 10px; padding: 10px; border-radius: 6px; }
.note + .note { border-top: 1px solid var(--row-line); }
.note.unread { background: #f6f9ff; }
.note .when { font-size: 12px; color: var(--muted); }
.note-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--faint); }
.note-dot.online { background: var(--green); }
.note-dot.offline, .note-dot.refused { background: var(--red-dot); }
.note-dot.degraded { background: var(--amber); }
.note-dot.enrolled { background: var(--primary); }
.notes-empty { padding: 18px 10px; color: var(--muted); font-size: 13.5px; }

.content { flex: 1; padding: 26px 30px 30px; }
.footer {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 30px;
  border-top: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--muted);
}
.footer .product { color: var(--text); font-weight: 600; margin-right: 14px; }

/* Page header */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.page-title { font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; margin: 4px 0 6px; }
.page-sub { margin: 0; color: var(--text-2); font-size: 15px; }
.page-actions { display: flex; gap: 10px; padding-top: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow); }
.btn-outline:hover { background: #f9fafb; }
.btn-danger { background: #d92d20; color: #fff; }
.btn-danger:hover { background: #b42318; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #f2f4f7; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; font-weight: 500; }
.btn[disabled], .btn.disabled { color: var(--faint); background: #fcfcfd; border-color: var(--border); box-shadow: none; cursor: not-allowed; pointer-events: none; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; min-height: 78px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit;
}
a.stat:hover { border-color: var(--border-strong); text-decoration: none; }
a.stat.current { border-color: #84adff; box-shadow: 0 0 0 3px #e0eaff; }
.stat .num { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.15; }
.stat .label { font-size: 14px; color: var(--text-2); }
.stat .pct { margin-left: auto; font-size: 13px; color: var(--muted); }
.stat .glyph { color: #475467; }
.stat-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.stat-dot.online { background: var(--green); }
.stat-dot.offline { background: var(--red-dot); }
.stat-warn { color: var(--amber); fill: none; }

/* Info banner */
.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px;
  background: var(--info-soft); border: 1px solid var(--info-border); border-radius: var(--radius); font-size: 14px;
}
.banner > .icon { color: var(--primary); }
.banner p { margin: 0; flex: 1; }
.banner strong { color: var(--text); font-weight: 600; }
.banner .icon-btn { width: 30px; height: 30px; }

/* Cards and tables */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 16px; font-weight: 600; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.card-body { padding: 18px 20px; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--text-2); padding: 15px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data th a { color: inherit; display: inline-flex; align-items: center; gap: 6px; }
table.data th a:hover { text-decoration: none; color: var(--text); }
table.data td { padding: 12px; border-bottom: 1px solid var(--row-line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fcfcfd; }
table.data .check { width: 46px; padding-left: 16px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); border-radius: 4px; vertical-align: middle; }
.cell-name { display: flex; align-items: center; gap: 13px; }
.machine-icon {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none;
  background: #e8f0fe; color: var(--primary);
}
.machine-icon.off { background: #f2f4f7; color: #475467; }
.name { font-weight: 600; color: var(--text); font-size: 14.5px; line-height: 1.3; }
a.name:hover { color: var(--primary); text-decoration: none; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.35; }
.sub code, .check-row code, .card-head code { white-space: nowrap; }
td a.name, td .name { white-space: nowrap; }
.two { line-height: 1.35; }
.two .sub { margin-top: 2px; }
.cell-os { display: flex; align-items: center; gap: 12px; }
.os-icon { width: 20px; height: 20px; flex: none; fill: currentColor; }
.os-linux { color: #1d2939; }
.os-apple { color: #555; }
.os-pi { color: #c51a4a; }

.pill { display: inline-flex; align-items: center; gap: 7px; height: 27px; padding: 0 11px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.pill .pdot { width: 9px; height: 9px; border-radius: 50%; }
.pill.online { background: var(--green-soft); color: var(--green-text); }
.pill.online .pdot { background: var(--green); }
.pill.degraded { background: var(--amber-soft); color: var(--amber-text); }
.pill.degraded .icon { color: var(--amber); }
.pill.offline { background: var(--red-soft); color: var(--red-text); }
.pill.offline .pdot { background: var(--red); }
.pill.neutral { background: #f2f4f7; color: var(--text-2); }
.pill.blue { background: var(--primary-soft); color: var(--primary-text); }
.seen { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.seen .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.seen.late .sdot { background: var(--amber); }

.cell-load { display: flex; align-items: center; gap: 14px; }
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { stroke: none; }
.spark-online polyline { stroke: #16a34a; } .spark-online .area { fill: rgba(34, 197, 94, .12); }
.spark-degraded polyline { stroke: #f59e0b; } .spark-degraded .area { fill: rgba(245, 158, 11, .16); }
.spark-flat path { stroke: #d0d5dd; stroke-width: 1.5; fill: none; }
.load-num { min-width: 34px; text-align: right; color: var(--text-2); }
.cell-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.cell-actions .icon-btn { width: 34px; height: 34px; }

.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-2); }
.pager { display: flex; align-items: center; gap: 12px; }
.pager select {
  height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  appearance: none; font: inherit; color: var(--text); cursor: pointer;
}
.pager-btns { display: flex; }
.pager-btns a, .pager-btns span {
  display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface);
}
.pager-btns > :first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pager-btns > :last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 0; }
.pager-btns span { color: var(--faint); }
.pager-btns a:hover { background: #f9fafb; text-decoration: none; }

.bulk-bar { display: none; align-items: center; gap: 12px; padding: 10px 16px; background: var(--primary-soft); border-bottom: 1px solid var(--info-border); font-size: 13.5px; color: var(--primary-text); }
.bulk-bar.show { display: flex; }

.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty h3 { font-size: 16px; margin-bottom: 6px; }
.empty p { margin: 0 auto 18px; max-width: 460px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 500; font-size: 13.5px; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; color: var(--text); outline: 0;
}
textarea.input { font-family: var(--mono); font-size: 12.5px; min-height: 84px; resize: vertical; }
.input:focus { border-color: #84adff; box-shadow: 0 0 0 3px #e0eaff; }
.errorlist { margin: 4px 0 0; padding: 0; list-style: none; color: var(--red-text); font-size: 13px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fcfcfd; cursor: pointer; }
.check-row input { margin-top: 2px; }
.check-row b { color: var(--text); font-weight: 600; }
.check-row span { display: block; font-size: 13px; color: var(--muted); }

/* Command boxes */
.cmd {
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; margin: 6px 0 14px;
  background: #0f172a; color: #e2e8f0; border-radius: var(--radius-sm); font-family: var(--mono); font-size: 12.5px;
}
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.cmd .prompt { color: #64748b; user-select: none; }
.copy-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid #334155;
  border-radius: 6px; background: #1e293b; color: #cbd5e1; cursor: pointer;
}
.copy-btn:hover { background: #273449; color: #fff; }
.copy-btn.done { color: #4ade80; border-color: #166534; }
.cmd-label { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* Dialogs */
dialog {
  width: min(680px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-pop); color: var(--text-2);
}
dialog::backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 4px; }
.dialog-head h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); }
.dialog-body { padding: 16px 24px 8px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; }
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: #f2f4f7; margin-bottom: 12px; }
.tabs button { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-weight: 500; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }
.notice.warn { background: var(--amber-soft); color: #7a2e0e; border: 1px solid #fedf89; }
.notice.warn .icon { color: var(--amber); }
.notice.ok { background: var(--green-soft); color: #054f31; border: 1px solid #abefc6; }
.notice.info { background: var(--info-soft); border: 1px solid var(--info-border); }
.messages { margin-bottom: 16px; }

/* Grids for the dashboard and detail pages */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--row-line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); margin: 0; }
.kv dt, .kv dd { padding: 11px 20px; margin: 0; border-bottom: 1px solid var(--row-line); font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); overflow-wrap: anywhere; }
.kv dt:nth-last-of-type(1), .kv dd:last-of-type { border-bottom: 0; }
.big-spark { padding: 18px 20px 14px; }
.big-spark .spark { width: 100%; height: 88px; }

/* Terminal page */
.term-shell { display: flex; flex-direction: column; height: calc(100vh - 70px - 52px - 56px); min-height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid #1f2937; background: #0b1220; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #111827; color: #cbd5e1; font-size: 13px; border-bottom: 1px solid #1f2937; }
.term-bar .state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.term-bar .sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.term-bar .sdot.on { background: var(--green); }
.term-bar .sdot.off { background: var(--red); }
#terminal { flex: 1; padding: 10px 12px; }

/* Home and sign-in: a full-screen banner with the sign-in box on it */
.banner-page {
  position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  background:
    radial-gradient(1100px 620px at 12% 8%, rgba(59, 130, 246, .38), transparent 62%),
    radial-gradient(900px 560px at 92% 96%, rgba(14, 165, 233, .26), transparent 60%),
    linear-gradient(135deg, #0a1020 0%, #0f1f3d 52%, #14306c 100%);
}
.banner-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 78%);
}
.banner-page .auth-wrap { position: relative; flex: 1; min-height: 0; }
.banner-foot {
  position: relative; padding: 18px 24px; text-align: center; font-size: 12.5px; color: rgba(226, 232, 240, .66);
}
.banner-foot a { color: rgba(226, 232, 240, .85); }
.banner-cmd {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-bottom: 12px; padding: 7px 7px 7px 14px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 9px; background: rgba(2, 6, 23, .45);
  font-family: var(--mono); font-size: 12.5px; color: #e2e8f0; text-align: left;
}
.banner-cmd code { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.banner-cmd .prompt { color: #64748b; user-select: none; }
.banner-cmd .copy-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.banner-foot a:hover { color: #fff; }
.banner-page .auth-card { box-shadow: 0 30px 70px -20px rgba(2, 6, 23, .7), 0 2px 8px rgba(2, 6, 23, .25); border-color: rgba(255, 255, 255, .6); }

/* Sign-in box */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(400px, 100%); padding: 34px 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-pop); }
.auth-card .wordmark { font-size: 32px; }
.auth-card .tagline { margin-bottom: 26px; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* Public pages: landing, docs, downloads */
.pub-nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.pub-nav .inner { max-width: 1180px; margin: 0 auto; height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.pub-nav .wordmark { font-size: 24px; }
.pub-nav nav { display: flex; gap: 24px; font-weight: 500; }
.pub-nav nav a { color: var(--text-2); }
.pub-nav nav a.active, .pub-nav nav a:hover { color: var(--text); text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.pub-footer { border-top: 1px solid var(--border); background: var(--surface); }
.pub-footer .inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 40px 0 64px; }
.docs-nav { position: sticky; top: 92px; align-self: start; font-size: 13.5px; }
.docs-nav h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.docs-nav a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--text-2); }
.docs-nav a.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.docs-nav .toc a { padding-left: 18px; font-size: 13px; }
.prose { max-width: 780px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.prose h1 { font-size: 34px; letter-spacing: -0.025em; margin: 0 0 18px; }
.prose h2 { font-size: 22px; margin: 38px 0 12px; padding-top: 8px; letter-spacing: -0.015em; }
.prose h3 { font-size: 17px; margin: 26px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose code { font-size: 13px; padding: 1px 5px; border-radius: 5px; background: #f2f4f7; color: var(--text); }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13px; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; }

@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .brand { padding: 0 8px 0 0; }
  .sidebar .tagline, .side-card { display: none; }
  .nav { flex-direction: row; }
  .nav a { height: 36px; padding: 0 10px; font-size: 13.5px; }
  .topbar { padding: 0 16px; top: 0; }
  .user-meta { display: none; }
  .content { padding: 20px 16px; }
  .page-head { flex-direction: column; gap: 6px; }
  .page-actions { padding-top: 0; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; }
  .footer, .pub-footer .inner { flex-direction: column; gap: 4px; }
  .pub-nav nav { gap: 14px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .page-title { font-size: 25px; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
}
