:root {
  --bg: #f7f2ea;
  --panel: rgba(255, 252, 247, 0.92);
  --panel-strong: #fffaf2;
  --line: rgba(82, 61, 40, 0.12);
  --text: #1e1a17;
  --muted: #695d50;
  --accent: #b24c2d;
  --accent-soft: rgba(178, 76, 45, 0.12);
  --accent-strong: #8d3419;
  --secondary: #245f58;
  --secondary-soft: rgba(36, 95, 88, 0.12);
  --shadow: 0 22px 60px rgba(58, 39, 19, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --font: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "IBM Plex Serif", "Iowan Old Style", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(255, 210, 176, 0.85), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(119, 177, 168, 0.4), transparent 22%),
    linear-gradient(160deg, #f9f2e7 0%, #f1e7d7 48%, #efe7dd 100%);
}

.orb {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.45;
  pointer-events: none;
}

.orb-a {
  top: 120px;
  right: 5vw;
  width: 220px;
  height: 220px;
  background: rgba(249, 124, 82, 0.22);
}

.orb-b {
  bottom: 40px;
  left: -30px;
  width: 260px;
  height: 260px;
  background: rgba(55, 124, 113, 0.18);
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar,
.workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 22px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  background:
    linear-gradient(135deg, rgba(255, 244, 232, 0.96), rgba(255, 250, 245, 0.92)),
    radial-gradient(circle at top right, rgba(178, 76, 45, 0.08), transparent 40%);
}

.hidden {
  display: none !important;
}

.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.step-header .secondary {
  flex: 0 0 auto;
}

.brand h1,
.hero h2,
.card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
}

.hero h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.card h2 {
  font-size: 1.1rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(82, 61, 40, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(178, 76, 45, 0.55);
  box-shadow: 0 0 0 4px rgba(178, 76, 45, 0.1);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 12px 24px rgba(141, 52, 25, 0.18);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

button.secondary,
.ghost-button {
  background: linear-gradient(135deg, #3a8279, var(--secondary));
  box-shadow: 0 12px 24px rgba(36, 95, 88, 0.16);
}

.ghost-button {
  padding-inline: 12px;
}

.button-row {
  display: flex;
  gap: 10px;
}

.button-row.wrap {
  flex-wrap: wrap;
}

.status-pills,
.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(82, 61, 40, 0.12);
  color: var(--muted);
  font-size: 0.9rem;
}

.pill strong {
  color: var(--text);
}

.projects-list,
.products-list,
.panel-body,
.question-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.artifact-focus {
  position: relative;
  border-color: rgba(178, 76, 45, 0.42) !important;
  box-shadow:
    0 0 0 4px rgba(178, 76, 45, 0.12),
    0 16px 34px rgba(141, 52, 25, 0.12);
  animation: artifactPulse 1.4s ease;
}

@keyframes artifactPulse {
  0% {
    transform: translateY(0);
    box-shadow:
      0 0 0 0 rgba(178, 76, 45, 0.22),
      0 10px 24px rgba(141, 52, 25, 0.08);
  }
  35% {
    transform: translateY(-2px);
    box-shadow:
      0 0 0 6px rgba(178, 76, 45, 0.14),
      0 18px 36px rgba(141, 52, 25, 0.16);
  }
  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 4px rgba(178, 76, 45, 0.12),
      0 16px 34px rgba(141, 52, 25, 0.12);
  }
}

.project-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.project-row:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 76, 45, 0.24);
}

.project-row.active {
  border-color: rgba(178, 76, 45, 0.45);
  background: linear-gradient(135deg, rgba(178, 76, 45, 0.09), rgba(255, 255, 255, 0.9));
}

.project-select {
  flex: 1;
  text-align: left;
  background: none;
  box-shadow: none;
  color: var(--text);
  padding: 0;
}

.project-select:hover {
  transform: none;
}

.project-name {
  display: block;
  font-weight: 700;
}

.project-meta {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
}

.stage-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.stage-item {
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  min-height: 92px;
}

