/* ABC Dinamo Fonts */
@font-face {
  font-family: 'ABC Prophet';
  src: url('fonts/ABC Prophet/ABCProphet-Bold-Trial.woff2') format('woff2'),
       url('fonts/ABC Prophet/ABCProphet-Bold-Trial.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Oracle';
  src: url('fonts/ABC Oracle/ABC Oracle/ABCOracle-Book-Trial.woff2') format('woff2'),
       url('fonts/ABC Oracle/ABC Oracle/ABCOracle-Book-Trial.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Oracle';
  src: url('fonts/ABC Oracle/ABC Oracle/ABCOracle-Bold-Trial.woff2') format('woff2'),
       url('fonts/ABC Oracle/ABC Oracle/ABCOracle-Bold-Trial.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Oracle';
  src: url('fonts/ABC Oracle/ABC Oracle/ABCOracle-Light-Trial.woff2') format('woff2'),
       url('fonts/ABC Oracle/ABC Oracle/ABCOracle-Light-Trial.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Favorit';
  src: url('fonts/ABCFavorit-Book.woff2') format('woff2'),
       url('fonts/ABCFavorit-Book.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Favorit';
  src: url('fonts/ABCFavorit-Bold.woff2') format('woff2'),
       url('fonts/ABCFavorit-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Favorit Mono';
  src: url('fonts/ABCFavoritMono-Book.woff2') format('woff2'),
       url('fonts/ABCFavoritMono-Book.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Diatype';
  src: url('fonts/ABCDiatype-Light.woff2') format('woff2'),
       url('fonts/ABCDiatype-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Maxi Round';
  src: url('fonts/ABC Maxi/ABC Maxi Round/ABCMaxiRound-Regular-Trial.woff2') format('woff2'),
       url('fonts/ABC Maxi/ABC Maxi Round/ABCMaxiRound-Regular-Trial.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Maxi Round';
  src: url('fonts/ABC Maxi/ABC Maxi Round/ABCMaxiRound-Light-Trial.woff2') format('woff2'),
       url('fonts/ABC Maxi/ABC Maxi Round/ABCMaxiRound-Light-Trial.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ABC Maxi Round';
  src: url('fonts/ABC Maxi/ABC Maxi Round/ABCMaxiRound-Bold-Trial.woff2') format('woff2'),
       url('fonts/ABC Maxi/ABC Maxi Round/ABCMaxiRound-Bold-Trial.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Miu Miu inspired - powder blue palette */
  --bg-primary: #f4f6f9;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eaeff5;
  --bg-elevated: #ffffff;

  /* Accent - Miu Miu signature blue */
  --accent: #5b7a99;
  --accent-hover: #4a6a8a;
  --accent-soft: rgba(91, 122, 153, 0.08);
  --accent-muted: #8fa4b8;

  /* Text hierarchy */
  --text-primary: #1a2a3a;
  --text-secondary: #5a6a7a;
  --text-tertiary: #8a9aaa;

  /* Semantic - muted, sophisticated */
  --success: #6a9a7a;
  --success-dim: rgba(106, 154, 122, 0.12);
  --warning: #b89a6a;
  --warning-dim: rgba(184, 154, 106, 0.12);
  --error: #a07070;
  --error-dim: rgba(160, 112, 112, 0.12);
  --escalated: #8a7a9a;
  --escalated-dim: rgba(138, 122, 154, 0.12);

  /* Legacy mappings */
  --primary: var(--accent);
  --primary-dark: var(--accent-hover);
  --primary-light: var(--accent-soft);
  --success-light: var(--success-dim);
  --warning-light: var(--warning-dim);
  --error-light: var(--error-dim);
  --escalated-light: var(--escalated-dim);

  /* Gray scale - cool blue undertones */
  --gray-50: #fafbfc;
  --gray-100: #f4f6f9;
  --gray-200: #e4e8ed;
  --gray-300: #d0d6de;
  --gray-400: #a8b4c0;
  --gray-500: #7a8a9a;
  --gray-600: #5a6a7a;
  --gray-700: #3a4a5a;
  --gray-800: #2a3a4a;
  --gray-900: #1a2a3a;

  /* Typography - ABC Dinamo */
  --font-display: 'ABC Oracle', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'ABC Favorit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'ABC Favorit Mono', monospace;
  --font-light: 'ABC Diatype', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'ABC Maxi Round', 'ABC Favorit', sans-serif;

  /* Effects - soft shadows for light theme */
  --shadow-sm: 0 1px 3px rgba(26, 42, 58, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 42, 58, 0.08);
  --shadow-lg: 0 12px 32px rgba(26, 42, 58, 0.12);

  /* Softer radii for elegant feel */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius: 12px;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 48px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'ABC Prophet', var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo-icon {
  color: var(--accent);
  font-size: 16px;
  opacity: 0.8;
}

.nav {
  display: flex;
  gap: 0;
}

.nav-item {
  padding: 8px 20px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.nav-item.active {
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.budget-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.budget-label {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.budget-value {
  font-size: 13px;
  font-weight: 500;
}

.budget-bar {
  width: 120px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}

.budget-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Main Content */
.main {
  flex: 1;
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  background: var(--bg-primary);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.page-header {
  margin-bottom: 56px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font-light);
  font-size: 11px;
  font-weight: 300;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.back-button:hover {
  color: var(--accent);
}

.back-button svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Outcome Grid */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.outcome-card {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px;
  cursor: pointer;
  transition: border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.outcome-card:hover {
  border-color: var(--accent-muted);
  box-shadow: 0 4px 16px rgba(91, 122, 153, 0.08);
}

.outcome-icon {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.outcome-icon svg {
  display: none;
}

.outcome-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.2;
}

.outcome-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.outcome-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.price-range {
  color: var(--success);
  font-weight: 500;
}

.success-rate {
  color: var(--gray-500);
}

/* Outcome Types List */
.outcome-types-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
}

.outcome-type-item {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  cursor: pointer;
  transition: border-color 0.2s ease,
              background 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.outcome-type-item:hover {
  border-color: var(--accent-muted);
  background: var(--accent-soft);
}

.outcome-type-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.outcome-type-item input[type="radio"] {
  margin-top: 4px;
}

.outcome-type-content {
  flex: 1;
}

.outcome-type-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.outcome-type-name {
  font-weight: 600;
  font-size: 16px;
}

.recommended-badge {
  background: var(--success-light);
  color: var(--success);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-light);
  font-size: 10px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.verification-badge {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-light);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-left: 8px;
}

.verification-badge.capi {
  background: var(--primary-light);
  color: var(--primary);
}

.verification-badge.guarantee {
  background: var(--warning-light);
  color: #d48806;
}

.outcome-type-desc {
  color: var(--gray-500);
  margin-bottom: 12px;
}

.outcome-type-stats {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--gray-600);
}

.outcome-type-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Wizard */
.wizard-container {
  display: flex;
  gap: 32px;
  max-width: 1000px;
}

.wizard-sidebar {
  width: 200px;
  flex-shrink: 0;
}

.wizard-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--gray-500);
}

.wizard-step.active {
  background: var(--primary-light);
  color: var(--primary);
}

.wizard-step.completed {
  color: var(--success);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: currentColor;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.wizard-step.active .step-number,
.wizard-step.completed .step-number {
  background: currentColor;
}

.wizard-step .step-number {
  background: var(--gray-300);
}

.step-label {
  font-weight: 500;
}

.wizard-content {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

.wizard-panel h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  font-weight: 600;
}

.wizard-description {
  color: var(--gray-500);
  margin-bottom: 24px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease,
              box-shadow 0.2s ease;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(91, 122, 153, 0.15);
}

.btn-primary:active {
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--gray-300);
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease,
              color 0.2s ease,
              background 0.2s ease;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* Context Sources */
.context-sources {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.context-source {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
}

.context-source.connected {
  border-color: var(--success);
  background: var(--success-light);
}

.source-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.source-icon {
  font-size: 20px;
}

.source-name {
  font-weight: 500;
  flex: 1;
}

.source-status {
  font-size: 12px;
  color: var(--gray-500);
}

.source-status.connected {
  color: var(--success);
}

.source-details {
  margin-top: 8px;
  margin-left: 36px;
  font-size: 13px;
  color: var(--gray-500);
}

.add-source-btn {
  background: none;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--gray-500);
  cursor: pointer;
  width: 100%;
  transition: border-color 0.3s ease,
              color 0.3s ease,
              background 0.3s ease,
              border-style 0.3s ease;
}

.add-source-btn:hover {
  border-color: var(--accent);
  border-style: solid;
  color: var(--accent);
  background: var(--accent-soft);
}

/* Tools */
.tools-section {
  margin-bottom: 24px;
}

.tools-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}

.tool-item-complex {
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.tool-item-complex label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-config {
  margin-top: 8px;
  margin-left: 24px;
  font-size: 13px;
}

.tool-warning {
  margin-top: 8px;
  margin-left: 24px;
  font-size: 12px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Inputs */
input[type="number"],
input[type="text"],
select {
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--gray-800);
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--gray-500);
}

.small-input {
  width: 60px;
}

.tiny-input {
  width: 50px;
  text-align: center;
}

/* Inline inputs within checkbox items (escalation triggers) */
.checkbox-item input[type="number"] {
  width: 55px;
  padding: 4px 8px;
  text-align: center;
  font-weight: 500;
}

.medium-input {
  width: 200px;
}

.full-width {
  width: 100%;
}

/* Criteria */
.criteria-section {
  margin-bottom: 24px;
}

.criteria-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 12px;
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.criterion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.criterion-name {
  font-weight: 500;
}

.criterion-desc {
  font-size: 13px;
  color: var(--gray-500);
}

.criterion-config {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 13px;
}

/* Radio Groups */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.radio-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease,
              background 0.2s ease;
  background: var(--bg-secondary);
}

.radio-item:hover {
  border-color: var(--accent-muted);
  background: var(--accent-soft);
}

.radio-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio-label {
  font-weight: 500;
  display: block;
}

.radio-desc {
  font-size: 13px;
  color: var(--gray-500);
}

/* Checkbox Items */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

/* Escalation */
.delivery-section,
.escalation-section {
  margin-bottom: 24px;
}

.delivery-section h3,
.escalation-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.escalation-triggers {
  margin: 16px 0;
  padding-left: 8px;
}

.escalation-triggers h4,
.handoff-config h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
  margin-top: 16px;
}

.form-row {
  margin-top: 16px;
}

/* Strategy Cards */
.strategy-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.strategy-card {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease,
              background 0.2s ease;
  background: var(--bg-secondary);
}

.strategy-card:hover {
  border-color: var(--accent-muted);
  background: var(--accent-soft);
}

.strategy-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.strategy-card input[type="radio"] {
  margin-top: 2px;
}

.strategy-card .strategy-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.strategy-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.strategy-name {
  font-weight: 600;
}

.strategy-badge {
  background: var(--success);
  color: white;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-light);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.strategy-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
}

/* Pricing Config */
.pricing-config {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.price-slider {
  margin-bottom: 24px;
}

.price-slider label {
  display: block;
  font-weight: 500;
  margin-bottom: 12px;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-container input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: var(--gray-300);
  border-radius: 2px;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.slider-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 400;
  color: var(--primary);
  min-width: 80px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
}

.budget-config {
  margin-bottom: 24px;
}

.budget-config label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.budget-input-group {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 200px;
}

.budget-input-group .currency {
  padding: 10px 12px;
  background: var(--gray-100);
  color: var(--gray-500);
}

.budget-input {
  border: none !important;
  padding: 10px;
  width: 100%;
}

.estimate {
  margin-top: 8px;
  font-size: 13px;
  color: var(--gray-500);
}

/* Guarantee */
.guarantee-section h3 {
  font-weight: 600;
  margin-bottom: 12px;
}

.guarantee-options {
  display: flex;
  gap: 8px;
}

.guarantee-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease,
              background 0.2s ease;
}

.guarantee-option:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.guarantee-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.guarantee-option input {
  display: none;
}

.guarantee-name {
  font-weight: 500;
  margin-top: 8px;
}

.guarantee-price {
  font-size: 12px;
  color: var(--gray-500);
}

/* Review Summary */
.review-summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-section {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.review-section:last-child {
  border-bottom: none;
}

.review-section h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.review-section.highlight {
  background: var(--primary-light);
  margin: -24px;
  margin-top: 0;
  padding: 24px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-bottom: none;
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.review-item.total {
  font-weight: 600;
  font-size: 16px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--gray-300);
}

.review-label {
  color: var(--gray-600);
}

.review-value {
  font-weight: 500;
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.review-list {
  list-style: none;
  padding: 0;
}

.review-list li {
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.review-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--success);
}

/* Dashboard */
.date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-family: var(--font-light);
  font-size: 11px;
  font-weight: 300;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 400;
  margin: 4px 0;
}

.metric-change {
  font-size: 13px;
  font-weight: 500;
}

.metric-change.positive {
  color: var(--success);
}

.metric-change.negative {
  color: var(--error);
}

.metric-subtext {
  font-size: 12px;
  color: var(--gray-500);
}

.dashboard-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.chart-card h3 {
  font-size: 16px;
  margin-bottom: 20px;
}

.chart-placeholder {
  height: 200px;
  position: relative;
  overflow: hidden;
}


.outcome-breakdown {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breakdown-type {
  width: 80px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray-600);
}

.breakdown-bar-container {
  flex: 1;
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.breakdown-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-sm);
}

.breakdown-value {
  width: 50px;
  text-align: right;
  font-weight: 500;
}

/* Recent Outcomes Table */
.recent-outcomes {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.recent-outcomes h3 {
  font-size: 16px;
  margin-bottom: 20px;
}

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

.outcomes-table th,
.outcomes-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.outcomes-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.outcomes-table td code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-light);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-badge.success {
  background: var(--success-light);
  color: var(--success);
}

.status-badge.escalated {
  background: var(--escalated-light);
  color: var(--escalated);
}

.status-badge.failed {
  background: var(--error-light);
  color: var(--error);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.modal-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.modal-icon svg {
  width: 32px;
  height: 32px;
}

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

.modal-content p {
  color: var(--gray-500);
  margin-bottom: 24px;
}

.modal-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.modal-stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
}

.modal-config {
  background: var(--bg-tertiary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.config-field {
  margin-bottom: 16px;
}

.config-field:last-child {
  margin-bottom: 0;
}

.config-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.config-value-copy {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-value-copy code {
  flex: 1;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gray-900);
}

.btn-copy {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.config-code {
  background: var(--gray-900);
  color: #e5e5e5;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}

.modal-content p code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 16px;
  }

  .header-left {
    gap: 16px;
  }

  .nav {
    display: none;
  }

  .main {
    padding: 16px;
  }

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

  .wizard-container {
    flex-direction: column;
  }

  .wizard-sidebar {
    width: 100%;
  }

  .wizard-steps {
    flex-direction: row;
    overflow-x: auto;
  }

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

  .guarantee-options {
    flex-wrap: wrap;
  }

  .guarantee-option {
    flex: 1 1 calc(50% - 4px);
  }
}

/* New UI Elements for Updated Prototype */

/* Field descriptions */
.field-description {
  font-size: 13px;
  color: var(--gray-500);
  margin: 4px 0 12px;
}

/* Cost input section (replaces slider) */
.cost-input-section {
  margin-bottom: 24px;
}

.cost-input-section label {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.cost-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  max-width: 200px;
}

.cost-input-group .currency {
  font-size: 16px;
  color: var(--gray-500);
}

.cost-input {
  border: none;
  font-size: 18px;
  font-weight: 600;
  width: 80px;
  outline: none;
}

.cost-unit {
  font-size: 13px;
  color: var(--gray-500);
}

.market-reference {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
}

/* Success definition */
.success-definition {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.success-definition p {
  margin-bottom: 8px;
}

.success-definition p:last-child {
  margin-bottom: 0;
}

/* cAPI signals */
.capi-signals {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
}

.capi-signals h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.signal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.signal-item.success {
  background: var(--success-light);
}

.signal-item.failure {
  background: var(--error-light);
}

.signal-event {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  min-width: 120px;
}

.signal-item.success .signal-event {
  color: var(--success);
}

.signal-item.failure .signal-event {
  color: var(--error);
}

.signal-when {
  font-size: 13px;
  color: var(--gray-600);
}

/* Breakdown note */
.breakdown-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

/* Guarantee-backed criteria styling */
.criterion-check {
  color: var(--success);
  font-weight: bold;
  margin-right: 8px;
}

.guarantee-list .criterion-item {
  background: var(--warning-light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.guarantee-icon {
  margin-right: 8px;
}

/* Bid strategy configs - show/hide based on selection */
.strategy-config {
  margin-top: 16px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  display: none;
}

.strategy-config.active {
  display: block;
}

.strategy-config label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.strategy-config .config-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.strategy-config .config-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.strategy-config input[type="number"] {
  border: none;
  font-size: 16px;
  font-weight: 600;
  width: 60px;
  outline: none;
}

/* Claims API note for guarantee-backed outcomes */
.claims-api-note {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--gray-600);
}

.claims-api-note code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: white;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

/* Guarantee item styling */
.guarantee-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--warning-light);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.guarantee-item .guarantee-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.guarantee-item .criterion-name {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.guarantee-item .criterion-desc {
  font-size: 12px;
  color: var(--gray-600);
}

/* ROAS note styling */
.roas-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.roas-note code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: white;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

/* Agent resources section */
.agent-resources-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

.agent-resources-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.included-badge {
  background: var(--success-light);
  color: var(--success);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-light);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.agent-resources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-resource-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}

.agent-resource-item .resource-name {
  font-weight: 500;
  min-width: 140px;
}

.agent-resource-item .resource-desc {
  font-size: 13px;
  color: var(--gray-500);
}

/* Maximum claim amount for guarantees */
.claim-cap-section {
  margin-top: 16px;
  padding: 16px;
  background: var(--warning-light);
  border-radius: var(--radius-md);
}

.claim-cap-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.claim-cap-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  max-width: 200px;
  margin-top: 8px;
}

.claim-cap-input-group .currency {
  font-size: 16px;
  color: var(--gray-500);
}

.claim-cap-input {
  border: none;
  font-size: 16px;
  font-weight: 600;
  width: 100px;
  outline: none;
}

/* Escalation trigger select dropdown */
.escalation-triggers select {
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-width: 100px;
}

/* Not covered section for guarantees */
.not-covered-section {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.not-covered-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.not-covered-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--gray-500);
}

.not-covered-list li {
  margin-bottom: 4px;
}

.not-covered-list li:last-child {
  margin-bottom: 0;
}

/* Cost Optimization Card */
.optimization-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.optimization-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.optimization-header h3 {
  margin-bottom: 4px;
}

.optimization-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.optimization-badge {
  background: var(--success-light);
  color: var(--success);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.optimization-outcomes {
  font-size: 12px;
  color: var(--gray-500);
}

.cost-trend {
  margin-bottom: 20px;
}

.cost-trend-chart {
  position: relative;
  height: 100px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  overflow: hidden;
}

.cost-trend-labels {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px 0;
  font-size: 11px;
  color: var(--gray-500);
}

/* Trend points with connecting line */
.trend-points-connected {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
}

.trend-points-connected .trend-point {
  position: relative;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 2;
  flex-shrink: 0;
}

/* Position points at descending heights to show cost reduction */
.trend-points-connected .trend-point:nth-child(1) { margin-bottom: 58px; }
.trend-points-connected .trend-point:nth-child(2) { margin-bottom: 50px; }
.trend-points-connected .trend-point:nth-child(3) { margin-bottom: 42px; }
.trend-points-connected .trend-point:nth-child(4) { margin-bottom: 34px; }
.trend-points-connected .trend-point:nth-child(5) { margin-bottom: 26px; }
.trend-points-connected .trend-point:nth-child(6) { margin-bottom: 18px; }
.trend-points-connected .trend-point:nth-child(7) { margin-bottom: 8px; }

.trend-points-connected .trend-point:last-child {
  background: var(--success);
}

.trend-points-connected .trend-point[data-value]::before {
  content: attr(data-value);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}

.optimization-stats {
  display: flex;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.opt-stat {
  display: flex;
  flex-direction: column;
}

.opt-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
}

.opt-stat-label {
  font-size: 12px;
  color: var(--gray-500);
}

/* History View */
.history-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.history-summary {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  padding: 20px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}

.summary-stat {
  display: flex;
  flex-direction: column;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.summary-label {
  font-size: 13px;
  color: var(--gray-500);
}

.history-table-container {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.history-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--gray-50);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover {
  background: var(--gray-50);
}

.history-table .claim-row {
  background: #fffbeb;
}

.history-table .claim-row:hover {
  background: #fef3c7;
}

.type-badge {
  display: inline-block;
  padding: 4px 8px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--gray-700);
}

.status-badge.claim {
  background: #fef3c7;
  color: #92400e;
}

.claim-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.claim-link:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  font-size: 14px;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--gray-50);
}

.pagination-info {
  font-size: 14px;
  color: var(--gray-500);
}

/* Dashboard header with filters */
.dashboard-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.outcome-type-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.type-chip {
  padding: 8px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  background: white;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.15s;
}

.type-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.type-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Docs View - Professional documentation styling */
.docs-container {
  display: flex;
  gap: 0;
  max-width: 100%;
  margin: -32px;
  min-height: calc(100vh - 60px);
}

.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--gray-200);
  padding: 40px 0;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.docs-nav-section {
  margin-bottom: 8px;
}

.docs-nav-section h4 {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  padding: 12px 32px;
  margin: 0;
}

.docs-nav-item {
  display: block;
  padding: 10px 32px;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease;
}

.docs-nav-item:hover {
  color: var(--text-primary);
}

.docs-nav-item.active {
  color: var(--accent);
}

.docs-content {
  flex: 1;
  min-width: 0;
  padding: 64px 80px 100px;
  max-width: 800px;
  background: var(--bg-primary);
}

.docs-section {
  display: none;
  scroll-margin-top: 80px;
}

.docs-section.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.docs-section h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.docs-section h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  margin-top: 64px;
  margin-bottom: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
  color: var(--text-primary);
}

.docs-section h2:first-of-type {
  margin-top: 40px;
  border-top: none;
  padding-top: 0;
}

.docs-section h3 {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.docs-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.docs-section ul, .docs-section ol {
  margin-bottom: 28px;
  padding-left: 0;
  list-style: none;
}

.docs-section li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 14px;
  padding-left: 20px;
  position: relative;
}

.docs-section ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.docs-section code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.docs-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.docs-header-row h1 {
  margin-bottom: 0;
}

.btn-copy-docs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-copy-docs:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-copy-docs svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.btn-copy-docs.copied {
  border-color: var(--success);
  color: var(--success);
}

.docs-lead {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 40px;
  font-weight: 400;
  font-style: italic;
}

.docs-callout {
  background: var(--bg-tertiary);
  border: none;
  border-left: 2px solid var(--accent);
  border-radius: 0;
  padding: 24px 28px;
  margin: 40px 0;
}

.docs-callout strong {
  color: var(--text-primary);
}

.docs-callout a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.docs-callout a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.docs-callout-info {
  background: var(--bg-tertiary);
  border: none;
  border-left: 2px solid var(--accent);
}

.docs-callout-info strong {
  color: var(--text-primary);
}

/* Decision Tree */
.decision-tree {
  margin: 32px 0;
}

.decision-node {
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.decision-question {
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
}

.decision-question-secondary {
  background: white;
  border: 2px dashed var(--gray-300);
}

.decision-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.decision-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-900);
  line-height: 1.5;
}

.decision-hint {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 8px;
  font-style: italic;
}

.decision-branches {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.decision-branch {
  flex: 1;
  position: relative;
}

.branch-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.decision-branch-no .branch-label {
  background: #fef2f2;
  color: #dc2626;
}

.decision-branch-yes .branch-label {
  background: #f0fdf4;
  color: #16a34a;
}

.branch-line {
  width: 2px;
  height: 20px;
  margin: 0 auto 12px;
}

.decision-branch-no .branch-line {
  background: #fca5a5;
}

.decision-branch-yes .branch-line {
  background: #86efac;
}

.decision-result {
  border: none;
  padding: 20px;
}

.decision-result-guarantee {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
  border-left: 4px solid #f59e0b;
}

.decision-result-capi {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-left: 4px solid var(--primary);
}

.result-model {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.decision-result-guarantee .result-model {
  color: #b45309;
}

.decision-result-capi .result-model {
  color: var(--primary-dark);
}

.result-reason {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 8px;
}

.result-example {
  font-size: 13px;
  color: var(--gray-500);
  font-style: italic;
}

.decision-branches-nested {
  margin-top: 16px;
}

@media (max-width: 700px) {
  .decision-branches {
    flex-direction: column;
    gap: 16px;
  }
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.docs-table th,
.docs-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.docs-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.docs-table td {
  color: var(--gray-600);
  line-height: 1.5;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-table tr:hover td {
  background: var(--gray-50);
}

.docs-code-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--gray-900);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
  margin-right: 8px;
  margin-bottom: 12px;
  font-weight: 500;
}

.docs-card {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
}

.docs-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-card p {
  margin-bottom: 16px;
}

.docs-card ul {
  margin-bottom: 0;
}

.docs-code {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0 0 20px 0;
  white-space: pre;
  border: 1px solid var(--gray-200);
}

.docs-code:last-child {
  margin-bottom: 0;
}

.code-block {
  position: relative;
  margin: 28px 0;
}

.code-block .docs-code {
  margin: 0;
}

.code-copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--gray-300);
  color: var(--text-tertiary);
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-copy-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.code-block:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.code-copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.docs-code.architecture {
  font-size: 11px;
  line-height: 1.5;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Verification badges in docs */
.docs-section .verification-badge {
  margin-left: 12px;
  vertical-align: middle;
}

/* Responsive docs */
@media (max-width: 1100px) {
  .docs-content {
    padding: 40px 40px 60px;
  }
}

@media (max-width: 900px) {
  .docs-container {
    flex-direction: column;
    margin: -16px;
  }

  .docs-sidebar {
    width: 100%;
    position: static;
    height: auto;
    padding: 12px 16px;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    -webkit-overflow-scrolling: touch;
  }

  .docs-nav-section {
    display: contents;
  }

  .docs-nav-section h4 {
    display: none;
  }

  .docs-nav-item {
    padding: 8px 14px;
    border-left: none;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 13px;
    background: var(--bg-tertiary);
  }

  .docs-nav-item.active {
    border-left-color: transparent;
    background: var(--accent);
    color: white;
  }

  .docs-content {
    padding: 24px 16px 40px;
  }

  .docs-section h1 {
    font-size: 32px;
  }

  .docs-section h2 {
    font-size: 24px;
  }
}

/* Mobile responsive - main layout */
@media (max-width: 768px) {
  .header {
    padding: 0 20px;
    height: 64px;
  }

  .header-left {
    gap: 16px;
  }

  .logo {
    font-size: 18px;
    gap: 10px;
  }

  .nav {
    display: none;
  }

  .header-right {
    display: none;
  }

  .main {
    padding: 24px 20px;
  }

  .page-header {
    margin-bottom: 32px;
  }

  .page-header h1 {
    font-size: 32px;
  }

  .outcome-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .outcome-card {
    padding: 24px;
  }

  .outcome-card h3 {
    font-size: 20px;
  }

  /* Wizard mobile */
  .wizard-container {
    flex-direction: column;
  }

  .wizard-sidebar {
    width: 100%;
    padding: 16px 20px;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 64px;
    background: var(--bg-primary);
    z-index: 10;
  }

  .wizard-steps {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
  }

  .wizard-step {
    flex-direction: column;
    padding: 8px 12px;
    min-width: auto;
  }

  .step-label {
    font-size: 10px;
  }

  .wizard-content {
    padding: 24px 20px;
  }

  .wizard-panel h2 {
    font-size: 20px;
  }

  .wizard-footer {
    padding: 16px 20px;
  }

  /* Outcome types mobile */
  .outcome-types-list {
    gap: 12px;
  }

  .outcome-type-item {
    padding: 16px;
  }

  /* Forms mobile */
  .context-sources {
    grid-template-columns: 1fr;
  }

  .tools-section {
    grid-template-columns: 1fr;
  }

  .strategy-cards {
    gap: 12px;
  }

  /* Docs mobile */
  .docs-header-row {
    flex-direction: column;
    gap: 16px;
  }

  .docs-lead {
    font-size: 20px;
  }

  .docs-table {
    font-size: 12px;
  }

  .docs-table th,
  .docs-table td {
    padding: 8px 10px;
  }

  .decision-tree {
    font-size: 13px;
  }

  .decision-node {
    padding: 16px;
  }

  .code-block {
    margin: 20px -20px;
    border-radius: 0;
  }

  .code-copy-btn {
    opacity: 1;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .header {
    padding: 0 16px;
  }

  .main {
    padding: 20px 16px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .outcome-card {
    padding: 20px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 12px 24px;
    font-size: 11px;
  }

  .docs-section h1 {
    font-size: 28px;
  }

  .docs-section h2 {
    font-size: 20px;
  }
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 1000;
  flex-direction: column;
}

.mobile-menu-overlay.active {
  display: flex;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.mobile-menu-header .logo-text {
  font-family: 'ABC Prophet', var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.mobile-menu-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-menu-close svg {
  width: 24px;
  height: 24px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 8px;
}

.mobile-nav-item {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  background: var(--accent-soft);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }

  .header-left {
    flex: 1;
  }
}
