/* =====================================================================
   GROUSS — оформление кабинета.

   Собрано из макетов интерфейса (Intake, Review Workspace, Monitoring,
   Decision Library) без переписывания правил: повторяющаяся общая часть
   взята один раз, экранная — как есть. Изменено ровно два: цвета,
   заданные числом в обход системы, переведены на переменные, и набор
   переменных заменён на светлый. Вернуть тёмное оформление — это
   заменить один блок :root.
   ===================================================================== */

:root {
  color-scheme: light;
  --bg: oklch(0.978 0.003 145);
  --nav: oklch(1 0 0);
  --surface: oklch(1 0 0);
  --surface-raised: oklch(0.988 0.003 145);
  --surface-hover: oklch(0.955 0.006 145);
  --line: oklch(0.885 0.008 145);
  --line-soft: oklch(0.935 0.006 145);
  --text: oklch(0.23 0.012 145);
  --muted: oklch(0.50 0.014 145);
  --faint: oklch(0.63 0.012 145);
  --lime: oklch(0.72 0.17 128);
  --lime-ink: oklch(0.20 0.05 128);
  --lime-soft: oklch(0.955 0.05 128);
  --cyan: oklch(0.58 0.11 210);
  --cyan-soft: oklch(0.955 0.03 210);
  --red: oklch(0.55 0.20 25);
  --red-soft: oklch(0.955 0.045 25);
  --amber: oklch(0.62 0.14 80);
  --amber-soft: oklch(0.96 0.055 80);
  --page: oklch(1 0 0);
  --page-ink: oklch(0.22 0.012 250);
  --page-muted: oklch(0.52 0.015 250);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 14px 44px oklch(0.55 0.02 145 / 0.16);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
}

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

button,
a,
input,
textarea,
select {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  box-shadow: 0 0 0 3px oklch(0.83 0.185 128 / 0.22);
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.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;
}

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

.sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 18px 14px 14px;
  background: var(--nav);
  border-right: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 8px 0 10px;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0.14em;
}

.brand-mark {
  width: 10px;
  height: 10px;
  background: var(--lime);
  border-radius: 3px;
  transform: rotate(10deg);
  box-shadow: 0 0 24px oklch(0.83 0.185 128 / 0.32);
}

.prototype-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 14px 0 18px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.workspace-switcher:hover {
  background: var(--surface-raised);
}

.workspace-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 12px;
  font-weight: 800;
}

.workspace-copy {
  min-width: 0;
  flex: 1;
}

.workspace-copy strong,
.workspace-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-copy strong {
  font-size: 13px;
  font-weight: 680;
}

.workspace-copy span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.chevron {
  color: var(--faint);
  font-size: 11px;
}

.nav-label {
  margin: 0 10px 7px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 580;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background: var(--surface-raised);
  color: var(--text);
}

.nav-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.nav-item.active .nav-icon {
  color: var(--lime);
}

.nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.nav-separator {
  height: 1px;
  margin: 16px 10px;
  background: var(--line-soft);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.coverage-note {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.coverage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.coverage-row strong {
  color: var(--text);
  font-weight: 650;
}

.coverage-bar {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.coverage-bar span {
  display: block;
  width: 72%;
  height: 100%;
  background: var(--lime);
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
}

.profile-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
}

.profile-copy {
  min-width: 0;
}

.profile-copy strong,
.profile-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.profile-copy span {
  color: var(--muted);
  font-size: 10px;
}

.app-main {
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--nav);
}

.mobile-menu {
  display: none;
}

.breadcrumb {
  min-width: 0;
}

.breadcrumb-path {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 11px;
}

.breadcrumb-path span:last-child {
  color: var(--muted);
}

.breadcrumb-title {
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-spacer {
  flex: 1;
}

.autosave {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), color 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button:hover {
  border-color: oklch(0.42 0.018 145);
  background: var(--surface-hover);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.button.primary:hover {
  background: oklch(0.87 0.175 128);
}

.button.danger {
  border-color: oklch(0.50 0.12 25);
  color: oklch(0.82 0.11 25);
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button.ghost:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.button.small {
  min-height: 29px;
  padding: 0 9px;
  font-size: 11px;
}

.button.full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.icon-button svg,
.button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.page-content {
  min-height: calc(100vh - 62px);
}

.review-layout {
  display: grid;
  grid-template-columns: 236px minmax(480px, 1fr) 390px;
  height: calc(100vh - 62px);
  min-height: 620px;
}

.flow-panel,
.decision-drawer,
.monitor-drawer,
.library-drawer {
  min-width: 0;
  overflow: auto;
  background: var(--surface);
}

.flow-panel {
  border-right: 1px solid var(--line-soft);
}

.decision-drawer,
.monitor-drawer,
.library-drawer {
  border-left: 1px solid var(--line-soft);
}

.panel-header {
  position: sticky;
  z-index: 5;
  top: 0;
  padding: 17px 16px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.eyebrow {
  color: var(--faint);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.panel-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.subtle-link {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 620;
}

.flow-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-soft);
}

.flow-summary-item {
  padding: 12px 10px;
  text-align: center;
}

.flow-summary-item + .flow-summary-item {
  border-left: 1px solid var(--line-soft);
}

.flow-summary-item strong,
.flow-summary-item span {
  display: block;
}

.flow-summary-item strong {
  font-size: 14px;
  font-weight: 720;
}

.flow-summary-item span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-tree {
  padding: 10px;
}

.flow-connector {
  width: 1px;
  height: 9px;
  margin-left: 17px;
  background: var(--line);
}

.flow-node {
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.flow-node:hover {
  background: var(--surface-raised);
}

.flow-node.active {
  border-color: var(--line);
  background: var(--surface-raised);
}

.flow-node-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.node-index {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.flow-node.active .node-index {
  border-color: var(--lime);
  background: var(--lime-soft);
  color: var(--lime);
}

.flow-node-title {
  min-width: 0;
  flex: 1;
}

.flow-node-title strong,
.flow-node-title span {
  display: block;
}

.flow-node-title strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 660;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-node-title span {
  margin-top: 1px;
  color: var(--faint);
  font-size: 10px;
}

.severity-token {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 740;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.severity-token::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.severity-token.high {
  background: var(--red-soft);
  color: oklch(0.80 0.12 25);
}

.severity-token.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.severity-token.low,
.severity-token.clear {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.flow-node-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  margin: 9px 0 0 34px;
  color: var(--faint);
  font-size: 9px;
}

.flow-node-meta strong {
  color: var(--muted);
  font-weight: 620;
}

.release-gate {
  margin: 6px 10px 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--red-soft);
}

.release-gate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.release-gate strong {
  font-size: 11px;
  font-weight: 680;
}

.release-gate p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.canvas-column {
  min-width: 0;
  overflow: auto;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
}

.canvas-toolbar {
  position: sticky;
  z-index: 7;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.page-identity {
  min-width: 0;
  margin-right: auto;
}

.page-identity strong,
.page-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-identity strong {
  font-size: 12px;
  font-weight: 670;
}

.page-identity span {
  color: var(--faint);
  font-size: 9px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
}

.segment {
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  cursor: pointer;
}

.segment:hover {
  color: var(--text);
}

.segment.active {
  background: var(--surface-hover);
  color: var(--text);
}

.canvas-stage {
  display: grid;
  min-height: calc(100% - 52px);
  padding: 24px;
  place-items: start center;
}

.browser-frame {
  width: min(860px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
  box-shadow: var(--shadow);
  transition: width 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.browser-frame.mobile-preview {
  width: min(390px, 100%);
}

.browser-frame.mobile-preview .checkout-grid {
  grid-template-columns: 1fr;
}

.browser-frame.mobile-preview .order-summary {
  border-top: 1px solid oklch(0.90 0.006 90);
  border-left: 0;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid oklch(0.88 0.006 90);
  background: oklch(0.94 0.005 90);
}

.browser-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.78 0.015 90);
}

.browser-url {
  display: flex;
  align-items: center;
  height: 21px;
  margin-left: 6px;
  padding: 0 10px;
  border: 1px solid oklch(0.86 0.007 90);
  border-radius: 6px;
  background: oklch(0.98 0.003 90);
  color: oklch(0.48 0.012 250);
  font-size: 9px;
}

.checkout-page {
  position: relative;
  min-height: 600px;
  color: var(--page-ink);
  background: var(--page);
}

.shop-header {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 34px;
  border-bottom: 1px solid oklch(0.90 0.006 90);
}

.shop-logo {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.secure-copy {
  margin-left: auto;
  color: var(--page-muted);
  font-size: 9px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  min-height: 482px;
}

.checkout-form {
  padding: 34px;
}

.checkout-form h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.checkout-form > p {
  max-width: 46ch;
  margin: 8px 0 28px;
  color: var(--page-muted);
  font-size: 11px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fake-field {
  margin-bottom: 13px;
}

.fake-field label {
  display: block;
  margin-bottom: 5px;
  color: oklch(0.42 0.012 250);
  font-size: 9px;
  font-weight: 650;
}

.fake-input {
  height: 38px;
  border: 1px solid oklch(0.84 0.01 250);
  border-radius: 7px;
  background: oklch(0.99 0.002 90);
}

.consent-row {
  display: flex;
  gap: 8px;
  margin: 5px 0 18px;
  color: oklch(0.45 0.012 250);
  font-size: 9px;
  line-height: 1.5;
}

.fake-checkbox {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: 0 0 auto;
  border: 1px solid oklch(0.72 0.012 250);
  border-radius: 3px;
}

.purchase-button {
  display: grid;
  width: 100%;
  height: 40px;
  place-items: center;
  border-radius: 7px;
  background: oklch(0.26 0.018 250);
  color: oklch(0.97 0.004 90);
  font-size: 10px;
  font-weight: 720;
}

.cancel-claim {
  position: relative;
  margin: 12px 0 0;
  padding: 8px;
  border-radius: 6px;
  color: oklch(0.45 0.012 250);
  font-size: 9px;
  text-align: center;
}

.cancel-claim.flagged {
  background: oklch(0.95 0.03 25);
  box-shadow: 0 0 0 1px oklch(0.70 0.15 25);
}

.order-summary {
  padding: 34px 28px;
  border-left: 1px solid oklch(0.90 0.006 90);
  background: oklch(0.955 0.006 90);
}

.order-summary h3 {
  margin: 0 0 20px;
  font-size: 12px;
}

.product-line {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: oklch(0.84 0.055 128);
}

.product-copy strong,
.product-copy span {
  display: block;
}

.product-copy strong {
  font-size: 9px;
}

.product-copy span {
  color: var(--page-muted);
  font-size: 8px;
}

.price-lines {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid oklch(0.86 0.008 90);
}

.price-line {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  color: var(--page-muted);
  font-size: 9px;
}

.price-line.total {
  margin-top: 15px;
  color: var(--page-ink);
  font-size: 11px;
  font-weight: 720;
}

.trial-note {
  position: relative;
  margin-top: 24px;
  padding: 10px;
  border-radius: 7px;
  background: oklch(0.99 0.002 90);
  color: var(--page-muted);
  font-size: 9px;
  line-height: 1.5;
}

.trial-note.flagged {
  background: oklch(0.97 0.025 80);
  box-shadow: 0 0 0 1px oklch(0.70 0.13 80);
}

.finding-marker {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 30px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border: 2px solid var(--page);
  border-radius: 999px;
  background: var(--red);
  color: oklch(0.98 0.004 25);
  box-shadow: 0 4px 12px oklch(0.25 0.08 25 / 0.28);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.finding-marker:hover,
.finding-marker.active {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px oklch(0.69 0.20 25 / 0.24), 0 4px 12px oklch(0.25 0.08 25 / 0.28);
}

.marker-07 {
  right: 3px;
  top: -12px;
}

.marker-08 {
  right: -10px;
  top: -10px;
  background: var(--amber);
  color: oklch(0.22 0.04 80);
}

.diff-layer {
  display: none;
  padding: 11px 18px;
  border-top: 1px solid oklch(0.88 0.006 90);
  background: oklch(0.965 0.006 90);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
}

.diff-layer.visible {
  display: grid;
  gap: 5px;
}

.diff-remove {
  color: oklch(0.53 0.16 25);
}

.diff-add {
  color: oklch(0.44 0.12 145);
}

.version-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.version-label {
  color: var(--faint);
  font-size: 9px;
  text-transform: uppercase;
}

.version-pill {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
}

.version-pill.current {
  border-color: var(--lime);
  background: var(--lime-soft);
  color: var(--lime);
}

.version-line {
  width: 28px;
  height: 1px;
  background: var(--line);
}

.change-time {
  margin-left: auto;
  color: var(--faint);
  font-size: 9px;
}

.finding-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.finding-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finding-number {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.finding-header h1 {
  max-width: 28ch;
  margin: 9px 0 0;
  font-size: 18px;
  font-weight: 720;
  line-height: 1.3;
}

.finding-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 630;
}

.finding-status.approved {
  color: var(--lime);
}

.drawer-section {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-section h2 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 730;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metadata-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}

.metadata-item span,
.metadata-item strong {
  display: block;
}

.metadata-item span {
  color: var(--faint);
  font-size: 9px;
}

.metadata-item strong {
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 620;
}

.observed-claim {
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 12px;
  line-height: 1.5;
}

.drawer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.source-pack {
  display: grid;
  gap: 10px;
}

.source-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-heading strong {
  display: block;
  font-size: 11px;
  font-weight: 670;
}

.source-heading span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.verified-token {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 9px;
  font-weight: 700;
}

.source-excerpt {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--faint);
  font-size: 9px;
}

.proposed-diff {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.proposed-diff div {
  padding: 8px 10px;
}

.proposed-diff div + div {
  border-top: 1px solid var(--line-soft);
}

.proposed-diff .remove {
  color: oklch(0.82 0.11 25);
}

.proposed-diff .add {
  color: oklch(0.83 0.12 145);
}

.reason-field {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.reason-field::placeholder {
  color: var(--faint);
}

.reason-help {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 9px;
}

.decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.implementation {
  display: none;
}

.implementation.visible {
  display: block;
}

.implementation-step {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 9px;
  align-items: start;
  padding: 8px 0;
}

.implementation-step + .implementation-step {
  border-top: 1px solid var(--line-soft);
}

.step-state {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--faint);
  font-size: 9px;
}

.step-state.done {
  border-color: var(--lime);
  background: var(--lime-soft);
  color: var(--lime);
}

.step-copy strong,
.step-copy span {
  display: block;
}

.step-copy strong {
  font-size: 10px;
  font-weight: 650;
}

.step-copy span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.step-meta {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.page-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.page-header-copy {
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 730;
  line-height: 1.25;
}

.page-header p {
  max-width: 70ch;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.metric-strip {
  display: flex;
  align-items: stretch;
  min-height: 70px;
  border-bottom: 1px solid var(--line-soft);
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 13px 24px;
}

.metric-item + .metric-item {
  border-left: 1px solid var(--line-soft);
}

.metric-item strong {
  font-size: 20px;
  font-weight: 720;
}

.metric-item span {
  max-width: 15ch;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.monitor-layout,
.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  height: calc(100vh - 62px);
  min-height: 620px;
}

.monitor-main,
.library-main {
  min-width: 0;
  overflow: auto;
}

.filter-bar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 9px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.search-field {
  display: flex;
  align-items: center;
  min-width: 220px;
  max-width: 420px;
  height: 34px;
  padding: 0 10px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-field svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--faint);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.search-field input::placeholder {
  color: var(--faint);
}

.select-control {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}

.change-list {
  min-width: 760px;
}

.change-list-header,
.change-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 112px 108px 116px minmax(160px, 0.8fr);
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}

.change-list-header {
  min-height: 38px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.change-row {
  min-height: 72px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  cursor: pointer;
}

.change-row:hover {
  background: var(--surface);
}

.change-row.active {
  background: var(--surface-raised);
}

.change-page {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.change-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--cyan);
}

.change-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.change-page-copy {
  min-width: 0;
}

.change-page-copy strong,
.change-page-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-page-copy strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.change-page-copy span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.state-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 9px;
  font-weight: 680;
}

.state-label.critical {
  background: var(--red-soft);
  color: oklch(0.80 0.12 25);
}

.state-label.safe {
  background: var(--lime-soft);
  color: var(--lime);
}

.state-label.info {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.drawer-intro {
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-intro h2 {
  max-width: 28ch;
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.3;
}

.drawer-intro p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.impact-chain {
  display: grid;
  gap: 8px;
}

.impact-node {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.impact-node-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-raised);
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
}

.impact-node strong,
.impact-node span {
  display: block;
}

.impact-node strong {
  font-size: 10px;
  font-weight: 650;
}

.impact-node span {
  margin-top: 1px;
  color: var(--faint);
  font-size: 9px;
}

.impact-arrow {
  width: 1px;
  height: 8px;
  margin: 0 0 0 22px;
  background: var(--line);
}

.impact-actions {
  display: grid;
  gap: 8px;
  padding: 16px 18px 20px;
}

.change-diff {
  display: grid;
  gap: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.change-diff div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.change-diff .remove {
  color: oklch(0.82 0.11 25);
}

.change-diff .add {
  color: oklch(0.83 0.12 145);
}

.memory-bands {
  display: flex;
  min-height: 62px;
  border-bottom: 1px solid var(--line-soft);
}

.memory-band {
  min-width: 150px;
  padding: 12px 24px;
}

.memory-band + .memory-band {
  border-left: 1px solid var(--line-soft);
}

.memory-band strong,
.memory-band span {
  display: block;
}

.memory-band strong {
  font-size: 15px;
  font-weight: 710;
}

.memory-band span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.decision-table-wrap {
  min-width: 920px;
}

.decision-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.decision-table th {
  height: 38px;
  padding: 0 14px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.decision-table td {
  height: 70px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
  vertical-align: middle;
}

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

.decision-table tbody tr:hover {
  background: var(--surface);
}

.decision-table tbody tr.active {
  background: var(--surface-raised);
}

.decision-main-cell strong,
.decision-main-cell span {
  display: block;
}

.decision-main-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-main-cell span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-position {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reuse-count {
  color: var(--cyan);
  font-weight: 670;
}

.preview-quote {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 12px;
}

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

.policy-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.policy-row + .policy-row {
  border-top: 1px solid var(--line-soft);
}

.policy-row strong,
.policy-row span {
  display: block;
}

.policy-row strong {
  font-size: 10px;
  font-weight: 630;
}

.policy-row span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
}

.policy-value {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
}

.toast-copy strong,
.toast-copy span {
  display: block;
}

.toast-copy strong {
  font-size: 10px;
  font-weight: 670;
}

.toast-copy span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1280px) {
  .review-layout {
    grid-template-columns: 220px minmax(430px, 1fr) 360px;
  }

  .metadata-grid {
    gap: 10px 12px;
  }

  .canvas-stage {
    padding: 16px;
  }
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-name {
    gap: 0;
    font-size: 0;
  }

  .prototype-label,
  .workspace-copy,
  .chevron,
  .nav-label,
  .nav-item span:not(.nav-icon):not(.nav-count),
  .coverage-note,
  .profile-copy {
    display: none;
  }

  .workspace-switcher {
    justify-content: center;
    padding: 8px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-count {
    position: absolute;
    margin: -20px 0 0 27px;
    min-width: 16px;
    padding-inline: 4px;
    background: var(--nav);
  }

  .profile {
    justify-content: center;
    padding: 8px 0;
  }

  .review-layout {
    grid-template-columns: 220px minmax(400px, 1fr);
  }

  .decision-drawer {
    position: fixed;
    z-index: 30;
    top: 62px;
    right: 0;
    bottom: 0;
    width: min(410px, calc(100vw - 72px));
    box-shadow: -20px 0 60px oklch(0.05 0.01 145 / 0.42);
  }

  .monitor-layout,
  .library-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: 228px;
    transform: translateX(-100%);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .sidebar .brand {
    justify-content: space-between;
    padding: 0 8px 0 10px;
  }

  .sidebar .brand-name {
    gap: 9px;
    font-size: 15px;
  }

  .sidebar .prototype-label,
  .sidebar .workspace-copy,
  .sidebar .chevron,
  .sidebar .nav-label,
  .sidebar .nav-item span:not(.nav-icon):not(.nav-count),
  .sidebar .coverage-note,
  .sidebar .profile-copy {
    display: block;
  }

  .sidebar .workspace-switcher,
  .sidebar .nav-item,
  .sidebar .profile {
    justify-content: flex-start;
  }

  .sidebar .workspace-switcher {
    padding: 10px;
  }

  .sidebar .nav-item {
    padding: 0 10px;
  }

  .sidebar .nav-count {
    position: static;
    margin: 0 0 0 auto;
  }

  .sidebar .profile {
    padding: 8px 10px;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .topbar {
    padding-inline: 12px;
  }

  .autosave,
  .topbar .button.secondary-action {
    display: none;
  }

  .review-layout {
    display: block;
    height: auto;
    min-height: calc(100vh - 62px);
  }

  .flow-panel {
    display: none;
  }

  .canvas-column {
    min-height: calc(100vh - 62px);
  }

  .decision-drawer {
    position: static;
    width: auto;
    min-height: auto;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
    box-shadow: none;
  }

  .canvas-toolbar {
    flex-wrap: wrap;
  }

  .canvas-stage {
    padding: 10px;
  }

  .checkout-page {
    min-height: 520px;
  }

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

  .order-summary {
    border-top: 1px solid oklch(0.90 0.006 90);
    border-left: 0;
  }

  .monitor-layout,
  .library-layout {
    display: block;
    height: auto;
  }

  .monitor-drawer,
  .library-drawer {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .page-header,
  .filter-bar {
    padding-inline: 14px;
  }

  .metric-strip,
  .memory-bands {
    overflow-x: auto;
  }

  .search-field {
    min-width: 150px;
  }
}

@media (max-width: 540px) {
  .topbar {
    gap: 10px;
  }

  .breadcrumb-path {
    display: none;
  }

  .breadcrumb-title {
    max-width: 160px;
    font-size: 13px;
  }

  .topbar .button {
    min-width: 34px;
    padding-inline: 8px;
    font-size: 0;
  }

  .topbar .button svg {
    margin: 0;
  }

  .page-header {
    display: block;
  }

  .page-header-actions {
    margin: 14px 0 0;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-field {
    min-width: 100%;
  }

  .select-control {
    flex: 1;
  }

  .canvas-toolbar .segmented.viewport-switch {
    display: none;
  }

  .checkout-form,
  .order-summary {
    padding: 24px 20px;
  }

  .shop-header {
    padding-inline: 20px;
  }

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

.ix-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 328px;
    gap: 22px;
    align-items: start;
    padding: 24px 28px 40px;
  }

.ix-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.ix-intro { display: flex; flex-direction: column; gap: 7px; }

.ix-title { margin: 2px 0 0; font-size: 22px; font-weight: 680; letter-spacing: -0.01em; color: var(--text); }

.ix-sub { margin: 0; max-width: 62ch; color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.ix-section {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px 18px 20px;
    display: flex; flex-direction: column; gap: 14px;
  }

.ix-section-head { display: flex; align-items: center; gap: 10px; }

.ix-step {
    display: inline-grid; place-items: center;
    width: 24px; height: 24px; flex: 0 0 auto;
    border: 1px solid var(--line); border-radius: 7px;
    color: var(--lime); background: var(--lime-soft);
    font-size: 11px; font-weight: 720; letter-spacing: 0.02em;
  }

.ix-h { margin: 0; font-size: 14.5px; font-weight: 640; color: var(--text); display: flex; align-items: center; gap: 9px; }

.ix-section-sub { margin: -4px 0 0; color: var(--faint); font-size: 11px; line-height: 1.5; max-width: 66ch; }

.ix-optional {
    font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px;
  }

.ix-field { display: flex; flex-direction: column; gap: 6px; }

.ix-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.ix-label { color: var(--muted); font-size: 11px; font-weight: 620; letter-spacing: 0.01em; }

.ix-hint { margin: 1px 0 0; color: var(--faint); font-size: 10px; line-height: 1.5; }

.ix-input-wrap { position: relative; display: flex; align-items: center; }

.ix-input-ic { position: absolute; left: 11px; width: 15px; height: 15px; fill: none; stroke: var(--faint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.ix-input {
    width: 100%; height: 40px;
    padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); font-size: 12.5px;
    transition: border-color 140ms ease;
  }

.ix-input-wrap .ix-input { padding-left: 34px; }

.ix-input.slim { height: 36px; font-size: 12px; }

.ix-input::placeholder { color: var(--faint); }

.ix-input:hover, .ix-select:hover { border-color: var(--line); }

.ix-input:focus, .ix-select:focus { border-color: var(--lime); }

.ix-select {
    width: 100%; height: 40px; padding: 0 34px 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); font-size: 12.5px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
  }

.ix-segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }

.ix-seg { height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 580; cursor: pointer; transition: background 140ms ease, color 140ms ease; }

.ix-seg:hover { color: var(--text); }

.ix-seg.active { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

.ix-chip-row { display: flex; flex-wrap: wrap; gap: 7px; }

.ix-chip { padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 11.5px; font-weight: 560; cursor: pointer; transition: all 130ms ease; }

.ix-chip:hover { color: var(--text); border-color: var(--line); }

.ix-chip.active { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 640; }

.ix-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.ix-mode { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 13px 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--muted); cursor: pointer; transition: border-color 140ms ease, background 140ms ease; }

.ix-mode:hover { border-color: var(--line); background: var(--surface-hover); }

.ix-mode.active { border-color: var(--lime); background: var(--lime-soft); }

.ix-mode-top { display: flex; align-items: center; justify-content: space-between; }

.ix-mode-name { font-size: 12.5px; font-weight: 660; color: var(--text); }

.ix-mode-dot { width: 14px; height: 14px; border-radius: 999px; border: 1px solid var(--line); flex: 0 0 auto; }

.ix-mode.active .ix-mode-dot { border-color: var(--lime); background: var(--lime); box-shadow: inset 0 0 0 3px var(--lime-ink); }

.ix-mode-desc { font-size: 10.5px; line-height: 1.5; color: var(--faint); }

.ix-mode.active .ix-mode-desc { color: var(--muted); }

.ix-capture { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ix-cap { display: flex; align-items: center; gap: 11px; text-align: left; padding: 13px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; transition: border-color 140ms ease, background 140ms ease; }

.ix-cap:hover { border-color: var(--line); background: var(--surface-hover); }

.ix-cap.active { border-color: var(--lime); background: var(--lime-soft); }

.ix-cap-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 7px; background: var(--surface-raised); }

.ix-cap-ic svg { width: 16px; height: 16px; fill: none; stroke: var(--lime); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.ix-cap-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.ix-cap-copy strong { font-size: 12px; font-weight: 620; color: var(--text); }

.ix-cap-copy span { font-size: 10px; line-height: 1.45; color: var(--faint); }

.ix-cap-dot { margin-left: auto; width: 14px; height: 14px; border-radius: 999px; border: 1px solid var(--line); flex: 0 0 auto; }

.ix-cap.active .ix-cap-dot { border-color: var(--lime); background: var(--lime); box-shadow: inset 0 0 0 3px var(--lime-ink); }

.ix-dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 18px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--bg); text-align: center; }

.ix-dropzone[hidden] { display: none; }

.ix-dropzone svg { width: 26px; height: 26px; fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.ix-dropzone p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.ix-dropzone p strong { display: block; color: var(--text); font-size: 12px; margin-bottom: 2px; }

.ix-opt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.ix-actions { display: flex; align-items: center; gap: 12px; padding-top: 2px; }

.ix-run { padding: 0 18px; height: 42px; }

.ix-actions-note { margin-left: auto; color: var(--faint); font-size: 10.5px; }

/* Right rail */
  .ix-rail { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 12px; }

.ix-rail-card { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); padding: 15px 15px 16px; display: flex; flex-direction: column; gap: 10px; }

.ix-summary { margin: 0; display: flex; flex-direction: column; gap: 0; }

.ix-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }

.ix-summary > div:last-child { border-bottom: 0; padding-bottom: 0; }

.ix-summary dt { color: var(--faint); font-size: 10px; font-weight: 620; letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }

.ix-summary dd { margin: 0; color: var(--text); font-size: 12px; font-weight: 560; text-align: right; }

.ix-do { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }

.ix-do li { position: relative; padding-left: 20px; color: var(--muted); font-size: 11px; line-height: 1.5; }

.ix-do li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 8px; height: 8px; border-radius: 2px; background: var(--lime); opacity: 0.85; }

.ix-pack-row { display: flex; flex-wrap: wrap; gap: 6px; }

.ix-pack { font-size: 10px; font-weight: 640; letter-spacing: 0.03em; color: var(--cyan); background: var(--cyan-soft); border: 1px solid var(--line-soft); border-radius: 6px; padding: 3px 8px; }

.ix-rail-note { margin: 0; color: var(--faint); font-size: 9.5px; line-height: 1.5; }

.ix-safe { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--bg); }

.ix-safe svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; fill: none; stroke: var(--lime); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.ix-safe span { color: var(--muted); font-size: 10.5px; line-height: 1.5; }

@media (max-width: 1080px) {
    .ix-layout { grid-template-columns: 1fr; }
    .ix-rail { position: static; }
    .ix-opt-grid { grid-template-columns: 1fr 1fr; }
    .ix-mode-grid { grid-template-columns: 1fr; }
  }

@media (max-width: 640px) {
    .ix-layout { padding: 18px 16px 32px; }
    .ix-grid-2, .ix-capture, .ix-opt-grid { grid-template-columns: 1fr; }
    .ix-actions { flex-wrap: wrap; }
    .ix-actions-note { margin-left: 0; width: 100%; }
  }