.stage-item.active {
  background: linear-gradient(160deg, rgba(178, 76, 45, 0.18), rgba(255, 255, 255, 0.92));
  border-color: rgba(178, 76, 45, 0.35);
}

.stage-item.done {
  background: linear-gradient(160deg, rgba(36, 95, 88, 0.16), rgba(255, 255, 255, 0.88));
  border-color: rgba(36, 95, 88, 0.28);
}

.stage-index {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  margin-bottom: 10px;
}

.stage-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.stage-subtitle {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

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

.workflow-card {
  min-height: 140px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.workflow-card:hover {
  border-color: rgba(178, 76, 45, 0.32);
}

.workflow-card.done {
  background: linear-gradient(160deg, rgba(36, 95, 88, 0.16), rgba(255, 255, 255, 0.9));
  border-color: rgba(36, 95, 88, 0.28);
}

.workflow-card.partial {
  background: linear-gradient(160deg, rgba(238, 174, 73, 0.16), rgba(255, 255, 255, 0.9));
  border-color: rgba(196, 122, 28, 0.26);
}

.workflow-card.empty {
  color: var(--muted);
}

.workflow-card-title {
  display: block;
  margin-top: 10px;
  font-weight: 800;
}

.workflow-card-hint,
.workflow-card-detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.workflow-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(82, 61, 40, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
}

.strategy-summary {
  display: grid;
  gap: 10px;
}

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

.empty-state {
  color: var(--muted);
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(82, 61, 40, 0.18);
  background: rgba(255, 255, 255, 0.44);
}

.info-list {
  margin: 0;
  padding-left: 18px;
}

.info-list li + li {
  margin-top: 8px;
}

.strategy-card,
.board-role-card,
.dimension-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.strategy-card h3,
.board-role-card h3,
.dimension-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.metric-badge {
  display: inline-flex;
  padding: 6px 10px;
  margin: 6px 6px 0 0;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  font-size: 0.84rem;
}

.question-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.question-card p {
  margin-top: 0;
}

.status-banner {
  position: sticky;
  bottom: 16px;
  align-self: flex-end;
  max-width: min(460px, 100%);
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(36, 95, 88, 0.18);
  background: rgba(255, 250, 245, 0.94);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(58, 39, 19, 0.12);
}

.status-banner.error {
  border-color: rgba(178, 76, 45, 0.24);
  background: rgba(255, 240, 235, 0.96);
}

.status-banner.success {
  border-color: rgba(36, 95, 88, 0.22);
  background: rgba(239, 249, 246, 0.96);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-shell.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 23, 0.48);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(88vh, 960px);
  overflow: auto;
}

.preview-meta {
  display: grid;
  gap: 12px;
}

.preview-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-meta-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.preview-meta-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-status {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  line-height: 1.5;
}

.preview-status.info {
  border-color: rgba(36, 95, 88, 0.16);
  background: rgba(239, 249, 246, 0.9);
}

.preview-status.error {
  border-color: rgba(178, 76, 45, 0.24);
  background: rgba(255, 240, 235, 0.96);
}

.preview-status.success {
  border-color: rgba(36, 95, 88, 0.22);
  background: rgba(239, 249, 246, 0.96);
}

.prompt-preview-body {
  margin: 0;
  padding: 18px;
  min-height: 320px;
  max-height: 48vh;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(82, 61, 40, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-card {
  background:
    linear-gradient(155deg, rgba(36, 95, 88, 0.1), rgba(255, 255, 255, 0.92)),
    rgba(255, 252, 247, 0.9);
}

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

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

  .stage-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .shell {
    padding: 16px;
    gap: 16px;
  }

  .card {
    padding: 18px;
  }

  .hero {
    flex-direction: column;
  }

  .action-grid,
  .workflow-chain,
  .stage-rail {
    grid-template-columns: 1fr;
  }

  .step-header {
    flex-direction: column;
  }

  .preview-meta-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
  }

  .modal-shell {
    padding: 12px;
  }

  .modal-panel {
    max-height: 92vh;
  }
}
