/* ================================================================
   IjyaLabs Consultant — App Styles
   Aligned to ijyalabs.in master design system
================================================================ */

/* ---- Reset & tokens ------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Exact tokens from ijyalabs.in globals.css */
  --c-bg:          #ffffff;
  --c-surface:     #ffffff;
  --c-surface-2:   #f5f5f5;
  --c-border:      rgba(0,102,204,.12);
  --c-border-2:    rgba(0,102,204,.28);

  --c-text:        #2c2c2c;
  --c-text-2:      rgba(44,44,44,.68);
  --c-text-3:      rgba(44,44,44,.50);

  --c-accent:      #0066cc;
  --c-accent-h:    #004499;
  --c-accent-glow: rgba(0,102,204,.12);

  --c-green:       #16a34a;
  --c-amber:       #d97706;
  --c-red:         #dc2626;
  --c-teal:        #0d9488;
  --c-purple:      #7c3aed;
  --c-rose:        #e11d48;

  --c-white:       #ffffff;

  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);

  --font: 'Open Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Roboto Serif', Georgia, serif;

  --header-h: 60px;
  --sidebar-w: 280px;
  --max-w: 1100px;
}

html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--c-accent); color: #fff; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-h); }

button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }

/* ---- Header -------------------------------------------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo-img {
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border-2);
  object-fit: cover;
}
.logo-mark {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.4px;
}
.logo-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-accent);
  background: rgba(0,102,204,.1);
  border: 1px solid rgba(0,102,204,.2);
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: .3px;
}
.session-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-2);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---- Screens ------------------------------------------------- */

main { padding-top: var(--header-h); }

.screen { display: none; }
.screen.active { display: block; }

/* ---- Entry screen -------------------------------------------- */

.screen-entry {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.entry-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.entry-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 16px;
}
.entry-headline {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.3px;
  color: var(--c-text);
  margin-bottom: 16px;
}
.entry-sub {
  font-size: 17px;
  color: var(--c-text-2);
  line-height: 1.7;
}

/* Search */
.search-wrap {
  position: relative;
  max-width: 520px;
  margin: 32px auto 0;
}
.search-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 16px;
  width: 18px; height: 18px;
  color: var(--c-text-3);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 48px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-xl);
  color: var(--c-text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--c-text-3); }
.search-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-glow);
}
.search-clear {
  position: absolute;
  right: 14px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-3);
  border-radius: 50%;
  transition: color .15s, background .15s;
}
.search-clear svg { width: 14px; height: 14px; }
.search-clear:hover { color: var(--c-text); background: var(--c-surface-2); }

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 50;
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--c-text);
  cursor: pointer;
  transition: background .15s;
}
.suggestion-item:hover, .suggestion-item.focused {
  background: var(--c-surface-2);
}
.suggestion-domain {
  font-size: 11px;
  color: var(--c-text-3);
  margin-left: auto;
}

/* Domain grid */
.domains-section { text-align: center; }
.domains-label {
  font-size: 13px;
  color: var(--c-text-3);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.domain-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  overflow: hidden;
}
.domain-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--card-color, var(--c-accent));
  border-radius: 3px 0 0 3px;
}
.domain-card:hover {
  border-color: var(--card-color, var(--c-accent));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.domain-card-icon {
  width: 36px; height: 36px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-surface-2);
  border-radius: var(--r-sm);
}
.domain-card-icon svg { width: 20px; height: 20px; }
.domain-card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 4px;
}
.domain-card-desc {
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.5;
}

/* ---- Context screen ------------------------------------------ */

.screen-context { display: none; }
.screen-context.active { display: block; }

.context-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 24px 80px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 24px;
  align-items: start;
}

/* Discovery panel */
.discovery-panel {
  min-width: 0;
}
.discovery-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.state-indicator {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.state-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-accent);
  background: rgba(0,102,204,.08);
  border: 1px solid rgba(0,102,204,.18);
  padding: 3px 10px;
  border-radius: 100px;
}

/* Paths section */
.paths-section { margin-bottom: 24px; }
.paths-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.paths-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}
.paths-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Path item */
.path-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .2s;
}
.path-item.active { border-color: var(--path-color, var(--c-accent)); }
.path-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
}
.path-color-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--path-color, var(--c-accent));
  flex-shrink: 0;
}
.path-domain-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  flex: 1;
}
.path-sub-label {
  font-size: 12px;
  color: var(--c-text-3);
}
.path-remove {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-3);
  border-radius: 4px;
  transition: color .15s, background .15s;
  margin-left: 4px;
}
.path-remove svg { width: 12px; height: 12px; }
.path-remove:hover { color: var(--c-red); background: rgba(239,68,68,.1); }

.path-progress-bar {
  height: 2px;
  background: var(--c-border);
}
.path-progress-fill {
  height: 100%;
  background: var(--path-color, var(--c-accent));
  transition: width .4s ease;
}

