:root {
  --paper: #07131d;
  --ink: #e4f1ff;
  --ink-muted: #8ea7be;
  --card: rgba(16, 34, 52, 0.6);
  --card-strong: rgba(12, 28, 44, 0.82);
  --border: rgba(116, 182, 255, 0.28);
  --shadow: 0 14px 48px rgba(2, 6, 17, 0.45);
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --accent-3: #4ade80;
  --warning: #f59e0b;
  --danger: #fb7185;
  --info: #38bdf8;
  --snapshot-accent-primary: #22d3ee;
  --snapshot-accent-attention: #f59e0b;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --focus: 0 0 0 3px rgba(56, 189, 248, 0.35);
  --grid-gap: 14px;
  --font-sans: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(circle at 0% 20%, rgba(56, 189, 248, 0.2) 0%, rgba(7, 19, 29, 0) 32%),
    radial-gradient(circle at 85% 10%, rgba(45, 212, 191, 0.22) 0%, rgba(7, 19, 29, 0) 28%),
    radial-gradient(circle at 50% 100%, rgba(251, 113, 133, 0.18) 0%, rgba(7, 19, 29, 0) 32%),
    var(--paper);
}

::selection {
  background: rgba(56, 189, 248, 0.3);
  color: #e4f1ff;
}

::-moz-selection {
  background: rgba(56, 189, 248, 0.3);
  color: #e4f1ff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 182, 255, 0.22) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(116, 182, 255, 0.22);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(116, 182, 255, 0.36);
}

a {
  color: var(--accent-2);
  transition: color 150ms ease;
}

a:hover {
  color: #7dd3fc;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(12, 27, 41, 0.65);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(116, 182, 255, 0.42);
}

.upload-form {
  display: grid;
  gap: 10px;
}

.file-input {
  padding: 8px;
  border-style: dashed;
  background: rgba(12, 27, 41, 0.72);
}

.file-input::file-selector-button {
  margin-right: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--card-strong);
  cursor: pointer;
}

.upload-status {
  min-height: 20px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--card-strong);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

button:hover:not([disabled]) {
  border-color: rgba(116, 182, 255, 0.48);
  transform: translateY(-1px);
}

button:active:not([disabled]) {
  transform: translateY(0);
}

button.primary {
  color: #001a21;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--info));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.32);
}

button.primary:hover:not([disabled]) {
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.42);
}

.button-link.primary {
  color: #001a21;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--info));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.32);
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.66;
}

button.is-loading {
  position: relative;
  padding-right: 34px;
}

button.is-loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(228, 241, 255, 0.65);
  border-top-color: transparent;
  border-radius: 999px;
  transform: translateY(-50%);
  animation: button-spin 0.85s linear infinite;
}

button.output-btn.active {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.22);
}

.state-badge {
  min-width: 88px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.34);
  background: rgba(12, 27, 41, 0.82);
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.state-badge.is-off:hover {
  border-color: rgba(116, 182, 255, 0.62);
  color: var(--ink);
}

.state-badge.is-on {
  border-color: rgba(45, 212, 191, 0.74);
  color: #d6fff6;
  background: linear-gradient(120deg, rgba(45, 212, 191, 0.3), rgba(56, 189, 248, 0.3));
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.22) inset, 0 0 18px rgba(45, 212, 191, 0.18);
}

.state-badge[disabled] {
  transform: none;
}

.setting-group {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.16);
  background: rgba(12, 27, 41, 0.48);
  padding: 12px;
}

.setting-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-state {
  min-width: 74px;
  text-align: right;
  opacity: 0;
  transition: opacity 260ms ease;
}

.config-summary-grid,
.config-card-grid,
.config-state-grid,
.config-depth-grid,
.config-field-grid,
.config-prompt-grid,
.config-overview-metrics,
.config-stage-list {
  display: grid;
  gap: 12px;
}

.config-card-grid {
  gap: 18px;
}

.config-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.config-summary-card,
.config-card,
.config-state-card,
.config-prompt-variant,
.config-overview-metric-card,
.config-stage-group {
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.16);
  background: rgba(12, 27, 41, 0.48);
}

.config-summary-card,
.config-state-card,
.config-prompt-variant,
.config-overview-metric-card,
.config-stage-group {
  padding: 14px;
}

.config-summary-label,
.config-state-title,
.config-prompt-variant-title,
.config-stage-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.config-overview-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.config-overview-metric-card {
  display: grid;
  gap: 6px;
  min-height: 94px;
  background: linear-gradient(180deg, rgba(14, 31, 48, 0.88), rgba(8, 20, 32, 0.72));
}

.config-overview-metric-card span {
  font-size: 12px;
  color: var(--ink-muted);
}

.config-overview-metric-card strong {
  font-size: 30px;
  line-height: 1;
  color: #f7fdff;
}

.config-overview-shell,
.config-jump-shell {
  display: grid;
  gap: 14px;
}

.config-overview-table-wrap {
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: rgba(8, 20, 32, 0.58);
  overflow: hidden;
}

.config-overview-table {
  display: grid;
}

.config-overview-table-head,
.config-overview-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(110px, 0.7fr) minmax(170px, 1fr) minmax(210px, 1.2fr) minmax(210px, 1.2fr) minmax(180px, 1fr);
  gap: 12px;
}

.config-overview-table-head {
  padding: 14px 16px;
  background: rgba(17, 38, 56, 0.95);
  border-bottom: 1px solid rgba(116, 182, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.config-overview-table-body {
  display: grid;
}

.config-overview-row {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(116, 182, 255, 0.12);
  padding: 14px 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.config-overview-row:first-child {
  border-top: 0;
}

.config-overview-row:hover {
  background: rgba(56, 189, 248, 0.08);
}

.config-overview-row:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: -2px;
}

.config-overview-step-cell,
.config-overview-cell,
.config-overview-status {
  display: grid;
  gap: 8px;
  align-content: center;
}

.config-overview-step-cell strong {
  color: #f7fdff;
}

.config-overview-chip-cell {
  align-content: start;
}

.config-jump-section {
  position: sticky;
  top: 72px;
  z-index: 2;
}

.config-jump-shell {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.config-jump-block-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.config-jump-links,
.config-filter-row,
.config-chip-row,
.config-inline-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-jump-link,
.config-filter-btn {
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.24);
  background: rgba(9, 23, 36, 0.82);
  color: #dcefff;
  font: inherit;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.config-jump-link:hover,
.config-filter-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
}

.config-jump-link:focus-visible,
.config-filter-btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: 2px;
}

.config-filter-btn.is-active {
  border-color: rgba(45, 212, 191, 0.72);
  background: rgba(45, 212, 191, 0.16);
  color: #dbfff8;
}

.config-card {
  position: relative;
  padding: 16px;
  overflow: hidden;
  border-color: rgba(116, 182, 255, 0.26);
  background: linear-gradient(180deg, rgba(14, 31, 48, 0.92), rgba(8, 20, 32, 0.8));
  box-shadow: 0 20px 40px rgba(2, 6, 17, 0.28), 0 0 0 1px rgba(56, 189, 248, 0.06) inset;
}

.config-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(45, 212, 191, 0.9));
}

.config-card-readonly {
  background: linear-gradient(180deg, rgba(12, 27, 41, 0.68), rgba(7, 19, 29, 0.5));
}

.config-card-readonly::before {
  background: linear-gradient(90deg, rgba(142, 167, 190, 0.8), rgba(56, 189, 248, 0.55));
}

.config-card-accordion {
  padding: 0;
}

.config-card-summary {
  width: 100%;
  border: 0;
  padding: 18px 16px 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.config-card-summary:hover {
  background: rgba(56, 189, 248, 0.05);
}

.config-card-summary:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: -2px;
}

.config-card-summary-main {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.config-card-summary-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.config-card-summary-arrow {
  min-width: 78px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.config-card-header {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  margin: -16px -16px 18px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(116, 182, 255, 0.18);
  background: linear-gradient(180deg, rgba(20, 43, 66, 0.92), rgba(12, 27, 41, 0.6));
}

.config-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.config-card .card-title {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: #f7fdff;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}

.config-step-key {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.22);
  background: rgba(8, 20, 32, 0.72);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.config-step-summary-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.config-summary-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: rgba(7, 17, 28, 0.45);
}

.config-summary-panel span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.config-summary-panel strong {
  color: #f7fdff;
  font-size: 20px;
}

.config-card-detail {
  border-top: 1px solid rgba(116, 182, 255, 0.14);
  padding: 18px 16px 16px;
  display: grid;
  gap: 16px;
}

.config-editor-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: rgba(7, 17, 28, 0.48);
}

.config-editor-section-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.config-editor-section-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #f7fdff;
}

.config-editor-section-grid {
  display: grid;
  gap: 12px;
}

.config-editor-section-grid-budget {
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
}

.config-field-grid {
  margin-bottom: 14px;
}

.config-depth-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 14px;
}

.config-field {
  display: grid;
  gap: 8px;
}

.config-field-emphasis {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: rgba(12, 27, 41, 0.56);
}

.config-field input,
.config-field select {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(116, 182, 255, 0.22);
  background: rgba(8, 20, 32, 0.88);
  color: #f7fdff;
  padding: 10px 12px;
}

.config-field select:focus,
.config-field input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 1px;
}

.config-field-label {
  font-weight: 600;
}

.config-control-stack {
  display: grid;
  gap: 12px;
}

.config-control-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.12);
  background: rgba(12, 27, 41, 0.46);
}

.config-control-row-main {
  display: grid;
  gap: 10px;
}

.config-control-row-title {
  font-size: 14px;
  font-weight: 700;
  color: #f7fdff;
}

.config-state-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-state-pill {
  min-width: 110px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(116, 182, 255, 0.16);
  background: rgba(8, 20, 32, 0.72);
}

.config-state-pill span {
  color: var(--ink-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.config-state-pill strong {
  color: #f7fdff;
  font-size: 13px;
}

.config-state-pill.is-override {
  border-color: rgba(45, 212, 191, 0.34);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.18) inset;
}

.config-state-pill-openai {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(56, 189, 248, 0.11);
}

.config-state-pill-claude {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.11);
}

.config-state-grid {
  grid-template-columns: minmax(0, 1fr);
}

.config-kv-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.config-kv-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.config-kv {
  display: grid;
  gap: 4px;
}

.config-kv span {
  color: var(--ink-muted);
  font-size: 12px;
}

.config-warning {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: #ffd789;
}

.config-prompt-grid {
  margin-top: 12px;
}

.config-prompt-details {
  margin-top: 10px;
  border-top: 1px solid rgba(116, 182, 255, 0.12);
  padding-top: 10px;
}

.config-prompt-details summary {
  cursor: pointer;
  color: #dcefff;
  font-weight: 600;
  list-style: none;
}

.config-prompt-details summary::-webkit-details-marker {
  display: none;
}

.config-prompt-details summary::before {
  content: "+";
  display: inline-block;
  margin-right: 8px;
  color: var(--ink-muted);
}

.config-prompt-details[open] summary::before {
  content: "−";
}

.config-provider-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.config-provider-tab {
  min-width: 120px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.2);
  background: rgba(8, 20, 32, 0.76);
  color: #dcefff;
  font: inherit;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.config-provider-tab:hover {
  transform: translateY(-1px);
}

.config-provider-tab.is-active {
  color: #f7fdff;
}

.config-provider-tab-openai.is-active {
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(56, 189, 248, 0.16);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.18) inset;
}

.config-provider-tab-claude.is-active {
  border-color: rgba(245, 158, 11, 0.52);
  background: rgba(245, 158, 11, 0.16);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.18) inset;
}

.config-provider-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.16);
}

.config-provider-panel-openai {
  background: linear-gradient(180deg, rgba(18, 47, 70, 0.76), rgba(8, 20, 32, 0.62));
  border-color: rgba(56, 189, 248, 0.28);
}

.config-provider-panel-claude {
  background: linear-gradient(180deg, rgba(53, 35, 8, 0.68), rgba(20, 13, 5, 0.58));
  border-color: rgba(245, 158, 11, 0.28);
}

.config-control-row-provider-openai {
  border-color: rgba(56, 189, 248, 0.18);
}

.config-control-row-provider-claude {
  border-color: rgba(245, 158, 11, 0.18);
}

.config-field-provider-openai select {
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.1);
}

.config-field-provider-claude select {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.1);
}

.config-stage-group {
  display: grid;
  gap: 14px;
  background: linear-gradient(180deg, rgba(12, 27, 41, 0.82), rgba(7, 19, 29, 0.64));
}

.config-stage-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.config-stage-title {
  font-size: 18px;
  margin-bottom: 4px;
}

.config-chip {
  border-color: rgba(116, 182, 255, 0.22);
  background: rgba(12, 27, 41, 0.68);
  color: #dcefff;
}

.config-chip-default {
  color: var(--ink-muted);
}

.config-chip-customized {
  background: rgba(45, 212, 191, 0.15);
  color: #d4fff4;
  border-color: rgba(45, 212, 191, 0.35);
}

.config-chip-openai {
  background: rgba(56, 189, 248, 0.14);
  color: #bfeeff;
  border-color: rgba(56, 189, 248, 0.32);
}

.config-chip-claude {
  background: rgba(245, 158, 11, 0.16);
  color: #ffe3ad;
  border-color: rgba(245, 158, 11, 0.34);
}

.config-chip-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #ffe3ad;
  border-color: rgba(245, 158, 11, 0.34);
}

.config-inline-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.2);
  background: rgba(12, 27, 41, 0.75);
  font-size: 12px;
  color: #dcefff;
}

.config-inline-chip strong {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.config-inline-chip.is-override {
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.24) inset;
}

.config-inline-chip-openai {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.12);
}

.config-inline-chip-claude {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
}

.config-readonly-note {
  color: var(--ink-muted);
}

.config-card > .setting-state {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(116, 182, 255, 0.12);
}

.config-empty-state {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(116, 182, 255, 0.2);
}

