:root {
  color-scheme: dark;
  --bg: #07100d;
  --panel: rgba(10, 20, 18, 0.82);
  --panel-strong: rgba(14, 27, 24, 0.95);
  --line: rgba(160, 224, 201, 0.18);
  --line-bright: rgba(109, 249, 195, 0.42);
  --text: #edf8f3;
  --muted: #91aaa1;
  --green: #58f0a7;
  --cyan: #70d7ff;
  --yellow: #f2ca72;
  --red: #ff6b75;
  --ink: #07100d;
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(135deg, rgba(21, 160, 198, 0.22) 0%, transparent 44%),
    linear-gradient(115deg, #0a6181 0%, #15549b 48%, #0b1d57 100%);
  color: var(--text);
  overflow: hidden;
}

.mystery-login {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(2, 9, 13, 0.36), rgba(2, 9, 13, 0.62)),
    url("/background2") center / cover no-repeat;
  transition:
    opacity 240ms ease,
    visibility 240ms ease;
}

.mystery-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.mystery-login.is-unlocked {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.is-mystery-locked .desktop-shell {
  filter: blur(8px) brightness(0.58);
  pointer-events: none;
  user-select: none;
}

.login-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(109, 249, 195, 0.42);
  border-radius: 8px;
  background: rgba(9, 14, 21, 0.84);
  box-shadow: 0 28px 120px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 32px;
  text-align: center;
}