/* Question area */
.question-area {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  min-height: 240px;
}
.question-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.question-path-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--path-color, var(--c-accent));
  background: rgba(0,102,204,.08);
  padding: 3px 8px;
  border-radius: 4px;
}
.question-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 24px;
}
.question-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.question-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: left;
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.5;
}
.question-option:hover {
  border-color: var(--c-accent);
  background: rgba(0,102,204,.06);
}
.question-option.selected {
  border-color: var(--c-accent);
  background: rgba(0,102,204,.08);
}
.option-letter {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--c-text-3);
  margin-top: 1px;
  transition: border-color .15s, background .15s, color .15s;
}
.question-option:hover .option-letter,
.question-option.selected .option-letter {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: white;
}

.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
}
.question-counter {
  font-size: 12px;
  color: var(--c-text-3);
}

/* ---- Progress sidebar ---------------------------------------- */

.progress-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.progress-card, .opportunities-card, .consult-cta {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.progress-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-text-3);
  margin-bottom: 16px;
}
.progress-metric {
  margin-bottom: 14px;
}
.metric-label {
  font-size: 12px;
  color: var(--c-text-3);
  display: block;
  margin-bottom: 6px;
}
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--c-border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 3px;
  transition: width .5s ease;
}
.progress-bar--confidence .progress-fill--confidence {
  background: var(--c-green);
}
.metric-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  min-width: 32px;
  text-align: right;
}
.progress-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}
.stat-item {
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.stat-label {
  font-size: 11px;
  color: var(--c-text-3);
}

/* Opportunities card */
.opportunities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.opportunity-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text-2);
  line-height: 1.4;
}
.opportunity-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-green);
  margin-top: 4px;
  flex-shrink: 0;
}
.opportunity-id {
  font-size: 10px;
  font-weight: 600;
  color: var(--c-text-3);
  margin-right: 2px;
}

/* Consultation CTA */
.consult-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.consult-score-label {
  font-size: 12px;
  color: var(--c-text-3);
}
.consult-score-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-green);
}
.consult-cta-note {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 8px;
  text-align: center;
  line-height: 1.5;
}

/* ---- Lead form ----------------------------------------------- */

.screen-lead {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.lead-header { margin-bottom: 36px; }
.lead-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.lead-sub { font-size: 15px; color: var(--c-text-2); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group:not(.form-row > .form-group) { margin-bottom: 16px; }
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-2);
}
.form-input {
  height: 44px;
  padding: 0 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.form-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-glow);
}
.form-input::placeholder { color: var(--c-text-3); }
.form-input.invalid {
  border-color: #e0554f;
  box-shadow: 0 0 0 3px rgba(224, 85, 79, 0.15);
}
.form-error {
  font-size: 12px;
  color: #e0554f;
  margin-top: -2px;
}
.download-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-sm);
  text-align: left;
}
.download-tile-icon { font-size: 20px; line-height: 1; }
.download-tile-text { flex: 1; }
.download-tile-title { font-size: 13px; font-weight: 600; color: var(--c-text); }
.download-tile-sub { font-size: 12px; color: var(--c-text-2); margin-top: 2px; }
.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.5 8l4.5 4.5L14.5 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}
.form-select option { background: var(--c-surface); }
.form-textarea {
  height: auto;
  padding: 10px 14px;
  resize: vertical;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* ---- Report screen ------------------------------------------- */

.screen-report {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 100px;
}
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--c-border);
}
.report-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.report-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.4px;
  margin-bottom: 4px;
}
.report-date { font-size: 13px; color: var(--c-text-3); }
.report-actions { display: flex; gap: 10px; flex-shrink: 0; }

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.score-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
}
.score-card--highlight {
  border-color: var(--c-green);
  background: rgba(34,197,94,.05);
}
.score-num {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}
.score-card--highlight .score-num { color: var(--c-green); }
.score-lbl { font-size: 12px; color: var(--c-text-3); }

.report-body { margin-bottom: 40px; }

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 20px;
}

/* Report sections */
.report-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.report-section h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--c-text-3);
  margin-bottom: 10px;
}
.report-section p {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.7;
}

/* Recommendation cards */
.rec-list { display: flex; flex-direction: column; gap: 14px; }
.rec-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
}
.rec-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-accent);
  background: rgba(0,102,204,.08);
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.rec-body {}
.rec-title { font-size: 14px; font-weight: 600; color: var(--c-text); margin-bottom: 4px; }
.rec-obs { font-size: 13px; color: var(--c-text-2); line-height: 1.5; }
.rec-benefit {
  font-size: 12px;
  color: var(--c-green);
  margin-top: 6px;
}
.rec-conf {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-3);
  white-space: nowrap;
}
.rec-conf.high { color: var(--c-green); }
.rec-conf.medium { color: var(--c-amber); }
.rec-conf.low { color: var(--c-text-3); }