@media (max-width: 1180px) {
  .config-overview-table-head,
  .config-overview-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(96px, 0.7fr) repeat(3, minmax(150px, 1fr)) minmax(150px, 0.9fr);
  }
}

@media (max-width: 960px) {
  .config-overview-table-head {
    display: none;
  }

  .config-overview-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .config-jump-section {
    position: static;
  }

  .config-editor-section-grid-budget,
  .config-step-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .config-card-summary-main,
  .config-stage-header {
    display: grid;
  }

  .config-card-summary-arrow {
    text-align: left;
  }

  .config-overview-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .config-provider-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-provider-tab {
    min-width: 0;
  }
}

.subscription-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.subscription-metric-card {
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.16);
  background: rgba(12, 27, 41, 0.48);
  padding: 12px;
}

.subscription-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.subscription-plan-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: linear-gradient(180deg, rgba(12, 27, 41, 0.82), rgba(7, 19, 29, 0.58));
}

.subscription-plan-card.is-active {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25) inset, 0 0 24px rgba(45, 212, 191, 0.15);
}

.subscription-plan-title {
  font-size: 20px;
  font-weight: 700;
}

.subscription-plan-price {
  font-family: var(--font-mono);
  color: #d6fff6;
}

.credit-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.credit-pack-btn {
  display: grid;
  gap: 6px;
  align-items: start;
  justify-items: start;
  padding: 16px;
  border-radius: 14px;
}

.credit-pack-count {
  font-size: 18px;
  font-weight: 700;
}

.credit-pack-price {
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.setting-state.is-visible {
  opacity: 1;
}

.setting-state.saved-fade.is-visible {
  animation: setting-saved-pulse 300ms ease;
}

.run-depth-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.run-depth-option {
  min-width: 190px;
  justify-content: flex-start;
  text-align: left;
  border-radius: 14px;
  line-height: 1.35;
}

.run-depth-option .depth-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-muted);
}

.run-depth-option.is-on .depth-meta {
  color: rgba(228, 241, 255, 0.92);
}

.run-depth-option.is-disabled {
  opacity: 0.5;
}

.run-subscription-panel {
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.16);
  background: rgba(12, 27, 41, 0.45);
  padding: 12px;
}

.run-assumptions-label {
  margin-top: 4px;
}

.run-options-divider {
  border-top: 1px solid rgba(116, 182, 255, 0.2);
}

.run-options-subheading {
  font-size: 14px;
  margin-bottom: 10px;
}

.run-assumption-preset-group,
.run-underwriting-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.run-assumption-table-toggle {
  display: none;
  margin-top: 10px;
  border: 1px solid rgba(116, 182, 255, 0.34);
  background: rgba(12, 27, 41, 0.65);
  color: var(--ink-muted);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
}

.run-assumptions-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 12px;
  background: rgba(8, 21, 34, 0.72);
}

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

.run-assumptions-table th,
.run-assumptions-table td {
  border-bottom: 1px solid rgba(116, 182, 255, 0.15);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.run-assumptions-table thead th {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9dd8f8;
  background: rgba(13, 30, 50, 0.85);
}

.run-assumptions-table tbody tr:last-child td {
  border-bottom: 0;
}

.run-assumptions-table .assumption-parameter {
  min-width: 220px;
}

.assumption-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.assumption-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.45);
  background: rgba(116, 182, 255, 0.12);
  color: #9dd8f8;
  padding: 0;
  line-height: 1;
  font-size: 11px;
  cursor: help;
}

.assumption-help-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 180px;
  max-width: 280px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(116, 182, 255, 0.35);
  background: rgba(9, 22, 36, 0.96);
  color: #d7ecff;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 130ms ease;
}

.assumption-help:hover .assumption-help-tooltip,
.assumption-help:focus-visible .assumption-help-tooltip {
  opacity: 1;
  visibility: visible;
}

.run-assumptions-table-wrap[data-selected-preset="conservative"] [data-col="conservative"],
.run-assumptions-table-wrap[data-selected-preset="balanced"] [data-col="balanced"],
.run-assumptions-table-wrap[data-selected-preset="aggressive"] [data-col="aggressive"],
.run-assumptions-table-wrap[data-selected-preset="custom"] [data-col="custom"] {
  background: rgba(45, 212, 191, 0.12);
}

.assumption-custom-cell {
  min-width: 190px;
}

.assumption-custom-cell .dcf-input-wrap input {
  min-width: 88px;
}

.assumption-custom-cell .dcf-input-wrap.pct-mode input {
  padding-left: 10px;
  padding-right: 22px;
}

.assumption-delta-indicator {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.86);
  min-height: 1.1em;
}

.assumption-delta-indicator.is-aggressive {
  color: #79ebca;
}

.assumption-delta-indicator.is-conservative {
  color: #f6cb70;
}

.run-assumptions-summary,
.run-underwriting-explainer {
  margin-top: 8px;
}

button.danger {
  border: 1px solid rgba(251, 113, 133, 0.6);
  background: rgba(251, 113, 133, 0.18);
  color: #ffd1da;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.app-shell {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(18, 32, 46, 0.96), rgba(11, 20, 31, 0.92));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.app-shell-brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.app-shell-subtitle {
  color: var(--ink-muted);
  font-size: 13px;
  margin-top: 4px;
}

.app-shell-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.app-shell-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.18);
  background: rgba(148, 163, 184, 0.06);
  color: var(--ink);
  text-decoration: none;
}

.app-shell-nav-link.is-active {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.36);
  color: #dcfff6;
}

.app-shell-nav-badge {
  min-width: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.92), rgba(56, 189, 248, 0.9));
  color: #001a21;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.app-shell-nav-badge.is-empty {
  background: rgba(251, 113, 133, 0.18);
  color: #ffd8e0;
}

.app-shell-actions {
  display: flex;
  justify-content: flex-end;
}

.timeline-scroll-hint {
  display: none;
}

.page-hero {
  margin-bottom: 0;
}

.invite-page-hero {
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(251, 113, 133, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(13, 30, 50, 0.92), rgba(8, 21, 34, 0.94));
}

.invite-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.invite-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.34);
  background: rgba(45, 212, 191, 0.12);
  color: #d6fff6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-hero-title {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.96;
}

.invite-hero-copy {
  max-width: 620px;
  font-size: 16px;
  line-height: 1.7;
}

.invite-quota-panel,
.invite-result-panel,
.invite-metric-card {
  border-radius: 22px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: linear-gradient(180deg, rgba(12, 27, 41, 0.82), rgba(7, 19, 29, 0.72));
}

.invite-quota-panel {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 22px;
}

.invite-quota-label {
  color: #9dd8f8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invite-quota-remaining {
  font-family: var(--font-mono);
  font-size: clamp(54px, 8vw, 78px);
  line-height: 0.95;
  color: #d6fff6;
}

.invite-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.invite-metric-card {
  padding: 16px;
}

.invite-create-card {
  display: grid;
  gap: 18px;
}

.invite-create-form {
  display: grid;
  gap: 18px;
}

.invite-choice-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.invite-choice-btn {
  min-width: 180px;
}

.invite-choice-btn.is-active {
  border-color: rgba(45, 212, 191, 0.6);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(56, 189, 248, 0.18));
  color: #d6fff6;
}

.invite-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.invite-result-panel {
  padding: 18px;
}

.invite-result-header,
.invite-accept-context {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}

.invite-accept-shell {
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(251, 113, 133, 0.16), transparent 24%),
    var(--paper);
}

.invite-accept-card {
  max-width: 560px;
}

.invite-accept-context {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: rgba(12, 27, 41, 0.55);
}

.invite-context-item {
  display: grid;
  gap: 4px;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.deals-actions-cell {
  vertical-align: middle;
}

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

.icon-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  background: rgba(12, 28, 44, 0.78);
}

.icon-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-action-btn.warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
  color: #f6cb70;
}

.icon-action-btn.warning:hover:not([disabled]) {
  border-color: rgba(245, 158, 11, 0.78);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
}

.admin-users-table-wrap {
  overflow-x: hidden;
}

.admin-users-table {
  width: 100%;
  table-layout: fixed;
}

.admin-users-table th,
.admin-users-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
}

.admin-users-table th {
  font-size: 0.78rem;
}

.admin-users-table td {
  font-size: 0.86rem;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
  width: 11%;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
  width: 14%;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
  width: 10%;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4) {
  width: 8%;
}

.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
  width: 8%;
}

.admin-users-table th:nth-child(6),
.admin-users-table td:nth-child(6) {
  width: 12%;
}

.admin-users-table th:nth-child(7),
.admin-users-table td:nth-child(7) {
  width: 10%;
}

.admin-users-subscription-cell,
.admin-users-usage-cell {
  width: 12%;
}

.admin-users-actions-cell {
  width: 17%;
}

.admin-users-table.super-admin-view th:nth-child(1),
.admin-users-table.super-admin-view td:nth-child(1) {
  width: 9%;
}

.admin-users-table.super-admin-view th:nth-child(2),
.admin-users-table.super-admin-view td:nth-child(2) {
  width: 13%;
}

.admin-users-table.super-admin-view th:nth-child(3),
.admin-users-table.super-admin-view td:nth-child(3) {
  width: 8%;
}

.admin-users-table.super-admin-view th:nth-child(4),
.admin-users-table.super-admin-view td:nth-child(4) {
  width: 6%;
}

.admin-users-table.super-admin-view th:nth-child(5),
.admin-users-table.super-admin-view td:nth-child(5) {
  width: 7%;
}

.admin-users-table.super-admin-view th:nth-child(6),
.admin-users-table.super-admin-view td:nth-child(6) {
  width: 10%;
}

.admin-users-table.super-admin-view th:nth-child(7),
.admin-users-table.super-admin-view td:nth-child(7) {
  width: 8%;
}

.admin-users-table.super-admin-view .admin-users-subscription-cell,
.admin-users-table.super-admin-view .admin-users-usage-cell {
  width: 10%;
}

.admin-users-table.super-admin-view .admin-users-actions-cell {
  width: 22%;
}

.admin-users-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-users-actions > button {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  padding-inline: 10px;
  font-size: 0.82rem;
}

.admin-user-adjustments {
  width: 100%;
}

.admin-users-summary-stack {
  display: grid;
  gap: 4px;
}

.admin-user-manage-btn {
  width: 100%;
}

.admin-user-manage-modal {
  max-width: 560px;
}

.admin-user-manage-modal-header {
  margin-bottom: 18px;
}

.admin-user-manage-grid {
  display: grid;
  gap: 12px;
}

.admin-user-manage-card {
  border: 1px solid rgba(116, 182, 255, 0.18);
  border-radius: 16px;
  background: rgba(10, 20, 32, 0.72);
  padding: 16px;
}

.admin-user-manage-card-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-user-manage-row {
  display: grid;
  grid-template-columns: 96px auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.admin-user-manage-row input {
  width: 100%;
}

.admin-user-manage-email {
  gap: 8px;
  margin-top: 14px;
}

.admin-user-manage-status {
  min-height: 1.25rem;
  margin-top: 10px;
}

.admin-user-adjustment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-user-adjustment-row + .admin-user-adjustment-row {
  margin-top: 8px;
}

.admin-user-adjustment-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.admin-user-adjustment-input {
  width: 64px;
}

.admin-user-adjustment-email {
  gap: 8px;
  margin-top: 8px;
}

.admin-user-adjustment-status {
  margin-top: 8px;
}

.admin-users-table td:nth-child(5),
.admin-users-table.super-admin-view td:nth-child(5) {
  white-space: nowrap;
}

@media (max-width: 1360px) {
  .admin-users-table th,
  .admin-users-table td {
    padding: 10px 8px;
  }

  .admin-users-table td {
    font-size: 0.8rem;
  }

  .admin-users-actions > button {
    font-size: 0.76rem;
    letter-spacing: -0.01em;
  }

  .admin-user-adjustment-label,
  .admin-user-adjustment-email,
  .admin-users-summary-stack {
    font-size: 0.76rem;
  }
}

.list-toolbar-controls {
  align-items: center;
}

.list-visibility-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.list-toolbar-meta,
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.list-status {
  min-height: 20px;
  color: var(--ink-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-empty-cell {
  padding: 22px 14px;
  text-align: center;
  color: var(--ink-muted);
}

.portfolio-picker-modal-card {
  max-width: 560px;
}

.portfolio-detail-hero {
  margin-bottom: 0;
}

.topbar {
  display: flex;
  gap: var(--grid-gap);
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.deal-detail-page .deal-topbar {
  --deal-progress: 0%;
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  isolation: isolate;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(128, 211, 255, 0.22), rgba(128, 211, 255, 0) 32%),
    radial-gradient(circle at 88% 22%, rgba(45, 212, 191, 0.18), rgba(45, 212, 191, 0) 28%),
    linear-gradient(135deg, rgba(8, 25, 42, 0.96), rgba(7, 28, 44, 0.94) 44%, rgba(8, 46, 58, 0.9));
}

.deal-detail-page .deal-topbar::before {
  content: "";
  position: absolute;
  inset: auto 18px 16px 18px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 0;
}

.deal-detail-page .deal-topbar::after {
  content: "";
  position: absolute;
  left: 18px;
  right: auto;
  bottom: 16px;
  width: var(--deal-progress);
  max-width: calc(100% - 36px);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.92), rgba(45, 212, 191, 0.92));
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.26);
  pointer-events: none;
  z-index: 1;
  transition: width 220ms ease, background 220ms ease;
}

.deal-detail-page .deal-topbar.progress-complete::after {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.95), rgba(45, 212, 191, 0.92));
}

.deal-detail-page .deal-topbar.progress-complete::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(74, 222, 128, 0.08), rgba(255, 255, 255, 0));
}

