:root {
  --bg: #eef2f6;
  --bg-strong: #e3e9f0;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --ink: #16202b;
  --muted: #5b6978;
  --line: rgba(22, 32, 43, 0.1);
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --danger: #b42318;
  --status-ready: #2563eb;
  --status-ready-soft: rgba(37, 99, 235, 0.12);
  --status-active: #1d4ed8;
  --status-active-soft: rgba(29, 78, 216, 0.16);
  --status-hold: #b7791f;
  --status-hold-soft: rgba(234, 179, 8, 0.16);
  --status-skipped: #64748b;
  --status-skipped-soft: rgba(100, 116, 139, 0.14);
  --status-blocked: #b42318;
  --status-blocked-soft: rgba(180, 35, 24, 0.1);
  --status-complete: #15803d;
  --status-complete-soft: rgba(34, 197, 94, 0.12);
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

body.theme-dark {
  --bg: #0b1117;
  --bg-strong: #121922;
  --panel: rgba(14, 20, 27, 0.94);
  --panel-strong: #18212b;
  --ink: #e6edf3;
  --muted: #93a1af;
  --line: rgba(226, 232, 240, 0.12);
  --accent: #7f8ea3;
  --accent-soft: rgba(127, 142, 163, 0.14);
  --danger: #d28787;
  --status-ready: #60a5fa;
  --status-ready-soft: rgba(96, 165, 250, 0.16);
  --status-active: #3b82f6;
  --status-active-soft: rgba(59, 130, 246, 0.22);
  --status-hold: #f2c14e;
  --status-hold-soft: rgba(242, 193, 78, 0.18);
  --status-skipped: #a8b3c2;
  --status-skipped-soft: rgba(168, 179, 194, 0.16);
  --status-blocked: #f08c8c;
  --status-blocked-soft: rgba(240, 140, 140, 0.18);
  --status-complete: #4ade80;
  --status-complete-soft: rgba(74, 222, 128, 0.18);
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 24%),
    linear-gradient(180deg, #f3f6fa 0%, #e9eef4 100%);
}

body.theme-dark {
  background:
    radial-gradient(circle at top left, rgba(127, 142, 163, 0.08), transparent 22%),
    linear-gradient(180deg, #090e13 0%, #0d131a 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  gap: 20px;
  padding: 18px;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.eyebrow,
.summary-label {
  margin-bottom: 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
}

.heading-with-info,
.label-with-info,
.command-bar-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.heading-with-info {
  flex-wrap: wrap;
}

.label-with-info {
  justify-content: space-between;
}

.command-bar-top {
  justify-content: space-between;
}

.heading-with-info h2,
.label-with-info p {
  margin-bottom: 0;
}

.info-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: help;
  flex: 0 0 auto;
}

.info-hint::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(260px, 70vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(22, 32, 43, 0.96);
  color: #f8fbff;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
  z-index: 30;
}

.info-hint:hover::after,
.info-hint:focus-visible::after {
  opacity: 1;
}

h1 {
  font-size: clamp(1.75rem, 2.4vw, 2.4rem);
  line-height: 1;
  margin-bottom: 12px;
}

.intro,
.muted {
  color: var(--muted);
}

.app-rail {
  display: grid;
  gap: 16px;
  align-content: start;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
}

.rail-brand,
.rail-panel,
.topbar,
.main-panel,
.sidebar-panel,
.summary-card,
.focus-panel {
  border-radius: 18px;
}

.rail-brand,
.rail-panel {
  padding: 18px;
}

.rail-brand {
  background:
    linear-gradient(180deg, rgba(22, 32, 43, 0.98), rgba(28, 45, 60, 0.96)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.18), transparent 55%);
  color: #f6fbff;
}

body.theme-dark .rail-brand {
  background:
    linear-gradient(180deg, rgba(8, 12, 17, 0.99), rgba(12, 18, 24, 0.97)),
    linear-gradient(135deg, rgba(127, 142, 163, 0.12), transparent 55%);
}

body.theme-dark .panel,
body.theme-dark .summary-card,
body.theme-dark .roadmap-overview-card,
body.theme-dark .activity-item,
body.theme-dark .step-card,
body.theme-dark .insight-card,
body.theme-dark .operation-row,
body.theme-dark .alt-card,
body.theme-dark .queue-card,
body.theme-dark .table-shell,
body.theme-dark .graph-shell,
body.theme-dark .empty-state {
  background: rgba(19, 30, 40, 0.92);
  color: var(--ink);
  box-shadow: none;
}

body.theme-dark .main-panel,
body.theme-dark .sidebar-panel,
body.theme-dark .topbar,
body.theme-dark .rail-panel {
  background: rgba(16, 25, 34, 0.94);
}

body.theme-dark .info-hint {
  background: rgba(159, 176, 191, 0.12);
  color: var(--ink);
}

body.theme-dark .info-hint::after {
  background: rgba(235, 243, 248, 0.98);
  color: #0f1720;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .button.ghost,
body.theme-dark .view-button,
body.theme-dark .nav-menu summary,
body.theme-dark .scope-pill,
body.theme-dark .sidebar-tab,
body.theme-dark .graph-zoom-label,
body.theme-dark .icon-button,
body.theme-dark .topbar-chip,
body.theme-dark .mode-badge,
body.theme-dark .tag,
body.theme-dark .user-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .view-switch {
  background: rgba(255, 255, 255, 0.04);
}

body.theme-dark .button {
  color: #08120f;
}

body.theme-dark .button.is-active,
body.theme-dark .view-button.is-active,
body.theme-dark .sidebar-tab.is-active,
body.theme-dark .scope-pill.is-active,
body.theme-dark .nav-menu[open] summary {
  background: var(--accent);
  color: #0d131a;
}

body.theme-dark .nav-menu-panel {
  background: rgba(13, 21, 29, 0.98);
}

body.theme-dark .status-active {
  background: var(--status-active-soft);
  color: var(--status-active);
}

body.theme-dark .status-hold {
  background: var(--status-hold-soft);
  color: var(--status-hold);
}

body.theme-dark .status-complete {
  background: var(--status-complete-soft);
  color: var(--status-complete);
}

body.theme-dark .status-blocked {
  background: var(--status-blocked-soft);
  color: var(--status-blocked);
}

body.theme-dark .status-ready {
  background: var(--status-ready-soft);
  color: var(--status-ready);
}

body.theme-dark .graph-shell {
  background:
    linear-gradient(180deg, rgba(15, 22, 29, 0.96), rgba(10, 16, 22, 0.96)),
    linear-gradient(90deg, rgba(226, 232, 240, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(226, 232, 240, 0.04) 1px, transparent 1px);
}

body.theme-dark .graph-lines path {
  stroke: rgba(226, 232, 240, 0.3);
}

body.theme-dark .graph-lines marker path {
  fill: rgba(226, 232, 240, 0.45);
}

body.theme-dark .compact-node {
  background: rgba(21, 30, 39, 0.98);
}

body.theme-dark .graph-node.status-ready {
  background: linear-gradient(180deg, var(--status-ready-soft), rgba(21, 30, 39, 0.98));
}

body.theme-dark .graph-node.status-active {
  background: linear-gradient(180deg, rgba(15, 38, 92, 0.96), rgba(21, 30, 39, 0.98));
}

body.theme-dark .graph-node.status-hold {
  background: linear-gradient(180deg, var(--status-hold-soft), rgba(21, 30, 39, 0.98));
}

body.theme-dark .graph-node.status-blocked {
  background: linear-gradient(180deg, var(--status-blocked-soft), rgba(21, 30, 39, 0.98));
}

body.theme-dark .graph-node.status-complete {
  background: linear-gradient(180deg, var(--status-complete-soft), rgba(21, 30, 39, 0.98));
}

body.theme-dark .tone-good {
  background: linear-gradient(180deg, rgba(127, 142, 163, 0.14), rgba(19, 30, 40, 0.94));
}

body.theme-dark .tone-accent {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(19, 30, 40, 0.94));
}

body.theme-dark .progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .ops-table tbody tr:hover {
  background: rgba(127, 142, 163, 0.08);
}

.rail-brand .eyebrow,
.rail-brand .intro {
  color: rgba(231, 241, 248, 0.78);
}

.rail-brand h1 {
  max-width: 8ch;
}

.rail-panel {
  display: grid;
  gap: 16px;
  overflow: auto;
}

.rail-section {
  display: grid;
  gap: 10px;
}

.nav-menus-rail {
  gap: 10px;
  min-width: 0;
}

.nav-menus-rail > div,
.nav-menus-rail .nav-menu {
  width: 100%;
  min-width: 0;
}

.rail-mode-controls {
  justify-items: stretch;
}

.rail-reset {
  width: 100%;
}

.app-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  padding: 18px 20px;
}

.topbar-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.topbar-copy h2 {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 5px 12px;
  width: min(310px, 32%);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(22, 32, 43, 0.04);
}

.topbar-meta strong {
  align-self: center;
  line-height: 1.3;
}

.topbar-meta .button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
}