.login-avatar {
  display: grid;
  place-items: center;
  width: 74px;
  aspect-ratio: 1;
  border: 1px solid rgba(113, 214, 255, 0.58);
  border-radius: 50%;
  background: linear-gradient(145deg, #1cb7d6, #124794);
  color: white;
  font-size: 34px;
  font-weight: 900;
  overflow: hidden;
  padding: 0;
}

.login-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-kicker {
  margin: 18px 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-panel h1 {
  margin-bottom: 12px;
  font-size: 46px;
}

.login-copy {
  max-width: 330px;
}

.login-readout {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
  padding: 12px;
}

.login-readout span,
.login-status {
  color: var(--muted);
  font-size: 12px;
}

.login-status {
  min-height: 18px;
  margin-top: 14px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#signal-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.18;
}

.desktop-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  min-height: 100vh;
  padding: 0;
  gap: 0;
}

.topbar,
.os-window,
.app-menu {
  border: 1px solid var(--line);
  background: rgba(15, 20, 28, 0.92);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 0 8px 0 4px;
  background: linear-gradient(#222a36, #151b25);
  box-shadow: 0 1px 16px rgba(0, 0, 0, 0.42);
}

.panel-left {
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(113, 214, 255, 0.55);
  border-radius: 3px;
  background: linear-gradient(145deg, #1cb7d6, #154fa8);
  color: white;
  font-weight: 800;
  overflow: hidden;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.start-button,
.panel-launcher,
.primary-action,
.secondary-action,
.scan-form button,
.config-card button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 7px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.start-button,
.panel-launcher {
  display: grid;
  place-items: center;
  height: 26px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0;
}

.start-button {
  width: 30px;
  border-color: rgba(113, 214, 255, 0.5);
}

.panel-launcher {
  width: 31px;
  font-size: 16px;
}

.start-button:hover,
.panel-launcher:hover,
.primary-action:hover,
.secondary-action:hover,
.scan-form button:hover,
.config-card button:hover {
  border-color: var(--line-bright);
  background: rgba(88, 240, 167, 0.1);
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.panel-launcher.is-active {
  color: var(--ink);
  background: var(--green);
  border-color: transparent;
}

.panel-title {
  flex: 1;
  color: #d6e3eb;
  font-size: 12px;
  text-align: center;
}

.status-strip {
  display: flex;
  gap: 4px;
  align-items: center;
}

.status-strip span {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 6px;
  color: #d6e3eb;
  font-size: 12px;
  white-space: nowrap;
}

.workspace {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(3, 8, 12, 0.12), rgba(3, 8, 12, 0.16)),
    url("/background2") center / cover no-repeat;
}

.desktop-icons {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: grid;
  gap: 14px;
  width: 132px;
}

.desktop-icon {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 76px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  font-size: 12px;
  line-height: 1.25;
  padding: 7px 5px;
}

.desktop-icon span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  background: linear-gradient(145deg, #151d2a, #2d8ec3);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  font-size: 20px;
}

.folder-icon span {
  border-color: rgba(242, 202, 114, 0.48);
  background: linear-gradient(145deg, #9f7624, #d9ad45 48%, #5a461d);
  color: #1c1608;
}

.desktop-icon:hover,
.desktop-icon.is-active {
  border-color: rgba(104, 187, 255, 0.72);
  background: rgba(36, 98, 157, 0.32);
}

.is-coming-soon {
  filter: grayscale(1);
  opacity: 0.48;
}

.desktop-icon.is-coming-soon::after,
.menu-apps .is-coming-soon::after,
.menu-categories .is-coming-soon::after {
  content: "preview";
  color: #9ba7ad;
  font-size: 10px;
  margin-left: auto;
}

.app-menu {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: none;
  width: min(620px, calc(100vw - 18px));
  height: min(660px, calc(100vh - 42px));
  border-color: rgba(62, 124, 197, 0.75);
  border-radius: 0 0 4px 0;
  background: rgba(20, 25, 34, 0.96);
  overflow: hidden;
}

.app-menu.is-open {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) 44px;
}

.menu-search {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-bottom: 1px solid rgba(81, 139, 205, 0.48);
}

.menu-search input {
  height: 30px;
  border-color: #1c66bd;
  border-radius: 4px;
  background: #101722;
}

.menu-columns {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 0;
}

.menu-categories,
.menu-apps {
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: auto;
  padding: 8px;
}

.menu-categories {
  background: rgba(255, 255, 255, 0.035);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-categories button,
.menu-apps button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  border: 0;
  border-radius: 2px;
  color: #e8eef5;
  background: transparent;
  text-align: left;
  padding: 6px 8px;
}

.menu-apps button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #111a26;
}

.menu-categories button:hover,
.menu-apps button:hover {
  background: rgba(46, 111, 188, 0.42);
}

.menu-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.035);
}

.menu-footer span {
  color: var(--muted);
  font-size: 12px;
}

.window-stack {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.os-window {
  position: absolute;
  display: none;
  grid-template-rows: 44px minmax(0, 1fr);
  overflow: hidden;
  width: min(1040px, calc(100vw - 190px));
  height: min(710px, calc(100vh - 72px));
  left: 166px;
  top: 42px;
  border-color: rgba(65, 112, 169, 0.75);
  border-radius: 4px;
  background: rgba(10, 15, 22, 0.94);
  pointer-events: auto;
  resize: none;
}

.os-window.is-active {
  display: grid;
}

.os-window.is-focused {
  border-color: rgba(109, 249, 195, 0.58);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(109, 249, 195, 0.08);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.035);
  cursor: move;
  user-select: none;
  touch-action: none;
}

.window-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 107, 117, 0.35);
  border-radius: 3px;
  background: rgba(255, 107, 117, 0.12);
  color: #ffb3b8;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}

.window-close:hover {
  background: rgba(255, 107, 117, 0.28);
  border-color: rgba(255, 107, 117, 0.72);
}

.window-bar > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 20px rgba(88, 240, 167, 0.8);
}

.window-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.window-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-grid,
.gate-layout,
.app-grid,
.graph-layout,
.folder-layout,
.ops-layout,
.roadmap-grid {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.gate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.gate-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 10, 0.68);
  padding: 24px;
}

.gate-card h1 {
  max-width: 760px;
  margin-bottom: 16px;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 14px;
}