@keyframes button-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes setting-saved-pulse {
  from {
    transform: translateY(2px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes snapshot-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes snapshot-badge-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.deal-detail-page .topbar-main,
.deal-detail-page .deal-topbar-main {
  position: relative;
  z-index: 2;
}

.deal-detail-page .deal-topbar-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.95fr) minmax(220px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.deal-topbar-identity,
.deal-topbar-status-panel {
  min-width: 0;
}

.deal-title {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f3fbff;
}

.deal-subtitle {
  margin-top: 10px;
  max-width: 60ch;
  font-size: 14px;
  color: rgba(223, 240, 255, 0.74);
}

.deal-subtitle-secondary {
  margin-top: 6px;
  max-width: 60ch;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(223, 240, 255, 0.68);
}

.deal-detail-page .topbar-progress-label {
  position: static;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #dff0ff;
  background: rgba(6, 19, 30, 0.52);
  border: 1px solid rgba(116, 182, 255, 0.32);
  border-radius: 999px;
  padding: 4px 10px;
}

.deal-topbar-actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-left: auto;
  width: min(100%, 240px);
}

.deal-topbar-actions > button {
  flex: 0 1 auto;
  width: 100%;
}

.deal-topbar-status-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: linear-gradient(180deg, rgba(9, 25, 39, 0.84), rgba(6, 18, 30, 0.66));
  box-shadow: inset 0 1px 0 rgba(198, 232, 255, 0.08);
}

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

.deal-status-summary {
  font-size: 18px;
  font-weight: 700;
  color: #effaff;
}

.deal-progress-panel {
  display: grid;
  gap: 8px;
}

.deal-progress-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.deal-progress-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 240, 255, 0.62);
}

.deal-progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(116, 182, 255, 0.16);
}

.deal-progress-fill {
  width: var(--deal-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(45, 212, 191, 0.9));
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.22);
  transition: width 220ms ease, background 220ms ease;
}

.deal-detail-page .deal-topbar.progress-complete .deal-progress-fill {
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.95), rgba(45, 212, 191, 0.92));
}

.deal-next-action {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(223, 240, 255, 0.74);
}

.deal-detail-page #gate-alert {
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.08);
}

.deal-detail-page #gate-alert-message {
  max-width: 100%;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.deal-detail-page .gate-alert-detail {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.deal-detail-page .gate-alert-detail-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 225, 164, 0.82);
}

.deal-detail-page .gate-alert-reasons {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 237, 201, 0.88);
}

.deal-detail-page .gate-alert-asset-list {
  display: grid;
  gap: 8px;
}

.deal-detail-page .gate-alert-asset {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 206, 120, 0.18);
  background: rgba(255, 193, 84, 0.08);
}

.deal-detail-page .gate-alert-asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.deal-detail-page .gate-alert-asset-name {
  font-weight: 600;
  color: rgba(255, 244, 221, 0.96);
}

.deal-detail-page .gate-alert-asset-meta {
  font-size: 12px;
  color: rgba(255, 234, 194, 0.76);
}

.deal-detail-page .gate-alert-asset-notes {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 239, 214, 0.78);
}

.deal-detail-page #gate-alert .row {
  margin-top: 12px;
}

.deal-hero-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deal-hero-metric {
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: linear-gradient(180deg, rgba(8, 25, 39, 0.72), rgba(8, 18, 30, 0.56));
  box-shadow: inset 0 1px 0 rgba(198, 232, 255, 0.05);
}

.deal-hero-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 240, 255, 0.58);
}

.deal-hero-metric .value {
  margin-top: 8px;
  font-size: 32px;
  line-height: 1;
}

.deal-hero-metric-status-main {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.deal-hero-metric-status-main .muted {
  font-size: 13px;
  line-height: 1.45;
}

.deal-hero-metric .section {
  margin-top: 12px;
}

.deal-hero-metric-price .recommended-range {
  margin-top: 12px;
}

.deal-portfolio-memberships {
  margin-top: 14px;
}

.deal-portfolio-memberships-label {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 240, 255, 0.58);
}

.deal-portfolio-memberships-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deal-portfolio-link,
.deal-portfolio-overflow summary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.22);
  background: rgba(8, 24, 38, 0.58);
  color: #e7f7ff;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.deal-portfolio-link:hover,
.deal-portfolio-overflow summary:hover {
  transform: translateY(-1px);
  border-color: rgba(116, 182, 255, 0.36);
  background: rgba(12, 33, 50, 0.72);
}

.deal-portfolio-link-meta,
.deal-portfolio-overflow-meta {
  color: rgba(223, 240, 255, 0.6);
  font-size: 11px;
}

.deal-portfolio-overflow {
  position: relative;
}

.deal-portfolio-overflow summary {
  cursor: pointer;
  list-style: none;
}

.deal-portfolio-overflow summary::-webkit-details-marker {
  display: none;
}

.deal-portfolio-overflow[open] summary {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(15, 39, 58, 0.86);
}

.deal-portfolio-overflow-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.22);
  background: rgba(5, 16, 27, 0.96);
  box-shadow: 0 18px 34px rgba(1, 7, 13, 0.4);
}

.deal-portfolio-overflow-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e7f7ff;
  text-decoration: none;
  background: rgba(8, 24, 38, 0.56);
}

.deal-portfolio-overflow-link:hover {
  background: rgba(15, 39, 58, 0.82);
}

.deals-portfolio-cell .deal-portfolio-memberships-links {
  gap: 6px;
  min-width: 180px;
}

.deals-portfolio-cell .deal-portfolio-link,
.deals-portfolio-cell .deal-portfolio-overflow summary {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 13px;
}

.deals-list-portfolio-overflow .deal-portfolio-overflow-menu {
  left: 0;
  right: auto;
  z-index: 3;
}

.deals-updated-cell {
  min-width: 172px;
  line-height: 1.3;
}

.deals-updated-relative {
  font-size: 12px;
}

.run-assumptions-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.2);
  background: rgba(8, 24, 38, 0.42);
  color: rgba(231, 247, 255, 0.82);
  font-size: 12px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--ink-muted);
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.snapshot-heading-right {
  margin-left: auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.snapshot-controls {
  gap: 8px;
}

.snapshot-control-btn {
  padding: 7px 10px;
  font-size: 11px;
  letter-spacing: 0.02em;
  border-radius: 10px;
  border: 1px solid rgba(116, 182, 255, 0.38);
  background: rgba(9, 23, 35, 0.82);
}

.snapshot-control-btn[aria-pressed="true"] {
  border-color: rgba(56, 189, 248, 0.62);
  background: rgba(56, 189, 248, 0.2);
}

.snapshot-grid {
  display: grid;
  gap: 18px 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.snapshot-category {
  --category-accent: rgba(56, 189, 248, 0.46);
  --category-glow: rgba(56, 189, 248, 0.08);
  --category-surface-top: rgba(8, 21, 33, 0.9);
  --category-surface-bottom: rgba(6, 17, 28, 0.88);
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(116, 182, 255, 0.08);
  border-radius: 16px;
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at 86% 0%, var(--category-glow), rgba(10, 24, 37, 0) 48%),
    linear-gradient(162deg, var(--category-surface-top), var(--category-surface-bottom));
  box-shadow: inset 0 1px 0 rgba(183, 227, 255, 0.06), 0 10px 18px rgba(2, 8, 16, 0.22);
  animation: snapshot-enter 260ms ease-out both;
  animation-delay: var(--snapshot-enter-delay, 0ms);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.snapshot-category:hover {
  transform: translateY(-1px);
  border-color: rgba(116, 182, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(183, 227, 255, 0.1), 0 14px 22px rgba(2, 8, 16, 0.28);
}

.snapshot-category:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.snapshot-category.is-transitioning {
  will-change: height;
}

.snapshot-category::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  opacity: 0.38;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), var(--category-accent), rgba(255, 255, 255, 0.02));
}

.snapshot-category.is-kpi-category {
  --category-accent: rgba(56, 189, 248, 0.86);
  --category-glow: rgba(56, 189, 248, 0.2);
}

.snapshot-category.is-kpi-category::before {
  opacity: 0.95;
}

.snapshot-category.row-break {
  margin-top: 12px;
}

.snapshot-category.category-market {
  margin-top: 16px;
}

.snapshot-category.size-xl {
  grid-column: span 12;
  min-height: 290px;
}

.snapshot-category.size-lg {
  grid-column: span 12;
  min-height: 270px;
}

.snapshot-category.size-md {
  grid-column: span 12;
  min-height: 230px;
}

.snapshot-category.size-sm {
  grid-column: span 12;
  min-height: 196px;
}

.snapshot-category.category-valuation {
  grid-column: span 4;
  --category-glow: rgba(56, 189, 248, 0.14);
  --category-surface-top: rgba(12, 28, 42, 0.93);
  --category-surface-bottom: rgba(9, 24, 37, 0.9);
}

.snapshot-category.category-returns {
  grid-column: span 5;
}

.snapshot-category.category-operations {
  grid-column: span 3;
}

.snapshot-category.category-market-highlights,
.snapshot-category.category-mix {
  grid-column: span 3;
}

.snapshot-category.category-financial {
  grid-column: span 6;
}

.snapshot-category.category-market {
  grid-column: span 12;
}

.snapshot-category-head {
  margin-bottom: 14px;
}

.snapshot-category-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.snapshot-card-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.snapshot-category-title {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d9edff;
}

.snapshot-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.snapshot-card-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.snapshot-card-action {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  border: 1px solid rgba(116, 182, 255, 0.4);
  background: rgba(9, 24, 39, 0.75);
  color: inherit;
  font-family: inherit;
}

.snapshot-card-control {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  border: 1px solid rgba(116, 182, 255, 0.26);
  background: rgba(9, 24, 39, 0.45);
  color: var(--ink-muted);
  font-family: inherit;
}

.snapshot-card-control.is-selected {
  border-color: rgba(116, 182, 255, 0.5);
  background: rgba(16, 55, 90, 0.7);
  color: #e6f4ff;
}

.snapshot-card-control:disabled {
  opacity: 0.45;
}

.snapshot-card-action-view {
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
}

.snapshot-category-subtitle {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 12px;
}

.snapshot-category-context {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.snapshot-category-toggle {
  margin-top: 8px;
  color: #9bc9e7;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(2px);
  transition: max-height 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.snapshot-category:hover .snapshot-category-toggle,
.snapshot-category:focus-visible .snapshot-category-toggle,
.snapshot-category.expanded .snapshot-category-toggle {
  max-height: 20px;
  opacity: 0.9;
  transform: translateY(0);
}

.snapshot-chart {
  margin-bottom: 14px;
  padding: 12px 12px 11px;
  border-radius: 12px;
  border: none;
  background: rgba(5, 16, 27, 0.64);
}

.snapshot-chart-caption {
  color: var(--ink-muted);
  font-size: 11px;
  margin-top: 8px;
}

.snapshot-chart-empty {
  min-height: 44px;
  display: grid;
  place-items: center;
}

.snapshot-chart-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #d3ebff;
}

.snapshot-chart-range-track {
  position: relative;
  margin-top: 7px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.26);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.36), rgba(56, 189, 248, 0.54));
}

.snapshot-chart-range-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #e5f7ff;
  background: #1cc6e7;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(28, 198, 231, 0.2);
}

.snapshot-chart-stack {
  display: flex;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.2);
}

.snapshot-chart-stack-segment {
  background: var(--segment-color, #5ec8ff);
}

.snapshot-chart-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.snapshot-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #d5e8f9;
}

.snapshot-chart-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--segment-color, #5ec8ff);
}

.snapshot-chart-bars-wrap {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  align-items: stretch;
  min-height: 138px;
  overflow: hidden;
}

.snapshot-category.category-returns .snapshot-chart-bars-wrap,
.snapshot-category.category-financial .snapshot-chart-bars-wrap {
  min-height: 170px;
}

.snapshot-chart-bar-col {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 8px;
  justify-items: center;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.snapshot-chart-bar {
  width: 100%;
  min-height: 4px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(125, 223, 255, 0.9), rgba(56, 189, 248, 0.68));
}

.snapshot-chart-bar-col.tone-good .snapshot-chart-bar {
  background: linear-gradient(180deg, rgba(160, 224, 255, 0.95), rgba(56, 189, 248, 0.78));
}

.snapshot-chart-bar-col.tone-warn .snapshot-chart-bar {
  background: linear-gradient(180deg, rgba(252, 204, 111, 0.9), rgba(245, 158, 11, 0.6));
}

.snapshot-chart-bar-col.tone-bad .snapshot-chart-bar {
  background: linear-gradient(180deg, rgba(252, 186, 79, 0.95), rgba(245, 158, 11, 0.78));
}

.snapshot-chart-bar-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  align-self: end;
  color: #d8ecff;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.snapshot-chart-bar-label {
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  line-height: 1.1;
}

.snapshot-category.category-returns .snapshot-chart-bar-value,
.snapshot-category.category-financial .snapshot-chart-bar-value {
  font-size: clamp(15px, 1.8vw, 22px);
  font-weight: 800;
  line-height: 1;
  color: #dbeaf8;
}

.snapshot-category.category-returns .snapshot-chart-bar-col.is-key .snapshot-chart-bar-value {
  color: var(--snapshot-accent-primary);
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.26);
}

.snapshot-category.category-returns .snapshot-chart-bar-col.is-key.tone-warn .snapshot-chart-bar-value,
.snapshot-category.category-returns .snapshot-chart-bar-col.is-key.tone-bad .snapshot-chart-bar-value {
  color: var(--snapshot-accent-attention);
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.24);
}

.snapshot-chart-trends {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.snapshot-trend-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid rgba(116, 182, 255, 0.2);
  padding: 7px 8px;
  background: rgba(7, 19, 29, 0.58);
}

.snapshot-trend-chip.tone-good {
  border-color: rgba(56, 189, 248, 0.46);
}

.snapshot-trend-chip.tone-warn {
  border-color: rgba(245, 158, 11, 0.36);
}

.snapshot-trend-chip.tone-bad {
  border-color: rgba(245, 158, 11, 0.46);
}

.snapshot-trend-arrow {
  font-size: 10px;
  color: #9cd9ff;
}