.topbar-next-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 800;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(22, 32, 43, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.mode-controls {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(22, 32, 43, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.mode-badge.is-editing {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

.app-nav,
.nav-group {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-menus {
  align-items: stretch;
}

.control-group,
.field {
  display: grid;
  gap: 6px;
}

.compact-control {
  min-width: 0;
}

.current-user-display {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
}

.current-user-display > span:last-child {
  display: grid;
  min-width: 0;
}

.current-user-display strong,
.current-user-display small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-group span,
.field span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 12px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.button,
.view-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  transition: 160ms ease;
}

.button {
  color: #f4fffd;
  background: var(--accent);
}

.button.small {
  padding: 9px 12px;
  font-size: 0.9rem;
}

.button:hover,
.view-button:hover,
.operation-row:hover,
.alt-card:hover,
.queue-card:hover {
  transform: translateY(-1px);
}

.button.ghost,
.view-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.button.is-active {
  background: var(--ink);
  color: #f8fbff;
  border-color: transparent;
}

.view-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.view-button.is-active {
  background: var(--ink);
  color: #f8fbff;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-weight: 600;
}

.nav-menus-rail .nav-menu summary {
  display: flex;
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu[open] summary {
  background: var(--ink);
  color: #f8fbff;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  width: min(340px, 90vw);
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.nav-menus-rail .nav-menu-panel {
  position: static;
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  border-radius: 12px;
  box-shadow: none;
}

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

.summary-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  box-shadow: none;
}

.summary-card h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.widget-tools,
.panel-header-actions,
.floating-widget-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header-actions {
  justify-content: flex-end;
}

.floating-widget-tools {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.focus-panel {
  position: relative;
}

.widget-focus-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-strong);
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}

.widget-focus-button:hover,
.widget-focus-button.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

body.has-focused-widget {
  overflow: hidden;
}

body.has-focused-widget::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(7, 12, 18, 0.72);
  backdrop-filter: blur(8px);
}

[data-widget].is-widget-focused {
  position: fixed;
  inset: 16px;
  z-index: 100;
  width: auto;
  height: auto;
  max-height: none;
  margin: 0;
  overflow: auto;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  animation: widget-focus-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-widget="operations-board"].is-widget-focused .graph-viewport {
  min-height: calc(100vh - 250px);
}

@keyframes widget-focus-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.command-bar {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.search-field {
  display: block;
  flex: 1;
}

.search-and-sort {
  display: flex;
  align-items: end;
  gap: 12px;
}

.sort-control {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.scope-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scope-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
}

.scope-pill.is-active {
  background: var(--ink);
  color: #f8fbff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tone-good {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.92));
}

.tone-accent {
  background: linear-gradient(180deg, rgba(22, 32, 43, 0.08), rgba(255, 255, 255, 0.92));
}

.focus-shell {
  margin-bottom: 0;
}

.focus-panel {
  padding: 18px;
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 18px;
}

.focus-summary {
  font-size: 1.05rem;
  max-width: 58ch;
}

.focus-main,
.focus-side {
  display: grid;
  gap: 12px;
}

.focus-actions,
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.studio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.workspace-block,
.activity-block,
.roadmap-studio,
.stack-form {
  display: grid;
  gap: 12px;
}

.team-list {
  display: grid;
  gap: 6px;
}

.team-directory {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.56);
  overflow: hidden;
}

.team-directory > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}

.team-directory > summary::-webkit-details-marker {
  display: none;
}

.team-directory > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.team-directory-panel {
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
  border-top: 1px solid var(--line);
}

.directory-chevron {
  color: var(--muted);
  transition: transform 160ms ease;
}

.team-directory[open] .directory-chevron {
  transform: rotate(180deg);
}

.roadmap-overview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

.team-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
}

.team-member-row.is-current {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--accent-soft);
}

