/* OpenNodd web app. Dark only. Two moods: a polished auth screen, and a console for everything after. */
@font-face {
  font-family: 'Inter';
  src: url('/app/inter.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/app/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #07080a;
  --pane: #0d0f12;
  --raised: #12151a;
  --line: #1f242a;
  --line-2: #2c333b;
  --text: #e6e9ec;
  --dim: #7d8794;
  --mint: #5af0b8;
  --mint-ink: #04130d;
  --mint-soft: rgba(90, 240, 184, 0.1);
  --mint-line: rgba(90, 240, 184, 0.32);
  --amber: #ffb85c;
  --amber-soft: rgba(255, 184, 92, 0.1);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.1);
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 6px;
  color-scheme: dark;
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
body {
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#root {
  height: 100%;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--mint);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
b {
  font-weight: 600;
}
::selection {
  background: rgba(90, 240, 184, 0.28);
}
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 3px;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-track {
  background: transparent;
}
.muted,
.dim {
  color: var(--dim);
}
.small {
  font-size: 12.5px;
}
.spacer {
  flex: 1;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
h1,
h2,
h3 {
  font-family: var(--mono);
  margin: 0;
  font-weight: 600;
}

/* ================================================================
   AUTH
   ================================================================ */
.auth {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background:
    radial-gradient(60% 50% at 18% 12%, rgba(90, 240, 184, 0.13), transparent 70%),
    radial-gradient(50% 45% at 85% 95%, rgba(90, 240, 184, 0.08), transparent 70%),
    #06070a;
  overflow: hidden;
  isolation: isolate;
}
.auth::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(75% 75% at 40% 45%, #000 20%, transparent 100%);
  mask-image: radial-gradient(75% 75% at 40% 45%, #000 20%, transparent 100%);
}
.auth-main {
  display: grid;
  place-items: center;
  padding: 32px 16px;
  min-height: 100dvh;
}
.auth-wrap {
  width: 100%;
  max-width: 400px;
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
.card.glass {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 24, 29, 0.82), rgba(11, 13, 16, 0.86));
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 24px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 90px -30px rgba(90, 240, 184, 0.28);
}
.card.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(90, 240, 184, 0.55), rgba(255, 255, 255, 0.09) 28%, rgba(255, 255, 255, 0.04) 60%, rgba(90, 240, 184, 0.28));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}
.glass-body {
  padding: 32px 32px 26px;
}
.auth-head {
  text-align: center;
  margin-bottom: 26px;
}
.auth-head .logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(90, 240, 184, 0.25), 0 8px 28px -6px rgba(90, 240, 184, 0.45);
}
.auth-head h1 {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 16px 0 6px;
}
.auth-head p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}
.invitecode {
  display: inline-block;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px dashed var(--mint-line);
  background: var(--mint-soft);
  color: var(--mint);
  font: 500 12.5px var(--mono);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.glass .field {
  display: block;
  margin-bottom: 16px;
}
.glass .field > span:first-child {
  display: flex;
  justify-content: space-between;
  font: 500 13px var(--sans);
  color: #c4cad2;
  margin-bottom: 7px;
}
.glass .field > span:first-child i {
  font-style: normal;
  color: var(--dim);
  font-weight: 400;
}
.glass .prompt {
  height: 44px;
  background: rgba(5, 6, 8, 0.7);
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.glass .prompt::before {
  content: none;
}
.glass .prompt input {
  font: 400 15px var(--sans);
  padding: 0 14px;
  height: 100%;
}
.glass .prompt:focus-within {
  border-color: var(--mint);
  background: rgba(5, 6, 8, 0.9);
  box-shadow: 0 0 0 4px rgba(90, 240, 184, 0.14);
}
.reveal {
  font: 500 12px var(--sans);
  color: var(--dim);
  background: none;
  border: 0;
  padding: 0 14px;
  height: 100%;
  cursor: pointer;
  border-radius: 0 10px 10px 0;
}
.reveal:hover {
  color: var(--text);
}
.glass .btn.go {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border-radius: 10px;
  font: 600 14.5px var(--sans);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #7bf6c9, #3fe0a4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 22px -6px rgba(90, 240, 184, 0.55);
  transition:
    transform 0.12s,
    box-shadow 0.2s,
    filter 0.2s;
}
.glass .btn.go:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 30px -4px rgba(90, 240, 184, 0.7);
}
.glass .btn.go:active:not(:disabled) {
  transform: translateY(1px);
}
.glass .btn.go .arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.2s;
}
.glass .btn.go:hover .arrow {
  transform: translateX(3px);
}
.glass .btn.go:disabled {
  cursor: progress;
  opacity: 0.85;
}
.spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(4, 19, 13, 0.25);
  border-top-color: var(--mint-ink);
  animation: rot 0.7s linear infinite;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
}
@keyframes rot {
  to {
    transform: rotate(360deg);
  }
}
.glass .error {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: var(--red-soft);
  color: #ffb3b3;
  font-size: 13px;
}
.glass .error {
  font-family: var(--sans);
}
.glass .error:empty {
  display: none;
}
.card-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0 0 18px 18px;
  padding: 14px 32px;
  text-align: center;
  font-size: 13.5px;
  color: var(--dim);
}
.card-foot.secured {
  padding: 9px 32px;
  font: 400 11.5px var(--mono);
  background: rgba(0, 0, 0, 0.25);
  color: #636d79;
}
.card-foot.secured b {
  color: #8b95a1;
  font-weight: 500;
}
.card-foot + .card-foot {
  border-radius: 0 0 18px 18px;
}
.card-foot:has(+ .card-foot) {
  border-radius: 0;
}
.auth-visual {
  display: none;
}
@media (min-width: 980px) {
  .auth {
    grid-template-columns: minmax(440px, 5fr) minmax(0, 6fr);
  }
  .auth-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 40px 48px;
    min-height: 100dvh;
    position: relative;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    background: radial-gradient(55% 45% at 50% 38%, rgba(90, 240, 184, 0.09), transparent 70%), rgba(255, 255, 255, 0.012);
  }
}
.orbit {
  position: relative;
  width: min(46vh, 30vw, 460px);
  aspect-ratio: 1;
  flex: none;
}
.orbit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.orbit .rings {
  inset: -8%;
  width: 116%;
  height: 116%;
  animation: rot 140s linear infinite;
}
.orbit .rings.slow {
  animation-duration: 260s;
  animation-direction: reverse;
  inset: -22%;
  width: 144%;
  height: 144%;
  opacity: 0.4;
}
.tagline {
  text-align: center;
  max-width: 460px;
}
.tagline h2 {
  font: 600 clamp(26px, 3vw, 38px) / 1.1 var(--sans);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  background: linear-gradient(180deg, #fff, #9ba6b1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}
.snippet {
  width: min(460px, 100%);
  border-radius: 12px;
  background: rgba(6, 8, 10, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  font: 12.5px/1.65 var(--mono);
  overflow: hidden;
}
.snippet-h {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--dim);
  font-size: 11px;
}
.snippet-h i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #262c33;
}
.snippet-h span {
  margin-left: 8px;
}
.snippet-b {
  padding: 12px 14px 14px;
  white-space: pre-wrap;
  color: #aeb7c1;
}
.snippet-b .m {
  color: var(--mint);
}
.snippet-b .a {
  color: var(--amber);
}
.snippet-b .d {
  color: #5d6671;
}
@media (max-width: 480px) {
  .glass-body {
    padding: 26px 20px 22px;
  }
  .card-foot {
    padding: 13px 20px;
  }
}

/* ================================================================
   CONSOLE SHELL
   ================================================================ */
.shell {
  position: relative;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  height: 100dvh;
  background: var(--bg);
}
.shell::after {
  /* very faint scanlines */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}
.side {
  display: flex;
  flex-direction: column;
  background: var(--pane);
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  min-height: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 14px;
}
.brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.brand small {
  margin-left: auto;
  color: var(--dim);
  font-weight: 400;
  font-size: 11px;
}
.side-label {
  padding: 16px 14px 6px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.side-links {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
}
.side a.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 5px;
  color: #aab2bc;
  font-size: 13px;
  text-decoration: none;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.side a.nav .mk {
  width: 10px;
  color: var(--mint);
  visibility: hidden;
}
.side a.nav:hover {
  background: var(--raised);
  color: var(--text);
}
.side a.nav.on {
  background: var(--raised);
  color: var(--mint);
  font-weight: 600;
}
.side a.nav.on .mk {
  visibility: visible;
}
.side a.nav.on::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--mint);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--mint);
}
.side a.nav .badge {
  margin-left: auto;
}
.side-foot {
  margin-top: auto;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
}
.side-foot kbd {
  font: inherit;
  color: var(--text);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  font: 600 11px var(--mono);
  background: var(--mint);
  color: var(--mint-ink);
}
.badge.warn {
  background: var(--amber);
  color: #231600;
}
.badge::before {
  content: '[';
  opacity: 0;
  width: 0;
}
.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
  flex: none;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--pane);
  font: 13px var(--mono);
  white-space: nowrap;
  overflow: hidden;
}
.topbar .u {
  color: var(--mint);
  font-weight: 600;
}
.topbar .at,
.topbar .sep {
  color: var(--dim);
  margin: 0 1px;
}
.topbar .host {
  color: #8fb7ff;
}
.topbar .path {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--mint);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.topbar .right {
  margin-left: auto;
  color: var(--dim);
  font-size: 11.5px;
}
.main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.statusbar {
  display: flex;
  align-items: center;
  gap: 0;
  flex: none;
  height: 26px;
  background: var(--pane);
  border-top: 1px solid var(--line);
  font: 11.5px var(--mono);
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
}
.statusbar > span {
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--line);
}
.statusbar .mode {
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
  border-right: 0;
}
.statusbar .sb-live {
  color: var(--mint);
}
.statusbar .sb-live.off {
  color: var(--red);
}
.statusbar .user {
  color: var(--text);
}
.statusbar .warn {
  color: var(--amber);
}
.statusbar .ver {
  margin-left: auto;
  border-right: 0;
  border-left: 1px solid var(--line);
}