.snapshot-trend-label {
  font-size: 10px;
  color: var(--ink-muted);
}

.snapshot-trend-value {
  font-size: 11px;
  color: #e8f4ff;
  font-weight: 700;
  font-family: var(--font-mono);
}

.snapshot-badge-grid {
  display: grid;
  gap: 12px 18px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.snapshot-badge {
  border: none;
  border-bottom: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 0;
  padding: 0 0 9px;
  background: transparent;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.snapshot-badge.is-entering {
  opacity: 0;
  transform: translateY(5px);
  animation: snapshot-badge-enter 220ms ease forwards;
  animation-delay: var(--badge-enter-delay, 0ms);
}

.snapshot-badge-label {
  font-size: 10px;
  color: #9ab2c8;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.snapshot-badge-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: #e8f4ff;
}

.snapshot-badge-value-text {
  line-height: inherit;
}

.snapshot-badge-value-meta {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
  color: #9ab2c8;
}

.snapshot-badge-caption {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-muted);
}

.snapshot-badge-caption.is-entering-caption {
  opacity: 0;
  animation: snapshot-badge-enter 190ms ease forwards;
  animation-delay: var(--caption-enter-delay, 0ms);
}

.snapshot-glossary {
  text-decoration: underline dotted rgba(125, 211, 252, 0.75);
  text-underline-offset: 2px;
  cursor: help;
}

.snapshot-info-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.snapshot-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.4);
  background: rgba(116, 182, 255, 0.12);
  color: #d7ecff;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  padding: 0;
  cursor: help;
}

.snapshot-info-popout {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, calc(100vw - 32px));
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(116, 182, 255, 0.28);
  background: rgba(9, 22, 36, 0.97);
  box-shadow: 0 14px 34px rgba(4, 10, 18, 0.34);
  color: #d7ecff;
  font-size: 11px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  z-index: 24;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 130ms ease;
}

.snapshot-info-help:hover .snapshot-info-popout,
.snapshot-info-help:focus-within .snapshot-info-popout {
  opacity: 1;
  visibility: visible;
}

.snapshot-info-popout-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 7px;
  color: #f3f9ff;
}

.snapshot-info-popout-section {
  display: block;
}

.snapshot-info-popout-section + .snapshot-info-popout-section {
  margin-top: 7px;
}

.snapshot-info-popout-label {
  display: block;
  margin-bottom: 2px;
  color: #9dd8f8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.snapshot-badge.tone-good {
  border-color: rgba(116, 182, 255, 0.2);
}

.snapshot-badge.tone-good .snapshot-badge-value {
  color: #e8f4ff;
}

.snapshot-badge.tone-warn {
  border-color: rgba(116, 182, 255, 0.2);
}

.snapshot-badge.tone-warn .snapshot-badge-value {
  color: #e8f4ff;
}

.snapshot-badge.tone-bad {
  border-color: rgba(116, 182, 255, 0.2);
}

.snapshot-badge.tone-bad .snapshot-badge-value {
  color: #e8f4ff;
}

.snapshot-badge.tone-neutral {
  border-color: rgba(116, 182, 255, 0.2);
}

.snapshot-badge.is-kpi {
  border-bottom: none;
  border-left: 3px solid rgba(56, 189, 248, 0.88);
  padding: 5px 0 5px 12px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0));
}

.snapshot-badge.is-kpi .snapshot-badge-label {
  font-size: 11px;
  color: #c4ddf2;
}

.snapshot-badge.is-kpi .snapshot-badge-value {
  font-size: clamp(1.95rem, 2.8vw, 2.55rem);
  font-weight: 700;
  line-height: 1.1;
}

.snapshot-badge.is-kpi.tone-bad {
  border-left-color: rgba(245, 158, 11, 0.86);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0));
}

.snapshot-badge.is-highlight .snapshot-badge-value-text {
  color: var(--snapshot-accent-primary);
  text-shadow: 0 0 14px rgba(34, 211, 238, 0.22);
}

.snapshot-badge.is-highlight .snapshot-badge-value {
  font-size: clamp(1.95rem, 2.7vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
}

.snapshot-badge.is-highlight.highlight-attention .snapshot-badge-value-text,
.snapshot-badge.is-highlight.highlight-primary.tone-warn .snapshot-badge-value-text,
.snapshot-badge.is-highlight.highlight-primary.tone-bad .snapshot-badge-value-text {
  color: var(--snapshot-accent-attention);
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.snapshot-badge.is-health {
  --health-color: rgba(156, 173, 191, 0.72);
  --health-tint: rgba(156, 173, 191, 0.12);
}

.snapshot-badge.is-health.tone-good {
  --health-color: rgba(34, 211, 238, 0.9);
  --health-tint: rgba(34, 211, 238, 0.14);
}

.snapshot-badge.is-health.tone-warn,
.snapshot-badge.is-health.tone-bad {
  --health-color: rgba(245, 158, 11, 0.92);
  --health-tint: rgba(245, 158, 11, 0.14);
}

.snapshot-badge.is-health .snapshot-badge-value {
  width: fit-content;
  padding: 2px 8px 2px 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--health-tint), rgba(9, 21, 34, 0));
}

.snapshot-health-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--health-color);
  box-shadow: 0 0 0 3px rgba(156, 173, 191, 0.2);
}

.snapshot-health-dot.tone-good {
  background: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22);
}

.snapshot-health-dot.tone-warn,
.snapshot-health-dot.tone-bad {
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.snapshot-category.collapsed .snapshot-badge {
  padding-bottom: 5px;
}

.snapshot-category.collapsed .snapshot-badge-value {
  font-size: 18px;
}

.snapshot-category.collapsed .snapshot-badge.is-highlight .snapshot-badge-value {
  font-size: clamp(1.95rem, 2.7vw, 2.5rem);
}

.snapshot-category.collapsed .snapshot-badge.is-kpi .snapshot-badge-value {
  font-size: clamp(2.1rem, 4.2vw, 2.7rem);
}

.snapshot-category.size-xl .snapshot-badge-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.card:hover {
  border-color: rgba(116, 182, 255, 0.38);
}

.card-title {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.value {
  font-size: 22px;
  font-weight: 700;
}

.deal-files-card .value {
  font-size: 28px;
  line-height: 1;
}

.recommended-range {
  margin-top: 8px;
}

.price-range-widget {
  position: relative;
  padding-top: 22px;
}

.price-range-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.42), rgba(56, 189, 248, 0.58));
  border: 1px solid rgba(116, 182, 255, 0.38);
}

.price-range-dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ecf8ff;
  border: 2px solid #1ecad9;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.2);
}

.price-range-callout {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(116, 182, 255, 0.5);
  background: rgba(10, 27, 41, 0.88);
  color: #d6ecff;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.price-range-labels {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 12px;
}

.recommended-range-empty {
  font-size: 12px;
}

.row {
  display: flex;
  gap: var(--grid-gap);
  align-items: center;
}

.wrap {
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  transition: background 200ms ease, border-color 200ms ease;
}

.chip.new,
.chip.info {
  background: rgba(56, 189, 248, 0.2);
  color: #a9ecff;
}

.status-chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.archived-row td {
  color: rgba(228, 241, 255, 0.88);
}

.chip.processing,
.chip.running,
.chip.queued,
.chip.warning,
.chip.needs_input,
.chip.paused {
  background: rgba(245, 158, 11, 0.2);
  color: #ffe4ab;
}

#gate-alert {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
}

.chip.complete,
.chip.success {
  background: rgba(74, 222, 128, 0.2);
  color: #b4f9c8;
}

.chip.failed,
.chip.danger {
  background: rgba(251, 113, 133, 0.2);
  color: #ffd1da;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid rgba(116, 182, 255, 0.2);
  padding: 10px;
  font-size: 14px;
}

th {
  color: var(--ink-muted);
  font-weight: 600;
}

.code {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
  background: rgba(6, 16, 26, 0.8);
  border: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  max-height: 500px;
  overflow: auto;
}

.output-preview {
  border: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 12px;
  background: rgba(6, 16, 26, 0.78);
  padding: 12px;
  max-height: 560px;
  overflow: auto;
}

.preview-code {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.preview-markdown {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
}

.preview-slide {
  font-family: var(--font-sans);
  white-space: normal;
}

.slide-preview {
  display: grid;
  gap: 10px;
}

.slide-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slide-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.6);
  border-radius: 10px;
  padding: 7px 12px;
  text-decoration: none;
  color: #e5f6ff;
  background: rgba(56, 189, 248, 0.2);
  font-weight: 700;
}

.slide-preview-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(116, 182, 255, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(7, 18, 29, 0.92);
}

.slide-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

.json-view {
  line-height: 1.65;
}

.json-key {
  color: #7dd3fc;
}

.json-string {
  color: #9efcc5;
}

.json-number {
  color: #fbbf24;
}

.json-boolean {
  color: #fda4af;
}

.json-null {
  color: #94a3b8;
}

.section {
  margin-top: 14px;
}

#deal-snapshot-section.section {
  margin-top: 20px;
  padding: 18px;
}

#deal-snapshot-section .section-heading {
  margin-bottom: 14px;
}

.section-heading {
  margin-bottom: 10px;
}

.section-heading .card-title {
  margin: 0;
}

.output-actions {
  margin-left: auto;
}

.output-regenerate-btn {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(135deg, rgba(120, 56, 10, 0.9), rgba(245, 158, 11, 0.28));
  color: #ffe7bf;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.14) inset;
}

.output-regenerate-btn:hover:not([disabled]) {
  border-color: rgba(251, 191, 36, 0.68);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.16);
}

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

.output-actions[hidden] {
  display: none !important;
}

.output-group {
  margin: 10px 0 6px;
}

.output-group-title {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.output-group-body {
  gap: 10px;
}

.output-group-planning {
  border: 1px dashed rgba(116, 182, 255, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(6, 16, 26, 0.34);
}

.output-group-planning > summary {
  list-style: none;
  cursor: pointer;
}

.output-group-planning > summary::-webkit-details-marker {
  display: none;
}

.output-group-body > .output-btn,
.output-group-body > .output-btn-report,
.output-group-body > .state-badge {
  flex: 1 1 180px;
}

.output-btn.output-btn-planning {
  opacity: 0.8;
  font-size: 12px;
  border-style: dashed;
}

.share-status {
  min-height: 20px;
}

.report-regeneration-credit-helper {
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(68, 33, 10, 0.62), rgba(108, 52, 12, 0.24));
  color: #ffe7bf;
  font-weight: 600;
}

.error-text {
  color: #ffd1da;
}

.accordion {
  border: 1px solid rgba(116, 182, 255, 0.22);
  border-radius: 12px;
  background: rgba(9, 20, 31, 0.66);
  padding: 8px 10px 10px;
  transition: border-color 150ms ease;
}

.accordion:hover {
  border-color: rgba(116, 182, 255, 0.32);
}

.accordion > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.timeline-accordion > summary .card-title {
  margin: 0;
}

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

.accordion > summary::after {
  content: "▸";
  color: var(--accent-2);
  margin-left: 10px;
  transition: transform 120ms ease;
}

.accordion[open] > summary::after {
  transform: rotate(90deg);
}

.s3-link code {
  color: #8be4ff;
}

.upload-list-mobile {
  display: none;
}

.upload-mobile-card {
  border: 1px solid rgba(116, 182, 255, 0.18);
  border-radius: 14px;
  padding: 12px;
  background: rgba(10, 24, 37, 0.64);
}

.upload-mobile-card + .upload-mobile-card {
  margin-top: 10px;
}

.upload-mobile-title {
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.upload-mobile-meta {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.upload-mobile-row {
  display: grid;
  gap: 4px;
}

.upload-mobile-row dt {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.upload-mobile-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.flowchart {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 8px 0;
}

.flow-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  min-width: 170px;
  max-width: 200px;
  align-items: stretch;
  justify-content: center;
}

.flow-connector {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
  position: relative;
}

.flow-connector::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 8px;
  height: 2px;
  background: rgba(136, 170, 196, 0.42);
  transform: translateY(-1px);
}

.flow-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 6px;
  height: 6px;
  border-top: 2px solid rgba(136, 170, 196, 0.55);
  border-right: 2px solid rgba(136, 170, 196, 0.55);
  transform: translateY(-50%) rotate(45deg);
}

.flow-connector.succeeded::before {
  background: rgba(74, 222, 128, 0.55);
}

.flow-connector.succeeded::after {
  border-color: rgba(74, 222, 128, 0.65);
}

.flow-connector.in-process::before {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(245, 158, 11, 0.6) 0 7px,
      rgba(245, 158, 11, 0.3) 7px 14px
    );
}

.flow-connector.in-process::after {
  border-color: rgba(245, 158, 11, 0.65);
}

.flow-connector.failed::before {
  background: rgba(251, 113, 133, 0.55);
}

.flow-connector.failed::after {
  border-color: rgba(251, 113, 133, 0.65);
}

.flow-node-shell {
  width: 100%;
}

