:root {
  --bg: #f4fbf7;
  --panel: #ffffff;
  --ink: #00472e;
  --muted: rgba(0, 71, 46, 0.68);
  --brand: #008751;
  --accent: #41f0aa;
  --line: rgba(0, 71, 46, 0.16);
  --danger: #b42318;
  --shadow: 0 14px 40px rgba(0, 71, 46, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button, .file-button { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 0.65rem 0.85rem; cursor: pointer; }
button:hover, .file-button:hover { border-color: var(--brand); }
button.primary { background: var(--brand); color: #fff; }
button.danger { color: var(--danger); }
.file-button input { display: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr; }
.topbar { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 0.2rem; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
h1 { margin: 0; font-size: 1.35rem; }
.toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.save-status { color: var(--muted); font-size: 0.9rem; }
.phase-nav { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.85rem 1.25rem; background: #fafffd; border-bottom: 1px solid var(--line); }
.phase-tab { white-space: nowrap; }
.phase-tab.active { background: var(--ink); color: #fff; }
.phase-root { padding: 1.25rem; }
.phase-header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; }
.field { display: grid; gap: 0.35rem; }
.field label { color: var(--muted); font-size: 0.86rem; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem; background: #fff; color: var(--ink); }
.field textarea { min-height: 84px; resize: vertical; }
.card-list { display: grid; gap: 0.7rem; }
.item-card { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem; background: #fff; }
.item-card h3 { margin: 0 0 0.4rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 1rem; align-items: start; }
.lane { min-height: 260px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem; }
.lane h2 { margin: 0 0 0.75rem; font-size: 1rem; }
.kanban-card { display: grid; gap: 0.5rem; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 12px; padding: 0.7rem; margin-bottom: 0.55rem; background: #fafffd; }
.matrix { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.matrix-cell { min-height: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 0.5rem; background: #fff; font-size: 0.85rem; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 0.7rem; text-align: left; vertical-align: top; }
.notice { padding: 0.75rem; border-radius: 12px; background: rgba(65, 240, 170, 0.18); border: 1px solid var(--line); }
@media (max-width: 900px) { .topbar { flex-direction: column; } .kanban { grid-template-columns: 1fr; } }

/* Intro page */
.intro-page { display: grid; gap: 1rem; }
.intro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
  padding: 1.3rem;
  border-radius: 24px;
  background:
    radial-gradient(600px 260px at 20% 0%, rgba(65, 240, 170, 0.34), transparent 65%),
    linear-gradient(135deg, #00472e 0%, #006c45 58%, #008751 100%);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero-copy { display: grid; align-content: center; gap: 1rem; max-width: 900px; }
.hero-copy .eyebrow { color: rgba(255, 255, 255, 0.78); }
.hero-copy h2 { margin: 0; font-size: clamp(2rem, 4vw, 4.1rem); line-height: 0.98; letter-spacing: -0.05em; }
.hero-copy p:not(.eyebrow) { margin: 0; max-width: 760px; color: rgba(255, 255, 255, 0.86); font-size: 1.08rem; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero-actions .primary, .engagement-block .primary { background: var(--accent); color: var(--ink); border-color: transparent; font-weight: 800; }
.hero-actions span { color: rgba(255, 255, 255, 0.72); }
.hero-stat-grid { display: grid; gap: 0.8rem; }
.hero-stat {
  display: grid;
  gap: 0.35rem;
  align-content: center;
  min-height: 130px;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}
.hero-stat strong { font-size: 2.1rem; line-height: 1; }
.hero-stat span { color: rgba(255, 255, 255, 0.78); }
.process-map { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 0.8rem; }
.process-card {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
  border: 1px solid var(--line);
  min-height: 260px;
}
.process-card::after {
  content: '';
  position: absolute;
  top: 2.1rem;
  right: -0.8rem;
  width: 0.8rem;
  height: 2px;
  background: var(--accent);
}
.process-card:last-child::after { display: none; }
.step-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}
.process-card h3 { margin: 0; font-size: 1rem; }
.process-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.process-card strong { margin-top: auto; color: var(--brand); font-size: 0.92rem; }
.intro-two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr); gap: 1rem; align-items: start; }
.output-grid { display: grid; gap: 0.7rem; }
.output-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafffd;
}
.output-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
}
.output-card p { margin: 0; line-height: 1.45; }
.agenda { display: grid; gap: 0.35rem; }
.agenda-item {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums; }
.engagement-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(65, 240, 170, 0.25), rgba(111, 181, 247, 0.18));
  border: 1px solid var(--line);
}
.engagement-block h2 { margin: 0; max-width: 920px; font-size: clamp(1.35rem, 2vw, 2.2rem); line-height: 1.14; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 1100px) { .process-map { grid-template-columns: repeat(2, minmax(220px, 1fr)); } .process-card::after { display: none; } }
@media (max-width: 900px) { .intro-hero, .intro-two-column { grid-template-columns: 1fr; } .engagement-block { align-items: flex-start; flex-direction: column; } }
@media (max-width: 560px) { .process-map { grid-template-columns: 1fr; } .agenda-item { grid-template-columns: 1fr; gap: 0.2rem; } }

.lane-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.lane-header h2 { margin: 0; }
.add-card-button { padding: 0.45rem 0.65rem; font-size: 0.86rem; }
.compact-card { position: relative; padding-top: 2rem; }
.compact-card textarea { min-height: 92px; border: 0; background: transparent; padding: 0; outline: none; resize: vertical; color: var(--ink); }
.delete-x {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
  font-weight: 800;
}
.delete-x:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.card-priority {
  position: absolute;
  top: 0.42rem;
  left: 0.55rem;
}
.card-priority select {
  max-width: 74px;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}

.phase2-issue-list { display: grid; gap: 1rem; }
.phase2-issue { display: grid; gap: 1rem; }
.phase2-issue-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.phase2-issue-header h3 { margin: 0.35rem 0 0.2rem; font-size: 1.05rem; }
.phase2-issue-header p { margin: 0; color: var(--muted); }
.priority-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.priority-one { background: rgba(180, 35, 24, 0.12); color: var(--danger); }
.priority-two { background: rgba(0, 135, 81, 0.13); color: var(--brand); }
.opportunity-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.opportunity-card {
  position: relative;
  display: grid;
  gap: 0.5rem;
  min-height: 145px;
  padding: 2.35rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  background: #fafffd;
}
.opportunity-card textarea { min-height: 82px; border: 0; background: transparent; padding: 0; outline: none; resize: vertical; color: var(--ink); }
.opportunity-category { position: absolute; top: 0.42rem; left: 0.55rem; }
.opportunity-category select {
  max-width: 145px;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}
@media (max-width: 700px) { .phase2-issue-header { flex-direction: column; } .opportunity-list { grid-template-columns: 1fr; } }

.phase3-opportunity-list { display: grid; gap: 1rem; }
.phase3-opportunity { display: grid; gap: 1rem; }
.phase3-opportunity-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.phase3-opportunity-header h3 { margin: 0.35rem 0 0.2rem; font-size: 1.05rem; }
.phase3-opportunity-header p { margin: 0; color: var(--muted); }
.use-case-created {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(65, 240, 170, 0.18);
  color: var(--brand);
  font-weight: 800;
  font-size: 0.86rem;
}
.use-case-form-card { background: #fafffd; }
.muted-empty { margin: 0; color: var(--muted); }
@media (max-width: 700px) { .phase3-opportunity-header { flex-direction: column; } }

.score-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.score-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  border-left: 6px solid var(--brand);
}
.score-card.quickWins { border-left-color: #008751; }
.score-card.strategicBets { border-left-color: #6f45d8; }
.score-card.medium { border-left-color: #d68a00; }
.score-card.lowPriority { border-left-color: #b42318; }
.score-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.score-card-header h3 { margin: 0 0 0.25rem; }
.score-card-header p { margin: 0; color: var(--muted); line-height: 1.4; }
.portfolio-badge { white-space: nowrap; padding: 0.35rem 0.6rem; border-radius: 999px; background: rgba(65, 240, 170, 0.18); font-weight: 800; font-size: 0.82rem; }
.slider-field { display: grid; gap: 0.35rem; }
.slider-field > span { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-weight: 700; }
.slider-field strong { color: var(--ink); font-size: 1.1rem; }
.slider-field input[type="range"] { width: 100%; accent-color: var(--brand); }
.slider-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.78rem; }
.bcg-matrix { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 1rem; }
.bcg-cell { min-height: 220px; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.bcg-cell.quickWins { background: linear-gradient(180deg, rgba(65, 240, 170, 0.22), #fff); }
.bcg-cell.strategicBets { background: linear-gradient(180deg, rgba(111, 181, 247, 0.22), #fff); }
.bcg-cell.medium { background: linear-gradient(180deg, rgba(214, 138, 0, 0.12), #fff); }
.bcg-cell.lowPriority { background: linear-gradient(180deg, rgba(180, 35, 24, 0.1), #fff); }
.bcg-cell h3 { margin: 0 0 0.3rem; }
.bcg-cell p { margin: 0 0 0.8rem; color: var(--muted); }
.bcg-items { display: grid; gap: 0.45rem; }
.bcg-item { padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.8); }
@media (max-width: 700px) { .bcg-matrix { grid-template-columns: 1fr; } .score-card-header { flex-direction: column; } }

/* Auth pages */
.auth-shell { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 1.5rem; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 2rem; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.auth-card .subtitle { margin: 0 0 1.5rem; color: var(--muted); }
.auth-card .field { margin-bottom: 1rem; }
.auth-card .primary { width: 100%; margin-top: 0.5rem; padding: 0.75rem; }
.auth-error { color: var(--danger); font-size: 0.9rem; margin-top: 0.5rem; }
.auth-link { margin-top: 1.25rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.auth-link a { color: var(--brand); }
.auth-notice { margin-top: 1rem; padding: 1rem; border-radius: 14px; background: rgba(65, 240, 170, 0.18); border: 1px solid var(--line); }

/* Projects page */
.projects-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: var(--bg); }
.projects-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); }
.projects-main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; width: 100%; }
.projects-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.projects-header h2 { margin: 0; font-size: 1.4rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.project-card { display: grid; gap: 0.75rem; padding: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.project-card h3 { margin: 0; font-size: 1.05rem; }
.project-card .meta { color: var(--muted); font-size: 0.88rem; margin: 0; }
.project-card .card-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.25rem; }
.role-pill { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 999px; background: rgba(0,135,81,0.12); color: var(--brand); font-size: 0.78rem; font-weight: 700; }
.empty-state { padding: 3rem; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: 18px; }