.primary-action {
  min-width: 156px;
  height: 42px;
  border-color: transparent;
  background: var(--green);
  color: var(--ink);
  border-radius: 7px;
  font-weight: 800;
}

.gate-status {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  padding: 12px;
  line-height: 1.45;
}

.gate-config {
  display: grid;
  align-content: start;
  gap: 10px;
}

.gate-config label {
  color: var(--muted);
  font-size: 12px;
}

.gate-readout {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.gate-readout div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 10px;
}

.gate-readout span {
  color: var(--muted);
  font-size: 12px;
}

.gate-readout strong {
  overflow-wrap: anywhere;
}

.is-gated #dashboard .window-meta::after,
.is-gated #wallet .window-meta::after,
.is-gated #approval .window-meta::after,
.is-gated #project .window-meta::after,
.is-gated #graph .window-meta::after {
  content: " / locked";
  color: var(--red);
}

.is-testing-mode .is-gated #dashboard .window-meta::after,
.is-testing-mode .is-gated #wallet .window-meta::after,
.is-testing-mode .is-gated #approval .window-meta::after,
.is-testing-mode .is-gated #project .window-meta::after,
.is-testing-mode .is-gated #graph .window-meta::after {
  content: "";
}

.is-coming-soon-window .window-meta::after {
  content: " / preview";
  color: #9ba7ad;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  grid-template-rows: auto minmax(240px, 1fr);
  gap: 14px;
}

.hero-panel,
.quick-scan,
.signal-panel,
.report-panel,
.metric-panel,
.finding-panel,
.threat-card,
.graph-inspector,
.ops-layout section,
.roadmap-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 10, 0.58);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  min-height: 250px;
  padding: 28px;
  overflow: hidden;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 740px;
  margin-bottom: 14px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 16px;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.score-orbit {
  display: grid;
  place-items: center;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 174px;
  aspect-ratio: 1;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(88, 240, 167, 0.12), transparent 58%),
    conic-gradient(from 20deg, var(--green), var(--cyan), rgba(255, 255, 255, 0.06), var(--green));
  color: var(--ink);
}

.score-ring strong {
  color: var(--text);
  font-size: 52px;
}

.score-ring span {
  margin-top: -34px;
  color: var(--text);
  font-size: 12px;
}

.quick-scan,
.signal-panel,
.report-panel,
.metric-panel,
.finding-panel {
  padding: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.scan-form label,
.config-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

input:focus {
  border-color: var(--line-bright);
}

.scan-form button,
.secondary-action,
.config-card button {
  height: 40px;
  padding: 0 12px;
}

.scan-output {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.4s infinite;
}

.signal-list {
  display: grid;
  gap: 8px;
}

.signal-item,
.finding-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 10px;
}

.signal-item strong,
.finding-list strong {
  font-size: 13px;
}

.signal-item span,
.finding-list span {
  color: var(--muted);
  font-size: 12px;
}

.report-text {
  min-height: 128px;
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.65;
}

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

.two-col .wide {
  grid-column: 1 / -1;
}

.large-meter strong {
  display: block;
  font-size: 72px;
  line-height: 1;
  color: var(--green);
}

.large-meter span {
  color: var(--muted);
}

.meter-bars {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.meter-bars span {
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--green) var(--value), rgba(255, 255, 255, 0.08) var(--value)),
    rgba(255, 255, 255, 0.08);
}

.finding-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.hygiene-grid div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}

.hygiene-grid strong,
.hygiene-grid span {
  display: block;
}

.hygiene-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.table-shell {
  overflow: auto;
  padding: 16px;
}

.approval-shell {
  display: grid;
  align-content: start;
  gap: 14px;
}

.approval-scan-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 10, 0.58);
  padding: 14px;
}

.approval-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.approval-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.approval-options input {
  width: 14px;
  height: 14px;
  accent-color: var(--green);
}