.flow-canvas {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.28);
  overflow-x: auto;
  overflow-y: visible;
  padding: 18px 24px 18px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 182, 255, 0.28) transparent;
  background:
    radial-gradient(80% 110% at 10% 0%, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0) 70%),
    radial-gradient(70% 110% at 95% 100%, rgba(45, 212, 191, 0.11), rgba(45, 212, 191, 0) 70%),
    linear-gradient(160deg, rgba(8, 19, 31, 0.92), rgba(10, 24, 37, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(173, 223, 255, 0.08),
    0 18px 34px rgba(2, 8, 16, 0.4);
}

.flow-canvas:active {
  cursor: grabbing;
}

.flow-canvas::-webkit-scrollbar {
  height: 6px;
}

.flow-canvas::-webkit-scrollbar-track {
  background: transparent;
}

.flow-canvas::-webkit-scrollbar-thumb {
  background: rgba(116, 182, 255, 0.28);
  border-radius: 3px;
}

.flow-node {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.38);
  background: linear-gradient(165deg, rgba(15, 34, 53, 0.97), rgba(9, 24, 37, 0.95));
  padding: 11px 12px;
  min-height: 74px;
  display: grid;
  place-content: center;
  gap: 5px;
  text-align: center;
  overflow: visible;
  box-shadow:
    inset 0 1px 0 rgba(176, 224, 255, 0.12),
    0 10px 18px rgba(2, 8, 16, 0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.flow-node:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(176, 224, 255, 0.15),
    0 14px 24px rgba(2, 8, 16, 0.34);
}

.flow-node-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.flow-node-meta {
  color: var(--ink-muted);
  font-size: 11px;
}

.step-cost {
  color: #8ad7ff;
  font-weight: 600;
}

.flow-node.not-started {
  border-color: rgba(116, 182, 255, 0.24);
  opacity: 0.6;
}

.flow-node.in-process {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(245, 158, 11, 0.22),
    0 0 20px rgba(245, 158, 11, 0.18);
}

.flow-node.in-process::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(245, 158, 11, 0.14) 0 10px,
      rgba(245, 158, 11, 0.04) 10px 20px
    );
  pointer-events: none;
}

.flow-node.succeeded {
  border-color: rgba(74, 222, 128, 0.64);
  box-shadow:
    inset 0 0 0 1px rgba(74, 222, 128, 0.2),
    0 0 18px rgba(74, 222, 128, 0.15);
}

.flow-node.failed {
  border-color: rgba(251, 113, 133, 0.64);
  box-shadow:
    inset 0 0 0 1px rgba(251, 113, 133, 0.24),
    0 0 18px rgba(251, 113, 133, 0.14);
}

.flow-node[data-has-context="1"] {
  cursor: pointer;
}

.flow-node[data-has-context="1"]:focus-visible {
  outline: 2px solid rgba(138, 215, 255, 0.85);
  outline-offset: 2px;
}

.flow-node-popout {
  position: fixed;
  left: 0;
  top: 0;
  min-width: 220px;
  max-width: 320px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(116, 182, 255, 0.45);
  background: linear-gradient(160deg, rgba(12, 27, 41, 0.98), rgba(7, 18, 29, 0.98));
  padding: 10px 11px;
  box-shadow: 0 16px 34px rgba(2, 8, 16, 0.45);
  z-index: 1300;
  pointer-events: none;
}

.flow-node-popout-title {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.flow-node-popout-line {
  font-size: 12px;
  margin-bottom: 6px;
}

.flow-node-popout-line:last-child {
  margin-bottom: 0;
}

.flow-node-popout-label {
  display: inline-block;
  min-width: 48px;
  margin-right: 6px;
  color: var(--ink-muted);
}

.flow-node-popout-list {
  margin: 4px 0 0;
  padding-left: 16px;
}

.flow-node-popout-list li {
  margin: 1px 0;
}

.markdown-view h1,
.markdown-view h2,
.markdown-view h3,
.markdown-view h4 {
  margin: 1em 0 0.45em;
  line-height: 1.25;
}

.markdown-view h1 {
  font-size: 1.6rem;
}

.markdown-view h2 {
  font-size: 1.3rem;
}

.markdown-view h3 {
  font-size: 1.1rem;
}

.markdown-view p {
  margin: 0.5em 0;
}

.markdown-view ul,
.markdown-view ol {
  padding-left: 1.3rem;
}

.markdown-view code,
.markdown-view pre {
  font-family: var(--font-mono);
}

.markdown-view pre {
  background: rgba(8, 21, 34, 0.9);
  border: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
}

.markdown-view table {
  border-collapse: collapse;
  margin-top: 8px;
}

.markdown-view th,
.markdown-view td {
  border: 1px solid rgba(116, 182, 255, 0.25);
  padding: 6px 8px;
}

@keyframes topbar-shimmer {
  from {
    background-position: -220px 0;
  }
  to {
    background-position: 220px 0;
  }
}

html.modal-open,
body.modal-open {
  overflow: hidden;
}

.modal-shell {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 14, 0.7);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 18px;
  overscroll-behavior: contain;
}

.modal-shell[hidden] {
  display: none !important;
}

.modal-card {
  width: min(520px, 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card-strong);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.deal-files-modal-card {
  width: min(980px, 100%);
  max-height: 88vh;
  overflow: auto;
}

.comps-mix-modal-card {
  width: min(1460px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.comps-mix-modal-card #comps-mix-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.comps-modal-actions {
  align-items: center;
  justify-content: flex-end;
}

.comps-rerun-status {
  margin-top: 6px;
  min-height: 1.2em;
}

.report-regeneration-modal-card {
  width: min(560px, 100%);
}

.split-assist-modal-card {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.split-assist-modal-status {
  margin-top: 6px;
  min-height: 1.2em;
}

.split-assist-modal-body {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.25fr);
  min-height: 0;
  overflow: hidden;
}

.split-assist-panel {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: linear-gradient(180deg, rgba(8, 25, 39, 0.62), rgba(8, 18, 30, 0.44));
}

.split-assist-section-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(159, 214, 255, 0.78);
}

.split-assist-assets-list,
.split-assist-uploads-list {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.split-assist-asset-card,
.split-assist-upload-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.16);
  background: rgba(5, 17, 28, 0.64);
}

.split-assist-asset-card.is-user-added {
  border-style: dashed;
}

.split-assist-asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.split-assist-asset-meta,
.split-assist-upload-meta,
.split-assist-upload-reasons {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(211, 230, 247, 0.74);
}

.split-assist-asset-summary {
  font-size: 12px;
  color: rgba(159, 214, 255, 0.76);
}

.split-assist-asset-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.split-assist-asset-fields label {
  display: grid;
  gap: 6px;
}

.split-assist-asset-fields label[data-field="name"],
.split-assist-asset-fields label[data-field="address"] {
  grid-column: 1 / -1;
}

.split-assist-asset-fields input {
  width: 100%;
}

.split-assist-upload-assignments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.split-assist-upload-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(116, 182, 255, 0.12);
  background: rgba(9, 22, 34, 0.52);
}

.split-assist-upload-choice input {
  margin-top: 2px;
}

.split-assist-upload-choice-label {
  display: grid;
  gap: 3px;
}

.split-assist-upload-choice-label strong {
  font-size: 13px;
}

.split-assist-upload-choice-label span {
  font-size: 12px;
  color: rgba(199, 223, 242, 0.68);
}

.split-assist-upload-card.is-unassigned {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(67, 36, 6, 0.26);
}

.split-assist-upload-card.is-shared {
  border-color: rgba(59, 130, 246, 0.26);
}

.split-assist-actions {
  justify-content: flex-end;
}

.report-regeneration-body {
  display: grid;
  gap: 14px;
}

.report-regeneration-body > p {
  margin: 0;
}

.report-regeneration-actions {
  justify-content: flex-end;
}

.property-edit-modal-card {
  width: min(640px, 96vw);
  max-height: 90vh;
  overflow: auto;
}

#location-autocomplete-hint {
  margin-top: -4px;
  margin-bottom: 4px;
  min-height: 1.2em;
}

.location-address-autocomplete {
  display: grid;
  gap: 8px;
}

.location-address-autocomplete gmp-place-autocomplete,
.location-address-autocomplete google.maps.places.PlaceAutocompleteElement {
  width: 100%;
}

.location-address-autocomplete[hidden] {
  display: none;
}

.run-options-modal-card {
  width: min(1180px, 96vw);
}

.pptx-theme-modal-card {
  width: min(1040px, 96vw);
}

.pptx-theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.pptx-theme-option {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: rgba(12, 27, 41, 0.72);
  color: var(--ink);
  text-align: left;
}

.pptx-theme-option.is-off:hover {
  border-color: rgba(116, 182, 255, 0.44);
}

.pptx-theme-option.is-on {
  border-color: color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 58%, rgba(255, 255, 255, 0.16));
  background: color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 10%, rgba(12, 27, 41, 0.84));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 18%, transparent) inset,
    0 16px 28px rgba(3, 11, 19, 0.32);
}

.pptx-theme-preview {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 14px;
  border-radius: 16px;
  background: var(--pptx-theme-bg, linear-gradient(135deg, #14253b, #1d3556));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pptx-theme-preview::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 78px;
  height: 78px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 28%, transparent);
  filter: blur(8px);
  opacity: 0.95;
}

.pptx-theme-option.is-on .pptx-theme-preview {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 34%, transparent);
}

.pptx-theme-preview-chip,
.pptx-theme-preview-line,
.pptx-theme-preview-grid {
  position: relative;
  z-index: 1;
}

.pptx-theme-preview-chip {
  width: 46%;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 62%, white 10%);
}

.pptx-theme-preview-line {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pptx-theme-text, #edf5ff) 82%, transparent);
  opacity: 0.88;
}

.pptx-theme-preview-line.is-short {
  width: 74%;
}