.team-member-copy {
  display: grid;
  flex: 1;
  min-width: 0;
}

.team-member-actions {
  display: flex;
  gap: 5px;
}

.icon-button.danger:hover:not(:disabled) {
  color: var(--status-blocked);
  border-color: var(--status-blocked);
}

.inline-form .add-person-button {
  align-self: end;
}

.inline-form {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.compact-form {
  gap: 10px;
}

.alt-card,
.operation-row,
.queue-card {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--panel-strong);
  border-radius: var(--radius-md);
}

.alt-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  cursor: pointer;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.88fr);
  gap: 16px;
}

.main-panel,
.sidebar-panel {
  padding: 18px;
}

.sidebar {
  display: grid;
  gap: 16px;
}

.sidebar-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.sidebar-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.sidebar-tab.is-active {
  background: var(--ink);
  color: #f8fbff;
  border-color: transparent;
}

.sidebar-tab-panel {
  display: none;
}

.sidebar-tab-panel.is-active {
  display: block;
}

.user-pill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--user-color) 12%, white);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--user-color) 30%, white);
  font-size: 0.82rem;
}

.user-pill.is-current {
  outline: 2px solid color-mix(in srgb, var(--user-color) 38%, white);
}

.worker-picker {
  position: relative;
}

.worker-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-strong);
  cursor: pointer;
  list-style: none;
}