.approval-note {
  max-width: 920px;
  margin: 0;
  font-size: 13px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 10, 0.58);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.risk {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.risk.low {
  background: rgba(88, 240, 167, 0.16);
  color: var(--green);
}

.risk.med {
  background: rgba(242, 202, 114, 0.16);
  color: var(--yellow);
}

.risk.high {
  background: rgba(255, 107, 117, 0.16);
  color: var(--red);
}

.threat-card {
  padding: 18px;
}

.threat-card strong,
.threat-card span {
  display: block;
}

.threat-card strong {
  margin: 10px 0 8px;
  font-size: 20px;
}

.threat-code {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.threat-card.warning {
  border-color: rgba(242, 202, 114, 0.42);
}

.threat-card.danger {
  border-color: rgba(255, 107, 117, 0.42);
}

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

.graph-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(5, 12, 10, 0.58);
  background-size: 28px 28px;
  overflow: hidden;
}

.node,
.edge {
  position: absolute;
}

.edge {
  height: 1px;
  transform-origin: left center;
  background: rgba(112, 215, 255, 0.38);
}

.node {
  display: grid;
  place-items: center;
  width: 92px;
  height: 44px;
  border: 1px solid var(--line-bright);
  border-radius: 7px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.node.hot {
  border-color: rgba(255, 107, 117, 0.7);
}

.graph-inspector {
  padding: 16px;
}

.graph-inspector dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.graph-inspector dd {
  margin: 4px 0 0;
}

.folder-window {
  width: min(1120px, calc(100vw - 182px));
}

.folder-layout {
  display: grid;
  grid-template-columns: 190px minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
  overflow: hidden;
}

.folder-tree,
.module-list,
.folder-preview {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 10, 0.58);
}

.folder-tree {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px;
}

.folder-tree strong {
  margin-bottom: 8px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.folder-tree button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #dceaf2;
  text-align: left;
  padding: 8px;
}

.folder-tree button:hover {
  background: rgba(46, 111, 188, 0.42);
}

.module-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 10px;
}

.folder-desc {
  margin: 0 0 4px;
  border: 1px solid rgba(112, 215, 255, 0.16);
  border-radius: 6px;
  background: rgba(112, 215, 255, 0.055);
  color: #b8c9d0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
}

.module-tile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  min-height: 70px;
  border: 1px solid rgba(88, 240, 167, 0.13);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(88, 240, 167, 0.055), transparent 42%),
    rgba(0, 0, 0, 0.26);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  text-align: left;
  padding: 10px;
}

.module-tile:hover {
  border-color: var(--line-bright);
  background:
    linear-gradient(90deg, rgba(88, 240, 167, 0.13), transparent 46%),
    rgba(0, 0, 0, 0.34);
}

.module-tile span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 38px;
  border: 1px solid rgba(112, 215, 255, 0.24);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--cyan);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.module-tile strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dfffea;
  font-size: 13px;
  letter-spacing: 0;
}

.module-tile em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.module-tile.is-preview-file {
  opacity: 0.72;
}

.module-tile.is-preview-file strong::after {
  content: "  [staged]";
  color: var(--yellow);
  font-size: 10px;
}

.folder-preview {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr) auto;
  overflow: hidden;
}

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}

.preview-bar a {
  color: var(--cyan);
  font-size: 12px;
  text-decoration: none;
}

.folder-preview iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  background: rgba(0, 0, 0, 0.32);
}

.folder-preview p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 12px;
}

.folder-preview-static {
  grid-template-rows: 42px minmax(0, 1fr);
}

.static-preview {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(rgba(88, 240, 167, 0.04) 1px, transparent 1px),
    rgba(0, 0, 0, 0.28);
  background-size: 100% 24px;
}

.static-preview code {
  display: block;
  border: 1px solid rgba(88, 240, 167, 0.2);
  border-radius: 4px;
  color: var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  padding: 12px;
}

.static-preview p {
  border: 0;
  padding: 0;
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 14px;
}