.pptx-theme-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.pptx-theme-preview-grid > span {
  height: 58px;
  border-radius: 12px;
  background: var(--pptx-theme-surface, rgba(25, 46, 71, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.pptx-theme-preview-grid > span:first-child {
  border: 1px solid color-mix(in srgb, var(--pptx-theme-accent, #5caeff) 58%, transparent);
}

.pptx-theme-option-body {
  display: grid;
  gap: 6px;
}

.pptx-theme-option-header {
  display: grid;
  gap: 4px;
}

.pptx-theme-option-name {
  color: var(--ink);
  font-weight: 700;
}

.pptx-theme-option-eyebrow {
  color: var(--pptx-theme-accent, #5caeff);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pptx-theme-option-description {
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.share-snapshot-modal-card {
  width: min(1080px, 96vw);
  max-height: 90vh;
  overflow: auto;
}

.financial-detail-modal-card {
  width: min(1120px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.financial-detail-modal-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.financial-detail-modal-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.financial-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.financial-detail-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.financial-detail-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(16, 36, 57, 0.82);
  color: #cfe9ff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.financial-detail-status {
  margin-top: 4px;
  min-height: 1.2em;
}

.financial-detail-note-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.financial-detail-note {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 29, 46, 0.86), rgba(10, 20, 33, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.financial-detail-note-title {
  margin-bottom: 4px;
  color: #cbe7fb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.financial-detail-note p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.financial-detail-note-list {
  margin: 0;
  padding-left: 16px;
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.financial-detail-edit-prompt {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: linear-gradient(180deg, rgba(12, 36, 48, 0.88), rgba(9, 22, 34, 0.86));
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.financial-detail-alert {
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: linear-gradient(180deg, rgba(53, 38, 8, 0.94), rgba(30, 21, 7, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(2, 8, 16, 0.18);
}

.financial-detail-alert-title {
  color: #fff3bf;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.financial-detail-alert p {
  margin: 6px 0 0;
  color: #f8ebc5;
  font-size: 0.9rem;
  line-height: 1.45;
}

.financial-detail-table-subtitle {
  margin-top: 2px;
}

.financial-detail-summary-card,
.financial-detail-table-card {
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 27, 43, 0.94), rgba(8, 18, 30, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 36px rgba(2, 8, 16, 0.2);
  padding: 12px 14px;
}

.financial-detail-summary-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.financial-detail-stat {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background: rgba(8, 20, 31, 0.74);
}

.financial-detail-stat.tone-good {
  border-color: rgba(74, 222, 128, 0.22);
  background: linear-gradient(180deg, rgba(9, 31, 24, 0.84), rgba(8, 19, 18, 0.82));
}

.financial-detail-stat.tone-warn,
.financial-detail-stat.tone-bad {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, rgba(39, 28, 12, 0.84), rgba(20, 15, 8, 0.82));
}

.financial-detail-stat-label {
  color: var(--ink-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.financial-detail-stat-value {
  margin-top: 4px;
  color: #eef8ff;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
}

.financial-detail-input-wrap {
  display: block;
  margin-top: 6px;
}

.financial-detail-input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(5, 16, 28, 0.92);
  color: #eef8ff;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  font-size: 0.92rem;
}

.financial-detail-input:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.48);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.financial-detail-table-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.financial-pnl-table-wrap {
  margin-top: 10px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  touch-action: pan-x pan-y;
  background: rgba(7, 17, 28, 0.6);
  cursor: grab;
}

.financial-pnl-table-wrap.is-dragging-x {
  cursor: grabbing;
}

.financial-pnl-table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
}

.financial-pnl-table th,
.financial-pnl-table td {
  vertical-align: top;
}

.financial-pnl-table th {
  text-align: left;
}

.financial-pnl-table-amount {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
}

.financial-pnl-table-ratio {
  white-space: nowrap;
}

.financial-pnl-amount-chip,
.financial-pnl-pct-chip {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}

.financial-pnl-table-notes {
  min-width: 200px;
  max-width: 340px;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.financial-pnl-table .financial-detail-input-wrap {
  margin-top: 0;
}

.financial-pnl-table .financial-detail-input {
  min-width: 148px;
  text-align: right;
}

.financial-pnl-table .financial-pnl-section-row th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9dd8f8;
  background: rgba(9, 25, 42, 0.98);
  border-bottom-color: rgba(125, 211, 252, 0.22);
}

.financial-pnl-row th,
.financial-pnl-row td {
  border-color: rgba(125, 211, 252, 0.08);
  background: rgba(8, 21, 34, 0.66);
}

.financial-pnl-row-revenue th,
.financial-pnl-row-revenue td,
.financial-pnl-total-row th,
.financial-pnl-total-row td,
.financial-pnl-noi-row th,
.financial-pnl-noi-row td {
  background: rgba(10, 42, 46, 0.72);
}

.financial-pnl-row-revenue-detail th,
.financial-pnl-row-revenue-detail td {
  background: rgba(11, 33, 47, 0.72);
}

.financial-pnl-row-revenue-adjustment th,
.financial-pnl-row-revenue-adjustment td {
  background: rgba(52, 35, 16, 0.5);
}

.financial-pnl-row-expense th,
.financial-pnl-row-expense td {
  background: rgba(8, 20, 31, 0.48);
}

.financial-pnl-row-gap th,
.financial-pnl-row-gap td {
  background: rgba(46, 39, 18, 0.48);
}

.financial-pnl-line-label {
  color: #ecf8ff;
  font-weight: 600;
}

.financial-pnl-line-subtitle {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

.financial-pnl-amount-chip,
.financial-pnl-pct-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: #eef8ff;
  font-weight: 600;
  white-space: nowrap;
}

.financial-pnl-pct-chip {
  color: var(--ink-muted);
  font-weight: 500;
}

/* Summary-row chips (Revenue, Total Expenses, NOI) get pill treatment */
.financial-pnl-row-revenue .financial-pnl-amount-chip,
.financial-pnl-total-row .financial-pnl-amount-chip,
.financial-pnl-noi-row .financial-pnl-amount-chip {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  background: rgba(8, 20, 31, 0.8);
  font-weight: 700;
}

.financial-pnl-noi-row .financial-pnl-amount-chip.tone-good {
  border-color: rgba(74, 222, 128, 0.28);
  background: linear-gradient(180deg, rgba(10, 46, 32, 0.9), rgba(8, 24, 19, 0.88));
}

.financial-pnl-total-row .financial-pnl-amount-chip.tone-warn,
.financial-pnl-total-row .financial-pnl-amount-chip.tone-bad {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, rgba(56, 35, 12, 0.9), rgba(24, 16, 8, 0.88));
}

.financial-pnl-table .financial-pnl-total-row td {
  font-weight: 600;
  color: #dceefe;
  background: linear-gradient(90deg, rgba(40, 31, 12, 0.6), rgba(16, 37, 58, 0.7));
}

.financial-pnl-table .financial-pnl-total-row th {
  background: linear-gradient(90deg, rgba(40, 31, 12, 0.72), rgba(16, 37, 58, 0.74));
}

.financial-pnl-table .financial-pnl-noi-row td {
  font-weight: 700;
  color: #ecf8ff;
  background: linear-gradient(90deg, rgba(8, 63, 57, 0.74), rgba(14, 45, 63, 0.74));
}

.financial-pnl-table .financial-pnl-noi-row th {
  background: linear-gradient(90deg, rgba(8, 63, 57, 0.82), rgba(14, 45, 63, 0.8));
}

.financial-pnl-table .financial-pnl-placeholder-row td {
  color: var(--ink-muted);
  font-style: italic;
  background: rgba(8, 20, 31, 0.66);
}

.share-snapshot-modal-card.is-comps-matrix {
  width: min(1460px, 96vw);
  max-height: 92vh;
}

.share-snapshot-modal-content .snapshot-badge-grid {
  margin-top: 14px;
}

.unit-mix-edit-modal-card {
  width: min(1380px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.unit-mix-edit-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.unit-mix-assist-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 25, 41, 0.92), rgba(10, 18, 30, 0.96));
}

.unit-mix-assist-header .card-title {
  margin-bottom: 6px;
}

.unit-mix-assist-text {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.unit-mix-assist-image-zone {
  margin-top: 12px;
  border: 1px dashed rgba(96, 165, 250, 0.5);
  border-radius: 14px;
  padding: 14px 16px;
  color: #b8d9ff;
  background: rgba(37, 99, 235, 0.09);
}

.unit-mix-assist-image-zone:focus {
  outline: 2px solid rgba(125, 211, 252, 0.9);
  outline-offset: 2px;
}

.unit-mix-assist-image-preview {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.unit-mix-assist-image-preview img {
  max-width: min(360px, 100%);
  max-height: 220px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.unit-mix-assist-preview {
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.78);
}

.unit-mix-assist-preview-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.unit-mix-assist-preview-meta {
  color: #cbd5e1;
  font-size: 13px;
}

.unit-mix-assist-preview-conflicts {
  margin-top: 12px;
  padding-left: 18px;
}

.unit-mix-assist-preview-conflicts li {
  margin-bottom: 6px;
  color: #fde68a;
}

.unit-mix-edit-grid-wrap {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
}

.unit-mix-edit-grid input,
.unit-mix-edit-grid select {
  min-width: 120px;
  padding: 8px 10px;
}

.unit-mix-edit-grid .dcf-input-wrap input {
  padding-left: 22px;
}

.unit-mix-col-hint {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  color: #9dd8f8;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.unit-mix-auto-cell {
  position: relative;
}

.unit-mix-auto-cell .is-auto-calculated {
  border-style: dashed;
  border-color: rgba(45, 212, 191, 0.75);
  background: linear-gradient(180deg, rgba(23, 56, 53, 0.82), rgba(14, 36, 40, 0.86));
}

.unit-mix-auto-cell .is-manual-override {
  border-style: solid;
  border-color: rgba(251, 191, 36, 0.62);
  background: linear-gradient(180deg, rgba(49, 39, 19, 0.82), rgba(31, 26, 16, 0.86));
}

.unit-mix-auto-state {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.unit-mix-auto-state.auto {
  color: #7ce9d6;
}

.unit-mix-auto-state.manual {
  color: #f9cf73;
}

.unit-mix-row-remove-btn {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(251, 113, 133, 0.6);
  background: rgba(251, 113, 133, 0.15);
}

.unit-mix-section-row .unit-mix-section-header {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9dd8f8;
  background: rgba(13, 30, 50, 0.9);
}

.unit-mix-section-row .unit-mix-section-total,
.unit-mix-section-row .unit-mix-section-filler {
  background: rgba(13, 30, 50, 0.9);
}

.unit-mix-section-row .unit-mix-section-total {
  font-family: var(--font-mono);
  text-align: right;
  color: #cde9ff;
}

.unit-mix-grand-total-row .unit-mix-section-header,
.unit-mix-grand-total-row .unit-mix-section-total,
.unit-mix-grand-total-row .unit-mix-section-filler {
  background: rgba(20, 46, 74, 0.94);
  border-top: 1px solid rgba(125, 211, 252, 0.32);
}

/* ---------- DCF Cash Flows Visual Editor ---------- */

.dcf-edit-modal-card {
  width: min(1380px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dcf-cf-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.dcf-cf-grid-wrap {
  max-height: 60vh;
}

.dcf-cf-grid input {
  min-width: 100px;
  padding: 8px 10px;
}

.dcf-cf-grid .dcf-input-wrap input {
  padding-left: 22px;
  min-width: 90px;
}

.dcf-cf-grid .dcf-input-wrap.pct-mode input {
  padding-left: 10px;
  padding-right: 22px;
}

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

.dcf-prefix,
.dcf-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(148, 163, 184, 0.5);
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.dcf-prefix {
  left: 9px;
}

.dcf-suffix {
  right: 9px;
}

.upload-form .dcf-input-wrap input {
  padding-left: 22px;
}

.dcf-cell-caption {
  margin-top: 3px;
  font-size: 10px;
  color: rgba(148, 163, 184, 0.7);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dcf-col-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 20px;
  margin-left: 5px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(116, 182, 255, 0.35);
  border-radius: 5px;
  background: rgba(116, 182, 255, 0.08);
  color: #9dd8f8;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s;
}

.dcf-col-toggle:hover {
  background: rgba(116, 182, 255, 0.2);
  border-color: rgba(116, 182, 255, 0.6);
}

.dcf-col-hint {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  color: #9dd8f8;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.dcf-auto-cell {
  position: relative;
}

.dcf-auto-cell .is-auto-calculated {
  border-style: dashed;
  border-color: rgba(45, 212, 191, 0.75);
  background: linear-gradient(180deg, rgba(23, 56, 53, 0.82), rgba(14, 36, 40, 0.86));
}

.dcf-auto-cell .is-manual-override {
  border-style: solid;
  border-color: rgba(251, 191, 36, 0.62);
  background: linear-gradient(180deg, rgba(49, 39, 19, 0.82), rgba(31, 26, 16, 0.86));
}

.dcf-auto-state {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dcf-auto-state.auto {
  color: #7ce9d6;
}

.dcf-auto-state.manual {
  color: #f9cf73;
}

.dcf-noi-pct {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: rgba(148, 163, 184, 0.7);
  margin-left: 4px;
  font-size: 10px;
}

.dcf-row-remove-btn {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.1);
  color: rgba(251, 113, 133, 0.85);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.dcf-row-remove-btn:hover {
  background: rgba(251, 113, 133, 0.25);
}

.dcf-year-cell input {
  min-width: 58px !important;
  max-width: 62px;
  text-align: center;
}

.dcf-action-cell {
  text-align: center;
  vertical-align: middle;
}

.dcf-cf-grid tbody tr:nth-child(even) td {
  background: rgba(116, 182, 255, 0.03);
}

.dcf-th-year {
  width: 62px;
  max-width: 62px;
}

.dcf-json-advanced {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.dcf-json-advanced summary {
  cursor: pointer;
  user-select: none;
}

.upload-index-debug-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.upload-index-debug-card {
  border: 1px solid rgba(116, 182, 255, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(7, 18, 30, 0.72);
  display: grid;
  gap: 7px;
}

.upload-index-debug-card.status-failed {
  border-color: rgba(251, 113, 133, 0.55);
  background: linear-gradient(170deg, rgba(58, 20, 28, 0.72), rgba(24, 12, 19, 0.82));
}

.upload-index-debug-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.upload-index-debug-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
}

.upload-index-debug-meta {
  color: var(--ink-muted);
  font-size: 11px;
}

.upload-index-debug-summary {
  font-size: 12px;
  line-height: 1.45;
  color: #d8ecff;
}

.upload-index-debug-error {
  border: 1px solid rgba(251, 113, 133, 0.52);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  color: #ffd7de;
  background: rgba(251, 113, 133, 0.12);
}

.upload-index-debug-hints {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
  font-size: 11px;
  color: #c5dff3;
}

.comps-metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.comps-metric {
  border: 1px solid rgba(116, 182, 255, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(7, 18, 30, 0.72);
  display: grid;
  gap: 4px;
  min-height: 96px;
}

.comps-metric-label {
  font-size: 11px;
  color: #bed7ec;
  letter-spacing: 0.03em;
}

.comps-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: #e6f3ff;
  line-height: 1.3;
}

.comps-metric-caption {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.35;
}

.comps-metric.tone-good {
  border-color: rgba(74, 222, 128, 0.46);
  background: linear-gradient(170deg, rgba(24, 54, 40, 0.74), rgba(10, 30, 23, 0.84));
}

.comps-metric.tone-warn {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(170deg, rgba(66, 43, 14, 0.74), rgba(32, 23, 9, 0.86));
}

.comps-metric.tone-bad {
  border-color: rgba(251, 113, 133, 0.52);
  background: linear-gradient(170deg, rgba(62, 24, 35, 0.74), rgba(32, 12, 20, 0.86));
}

.comps-inline-note {
  margin-bottom: 8px;
}

.comps-table-wrap {
  border: 1px solid rgba(116, 182, 255, 0.24);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  background: rgba(7, 17, 28, 0.8);
}

.comps-table-wrap.unit-mix-edit-grid-wrap {
  overflow-y: auto;
}

.comps-matrix-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  touch-action: pan-x pan-y;
  cursor: grab;
}

.comps-matrix-wrap.is-dragging-x {
  cursor: grabbing;
}

.comps-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

.comps-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(13, 30, 47, 0.96);
  border-bottom: 1px solid rgba(116, 182, 255, 0.34);
}

.comps-table th,
.comps-table td {
  white-space: nowrap;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(116, 182, 255, 0.2);
  font-size: 13px;
}

.comps-table .comps-sticky-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(8, 22, 35, 0.98);
}

.comps-table thead .comps-sticky-cell {
  z-index: 3;
}

.comps-unit-name {
  font-weight: 700;
  color: #def0ff;
}

.comps-unit-meta {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.comps-comp-col {
  min-width: 150px;
}

.comps-col-subtitle {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 500;
}

.comps-table tbody tr.tone-good td {
  background: rgba(74, 222, 128, 0.08);
}

.comps-table tbody tr.tone-bad td {
  background: rgba(251, 113, 133, 0.08);
}

.comps-table tbody tr.comps-group-header td {
  background: rgba(56, 189, 248, 0.18);
  border-bottom: 1px solid rgba(56, 189, 248, 0.4);
  color: #ddf3ff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.comps-table tbody tr.comps-subgroup-header td {
  background: rgba(13, 30, 47, 0.94);
  color: #cfe8fb;
  font-weight: 700;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-card {
  width: min(420px, 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), 0 0 64px rgba(56, 189, 248, 0.06);
  padding: 20px;
}

.progress-wrap {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(116, 182, 255, 0.14);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--info));
  transition: width 400ms ease;
}

.error {
  color: #ffd1da;
  background: rgba(251, 113, 133, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.4);
  border-radius: 10px;
  padding: 10px;
}

.share-page .share-layout {
  max-width: 1100px;
}

.share-hero {
  display: flex;
  gap: var(--grid-gap);
  justify-content: space-between;
  align-items: flex-start;
}

.share-hero-actions {
  justify-content: flex-end;
  align-items: center;
}

.share-hero-copy {
  display: grid;
  gap: 8px;
}

.share-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.1vw, 2.2rem);
  line-height: 1.2;
}

.share-metrics {
  margin-top: 0;
}

.share-metric-card {
  padding: 12px;
}

.share-metric-value {
  font-size: 18px;
  line-height: 1.3;
}

.share-page .output-preview {
  min-height: 280px;
  max-height: none;
}

.portfolio-share-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.portfolio-share-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.22);
  background: rgba(12, 27, 41, 0.52);
}

.portfolio-share-option input {
  width: auto;
  margin-top: 3px;
}

.share-portfolio-action-btn {
  min-width: 116px;
}

.share-portfolio-action-btn[disabled] {
  opacity: 0.55;
}

.share-output-full {
  border: 1px solid rgba(116, 182, 255, 0.2);
  border-radius: 12px;
  background: rgba(6, 16, 26, 0.76);
  padding: 18px;
  min-height: 300px;
}

.share-output-full.preview-code {
  font-family: var(--font-mono);
  white-space: pre-wrap;
  font-size: 13px;
}

.share-output-full.preview-markdown {
  font-size: 15px;
  line-height: 1.75;
}

.share-markdown-full .markdown-view h1 {
  font-size: 2rem;
}

.share-markdown-full .markdown-view h2 {
  font-size: 1.5rem;
}

.share-slide-preview {
  gap: 12px;
}

.share-slide-frame-wrap {
  aspect-ratio: 16 / 9;
  min-height: 420px;
}

.share-scope-chip {
  flex: 0 0 auto;
}

@media (max-width: 1200px) {
  .snapshot-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .snapshot-category.category-valuation,
  .snapshot-category.category-returns {
    grid-column: span 4;
  }

  .snapshot-category.category-operations,
  .snapshot-category.category-market-highlights,
  .snapshot-category.category-mix {
    grid-column: span 4;
  }

  .snapshot-category.category-financial {
    grid-column: span 8;
  }

  .snapshot-category.category-market {
    grid-column: span 8;
  }
}

@media (max-width: 900px) {
  .hide-mobile {
    display: none;
  }

  .invite-hero-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .app-shell-nav {
    justify-content: flex-start;
  }

  .app-shell-actions {
    justify-content: flex-start;
  }

  .deal-detail-page .deal-topbar-main {
    grid-template-columns: 1fr;
  }

  .deal-topbar-actions {
    margin-left: 0;
    width: 100%;
    flex-direction: row;
  }

  .deal-topbar-actions > button {
    flex: 1 1 calc(50% - (var(--grid-gap) / 2));
  }

  .list-toolbar-meta,
  .pagination-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .deal-hero-metrics {
    grid-template-columns: 1fr;
  }

  .snapshot-heading-right {
    width: 100%;
    justify-items: start;
  }

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

  .snapshot-category,
  .snapshot-category.category-valuation,
  .snapshot-category.category-returns,
  .snapshot-category.category-operations,
  .snapshot-category.category-market-highlights,
  .snapshot-category.category-financial,
  .snapshot-category.category-mix,
  .snapshot-category.category-market {
    grid-column: span 1;
    min-height: unset;
    margin-top: 0;
  }

  .snapshot-category-toggle {
    max-height: 20px;
    opacity: 0.9;
    transform: translateY(0);
  }

  .snapshot-chart-bars-wrap {
    min-height: 120px;
  }

  .flow-canvas {
    padding: 14px 12px 14px;
  }

  .flow-col {
    min-width: 150px;
  }

  .comps-mix-modal-card {
    width: min(100%, 100%);
    max-height: 94vh;
    padding: 14px;
  }

  .comps-metric-grid {
    grid-template-columns: 1fr;
  }

  .share-slide-frame-wrap {
    min-height: 240px;
  }

  .setting-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .setting-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .setting-state {
    min-width: 0;
    text-align: left;
  }

  .run-depth-option {
    min-width: 0;
    width: 100%;
  }

  .run-assumption-preset-group .state-badge,
  .run-underwriting-group .state-badge {
    min-width: 0;
    width: 100%;
  }

  .unit-mix-edit-modal-card,
  .dcf-edit-modal-card {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .unit-mix-edit-grid-wrap,
  .dcf-cf-grid-wrap {
    max-height: none;
  }
}

@media (max-width: 700px) {
  .run-assumption-table-toggle {
    display: inline-flex;
  }

  .run-assumptions-table {
    min-width: 620px;
  }

  .run-assumptions-table-wrap[data-show-all="false"] [data-col] {
    display: none;
  }

  .run-assumptions-table-wrap[data-show-all="false"] [data-col="custom"] {
    display: table-cell;
  }

  .run-assumptions-table-wrap[data-show-all="false"][data-selected-preset="conservative"] [data-col="conservative"],
  .run-assumptions-table-wrap[data-show-all="false"][data-selected-preset="balanced"] [data-col="balanced"],
  .run-assumptions-table-wrap[data-show-all="false"][data-selected-preset="aggressive"] [data-col="aggressive"] {
    display: table-cell;
  }
}

@media (max-width: 720px) {
  .invite-choice-group {
    display: grid;
  }

  .invite-choice-btn {
    width: 100%;
  }

  .markdown-view table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .layout {
    padding: 12px;
  }

  .card {
    padding: 12px;
  }

  .topbar {
    padding: 12px;
  }

  .deal-detail-page .deal-topbar {
    padding: 14px;
  }

  .deal-progress-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .deal-topbar-actions > button {
    min-width: 0;
  }

  .section-heading {
    gap: 10px;
  }

  .section-heading > * {
    width: 100%;
  }

  .output-actions {
    margin-left: 0;
    width: 100%;
    justify-content: stretch;
  }

  .output-actions > button {
    flex: 1 1 calc(50% - (var(--grid-gap) / 2));
    min-width: 0;
  }

  .output-group-body > .output-btn,
  .output-group-body > .output-btn-report,
  .output-group-body > .state-badge {
    flex-basis: 100%;
    width: 100%;
  }

  .output-preview,
  .share-page .output-preview,
  .share-output-full {
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .preview-markdown,
  .share-output-full.preview-markdown {
    font-size: 13px;
    line-height: 1.6;
  }

  .share-hero {
    flex-direction: column;
  }

  .share-scope-chip {
    align-self: flex-start;
  }

  .share-title {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
  }

  .share-page .grid.cards {
    grid-template-columns: 1fr;
  }

  .share-page .output-group-title {
    margin-bottom: 6px;
  }

  .share-output-full {
    padding: 14px;
  }

  .share-output-full.preview-code {
    font-size: 12px;
  }

  .share-markdown-full .markdown-view h1 {
    font-size: 1.55rem;
  }

  .share-markdown-full .markdown-view h2 {
    font-size: 1.2rem;
  }

  .share-slide-preview .slide-preview-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-scroll-hint {
    display: block;
    margin-top: 10px;
    font-size: 12px;
  }

  .flow-canvas {
    padding: 14px 14px 16px;
  }

  .flow-node-popout {
    max-width: min(260px, calc(100vw - 64px));
  }

  .upload-table-desktop {
    display: none;
  }

  .upload-list-mobile {
    display: block;
  }

  .deal-map-summary-line {
    font-size: 0.88rem;
  }

  .modal-shell {
    place-items: stretch;
    padding: 0;
    overflow-y: auto;
  }

  .modal-card,
  .deal-files-modal-card,
  .split-assist-modal-card,
  .comps-mix-modal-card,
  .financial-detail-modal-card,
  .property-edit-modal-card,
  .report-regeneration-modal-card,
  .pptx-theme-modal-card,
  .run-options-modal-card,
  .share-snapshot-modal-card,
  .unit-mix-edit-modal-card,
  .dcf-edit-modal-card,
  .trade-area-map-modal-card {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 16px 14px 18px;
  }

  .modal-card:not(.comps-mix-modal-card):not(.financial-detail-modal-card):not(.unit-mix-edit-modal-card):not(.dcf-edit-modal-card) {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .trade-area-map-modal-card {
    width: 100%;
  }

  .split-assist-modal-body {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .split-assist-assets-list,
  .split-assist-uploads-list {
    overflow: visible;
    padding-right: 0;
  }

  .split-assist-actions {
    justify-content: stretch;
  }

  .split-assist-actions > button {
    flex: 1 1 100%;
  }
}

@media (max-width: 430px) {
  .layout {
    padding: 10px;
  }

  .app-shell {
    margin-top: 10px;
    padding: 12px;
  }

  .app-shell-nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .deal-topbar-actions {
    flex-direction: column;
  }

  .deal-topbar-actions > button,
  .output-actions > button {
    flex-basis: 100%;
  }

  .deal-portfolio-overflow-menu {
    position: static;
    margin-top: 8px;
    min-width: 0;
  }

  .chip {
    max-width: 100%;
    line-height: 1.35;
  }

  .share-title {
    font-size: 1.28rem;
  }

  .value {
    font-size: 20px;
  }

  .output-group-planning {
    padding: 8px;
  }

  .modal-card,
  .deal-files-modal-card,
  .split-assist-modal-card,
  .comps-mix-modal-card,
  .financial-detail-modal-card,
  .property-edit-modal-card,
  .report-regeneration-modal-card,
  .pptx-theme-modal-card,
  .run-options-modal-card,
  .share-snapshot-modal-card,
  .unit-mix-edit-modal-card,
  .dcf-edit-modal-card,
  .trade-area-map-modal-card {
    padding: 14px 12px 18px;
  }

  .split-assist-asset-fields {
    grid-template-columns: 1fr;
  }
}

/* Reports section badges */
.output-btn-report {
  background: var(--surface-2, #1e1e2e);
  border: 1px solid var(--accent, #a78bfa);
  color: var(--accent, #a78bfa);
  font-weight: 500;
  position: relative;
  padding-left: 2rem;
}
.output-btn-report::before {
  content: "📄";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}
.output-btn-report[data-output-key="deal_overview_pptx"]::before {
  content: "📊";
}
.output-btn-report[data-output-key="exec_summary_md"]::before {
  content: "📋";
}
.output-btn-report[data-output-key="market_report_md"]::before {
  content: "🏪";
}

/* Reports output group styling */
.output-group-reports .output-group-title {
  color: var(--accent, #a78bfa);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.output-group-reports .output-group-body {
  gap: 0.75rem;
}

/* Mark-to-Market section in comps modal */
.comps-mtm-section {
  border: 1px solid rgba(35, 210, 173, 0.25);
  border-radius: 0.625rem;
  padding: 1.25rem;
  background: rgba(35, 210, 173, 0.04);
}
.comps-mtm-summary {
  margin-bottom: 1rem;
}
.comps-mtm-hero {
  text-align: center;
  padding: 1rem 0;
}
.comps-mtm-hero-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}
.comps-mtm-hero-value {
  font-size: 1.75rem;
  font-weight: 700;
}
.comps-mtm-hero-caption {
  margin-top: 0.25rem;
  font-size: 0.8rem;
}
.comps-mtm-table td.tone-good {
  color: #23d2ad;
  font-weight: 600;
}

/* Comps modal hierarchy improvements */
.comps-metric.tone-good .comps-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
}
.comps-metric.tone-bad .comps-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
}

/* De-emphasize secondary comps data */
.comps-subgroup-header td {
  font-size: 0.8rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comps-group-header td {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.trade-area-map-section {
  position: relative;
}

.deal-map-surface {
  position: relative;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(31, 111, 139, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(9, 34, 49, 0.04), rgba(9, 34, 49, 0.1));
  border: 1px solid rgba(17, 40, 56, 0.08);
}

.deal-map-surface-modal {
  height: 68vh;
  min-height: 68vh;
}

.trade-area-map-modal-card {
  width: min(1120px, 94vw);
}

.deal-map-shell,
.deal-map-canvas {
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.deal-map-shell {
  position: relative;
}

.deal-map-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deal-map-summary-line {
  color: var(--muted-color, #5d6b75);
  font-size: 0.95rem;
}

.deal-map-summary-line.subtle {
  font-size: 0.88rem;
}

.deal-map-warnings {
  display: grid;
  gap: 6px;
}

.deal-map-warning {
  color: #8a4b17;
  background: rgba(199, 138, 43, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.deal-map-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted-color, #5d6b75);
  text-align: center;
}

.deal-map-marker {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(12, 22, 32, 0.24);
}

.deal-map-marker.subject {
  background: linear-gradient(180deg, #138a67, #0d6d54);
}

.deal-map-marker.comp {
  background: linear-gradient(180deg, #d88a3c, #b85f19);
}

.deal-map-marker.comp.reit {
  background: linear-gradient(180deg, #2754c7, #16388b);
}

.deal-map-marker.comp.regional {
  background: linear-gradient(180deg, #b56a16, #8a4b08);
}

.deal-map-marker.comp.mom_and_pop {
  background: linear-gradient(180deg, #d0576d, #9a3247);
}

.deal-map-marker.comp.unknown {
  background: linear-gradient(180deg, #728692, #4a5d68);
}

.deal-map-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  pointer-events: none;
}

.deal-map-overlay-legend {
  top: 14px;
  display: flex;
  justify-content: flex-start;
}

.deal-map-legend {
  pointer-events: auto;
  width: min(320px, calc(100% - 28px));
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 51, 69, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 250, 0.98));
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 36px rgba(12, 22, 32, 0.16);
}

.deal-map-legend-eyebrow,
.deal-map-popup-eyebrow {
  color: #6e7d88;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deal-map-legend-title,
.deal-map-popup-title {
  margin-top: 4px;
  color: #163446;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.deal-map-legend-subtitle {
  margin-top: 4px;
  color: #557080;
  font-size: 0.85rem;
  line-height: 1.35;
}

.deal-map-legend-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.deal-map-legend-stat {
  display: grid;
  gap: 2px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  background: rgba(232, 240, 244, 0.78);
}

.deal-map-legend-stat span {
  color: #607581;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deal-map-legend-stat strong {
  color: #183749;
  font-size: 0.92rem;
  font-weight: 800;
}

.deal-map-legend-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
  color: #425d6b;
  font-size: 0.82rem;
}

.deal-map-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.deal-map-mode-switch,
.deal-map-feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deal-map-control-btn,
.deal-map-feature-btn {
  appearance: none;
  border: 1px solid rgba(20, 51, 69, 0.14);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(232, 240, 244, 0.72);
  color: #35586a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.deal-map-control-btn:hover,
.deal-map-feature-btn:hover {
  background: rgba(216, 228, 235, 0.9);
  border-color: rgba(20, 51, 69, 0.2);
}

.deal-map-control-btn.is-active,
.deal-map-feature-btn.is-active {
  background: #163446;
  border-color: #163446;
  color: #f5f8fa;
  transform: translateY(-1px);
}

.deal-map-legend-key-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.deal-map-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 10px rgba(12, 22, 32, 0.16);
}

.deal-map-legend-swatch.subject {
  background: #0f7f60;
}

.deal-map-legend-swatch.comp {
  background: #c66d26;
}

.deal-map-legend-swatch.reit {
  background: #1c4fc0;
}

.deal-map-legend-swatch.non_reit {
  background: #a65f12;
}

.deal-map-popup-meta,
.deal-map-popup-address,
.deal-map-popup-rating-count {
  color: #5d6b75;
  font-size: 0.84rem;
  line-height: 1.4;
}

.deal-map-popup-shell .mapboxgl-popup-content {
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(20, 51, 69, 0.12);
  box-shadow: 0 18px 38px rgba(12, 22, 32, 0.2);
  overflow: hidden;
}

.deal-map-popup-shell .mapboxgl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.96);
}

.deal-map-popup {
  min-width: 250px;
  max-width: 320px;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 250, 0.98));
}

.deal-map-popup-address {
  margin-top: 6px;
}

.deal-map-popup-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.deal-map-popup-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(16, 103, 144, 0.12);
  color: #1a5069;
  font-size: 0.77rem;
  font-weight: 700;
}

.deal-map-popup-pill.neutral {
  background: rgba(38, 57, 69, 0.08);
  color: #45616f;
}

.deal-map-popup-pill.operator {
  background: rgba(183, 76, 28, 0.12);
  color: #8d4716;
}

.deal-map-popup-rating-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.deal-map-popup-rating-value {
  color: #163446;
  font-size: 0.94rem;
  font-weight: 800;
}

.deal-map-popup-shell.comp-popup .deal-map-popup-title {
  font-size: 1.02rem;
}

.deal-map-popup-shell.subject-popup .deal-map-popup-title {
  font-size: 1rem;
}

.comp-context-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.comp-context-card {
  border: 1px solid rgba(17, 40, 56, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 246, 248, 0.96));
}

.comp-context-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.comp-context-meta,
.comp-context-rating,
.comp-context-status,
.comps-col-rating {
  color: #5d6b75;
  font-size: 0.85rem;
}

.comp-context-rating {
  margin-top: 6px;
}

.comp-context-status {
  margin-top: 6px;
  text-transform: capitalize;
}

.comps-col-rating {
  margin-top: 4px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
}

.demo-deal-banner {
  border: 1px solid rgba(38, 94, 78, 0.18);
  background: linear-gradient(135deg, rgba(242, 249, 245, 0.98), rgba(251, 247, 233, 0.96));
}

.demo-deal-inline-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(32, 73, 60, 0.08);
  color: #355348;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.demo-deal-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-deal-note {
  color: #617078;
  font-size: 0.86rem;
}

.demo-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onboarding-tour-open {
  overflow: hidden;
}

.onboarding-tour-root {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

.onboarding-tour-scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 17, 27, 0.46);
}

.onboarding-tour-focus {
  position: fixed;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(8, 17, 27, 0.42);
  border: 2px solid rgba(255, 245, 213, 0.96);
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  transition: all 180ms ease;
}

.onboarding-tour-card {
  position: fixed;
  z-index: 1301;
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(17, 40, 56, 0.12);
  background: linear-gradient(180deg, rgba(255, 251, 240, 0.99), rgba(255, 255, 255, 0.99));
  box-shadow: 0 24px 80px rgba(11, 22, 35, 0.24);
}

.onboarding-tour-kicker {
  margin-bottom: 8px;
  color: #7a5b1b;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.onboarding-tour-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  color: #132631;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.onboarding-tour-body {
  margin: 0;
  color: #445660;
  line-height: 1.55;
}

.onboarding-tour-meta {
  margin-top: 12px;
  color: #6a7a84;
  font-size: 0.84rem;
}

.onboarding-tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.onboarding-tour-actions button {
  flex: 1 1 0;
}

.portfolio-detail-hero,
.deal-insight-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 18%, rgba(128, 211, 255, 0.16), rgba(128, 211, 255, 0) 32%),
    radial-gradient(circle at 88% 18%, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0) 26%),
    linear-gradient(155deg, rgba(8, 22, 35, 0.96), rgba(7, 25, 39, 0.93) 52%, rgba(7, 38, 50, 0.9));
}

.portfolio-detail-hero::before,
.deal-insight-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.portfolio-detail-hero-main,
.portfolio-detail-hero-copy,
.portfolio-detail-hero-status,
.portfolio-detail-hero-actions,
.deal-insight-section > * {
  position: relative;
  z-index: 1;
}

.portfolio-detail-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.portfolio-detail-hero-copy {
  display: grid;
  gap: 10px;
}

.portfolio-detail-hero-copy .card-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.portfolio-detail-hero-next-action {
  max-width: 58ch;
  line-height: 1.5;
  color: rgba(223, 240, 255, 0.76);
}

.portfolio-detail-hero-status,
.portfolio-detail-hero-actions,
.deal-insight-body,
.deal-insight-meta {
  min-width: 0;
}

.portfolio-detail-hero-status,
.portfolio-detail-hero-actions {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: linear-gradient(180deg, rgba(9, 25, 39, 0.84), rgba(6, 18, 30, 0.68));
  box-shadow: inset 0 1px 0 rgba(198, 232, 255, 0.07);
}

.portfolio-detail-hero-status-summary {
  font-size: 1.15rem;
  font-weight: 700;
  color: #effaff;
  line-height: 1.3;
}

.portfolio-detail-hero-audience {
  display: grid;
  gap: 8px;
}

.portfolio-detail-hero-audience select {
  width: 100%;
}

.portfolio-detail-hero-primary-actions,
.portfolio-detail-hero-secondary-actions {
  gap: 10px;
}

.portfolio-detail-hero-primary-actions > button {
  flex: 1 1 220px;
}

.portfolio-detail-hero-secondary-actions > button {
  flex: 1 1 160px;
}

.portfolio-summary-section .section-heading {
  align-items: end;
}

.portfolio-summary-section .output-preview[data-summary-state="ready"] {
  border-color: rgba(45, 212, 191, 0.24);
  box-shadow: inset 0 1px 0 rgba(198, 232, 255, 0.04), 0 18px 34px rgba(2, 8, 16, 0.16);
}

.deal-more-actions {
  width: 100%;
}

.deal-more-actions > summary {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.24);
  background: rgba(9, 23, 35, 0.68);
  color: #eff8ff;
  font-weight: 600;
}

.deal-more-actions > summary::-webkit-details-marker {
  display: none;
}

.deal-more-actions[open] > summary {
  border-color: rgba(56, 189, 248, 0.44);
  background: rgba(18, 38, 58, 0.9);
}

.deal-more-actions-menu {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.deal-more-actions-menu > button {
  width: 100%;
}

.deal-insight-section {
  display: grid;
  gap: 14px;
}

.deal-insight-section[data-insight-state="summary"] {
  border-color: rgba(45, 212, 191, 0.26);
}

.deal-insight-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  background: rgba(14, 45, 46, 0.66);
  color: #dcfff8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deal-insight-body {
  max-width: 72ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(235, 247, 255, 0.92);
}

.deal-insight-body p,
.deal-insight-meta {
  margin: 0;
}

.deal-insight-meta {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.deal-detail-page .outputs-list {
  gap: 14px;
}

.deal-detail-page .output-group {
  margin: 0;
}

.deal-detail-page .output-group-title {
  margin-bottom: 10px;
}

.deal-detail-page .output-group-reports,
.deal-detail-page .output-group:not(.output-group-planning) {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 24, 38, 0.82), rgba(7, 18, 29, 0.78));
}

.deal-detail-page .output-group-reports {
  border-color: rgba(45, 212, 191, 0.16);
}

.deal-detail-page .output-group-planning {
  padding: 12px 14px;
  border-radius: 16px;
}

.deal-detail-page .output-group-planning > summary {
  font-weight: 700;
}

.deal-detail-page .output-group-body {
  display: flex;
  gap: 10px;
}

.deal-detail-page .output-group-body > .output-btn,
.deal-detail-page .output-group-body > .output-btn-report,
.deal-detail-page .output-group-body > .state-badge {
  flex: 1 1 210px;
  min-height: 54px;
}

.deal-detail-page .output-btn-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  background: linear-gradient(180deg, rgba(16, 31, 48, 0.95), rgba(11, 22, 35, 0.92));
  color: #ddf7f2;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.deal-detail-page .output-btn-report:hover:not([disabled]) {
  border-color: rgba(56, 189, 248, 0.58);
  background: linear-gradient(180deg, rgba(18, 39, 60, 0.96), rgba(11, 24, 37, 0.94));
}

.deal-detail-page .output-btn-report.active {
  border-color: rgba(45, 212, 191, 0.7);
  background: linear-gradient(180deg, rgba(9, 45, 49, 0.96), rgba(8, 29, 34, 0.94));
  color: #f4fffd;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.14) inset, 0 16px 28px rgba(3, 11, 19, 0.3);
}

.deal-detail-page .output-btn-report::before {
  left: 14px;
  font-size: 1rem;
}

.deal-detail-page .output-btn.output-btn-planning {
  border-color: rgba(116, 182, 255, 0.18);
  background: rgba(9, 20, 30, 0.72);
  color: rgba(223, 240, 255, 0.82);
}

.financial-detail-modal-card > .row:first-child,
.comps-mix-modal-card > .row:first-child {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -18px -18px 12px;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, rgba(8, 20, 31, 0.98), rgba(8, 20, 31, 0.92) 70%, rgba(8, 20, 31, 0));
  backdrop-filter: blur(16px);
}

.financial-detail-modal-body {
  gap: 14px;
}

.financial-detail-toolbar {
  align-items: center;
}

.financial-detail-pill-row {
  justify-content: flex-start;
}

.financial-detail-pill {
  min-height: 32px;
  border-color: rgba(116, 182, 255, 0.18);
}

.financial-delta-card,
.financial-detail-summary-card,
.financial-detail-table-card {
  padding: 16px;
}

.financial-delta-card {
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 34, 39, 0.82), rgba(7, 23, 29, 0.88));
}

.financial-delta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.financial-delta-stat {
  min-width: 0;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: rgba(8, 21, 32, 0.72);
}

.financial-delta-stat.tone-good {
  border-color: rgba(45, 212, 191, 0.22);
}

.financial-delta-stat.tone-warn {
  border-color: rgba(251, 191, 36, 0.24);
}

.financial-delta-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 240, 255, 0.62);
}

.financial-delta-value {
  margin-top: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f4fbff;
}

.financial-delta-note {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.financial-detail-note-grid {
  gap: 10px;
}

.financial-detail-note {
  padding: 12px 14px;
}

.financial-detail-summary-grid {
  gap: 10px;
}

.financial-detail-stat {
  padding: 12px;
}

.financial-pnl-table thead th {
  top: 0;
}

.financial-pnl-table .financial-pnl-sticky-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(10, 24, 36, 0.98);
}

.financial-pnl-table thead .financial-pnl-sticky-cell {
  z-index: 2;
}

.comps-mix-modal-card {
  border-color: rgba(116, 182, 255, 0.18);
  background: linear-gradient(180deg, rgba(8, 21, 33, 0.97), rgba(6, 16, 28, 0.96));
}

.comp-context-strip {
  gap: 10px;
}

.comp-context-card {
  min-height: 118px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: linear-gradient(180deg, rgba(12, 28, 43, 0.92), rgba(8, 18, 31, 0.94));
  color: #e4f2ff;
}

.comp-context-card:first-child {
  border-color: rgba(45, 212, 191, 0.28);
  background: linear-gradient(180deg, rgba(8, 41, 45, 0.96), rgba(8, 24, 29, 0.94));
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.14) inset;
}

.comp-context-name {
  font-weight: 700;
}

.comp-context-meta,
.comp-context-rating,
.comp-context-status {
  color: rgba(223, 240, 255, 0.72);
}

.comps-metric-grid {
  gap: 10px;
}

.comps-metric {
  border-radius: 16px;
  border: 1px solid rgba(116, 182, 255, 0.14);
  background: linear-gradient(180deg, rgba(12, 28, 43, 0.92), rgba(8, 18, 31, 0.94));
}

.comps-table th,
.comps-table td {
  padding: 11px 12px;
}

.comps-table tbody tr:hover td {
  background: rgba(18, 41, 62, 0.52);
}

.comps-group-header td {
  background: rgba(18, 56, 77, 0.78);
  color: #e9f9ff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comps-subgroup-header td {
  background: rgba(12, 31, 48, 0.96);
  color: rgba(223, 240, 255, 0.78);
}

.comps-table .tone-good td:last-child,
.comps-table .tone-good td:nth-last-child(2) {
  color: #5cf0bf;
  font-weight: 700;
}

.comps-table .tone-bad td:last-child,
.comps-table .tone-bad td:nth-last-child(2) {
  color: #ffbf5f;
  font-weight: 700;
}

@media (max-width: 720px) {
  .portfolio-detail-hero-main {
    grid-template-columns: 1fr;
  }

  .portfolio-detail-hero-primary-actions > button,
  .portfolio-detail-hero-secondary-actions > button,
  .deal-more-actions > summary,
  .deal-more-actions-menu > button {
    width: 100%;
  }

  .deal-detail-page .output-group-body {
    flex-direction: column;
  }

  .financial-delta-grid {
    grid-template-columns: 1fr;
  }

  .deal-map-surface {
    min-height: 260px;
  }

  .deal-map-surface-modal {
    height: 56vh;
    min-height: 56vh;
  }

  .deal-map-overlay {
    left: 10px;
    right: 10px;
  }

  .deal-map-legend {
    width: min(100%, 280px);
    padding: 12px 12px 13px;
  }

  .deal-map-legend-stats {
    grid-template-columns: 1fr;
  }

  .comp-context-strip {
    grid-auto-columns: minmax(190px, 1fr);
  }

  .demo-table-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .onboarding-tour-card {
    padding: 16px;
  }

  .onboarding-tour-actions {
    flex-direction: column;
  }
}