.worker-picker summary::-webkit-details-marker {
  display: none;
}

.worker-options {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.worker-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 9px;
  cursor: pointer;
}

.worker-option:hover {
  background: var(--accent-soft);
}

.worker-option span:last-child {
  display: grid;
}

.worker-option small {
  color: var(--muted);
}

.worker-avatar-stack {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  padding-left: 7px;
}

.worker-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border: 2px solid var(--panel-strong);
  border-radius: 999px;
  background: var(--user-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.team-member-row > .worker-avatar,
.worker-option > .worker-avatar {
  margin-left: 0;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.77rem;
}

.tag {
  background: rgba(22, 32, 43, 0.07);
  color: var(--muted);
}

.phase-tag {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill {
  font-weight: 700;
}

.status-ready {
  background: var(--status-ready-soft);
  color: var(--status-ready);
}

.status-active {
  background: var(--status-active-soft);
  color: var(--status-active);
}

.status-hold {
  background: var(--status-hold-soft);
  color: var(--status-hold);
}

.status-skipped {
  background: var(--status-skipped-soft);
  color: var(--status-skipped);
}

.status-blocked {
  background: var(--status-blocked-soft);
  color: var(--status-blocked);
}

.status-complete {
  background: var(--status-complete-soft);
  color: var(--status-complete);
}

.mini-progress,
.queue-card-top,
.roadmap-phase-top,
.roadmap-track-top,
.step-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}

.empty-state.compact {
  padding: 12px;
}

.small {
  font-size: 0.84rem;
}

.operation-list,
.step-list,
.roadmap-track-list,
.roadmap-op-list {
  display: grid;
  gap: 12px;
}

.operation-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.operation-row-open {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.operation-row-main {
  display: grid;
  gap: 6px;
}

.operation-row-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-content: start;
}

.operation-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.next-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.operation-row.is-selected,
.alt-card.is-selected,
.queue-card.is-selected,
.graph-node.is-selected,
.ops-table tr.is-selected {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 0;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
}

.table-actions {
  width: 84px;
}

.quick-actions {
  display: inline-flex;
  gap: 6px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ops-table th,
.ops-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.ops-table tbody tr {
  cursor: pointer;
}

.ops-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.04);
}