.ops-layout section {
  padding: 16px;
}

.action-queue {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.config-card {
  display: grid;
  gap: 10px;
}

.terminal-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 48px;
  min-height: 0;
  background:
    linear-gradient(rgba(88, 240, 167, 0.035) 1px, transparent 1px),
    #050807;
  background-size: 100% 24px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.terminal-output {
  overflow: auto;
  padding: 14px;
}

.terminal-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #d8fbe8;
  line-height: 1.55;
  margin-bottom: 8px;
}

.terminal-line.system {
  color: #70d7ff;
}

.terminal-line.user {
  color: #f2ca72;
}

.terminal-line.assistant {
  color: #58f0a7;
}

.terminal-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 76px;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(88, 240, 167, 0.22);
  background: rgba(4, 9, 7, 0.96);
  padding: 7px 10px;
}

.terminal-form span {
  color: #58f0a7;
  font-size: 13px;
  white-space: nowrap;
}

.terminal-form input {
  height: 34px;
  border-color: rgba(88, 240, 167, 0.25);
  background: rgba(0, 0, 0, 0.36);
  font-family: inherit;
}

.terminal-form button {
  height: 34px;
  border: 1px solid rgba(88, 240, 167, 0.35);
  border-radius: 6px;
  background: rgba(88, 240, 167, 0.12);
  color: #d8fbe8;
}

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

.docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.docs-index {
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
  overflow: auto;
}

.docs-index a {
  border-radius: 4px;
  color: #dceaf2;
  font-size: 13px;
  text-decoration: none;
  padding: 8px;
}

.docs-index a:hover {
  background: rgba(46, 111, 188, 0.42);
}

.docs-content {
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: auto;
  padding: 16px;
}

.docs-content article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 10, 0.58);
  padding: 16px;
}

.docs-content h2 {
  margin-bottom: 8px;
}

.roadmap-grid article {
  min-height: 180px;
  padding: 16px;
}

.roadmap-grid article span {
  color: var(--green);
  font-weight: 800;
}

.roadmap-grid article strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 18px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.86);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@media (max-width: 1100px) {
  .dashboard-grid,
  .gate-layout,
  .app-grid,
  .docs-layout,
  .graph-layout,
  .terminal-form,
  .ops-layout,
  .folder-layout,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .os-window {
    width: calc(100vw - 148px);
    left: 132px;
  }
}

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .desktop-shell {
    min-height: 100dvh;
    grid-template-rows: 30px minmax(0, 1fr);
    padding: 0;
    gap: 0;
  }

  .topbar {
    padding: 0 5px;
  }

  .panel-title {
    display: none;
  }

  .status-strip {
    gap: 2px;
  }

  .status-strip span:not(:last-child):not(#proxy-state) {
    display: none;
  }

  .workspace {
    padding: 0;
  }

  .desktop-icons {
    top: 12px;
    left: 8px;
    width: 96px;
    gap: 8px;
  }

  .desktop-icon {
    min-height: 64px;
    font-size: 11px;
  }

  .desktop-icon span {
    width: 32px;
    height: 30px;
  }

  .app-menu {
    width: calc(100vw - 8px);
    height: min(620px, calc(100vh - 34px));
  }

  .menu-columns {
    grid-template-columns: 1fr;
  }

  .menu-categories {
    display: none;
  }

  .os-window {
    top: 42px;
    left: 6px;
    width: calc(100vw - 12px);
    height: calc(100vh - 52px);
  }

  .dashboard-grid,
  .gate-layout,
  .app-grid,
  .docs-layout,
  .graph-layout,
  .ops-layout,
  .roadmap-grid,
  .folder-layout,
  .table-shell {
    padding: 10px;
  }

  .hero-panel {
    padding: 18px;
  }

  h1 {
    font-size: 42px;
  }

  .input-row,
  .hygiene-grid {
    grid-template-columns: 1fr;
  }
}