/* pages */
.page {
  padding: 22px 24px 40px;
}
.page-narrow {
  max-width: 920px;
}
.page h2 {
  font-size: 15px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page h2::before {
  content: '$';
  color: var(--mint);
}
.lede {
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 13px;
  max-width: 64ch;
}

/* panes */
.pane,
.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--pane);
  margin-bottom: 16px;
}
.card {
  padding: 14px;
  margin-bottom: 10px;
}
.card.row {
  flex-wrap: nowrap;
}
.pane-h {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent);
  font: 600 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  border-radius: var(--r) var(--r) 0 0;
}
.pane-h::before,
.dialog > h2::before {
  content: '';
  width: 7px;
  height: 7px;
  margin: 3px 2px 0 0;
  border-top: 1.5px solid var(--mint);
  border-left: 1.5px solid var(--mint);
}
.pane-h .right {
  margin-left: auto;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.pane-b {
  padding: 14px;
}
.pane-b.flush {
  padding: 0;
}
.pane .card {
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
}

/* controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: 500 12.5px var(--mono);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, color 0.12s;
}
.btn:hover {
  background: var(--raised);
  border-color: #3a424b;
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
}
.btn.primary:hover {
  background: #7af5c8;
  box-shadow: 0 0 18px -2px rgba(90, 240, 184, 0.5);
}
.btn.ret::after {
  content: '↵';
  opacity: 0.6;
  font-weight: 400;
}
.btn.danger {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.45);
}
.btn.danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}
.btn.ghost {
  border-color: transparent;
  color: var(--dim);
}
.btn.ghost.danger {
  color: var(--red);
}
.btn.sm {
  height: 26px;
  padding: 0 9px;
  font-size: 11.5px;
}
.btn.big {
  height: 42px;
  font-size: 13.5px;
}
.btn.block {
  width: 100%;
}
.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: none;
  color: var(--dim);
  font: 15px var(--mono);
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:hover {
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
}

.field {
  display: block;
  margin-bottom: 14px;
}
.field > span:first-child {
  display: block;
  margin-bottom: 6px;
  font: 11px var(--mono);
  color: var(--dim);
  letter-spacing: 0.04em;
}
.prompt {
  display: flex;
  align-items: center;
  min-height: 36px;
  background: #090b0d;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.prompt::before {
  content: '›';
  padding-left: 11px;
  color: var(--mint);
  font: 700 15px var(--mono);
  line-height: 1;
}
.prompt:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(90, 240, 184, 0.13), 0 0 18px -6px var(--mint);
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  font: 13px var(--mono);
  color: var(--text);
  background: #090b0d;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 8px 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input::placeholder,
textarea::placeholder {
  color: #566069;
}
input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(90, 240, 184, 0.13);
}
.prompt input {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 8px 10px 8px 8px;
}
.prompt input:focus {
  box-shadow: none;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
input[type='checkbox'],
input[type='radio'] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 16px;
  height: 16px;
  padding: 0;
  margin: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  cursor: pointer;
}
input[type='radio'] {
  border-radius: 50%;
}
input[type='checkbox']:checked,
input[type='radio']:checked {
  background: var(--mint);
  border-color: var(--mint);
}
input[type='checkbox']:checked::after {
  content: '✓';
  color: var(--mint-ink);
  font: 700 11px/1 var(--mono);
}
input[type='radio']:checked::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint-ink);
}
input:disabled {
  opacity: 0.55;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.error {
  color: var(--red);
  font: 12.5px var(--mono);
  margin: 6px 0;
}
.error:empty {
  display: none;
}
.error:not(:empty)::before {
  content: '! ';
}
.switch,
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: 12.5px var(--mono);
}
.choice {
  align-items: flex-start;
  padding: 8px 0;
}
.choice > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.choice .small {
  font: 400 12.5px var(--sans);
  color: var(--dim);
}
.choice input {
  margin-top: 2px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: #aab2bc;
  font: 500 11px var(--mono);
  white-space: nowrap;
}
.pill.agent {
  color: var(--mint);
  border-color: var(--mint-line);
  background: var(--mint-soft);
}
.pill.ok {
  color: var(--mint);
  border-color: var(--mint-line);
}
.pill.warn {
  color: var(--amber);
  border-color: rgba(255, 184, 92, 0.4);
  background: var(--amber-soft);
}
.pill.bad {
  color: var(--red);
  border-color: rgba(255, 107, 107, 0.4);
  background: var(--red-soft);
}
button.pill {
  cursor: pointer;
  background: transparent;
}
button.pill:hover {
  border-color: var(--mint);
}

.avatar {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid;
  font: 700 14px var(--mono);
}
.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.appicon {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--mint-line);
  background: var(--mint-soft);
  color: var(--mint);
  font: 700 12px var(--mono);
  letter-spacing: -0.02em;
}

/* status */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 12px var(--mono);
  color: var(--dim);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--dim);
  flex: none;
}
.dot.on {
  background: var(--mint);
  border-color: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2.4s ease-in-out infinite;
}
.dot.new {
  border-style: dashed;
}
.status.on {
  color: var(--mint);
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 2px var(--mint);
  }
}