.queue-card.status-ready,
.alt-card.status-ready,
.operation-row.status-ready,
.ops-table tbody tr.status-ready,
.inspector-callout.status-ready {
  border-left-color: var(--status-ready);
}

.queue-card.status-active,
.alt-card.status-active,
.operation-row.status-active,
.ops-table tbody tr.status-active,
.inspector-callout.status-active {
  border-left-color: var(--status-active);
}

.queue-card.status-hold,
.alt-card.status-hold,
.operation-row.status-hold,
.ops-table tbody tr.status-hold,
.inspector-callout.status-hold {
  border-left-color: var(--status-hold);
}

.queue-card.status-skipped,
.alt-card.status-skipped,
.operation-row.status-skipped,
.ops-table tbody tr.status-skipped,
.inspector-callout.status-skipped {
  border-left-color: var(--status-skipped);
}

.queue-card.status-blocked,
.alt-card.status-blocked,
.operation-row.status-blocked,
.ops-table tbody tr.status-blocked,
.inspector-callout.status-blocked {
  border-left-color: var(--status-blocked);
}

.queue-card.status-complete,
.alt-card.status-complete,
.operation-row.status-complete,
.ops-table tbody tr.status-complete,
.inspector-callout.status-complete {
  border-left-color: var(--status-complete);
}

.graph-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(246, 249, 252, 0.85)),
    linear-gradient(90deg, rgba(22, 32, 43, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(22, 32, 43, 0.03) 1px, transparent 1px);
  background-size: auto, 120px 120px, 120px 120px;
}

.graph-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.status-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.graph-edit-banner {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 118, 110, 0.08);
}

.graph-zoom-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(22, 32, 43, 0.07);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.graph-viewport {
  overflow: hidden;
  min-height: 520px;
  cursor: grab;
}

.graph-viewport.is-dragging {
  cursor: grabbing;
}

.graph-stage {
  position: relative;
  width: max-content;
  transform-origin: 0 0;
  will-change: transform;
}

.graph-canvas {
  position: relative;
}

.graph-lines {
  position: absolute;
  inset: 0;
}

