:root {
  color-scheme: dark;
  --bg: #030304;
  --panel: #101114;
  --panel-2: #15171b;
  --line: #2a2d34;
  --text: #f4f5f7;
  --muted: #7b808a;
  --blue: #0887e7;
}

* { box-sizing: border-box; }
html {
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: radial-gradient(circle at 82% 0%, rgba(8,135,231,.18), transparent 25%), #000;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
button, input { font: inherit; }
.hidden { display: none !important; }
.login {
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(920px, 100%);
  text-align: center;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 68px;
}
.core-mark {
  width: clamp(96px, 14vw, 168px);
  height: auto;
  display: block;
  object-fit: contain;
}
.brand h1 {
  font-size: clamp(64px, 11vw, 132px);
  letter-spacing: .16em;
  margin: 0;
}
.login input {
  display: block;
  width: min(760px, 100%);
  margin: 0 auto 28px;
  padding: 30px 40px;
  background: #050506;
  border: 2px solid #272a30;
  border-radius: 18px;
  color: var(--text);
  font-size: 32px;
}
.change-card {
  width: min(760px, 100%);
  margin: 24px auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16,17,20,.92);
  text-align: left;
}
.change-card h2 { margin: 0 0 8px; }
.change-card p { color: var(--muted); }
.change-card input {
  width: 100%;
  margin-bottom: 16px;
  font-size: 22px;
  padding: 18px 20px;
}
.login button, .chat button {
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: 14px;
  padding: 16px 22px;
  cursor: pointer;
}
.tagline {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  color: #626670;
  letter-spacing: .45em;
}
.app {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
}
.rail {
  background: #0c0d0f;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  min-height: 0;
  overflow: auto;
}
.rail-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
}
.rail nav {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}
.rail button {
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
}
.rail .active, .rail button:hover { color: white; }
.logout { margin-top: auto; }
.workspace {
  display: grid;
  grid-template-rows: 82px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.topbar {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  padding: 0 24px;
  min-width: 0;
  gap: clamp(10px, 1.8vw, 24px);
}
.presence-panel {
  align-self: center;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 7px;
  min-width: 86px;
  padding-left: 16px;
}
.presence-user {
  align-items: center;
  color: #dfe3e8;
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: 9px auto;
  line-height: 1;
}
.presence-dot {
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  height: 9px;
  width: 9px;
}
.presence-dot.offline { background: #e34c55; box-shadow: 0 0 8px rgba(227,76,85,.35); }
.presence-dot.inactive { background: #f29f32; box-shadow: 0 0 8px rgba(242,159,50,.38); }
.presence-dot.active { background: #2bd47d; box-shadow: 0 0 9px rgba(43,212,125,.5); }
.mini-brand {
  font-weight: 900;
  letter-spacing: clamp(.08em, .45vw, .24em);
  color: #dfe3e8;
  font-size: clamp(11px, 1.08vw, 18px);
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  text-wrap: balance;
}
.tabs {
  display: flex;
  gap: clamp(6px, .8vw, 12px);
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  justify-self: end;
}
.tabs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 12px clamp(7px, .8vw, 12px);
  white-space: nowrap;
  font-size: clamp(13px, .95vw, 16px);
}
.tabs .active {
  color: white;
  border-bottom: 2px solid white;
}
.desktop {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 18px;
  padding: 18px;
}
.mia-panel, .work-panel {
  background: rgba(16,17,20,.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.custom-scroll-host {
  position: relative;
}
.mia-panel {
  padding: clamp(8px, 1.1vw, 16px);
}
.work-panel {
  padding: 22px;
}
.chat,
.panel-header { flex: 0 0 auto; }
.settings-note {
  color: #a4a9b3;
  line-height: 1.45;
}
.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #ecf4ff;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.voice-settings {
  display: grid;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.toggle-row input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #6fb5ff;
}
.messages {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 0 0;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(126, 132, 143, .62) rgba(8, 9, 11, .55);
  scrollbar-width: thin;
}
.custom-scroll-target {
  scrollbar-width: none;
}
.custom-scroll-target::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.custom-scrollbar {
  position: absolute;
  top: 12px;
  right: 8px;
  bottom: 12px;
  width: 6px;
  z-index: 30;
  border-radius: 999px;
  background: rgba(85, 91, 102, .24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
  opacity: 1;
  pointer-events: auto;
  transition: background .16s ease, opacity .16s ease;
}
.custom-scrollbar.disabled {
  opacity: 0;
  pointer-events: none;
}
.custom-scrollbar-thumb {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 0;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(150, 157, 170, .62);
  box-shadow: 0 0 10px rgba(8,135,231,.08);
  cursor: grab;
  transition: background .16s ease, box-shadow .16s ease;
  touch-action: none;
}
.custom-scrollbar:hover,
.custom-scrollbar:active {
  background: rgba(98, 106, 120, .34);
}
.custom-scrollbar-thumb:hover,
.custom-scrollbar-thumb.dragging {
  background: rgba(202, 210, 224, .86);
  box-shadow: 0 0 12px rgba(8,135,231,.16);
}
.custom-scrollbar-thumb.dragging {
  cursor: grabbing;
}
.mia-panel > .custom-scrollbar {
  top: clamp(8px, 1.1vw, 16px);
  bottom: 82px;
}
.work-panel > .custom-scrollbar {
  top: 22px;
  right: 10px;
  bottom: 22px;
}
.week-calendar > .custom-scrollbar,
.today-pane > .custom-scrollbar {
  right: 6px;
}
.messages::-webkit-scrollbar,
.work-panel > section::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.messages::-webkit-scrollbar-track,
.work-panel > section::-webkit-scrollbar-track {
  background: rgba(8, 9, 11, .55);
  border-radius: 999px;
}
.messages::-webkit-scrollbar-thumb,
.work-panel > section::-webkit-scrollbar-thumb {
  background: rgba(126, 132, 143, .58);
  border-radius: 999px;
}
.messages::-webkit-scrollbar-thumb:hover,
.work-panel > section::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 174, 186, .72);
}
.messages::-webkit-scrollbar-thumb:active,
.work-panel > section::-webkit-scrollbar-thumb:active {
  background: rgba(208, 214, 224, .86);
}
.message-bubble {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--panel-2);
  line-height: 1.58;
  margin: 0;
  white-space: normal;
}
.message-attachments {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.message-attachment {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 10, 12, .42);
}
.message-attachment figcaption {
  color: #dfe7f3;
  font-size: 13px;
  margin-bottom: 8px;
}
.message-attachment img {
  display: block;
  max-width: 100%;
  border-radius: 10px;
}
.message-attachment a {
  display: inline-block;
  color: #7cc8ff;
}
.chat-empty {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  margin: auto;
  max-width: 420px;
  opacity: .78;
  text-align: center;
}
.messages .mia {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}
.messages .message-content > * {
  margin: 0 0 10px;
}
.messages .message-content > *:last-child {
  margin-bottom: 0;
}
.messages h1,
.messages h2,
.messages h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  color: #fff;
}
.messages ul,
.messages ol {
  padding-left: 1.35rem;
}
.messages li {
  margin: 0 0 6px;
}
.messages a {
  color: #7cc8ff;
}
.messages code {
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 5px;
}
.messages pre {
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  padding: 12px;
}
.messages pre code {
  border: 0;
  padding: 0;
  background: transparent;
}
.messages .you {
  align-self: flex-end;
  background: rgba(8,135,231,.28);
  width: fit-content;
  max-width: min(92%, 980px);
}
.chat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto auto;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}
.chat input {
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  padding: 16px;
}
#chatAttachments {
  padding: 12px;
  color: var(--muted);
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 14px;
}
#chatAttachmentList {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}
.work-panel h3 {
  color: var(--muted);
  margin: 0 0 10px;
  letter-spacing: .12em;
  font-size: 13px;
}
.work-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-panel li {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.task-list {
  display: grid;
  gap: 6px;
}
.task-view-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
}
.task-view-tabs button {
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 7px 12px;
  white-space: nowrap;
}
.task-view-tabs button.active,
.task-view-tabs button[aria-selected="true"] {
  background: rgba(8,135,231,.22);
  border-color: rgba(8,135,231,.72);
  color: white;
}
.task-view-tabs button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 0 !important;
}
.task-actions {
  display: flex;
  gap: 6px;
}
.task-actions:empty {
  display: none;
}
.task-actions button {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 8px;
}
.task-actions button:hover {
  border-color: var(--blue);
  color: white;
}
.task-row-child .task-main {
  padding-left: 18px;
  position: relative;
}
.task-row-child .task-main::before {
  content: "↳";
  color: var(--muted);
  left: 0;
  position: absolute;
}
.task-main {
  min-width: 0;
}
.task-title-line {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.task-name {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-number {
  border: 1px solid rgba(8,135,231,.45);
  border-radius: 999px;
  color: #9bd0ff;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
  padding: 3px 7px;
}
.task-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.source-badge {
  justify-self: end;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: white !important;
  font-size: 10px;
  font-weight: 900 !important;
  letter-spacing: .05em;
  margin-right: 0 !important;
  max-width: 132px;
  overflow: hidden;
  padding: 5px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-empty {
  color: var(--muted);
  font-size: 13px;
}
.health-group {
  border-top: 1px solid var(--line);
  padding: 18px 0 8px !important;
}
.health-group:first-child {
  border-top: 0;
  padding-top: 6px !important;
}
.health-group h4 {
  color: var(--text);
  font-size: 13px;
  letter-spacing: .12em;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.health-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 12px minmax(0, 1fr);
  padding: 10px 2px;
}
.health-row strong,
.health-row span {
  display: block;
}
.health-row strong {
  color: var(--text);
  font-size: 14px;
}
.health-row div > span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.health-dot {
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}
.health-dot-healthy {
  background: #22c875;
  box-shadow: 0 0 12px rgba(34,200,117,.45);
}
.health-dot-warning {
  background: #f5a524;
  box-shadow: 0 0 12px rgba(245,165,36,.35);
}
.health-dot-critical {
  background: #ef4d5a;
  box-shadow: 0 0 12px rgba(239,77,90,.4);
}
.inbox-empty {
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 16px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 22px;
}
.inbox-empty p {
  color: var(--text);
  font-weight: 800;
  margin: 0;
}
.inbox-empty span {
  line-height: 1.45;
}
.inbox-list { display: grid; gap: 10px; padding-bottom: 4px; }
.inbox-item {
  align-items: start; background: linear-gradient(135deg, rgba(24, 42, 34, .88), rgba(13, 17, 20, .96));
  border: 1px solid rgba(53, 220, 131, .28); border-radius: 14px; display: grid;
  gap: 14px; grid-template-columns: minmax(0, 1fr) auto; padding: 14px 15px; position: relative;
}
.inbox-item.inbox-security { border-color: rgba(239, 77, 90, .72); background: linear-gradient(135deg, rgba(78, 25, 32, .9), rgba(13, 17, 20, .96)); }
.inbox-item.inbox-server { border-color: rgba(242, 189, 84, .78); background: linear-gradient(135deg, rgba(82, 57, 20, .9), rgba(13, 17, 20, .96)); }
.inbox-item.inbox-research { border-color: rgba(78, 164, 255, .78); background: linear-gradient(135deg, rgba(24, 54, 91, .9), rgba(13, 17, 20, .96)); }
.inbox-item-content { display: grid; gap: 5px; min-width: 0; }
.inbox-item-content strong { color: var(--text); overflow-wrap: anywhere; }
.work-panel .inbox-item-content span { color: var(--muted); font-size: 12px; font-weight: 600; margin: 0; }
.inbox-item-body { color: var(--text); font-size: 12px; line-height: 1.45; margin: 4px 0 0; }
.inbox-decision-actions { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 8px; grid-column: 2; justify-content: flex-end; margin-top: 0; }
.inbox-decision-button { border: 1px solid; border-radius: 999px; color: #fff; cursor: pointer; font-size: 11px; font-weight: 900; letter-spacing: .06em; padding: 8px 13px; }
.inbox-decision-button.approve { background: #16864c; border-color: #45df8b; }
.inbox-decision-button.rework { background: #a96a13; border-color: #f3bd52; }
.inbox-decision-button.deny { background: #a8323e; border-color: #f17883; }
.inbox-decision-button.flag { background: #b16d15; border-color: #f2bd54; }
.inbox-decision-button:hover { filter: brightness(1.15); }
.inbox-decision-button:disabled { cursor: wait; opacity: .58; }
.inbox-decision-editor { background: rgba(13, 17, 20, .98); border: 1px solid rgba(242, 189, 84, .55); border-radius: 10px; display: grid; gap: 7px; margin-top: 42px; padding: 10px; position: absolute; right: 15px; top: 0; width: min(360px, calc(100vw - 70px)); z-index: 4; }
.inbox-decision-editor textarea { background: rgba(5, 10, 8, .8); border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: var(--text); font: inherit; padding: 9px; resize: vertical; }
.inbox-decision-cancel { background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; padding: 8px 13px; width: max-content; }
.inbox-read-button {
  background: #1d9d5b; border: 1px solid #45df8b; border-radius: 999px; color: #fff;
  cursor: pointer; font-size: 11px; font-weight: 900; letter-spacing: .08em; padding: 8px 13px;
}
.inbox-read-button:hover { background: #28b96d; }
.inbox-read-button:disabled { cursor: wait; opacity: .58; }
#desktopContext { overflow-y: scroll; scrollbar-gutter: stable; }
.calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  height: 100%;
  min-height: 0;
}
.calendar-main,
.today-pane {
  min-width: 0;
  min-height: 0;
}
.calendar-toolbar {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.calendar-toolbar h3 {
  margin-left: 8px;
}
.calendar-toolbar button {
  background: #090a0c;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
}
.calendar-empty {
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 16px;
  color: var(--muted);
  line-height: 1.45;
  padding: 22px;
}
.week-calendar {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100% - 44px);
  min-height: 0;
  overflow: hidden;
}
.week-header,
.week-body {
  display: grid;
  grid-template-columns: 56px repeat(7, minmax(96px, 1fr));
}
.week-header {
  background: #0b0c0f;
  border-bottom: 1px solid var(--line);
}
.week-body {
  overflow: auto;
  scrollbar-color: rgba(126, 132, 143, .62) rgba(8, 9, 11, .55);
  scrollbar-width: thin;
}
.week-body::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
.week-body::-webkit-scrollbar-track {
  background: rgba(8, 9, 11, .55);
}
.week-body::-webkit-scrollbar-thumb {
  background: rgba(126, 132, 143, .58);
  border-radius: 999px;
}
.calendar-day-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 10px 8px;
  text-align: center;
}
.calendar-day-label.today {
  color: white;
  background: rgba(8,135,231,.15);
}
.calendar-time-label {
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 6px;
  text-align: right;
}
.calendar-all-day-cell,
.calendar-hour-cell {
  border-right: 1px solid rgba(42,45,52,.8);
  border-top: 1px solid rgba(42,45,52,.8);
  min-height: 64px;
  padding: 3px;
  position: relative;
}
.calendar-all-day-cell {
  min-height: 42px;
}
.calendar-hour-cell.today,
.calendar-all-day-cell.today {
  background: rgba(8,135,231,.045);
}
.calendar-event {
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,.28);
  display: grid;
  font-size: 11px;
  gap: 2px;
  line-height: 1.2;
  overflow: hidden;
  padding: 5px 6px;
  position: absolute;
  z-index: 2;
}
.calendar-event strong,
.calendar-event span,
.calendar-event small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.all-day-event {
  margin-bottom: 3px;
  position: static;
}
.today-pane {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-left: 16px;
}
.today-agenda {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
  scrollbar-color: rgba(126, 132, 143, .62) rgba(8, 9, 11, .55);
  scrollbar-width: thin;
}
.today-agenda-item {
  background: #101114;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 10px;
}
.today-agenda-item strong {
  font-size: 13px;
}
.today-agenda-item span {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.workspace-config {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.workspace-option {
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 10px;
}
.workspace-option label {
  color: var(--text);
  display: flex;
  gap: 8px;
  align-items: center;
}
.workspace-option input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090a0c;
  color: white;
  padding: 9px;
}
.work-panel > section {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 18px;
  scrollbar-color: rgba(126, 132, 143, .62) rgba(8, 9, 11, .55);
  scrollbar-width: thin;
}
.messages.custom-scroll-target,
.work-panel > section.custom-scroll-target,
.week-body.custom-scroll-target,
.today-agenda.custom-scroll-target {
  scrollbar-width: none;
}
.messages.custom-scroll-target::-webkit-scrollbar,
.work-panel > section.custom-scroll-target::-webkit-scrollbar,
.week-body.custom-scroll-target::-webkit-scrollbar,
.today-agenda.custom-scroll-target::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.work-panel span {
  color: var(--blue);
  font-weight: 800;
  margin-right: 12px;
}
.memory-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.memory-form select,
.memory-form input,
.memory-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #090a0c;
  color: white;
  padding: 12px;
}
.memory-form textarea {
  min-height: 92px;
  resize: vertical;
}
.memory-form button {
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 12px;
}
.memory-form .danger-button {
  background: #742626;
}
.memory-review-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.memory-review-details {
  min-width: 0;
}
.memory-review-details strong,
.memory-review-details small {
  display: block;
}
.memory-review-details small {
  color: #99a7b6;
  margin-top: 5px;
}
.memory-review-details p {
  margin: 8px 0 0;
  color: #dce6ef;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.memory-review-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.memory-review-actions button {
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  padding: 8px 10px;
}
.memory-review-actions .danger-button {
  background: #742626;
}
.memory-review-actions button:disabled {
  cursor: wait;
  opacity: .55;
}
.brain-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.brain-map-header h3,
.brain-map-header p {
  margin: 0;
}
.brain-map-header p {
  color: #929ba8;
  font-size: 13px;
  margin-top: 6px;
}
.brain-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.brain-map-legend span {
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  padding: 5px 8px;
}
.brain-map-legend .live { color: #31d17c; }
.brain-map-legend .live-static { color: #69e6a1; }
.brain-map-legend .connected { color: #4aa3ff; }
.brain-map-legend .scaffolded { color: #e6aa36; }
.brain-map-legend .warning { color: #ff9f43; }
.brain-map-legend .planned { color: #f05252; }
.brain-map-legend .unknown { color: #f0f3f6; }
.brain-map-stage {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  border: 1px solid #27313c;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 45%, rgba(17, 93, 67, .17), transparent 32%),
    linear-gradient(rgba(49, 209, 124, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 209, 124, .035) 1px, transparent 1px),
    #080b0d;
  background-size: auto, 28px 28px, 28px 28px, auto;
}
#brainMap {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.brain-edge {
  stroke-width: 3;
  opacity: .16;
  transition: opacity .2s ease, stroke-width .2s ease;
}
.brain-edge.built { stroke: #20aa68; }
.brain-edge.planned {
  stroke: #d73c3c;
  stroke-dasharray: 8 9;
}
.brain-edge.live {
  stroke: #55f59d;
  stroke-dasharray: 5 15;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px #24d97a);
  animation: brain-flow 1.15s linear infinite;
}
.brain-map-stage:hover .brain-edge.live { opacity: .42; }
.brain-edge.warning { stroke: #e6aa36; }
.brain-edge.critical { stroke: #f14f4f; }
@keyframes brain-flow {
  to { stroke-dashoffset: -40; }
}
.brain-node {
  cursor: pointer;
  outline: none;
}
.brain-node text {
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  paint-order: stroke;
  stroke: #080b0d;
  stroke-width: 6px;
  stroke-linejoin: round;
}
.brain-node.hub text,
.brain-node.core text,
.brain-node:hover text,
.brain-node:focus text,
.brain-node.selected text { opacity: 1; }
.brain-node.selected circle { stroke-width: 5; filter: drop-shadow(0 0 14px currentColor); }
.brain-node circle {
  stroke-width: 3;
  transition: filter .18s ease, transform .18s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.brain-node:hover circle,
.brain-node:focus circle { transform: scale(1.12); }
.brain-node.live circle {
  fill: #0d2c20;
  stroke: #35dc83;
  filter: drop-shadow(0 0 9px rgba(53, 220, 131, .58));
}
.brain-node.connected circle {
  fill: #0c2336;
  stroke: #4aa3ff;
  filter: drop-shadow(0 0 9px rgba(74, 163, 255, .5));
}
.brain-node.scaffolded circle {
  fill: #2f230d;
  stroke: #efb644;
  filter: drop-shadow(0 0 8px rgba(239, 182, 68, .5));
}
.brain-node.warning circle {
  fill: #34240d;
  stroke: #ff9f43;
  filter: drop-shadow(0 0 9px rgba(255, 159, 67, .5));
}
.brain-node.planned circle {
  fill: #301315;
  stroke: #ef5151;
  filter: drop-shadow(0 0 7px rgba(239, 81, 81, .35));
}
.brain-node.live.health-warning circle {
  fill: #35270d;
  stroke: #efb644;
  filter: drop-shadow(0 0 9px rgba(239, 182, 68, .55));
}
.brain-node.live.health-critical circle {
  fill: #351014;
  stroke: #ff565f;
  filter: drop-shadow(0 0 11px rgba(255, 86, 95, .7));
}
.brain-node.core circle {
  fill: #10283a;
  stroke: #54b9ff;
  filter: drop-shadow(0 0 16px rgba(84, 185, 255, .72));
}
.brain-node text {
  fill: #e8edf2;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .05em;
  pointer-events: none;
}
.brain-node.core text {
  fill: white;
  font-size: 21px;
}
.brain-map-detail {
  flex: 0 0 auto;
  min-height: 42px;
  margin-top: 12px;
  border-left: 3px solid #54b9ff;
  background: #0b1015;
  color: #c8d1da;
  padding: 11px 13px;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .brain-map-header { flex-direction: column; }
  .brain-map-legend { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .memory-review-item {
    flex-direction: column;
  }
}
@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-content: center;
    padding: 10px 20px;
    gap: 4px;
  }
  .mini-brand {
    font-size: clamp(11px, 1.35vw, 14px);
    letter-spacing: clamp(.08em, .35vw, .16em);
  }
  .tabs {
    justify-self: stretch;
  }
  .presence-panel { grid-column: 2; grid-row: 1 / 3; }
  .tabs button {
    padding-block: 8px;
  }
}
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .rail {
    min-height: 64px;
    flex-direction: row;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail nav { display: flex; margin: 0; }
  .logout { margin: 0 0 0 auto; }
  .workspace { grid-template-rows: auto minmax(0, 1fr); }
  .topbar {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }
  .presence-panel {
    border-left: 0;
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: auto auto;
    justify-content: end;
    padding-left: 0;
  }
  .mini-brand {
    letter-spacing: .12em;
    font-size: 12px;
  }
  .tabs { justify-self: stretch; }
  .desktop {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(320px, 1fr);
    overflow: auto;
    padding: 12px;
  }
  .mia-panel { padding: 8px; }
  .work-panel { padding: 16px; }
  .calendar-shell {
    grid-template-columns: 1fr;
  }
  .today-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 14px;
  }
  .week-header,
  .week-body {
    grid-template-columns: 48px repeat(7, minmax(86px, 1fr));
  }
  .messages .mia,
  .messages .you {
    max-width: 100%;
  }
  .mia-panel > .custom-scrollbar {
    bottom: 80px;
    right: 6px;
  }
  .work-panel > .custom-scrollbar {
    top: 16px;
    right: 8px;
    bottom: 16px;
  }
  .tagline { position: static; margin-top: 42px; }
}