/* empty */
.empty {
  padding: 26px 16px;
  font: 13px var(--mono);
  color: var(--dim);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  text-align: left;
}
.empty p {
  margin: 0 0 6px;
}
.empty .pr {
  color: var(--mint);
  margin-right: 8px;
}
.empty .small {
  font: 400 12.5px var(--sans);
}

/* ---------- chats ---------- */
.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none !important;
  position: relative;
}
.chat-item:last-child {
  border-bottom: 0;
}
.chat-item:hover {
  background: var(--raised);
}
.chat-item .info {
  flex: 1;
  min-width: 0;
}
.chat-item .title {
  font: 600 13px var(--mono);
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-item .preview {
  color: var(--dim);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-item.unread .title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.chat-item .tm {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font: 11px var(--mono);
  color: var(--dim);
}

.chatpane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.header h1 {
  flex: 1;
  font-size: 13.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.members {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.banner {
  padding: 8px 14px;
  background: var(--amber-soft);
  color: var(--amber);
  font: 12.5px var(--mono);
  border-bottom: 1px solid rgba(255, 184, 92, 0.25);
}
.banner::before {
  content: '! ';
}
.thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 22px 22px;
}
.thread .empty {
  margin: auto;
}
.msg {
  display: flex;
  gap: 8px;
  max-width: min(78%, 640px);
  align-items: flex-start;
}
.msg.mine {
  align-self: flex-end;
}
.bubble {
  padding: 8px 12px 6px;
  border-radius: 4px 10px 10px 10px;
  background: var(--raised);
  border: 1px solid var(--line-2);
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 0;
}
.msg.mine .bubble {
  background: rgba(90, 240, 184, 0.09);
  border-color: var(--mint-line);
  border-radius: 10px 4px 10px 10px;
}
.msg.agent .bubble {
  border-left: 2px solid var(--mint);
}
.who {
  font: 600 11px var(--mono);
  color: var(--mint);
  margin-bottom: 2px;
}
.msg.mine .who {
  color: var(--dim);
}
.who .muted {
  font-weight: 400;
}
.meta {
  font: 10.5px var(--mono);
  color: var(--dim);
  text-align: right;
  margin-top: 2px;
}
.mention {
  color: var(--mint);
  font-weight: 500;
}
.sys {
  align-self: center;
  font: 11.5px var(--mono);
  color: var(--dim);
  padding: 2px 10px;
}
.sys::before {
  content: '-- ';
}
.sys::after {
  content: ' --';
}
.deliveries {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  white-space: normal;
}
.attachment {
  display: block;
  margin-top: 6px;
  font: 12px var(--mono);
}
.attachment img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  display: block;
}

.composer {
  position: relative;
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--pane);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px) * 0);
}
.composer .opts {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.composer .opts input {
  max-width: 260px;
  height: 28px;
  padding: 4px 8px;
}
.composer .files {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.composer .files:not(:empty) {
  margin-bottom: 8px;
}
.composer .bar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: #090b0d;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 4px 4px 4px 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.composer .bar:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(90, 240, 184, 0.13);
}
.composer .bar::before {
  content: '›';
  align-self: flex-start;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--mint);
  font: 700 16px/1 var(--mono);
}
.composer textarea {
  flex: 1;
  border: 0;
  background: none;
  box-shadow: none !important;
  resize: none;
  padding: 7px 4px;
  font: 14px/1.5 var(--sans);
  max-height: 140px;
}
.composer .bar .btn.send {
  width: 32px;
  padding: 0;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  overflow: hidden;
}
.seg button {
  height: 26px;
  padding: 0 12px;
  background: none;
  border: 0;
  color: var(--dim);
  font: 500 11.5px var(--mono);
  cursor: pointer;
}
.seg button.on {
  background: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
}
.suggest {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(100% - 4px);
  background: var(--raised);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 16px 40px -10px #000;
  overflow: hidden;
  z-index: 5;
}
.suggest button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: none;
  border: 0;
  color: var(--text);
  font: 13px var(--mono);
  cursor: pointer;
  text-align: left;
}
.suggest button:hover {
  background: var(--mint-soft);
}