/* Heatmap */
.heatmap-section { margin-bottom: 40px; }
.heatmap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.heatmap-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.heatmap-label {
  font-size: 13px;
  color: var(--c-text-2);
  width: 160px;
  flex-shrink: 0;
}
.heatmap-bar {
  flex: 1;
  height: 28px;
  background: var(--c-border);
  border-radius: 4px;
  overflow: hidden;
}
.heatmap-fill {
  height: 100%;
  background: var(--c-accent);
  border-radius: 4px;
  transition: width .8s ease;
  display: flex;
  align-items: center;
  padding-left: 10px;
}
.heatmap-fill.low    { background: var(--c-text-3); }
.heatmap-fill.medium { background: var(--c-amber); }
.heatmap-fill.high   { background: var(--c-accent); }
.heatmap-fill.critical { background: var(--c-red); }
.heatmap-score {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  min-width: 36px;
  text-align: right;
}

/* Roadmap */
.roadmap-section { margin-bottom: 48px; }
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.roadmap-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.roadmap-period {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.roadmap-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 8px;
}
.roadmap-desc {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.6;
}

/* Report CTA */
.report-cta {
  text-align: center;
  padding: 56px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
}
.report-cta-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
}
.report-cta-sub {
  font-size: 15px;
  color: var(--c-text-2);
  margin-bottom: 28px;
}
.report-cta-fine {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 12px;
}

/* ---- Escalation screen --------------------------------------- */

.screen-escalate.active { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-h)); }
.escalate-layout {
  text-align: center;
  max-width: 480px;
  padding: 48px 24px;
}
.escalate-icon {
  width: 64px; height: 64px;
  margin: 0 auto 24px;
  color: var(--c-amber);
}
.escalate-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 12px;
}
.escalate-body {
  font-size: 15px;
  color: var(--c-text-2);
  line-height: 1.7;
  margin-bottom: 32px;
}
.escalate-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* ---- Buttons ------------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  background: var(--c-accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: background .15s, transform .1s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary:hover { background: var(--c-accent-h); color: white; }
.btn-primary:active { transform: scale(.98); }

.btn-primary.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-primary.btn-lg { height: 52px; padding: 0 32px; font-size: 16px; }
.btn-primary.btn-block { width: 100%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  color: var(--c-text-2);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  transition: color .15s, border-color .15s, background .15s;
  cursor: pointer;
}
.btn-ghost:hover {
  color: var(--c-text);
  border-color: var(--c-border-2);
  background: var(--c-surface-2);
}
.btn-ghost svg { width: 14px; height: 14px; }

.btn-ghost.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }

/* ---- Modal --------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-text);
}
.modal-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-3);
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { color: var(--c-text); background: var(--c-surface-2); }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}
.modal-domain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-domain-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}
.modal-domain-item:hover {
  border-color: var(--card-color, var(--c-accent));
  background: var(--c-surface-2);
}
.modal-domain-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.modal-domain-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--card-color, var(--c-accent));
  flex-shrink: 0;
}

/* ---- Loading overlay ----------------------------------------- */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(244,246,251,.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
.loading-overlay[hidden] { display: none; }
.loading-spinner { text-align: center; }
.spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--c-text-2); }

/* ---- Toast notifications ------------------------------------- */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 400;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--c-text);
  max-width: 340px;
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.toast.info .toast-dot    { background: var(--c-accent); }
.toast.success .toast-dot { background: var(--c-green); }
.toast.warning .toast-dot { background: var(--c-amber); }
.toast.error .toast-dot   { background: var(--c-red); }

/* ---- Empty states -------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--c-text-3);
}
.empty-state-icon { font-size: 32px; margin-bottom: 12px; }
.empty-state-text { font-size: 14px; }

/* ---- Domain icon SVGs (inline via JS) ------------------------ */

.icon-technology { color: #2563eb; }
.icon-security   { color: #dc2626; }
.icon-cloud      { color: #0891b2; }
.icon-operations { color: #059669; }
.icon-automation { color: #7c3aed; }
.icon-governance { color: #d97706; }
.icon-compliance { color: #0f766e; }
.icon-ai         { color: #9333ea; }
.icon-transform  { color: #e11d48; }

/* ---- Utility ------------------------------------------------- */

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

/* ---- Responsive ---------------------------------------------- */

@media (max-width: 900px) {
  .context-layout {
    grid-template-columns: 1fr;
  }
  .progress-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .consult-cta { grid-column: 1 / -1; }
  .score-row { grid-template-columns: repeat(3, 1fr); }
  .roadmap-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .entry-headline { font-size: 26px; }
  .domain-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 1fr; }
  .progress-sidebar { grid-template-columns: 1fr; }
  .report-header { flex-direction: column; }
  .modal-domain-grid { grid-template-columns: 1fr; }
}

@media print {
  .header, .report-actions, .report-cta, .btn-primary, .btn-ghost { display: none !important; }
  body { background: white; color: black; }
  .report-section, .score-card, .roadmap-card, .rec-card {
    background: white; border: 1px solid #ddd;
  }
  .score-num, .report-title, .section-title { color: #111; }
  .score-lbl, .rec-obs, .roadmap-desc, .report-section p { color: #555; }
}