.graph-lines path {
  fill: none;
  stroke: rgba(22, 32, 43, 0.24);
  stroke-width: 2;
  marker-end: url(#arrow);
}

.graph-lines marker path {
  fill: rgba(22, 32, 43, 0.34);
}

.graph-node {
  position: absolute;
  text-align: left;
  cursor: pointer;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.graph-node.is-node-dragging {
  z-index: 5;
  cursor: grabbing;
  box-shadow: 0 20px 44px rgba(7, 12, 18, 0.28);
}

.compact-node {
  width: 190px;
  min-height: 76px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.97);
}

.graph-node.status-ready {
  background: linear-gradient(180deg, var(--status-ready-soft), rgba(255, 255, 255, 0.96));
}

.graph-node.status-active {
  background: linear-gradient(180deg, var(--status-active-soft), rgba(236, 243, 255, 0.96));
}

.graph-node.status-hold {
  background: linear-gradient(180deg, var(--status-hold-soft), rgba(255, 251, 235, 0.96));
}

.graph-node.status-skipped {
  background: linear-gradient(180deg, var(--status-skipped-soft), rgba(248, 250, 252, 0.96));
}

.graph-node.status-blocked {
  background: linear-gradient(180deg, var(--status-blocked-soft), rgba(255, 255, 255, 0.96));
}

.graph-node.status-complete {
  background: linear-gradient(180deg, var(--status-complete-soft), rgba(245, 255, 248, 0.96));
}

.graph-node.is-anchor {
  outline: 3px solid rgba(15, 118, 110, 0.42);
  outline-offset: 2px;
}

.graph-node-title {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.graph-node-meta {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.roadmap-phase {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.collapse-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.collapse-chevron {
  display: inline-block;
  color: var(--muted);
  transition: transform 140ms ease;
}

.roadmap-phase.is-collapsed .collapse-chevron {
  transform: rotate(-90deg);
}

.roadmap-phase.is-collapsed .roadmap-phase-content {
  display: none;
}

.roadmap-phase:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.roadmap-track {
  display: grid;
  gap: 8px;
}

.studio-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.roadmap-phase-list,
.activity-list {
  display: grid;
  gap: 12px;
}

.roadmap-studio-header {
  display: grid;
  gap: 6px;
}

.activity-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.activity-item p {
  margin-bottom: 6px;
}

.compact-card {
  padding: 10px 12px;
  cursor: pointer;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 32, 43, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #22c55e);
}

.inspector-callout {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(22, 32, 43, 0.04);
  border: 1px solid var(--line);
  border-left-width: 4px;
  margin: 16px 0;
}

.inspector-actions {
  margin-bottom: 18px;
}

.assignment-block {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.step-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
}

.step-card.is-complete {
  border-color: rgba(34, 197, 94, 0.28);
}

.compact-steps {
  gap: 10px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.insight-card {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.checklist-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(22, 32, 43, 0.04);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.check-item:hover {
  border-color: var(--line);
  background: rgba(22, 32, 43, 0.065);
}

.check-item.is-checked {
  background: rgba(34, 197, 94, 0.08);
}

.check-item input {
  appearance: none;
  position: relative;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid color-mix(in srgb, var(--muted) 65%, transparent);
  border-radius: 6px;
  background: var(--panel-strong);
  cursor: pointer;
  flex: 0 0 20px;
}

.check-item input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 120ms ease;
}

.check-item input:checked {
  border-color: var(--status-complete);
  background: var(--status-complete);
}

.check-item input:checked::after {
  transform: rotate(45deg) scale(1);
}

.check-item span {
  display: grid;
  gap: 4px;
  min-width: 0;
  line-height: 1.4;
  text-align: left;
}

.check-item > span {
  min-height: 20px;
  line-height: 20px;
}

.check-item small {
  line-height: 1.35;
}

.confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 12, 18, 0.58);
  backdrop-filter: blur(5px);
}

.confirmation-dialog {
  width: min(480px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  box-shadow: 0 28px 80px rgba(7, 12, 18, 0.32);
}

.confirmation-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--status-hold-soft);
  color: var(--status-hold);
  font-size: 1.2rem;
  font-weight: 900;
}

.confirmation-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.force-button {
  color: var(--danger);
  background: transparent;
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}

.step-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.compact-field {
  margin-top: 14px;
}

.comment-block {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-rail {
    position: static;
    height: auto;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-meta {
    width: 100%;
  }

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

  .workspace,
  .focus-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 800px) {
  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .topbar,
  .rail-brand,
  .rail-panel,
  .main-panel,
  .sidebar-panel,
  .focus-panel {
    padding: 14px;
  }

  .app-rail {
    gap: 12px;
  }

  .view-switch,
  .mode-controls,
  .rail-mode-controls,
  .topbar-meta,
  .nav-menus-rail {
    width: 100%;
  }

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

  .search-and-sort {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-control {
    min-width: 0;
  }

  .operation-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .operation-row-meta {
    justify-items: start;
  }

  .focus-actions,
  .card-actions {
    width: 100%;
  }

  .studio-actions,
  .step-footer {
    display: grid;
  }

  .nav-menu-panel {
    left: 0;
    right: auto;
    width: min(100%, 360px);
  }

  .sidebar-tabs {
    grid-template-columns: 1fr;
  }
}