/* ---------- approvals / agents ---------- */
.approval {
  border-left: 2px solid var(--amber);
}
.approval textarea.body {
  font: 14px/1.5 var(--sans);
}
.agent-card {
  padding: 0;
  overflow: hidden;
}
.agent-card .top {
  padding: 14px;
}
.agent-card .actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  flex-wrap: wrap;
}
.agent-card .actions .btn {
  flex: 1;
}
.agent-card .actions .btn.danger {
  flex: 0 0 auto;
}
details {
  border-top: 1px solid var(--line);
  padding: 0 14px;
}
summary {
  cursor: pointer;
  padding: 10px 0;
  font: 12px var(--mono);
  color: var(--dim);
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: '▸ ';
  color: var(--mint);
}
details[open] > summary::before {
  content: '▾ ';
}
details[open] {
  padding-bottom: 12px;
}

/* ---------- tables ---------- */
.ctable {
  width: 100%;
  border-collapse: collapse;
  font: 12.5px var(--mono);
}
.ctable th {
  text-align: left;
  font: 600 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ctable td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.ctable tr:last-child td {
  border-bottom: 0;
}
.ctable tbody tr:hover {
  background: var(--raised);
}
.ctable td.act {
  text-align: right;
  white-space: nowrap;
}
.ctable td.act .btn + .btn {
  margin-left: 6px;
}
.ctable .id {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ctable .id.me::after {
  content: ' (you)';
  color: var(--dim);
  font-weight: 400;
}
.ctable td.wrap {
  white-space: normal;
}
.ctable .dimtd {
  color: var(--dim);
}

.subnav {
  display: flex;
  gap: 0;
  margin: 14px 0 16px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  font: 13px var(--mono);
}
.subnav a {
  padding: 8px 14px;
  color: var(--dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none !important;
  white-space: nowrap;
}
.subnav a:hover {
  color: var(--text);
}
.subnav a.on {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--pane);
}
.stat b {
  display: block;
  font: 600 28px/1.1 var(--mono);
  color: var(--mint);
}
.stat span {
  font: 11px var(--mono);
  color: var(--dim);
}

/* log tail */
.feed {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  font: 12.5px/1.7 var(--mono);
  max-height: 420px;
  overflow: auto;
}
.feed li {
  display: flex;
  gap: 12px;
  padding: 0 14px;
}
.feed li:hover {
  background: var(--raised);
}
.feed time {
  color: #566069;
  flex: none;
  min-width: 8ch;
}
.feed .actor {
  color: var(--mint);
  flex: none;
  min-width: 11ch;
  max-width: 16ch;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed .act {
  min-width: 0;
  overflow-wrap: anywhere;
}
.feed .act.ok {
  color: #9fe9cc;
}
.feed .act.warn {
  color: var(--amber);
}
.feed .act.bad {
  color: var(--red);
}
.feed .none {
  color: var(--dim);
  padding: 8px 14px;
}

/* ---------- dialog / terminal ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(3, 4, 5, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade 0.15s both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.dialog {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--pane);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 30px 80px -20px #000, 0 0 60px -30px var(--mint);
  animation: rise 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.dialog > h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font: 600 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.dialog > h2 .esc {
  margin-left: auto;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--dim);
  font: 10.5px var(--mono);
  padding: 1px 6px;
  cursor: pointer;
}
.dialog-b {
  padding: 16px;
}
.dialog h3 {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 16px 0 4px;
}
.dialog p {
  margin: 0 0 10px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--raised);
  color: var(--text);
  font: 500 12px var(--mono);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.tile:hover,
.tile.on {
  border-color: var(--mint);
  box-shadow: 0 0 20px -8px var(--mint);
}
.tile .e {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--mint-line);
  background: var(--mint-soft);
  color: var(--mint);
  font: 700 13px var(--mono);
}
.steps {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  font: 11px var(--mono);
  color: var(--dim);
}
.steps i {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
}
.steps i.on {
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.steps span {
  margin-left: 6px;
}
.term {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: #060708;
  overflow: hidden;
  margin: 12px 0 10px;
}
.term-h {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  font: 11px var(--mono);
  color: var(--dim);
}
.term-h i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #262c33;
}
.term-h span {
  margin-left: 6px;
}
.cmd {
  padding: 12px 14px 12px 30px;
  position: relative;
  font: 13px/1.6 var(--mono);
  color: #d5fbec;
  word-break: break-all;
  user-select: all;
  min-height: 48px;
}
.cmd::before {
  content: '$';
  position: absolute;
  left: 14px;
  color: var(--mint);
}
.cmd.plain {
  padding-left: 14px;
}
.cmd.plain::before {
  content: none;
}
.live {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12.5px var(--mono);
  color: var(--amber);
  margin-top: 12px;
}
.live .dot {
  border-color: var(--amber);
  background: var(--amber);
  animation: pulse 1.4s ease-in-out infinite;
}
.live.done {
  color: var(--mint);
}
.live.done .dot {
  border-color: var(--mint);
  background: var(--mint);
  animation: none;
}
.bigcode,
.code {
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px dashed var(--mint-line);
  border-radius: var(--r);
  background: var(--mint-soft);
  color: var(--mint);
  font: 600 18px var(--mono);
  letter-spacing: 0.04em;
  word-break: break-all;
  user-select: all;
}
.code {
  font-size: 14px;
}

.list-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 42px;
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px 10px 12px;
  background: var(--raised);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--mint);
  border-radius: 5px;
  font: 12.5px var(--mono);
  box-shadow: 0 16px 40px -10px #000;
  animation: rise 0.2s both;
}
.toast::before {
  content: '> ';
  color: var(--mint);
}

/* ================================================================
   PHONE
   ================================================================ */
@media (max-width: 760px) {
  .shell {
    display: flex;
    flex-direction: column;
  }
  .col {
    order: 1;
    flex: 1;
  }
  .side {
    order: 2;
    flex-direction: row;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .brand,
  .side-label,
  .side-foot {
    display: none;
  }
  .side-links {
    flex-direction: row;
    width: 100%;
    padding: 0;
    gap: 0;
  }
  .side a.nav {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 54px;
    padding: 0 2px;
    border-radius: 0;
    font-size: 11px;
  }
  .side a.nav .mk {
    display: none;
  }
  .side a.nav.on {
    background: linear-gradient(180deg, var(--mint-soft), transparent);
  }
  .side a.nav.on::before {
    left: 20%;
    right: 20%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .side a.nav .badge {
    position: absolute;
    top: 5px;
    right: calc(50% - 26px);
    margin: 0;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
  }
  .topbar {
    padding: 0 12px;
    height: 40px;
    font-size: 12px;
  }
  .topbar .right {
    display: none;
  }
  .statusbar .hide-sm {
    display: none;
  }
  .statusbar {
    height: 24px;
    font-size: 11px;
  }
  .page {
    padding: 16px 12px 28px;
  }
  .toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .composer textarea {
    font-size: 16px;
  }
  .msg {
    max-width: 92%;
  }
  .thread {
    padding: 12px;
  }
  .overlay {
    place-items: end center;
    padding: 0;
  }
  .dialog {
    width: 100%;
    max-height: 92dvh;
    border-radius: 12px 12px 0 0;
  }
  /* tables become stacked rows */
  .ctable thead {
    display: none;
  }
  .ctable,
  .ctable tbody,
  .ctable tr,
  .ctable td {
    display: block;
  }
  .ctable tr {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
  }
  .ctable tr:last-child {
    border-bottom: 0;
  }
  .ctable td {
    padding: 2px 0;
    border: 0;
    white-space: normal;
  }
  .ctable td[data-label]:not(.first)::before {
    content: attr(data-label) ' ';
    color: #566069;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 6px;
  }
  .ctable td.act {
    text-align: left;
    padding-top: 8px;
  }
  .feed li {
    flex-wrap: wrap;
    gap: 0 10px;
    padding: 4px 12px;
  }
  .feed .act {
    flex-basis: 100%;
    order: 3;
  }
  .glass .prompt input {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .orbit .rings {
    animation: none !important;
  }
  .cursor {
    animation: none;
  }
}

@media (max-width: 760px) {
  .subnav a {
    padding: 8px 10px;
  }
}

/* ================================================================
   BOARDROOM (rooms | room | people and agents)
   ================================================================ */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.main.flush {
  overflow: hidden;
}
.pres {
  display: inline-block;
  width: 1.1ch;
  flex: none;
  font: 13px/1 var(--mono);
  text-align: center;
  cursor: help;
}
.pres.listening {
  color: var(--mint);
  text-shadow: 0 0 8px rgba(90, 240, 184, 0.55);
}
.pres.on_demand {
  color: var(--dim);
}
.pres.offline {
  color: #4a535c;
}
.pres.none {
  cursor: default;
}
.boardroom {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 272px;
  overflow: hidden;
}
.rooms,
.nicks {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--pane);
}
.rooms {
  border-right: 1px solid var(--line);
}
.nicks {
  border-left: 1px solid var(--line);
}
.col-h {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  height: 40px;
  padding: 0 6px 0 14px;
  border-bottom: 1px solid var(--line);
  font: 600 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.col-b {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 0 12px;
}
.sec {
  margin-bottom: 8px;
}
.sec-h,
.sec-t {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 4px;
  font: 600 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.sec-t {
  padding-top: 14px;
  color: #aab2bc;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.sec-h i {
  font-style: normal;
  letter-spacing: 0;
  color: #566069;
}
.none {
  padding: 4px 14px;
  font: 12px var(--mono);
  color: #566069;
}
.room-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 14px;
  font: 13px var(--mono);
  color: #aab2bc;
  text-decoration: none;
  position: relative;
}
.room-item:hover {
  background: var(--raised);
  color: var(--text);
  text-decoration: none;
}
.room-item.on {
  background: var(--raised);
  color: var(--mint);
}
.room-item.on::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}
.room-item .rk {
  width: 1.1ch;
  flex: none;
  color: var(--dim);
  text-align: center;
}
.room-item .rn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-item.unread .rn {
  color: var(--text);
  font-weight: 700;
}
.room-item .ov {
  color: var(--dim);
}
.room-item .badge {
  height: 16px;
  min-width: 18px;
  font-size: 10.5px;
}
.invite {
  padding: 8px 14px;
  margin: 2px 8px;
  border: 1px solid rgba(255, 184, 92, 0.35);
  border-radius: var(--r);
  background: var(--amber-soft);
}
.invite .rn {
  font: 600 13px var(--mono);
  color: var(--amber);
  overflow-wrap: anywhere;
}
.invite .row {
  margin-top: 6px;
}
.welcome {
  padding: 24px;
  max-width: 680px;
}
.welcome-sm {
  display: none;
}
.empty-room {
  overflow-y: auto;
}

.room {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}
.room-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 40px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
}
.room-h .back,
.people-btn,
.drawer-x {
  display: none;
}
.room-t {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.room-t h1 {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 600 13.5px var(--mono);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-t .sub {
  font: 12px var(--mono);
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.people-btn {
  width: auto;
  padding: 0 10px;
  font-size: 12px;
  border-color: var(--line-2);
}
.scrim {
  display: none;
}

/* the IRC thread */
.thread.irc-thread {
  gap: 0;
  padding: 10px 0 14px;
  background: none;
  font-size: 14px;
}
.thread.irc-thread:focus-visible {
  outline-offset: -2px;
}
.irc {
  display: grid;
  grid-template-columns: 46px minmax(7ch, 18ch) minmax(0, 1fr);
  column-gap: 10px;
  align-items: baseline;
  padding: 2px 18px 2px 14px;
}
.irc:hover {
  background: rgba(255, 255, 255, 0.02);
}
.irc time {
  font: 11.5px var(--mono);
  color: #566069;
}
.irc .nick {
  font: 600 13px var(--mono);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nick.agent {
  color: var(--mint);
}
.nick.human {
  color: #d6dce2;
}
.nick.me {
  color: #8fb7ff;
}
.irc .tx {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.irc .dl {
  white-space: normal;
  font: 12px/1.6 var(--mono);
  color: var(--dim);
}
.irc .dl.warn {
  color: var(--amber);
}
.irc .dl.ok {
  color: rgba(90, 240, 184, 0.75);
}
.irc .dl.bad {
  color: var(--red);
}
.irc.sysl .nick,
.irc.sysl .tx {
  color: var(--dim);
  font-weight: 400;
  font-size: 12.5px;
  font-family: var(--mono);
}
.irc.sysl.local {
  grid-template-columns: 46px minmax(7ch, 18ch) minmax(0, 1fr);
}
.irc.sysl.local::before {
  content: '';
}
.irc.sysl.local .tx {
  white-space: pre-wrap;
}
.irc.sysl.err .tx {
  color: var(--red);
}
.irc.daysep {
  display: block;
  text-align: center;
  padding: 10px 14px 4px;
  font: 11px var(--mono);
  color: #566069;
}
.irc.daysep span::before,
.irc.daysep span::after {
  content: ' ── ';
  color: var(--line-2);
}
.irc .attachment {
  display: block;
}

/* composer as a prompt line */
.irc-composer .hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin-top: 6px;
  font: 11.5px var(--mono);
  color: #566069;
}
.irc-composer .slash {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--dim);
  font: inherit;
  cursor: pointer;
}
.irc-composer .slash:hover {
  color: var(--mint);
}
.irc-composer .tabhint {
  margin-left: auto;
}
.irc-composer .suggest button .pres {
  width: 1.4ch;
}

/* the nick list */
.nick-search {
  flex: none;
  padding: 8px 10px 4px;
}
.nick-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 28px;
  padding: 0 14px 0 8px;
  background: none;
  border: 0;
  border-radius: 0;
  color: #d6dce2;
  font: 13px var(--mono);
  text-align: left;
  cursor: pointer;
}
.nick-row.agent .nm {
  color: var(--mint);
}
.nick-row:hover:not(:disabled) {
  background: var(--raised);
}
.nick-row:disabled {
  cursor: default;
  opacity: 0.75;
}
.nick-row .mk {
  width: 1.1ch;
  flex: none;
  color: var(--amber);
  text-align: center;
}
.nick-row .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nick-row .own {
  margin-left: auto;
  padding-left: 6px;
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}
.nicks .more {
  display: block;
  padding: 4px 14px 4px 34px;
  background: none;
  border: 0;
  color: var(--dim);
  font: 12px var(--mono);
  cursor: pointer;
}
.nicks .more:hover {
  color: var(--mint);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  flex: none;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font: 11px var(--mono);
  color: var(--dim);
  cursor: help;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* quick switcher */
.qs {
  max-height: 46dvh;
  overflow-y: auto;
  margin: 10px 0 6px;
}
.qs button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  font: 13px var(--mono);
  text-align: left;
  cursor: pointer;
}
.qs button.on,
.qs button:hover {
  background: var(--mint-soft);
  color: var(--mint);
}
.qs .rk {
  width: 1.4ch;
  text-align: center;
  color: var(--dim);
}
.qs .rn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qs .kind {
  font-size: 11px;
  color: var(--dim);
}

/* narrower than a wide desktop: the nick list becomes a drawer */
@media (max-width: 1099px) {
  .boardroom {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .nicks {
    position: absolute;
    z-index: 30;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 88vw);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.18s ease, visibility 0s 0.18s;
    box-shadow: -20px 0 40px -20px #000;
  }
  .boardroom.drawer .nicks {
    visibility: visible;
    transform: none;
    transition: transform 0.18s ease;
  }
  .boardroom.drawer .scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
  }
  .people-btn,
  .drawer-x {
    display: inline-grid;
  }
  .rooms .people-btn {
    display: none;
  }
}
@media (max-width: 760px) {
  .boardroom {
    grid-template-columns: minmax(0, 1fr);
  }
  .boardroom.has-room .rooms,
  .boardroom:not(.has-room) .room {
    display: none;
  }
  .room-h .back {
    display: inline-grid;
  }
  .rooms .people-btn {
    display: inline-grid;
  }
  .room-h {
    padding-left: 4px;
  }
  .room-t {
    flex-direction: column;
    gap: 0;
  }
  .room-t .sub {
    font-size: 11px;
  }
  .room-item {
    min-height: 44px;
    font-size: 14px;
  }
  .welcome-sm {
    display: block;
  }
  .welcome {
    padding: 14px 12px;
  }
  .nick-row {
    min-height: 44px;
  }
  .col-h .icon-btn {
    width: 40px;
    height: 40px;
  }
  .irc {
    display: block;
    padding: 3px 12px;
  }
  .irc time,
  .irc .nick {
    display: inline;
    margin-right: 8px;
  }
  .irc .tx {
    display: inline;
  }
  .irc .dl {
    display: block;
  }
  .irc.sysl.local .tx {
    white-space: pre-wrap;
  }
  .irc-composer .slash:nth-child(-n + 4) {
    display: none;
  }
  .irc-composer .tabhint {
    display: none;
  }
  .irc-composer .hint {
    margin-top: 2px;
  }
}

/* ================================================================
   FLEET
   ================================================================ */
.page.wide {
  max-width: none;
}
.fleet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.fleet.has-detail {
  grid-template-columns: minmax(0, 1fr) 400px;
}
.fleet-main {
  min-width: 0;
}
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.toolbar .grow {
  flex: 1;
  min-width: 0;
}
.toolbar select {
  width: auto;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.chip {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: none;
  color: #aab2bc;
  font: 12px var(--mono);
  cursor: pointer;
}
.chip:hover {
  color: var(--text);
  border-color: #3b444e;
}
.chip i {
  margin-left: 7px;
  font-style: normal;
  color: var(--dim);
}
.chip.on {
  color: var(--mint);
  border-color: var(--mint-line);
  background: var(--mint-soft);
}
.chip.on i {
  color: var(--mint);
}
.bulk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--mint-line);
  border-radius: var(--r);
  background: var(--mint-soft);
  font: 12.5px var(--mono);
}
.bulk b {
  margin-right: 6px;
  color: var(--mint);
}
.amber {
  color: var(--amber);
}
.fleet-t th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--pane);
}
.fleet-t th.ck,
.fleet-t td.ck {
  width: 34px;
  padding-right: 0;
}
.fleet-t td.gl,
.fleet-t th.gl {
  width: 22px;
  padding-left: 6px;
  padding-right: 0;
}
.fleet-t tbody tr {
  cursor: pointer;
}
.fleet-t td {
  white-space: nowrap;
}
.fleet-t td.nm {
  white-space: normal;
}
.fleet-t td.ck input {
  display: block;
}
.fleet-t tbody tr.on {
  background: var(--raised);
  box-shadow: inset 2px 0 0 var(--mint);
}
.fleet-t tr.arch .id {
  color: var(--dim);
  font-weight: 400;
}
.fleet-t .id {
  text-decoration: none;
}
.fleet-t .id:hover {
  color: var(--mint);
}
.fleet-t td.st {
  text-align: right;
  white-space: nowrap;
}
.fleet-t td.st .pill + .pill {
  margin-left: 4px;
}
.fleet-t .meta {
  display: none;
}
.fleet-t td.nm {
  width: 99%;
}
.has-detail .fleet-t td:nth-child(n + 4):nth-child(-n + 7),
.has-detail .fleet-t th:nth-child(n + 4):nth-child(-n + 7) {
  display: none;
}
.has-detail .fleet-t .meta {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--dim);
  font-weight: 400;
}

.fleet-detail {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100dvh - 44px - 26px - 44px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--pane);
  padding-bottom: 8px;
}
.dhead {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid var(--line);
}
.dhead .icon-btn:first-child {
  display: none;
}
.dname {
  font: 600 14px var(--mono);
  overflow-wrap: anywhere;
}
.dsub {
  padding: 10px 14px 0;
  font: 12px var(--mono);
  color: var(--dim);
}
.dpres {
  display: flex;
  gap: 10px;
  margin: 8px 14px 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #090b0d;
  font-size: 13px;
  line-height: 1.5;
}
.dpres .pres {
  margin-top: 3px;
}
.dactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
}
.fleet-detail .pad {
  display: flex;
  margin: 0 14px 6px;
}
.dsec {
  padding: 4px 14px 6px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.dsec h3 {
  margin: 10px 0 8px;
  font: 600 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.dsec .feed li {
  padding-left: 0;
  padding-right: 0;
}
.kv {
  display: flex;
  gap: 12px;
  padding: 3px 0;
  font-size: 12.5px;
}
.kv span:first-child {
  flex: none;
  width: 76px;
  color: var(--dim);
  font-family: var(--mono);
}
.kv span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.access {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  flex-wrap: wrap;
}
.access select {
  width: auto;
  max-width: 100%;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 12px;
}

@media (max-width: 1099px) {
  .fleet.has-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .fleet.has-detail .fleet-main {
    display: none;
  }
  .fleet-detail {
    position: static;
    max-height: none;
  }
  .dhead .icon-btn:first-child {
    display: inline-grid;
  }
  .dhead .closer {
    display: none;
  }
  .has-detail .fleet-t td:nth-child(n + 4):nth-child(-n + 7) {
    display: table-cell;
  }
}
@media (max-width: 760px) {
  .toolbar select {
    max-width: 44%;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -12px;
    padding-bottom: 4px;
  }
  .chip {
    flex: none;
    min-height: 36px;
  }
  .fleet-t thead {
    display: none;
  }
  .fleet-t tbody tr {
    display: grid;
    grid-template-columns: 34px 18px minmax(0, 1fr) auto;
    align-items: center;
    padding: 4px 8px 4px 0;
    min-height: 52px;
  }
  .fleet-t tbody td {
    display: block;
    padding: 0;
  }
  .fleet-t tbody td.ck {
    width: auto;
    padding: 0 0 0 12px;
  }
  .fleet-t tbody td.gl {
    width: auto;
    padding: 0;
  }
  .fleet-t tbody td.nm {
    width: auto;
    padding-left: 6px;
  }
  .fleet-t tbody td:nth-child(n + 4):nth-child(-n + 7),
  .has-detail .fleet-t tbody td:nth-child(n + 4):nth-child(-n + 7) {
    display: none;
  }
  .fleet-t .meta {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    color: var(--dim);
    font-weight: 400;
  }
  .fleet-t tbody td.ck input {
    width: 20px;
    height: 20px;
  }
  .fleet-detail {
    border-left: 0;
    border-right: 0;
    margin: 0 -12px;
    border-radius: 0;
  }
}

.fleet-t .meta {
  text-align: left;
}
.access {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
}
.access .arow {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding-left: 36px;
}
.access .arow select {
  flex: 1;
}

.col-h .people-btn {
  width: auto;
  height: 28px;
  margin: 0 4px;
}
.room-t {
  flex: 1 1 0;
}
.room-t h1 {
  flex: 0 1 auto;
  min-width: 4ch;
}
.room-t .sub {
  flex: 1 1 0;
  min-width: 0;
}
.room-h .spacer {
  flex: 0;
}
