:root {
  color-scheme: light;
  --ink: #15171c;
  --muted: #667085;
  --line: #d7deea;
  --panel: #ffffff;
  --canvas: #f4f6f9;
  --green: #15966b;
  --blue: #3467eb;
  --gold: #a86700;
  --red: #c2412f;
  --shadow: 0 18px 48px rgba(31, 42, 68, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(52, 103, 235, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(21, 150, 107, 0.13), transparent 42%),
    var(--canvas);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--blue);
}

.app-shell {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #15171c;
  color: #fff;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.panel-label,
.eyebrow,
.lede,
.muted,
small {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
  margin: 34px 0;
}

.nav a {
  padding: 11px 12px;
  border-radius: 8px;
  color: #303642;
  text-decoration: none;
}

.nav a.active,
.nav a:hover {
  background: #eaf0ff;
  color: #1e4fd1;
}

.side-panel,
.tool-panel,
.score-tile,
.metric,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.side-panel {
  padding: 15px;
  margin-bottom: 14px;
}

.side-panel p:last-child {
  margin-bottom: 0;
  line-height: 1.45;
}

.side-panel dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.side-panel dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.side-panel dt {
  color: #303642;
  font-weight: 750;
}

.side-panel dd {
  margin: 0;
  color: var(--blue);
  font-weight: 900;
}

.workspace {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 30px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 22px;
  align-items: start;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-bottom: 12px;
  font-size: 3.85rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.lede {
  max-width: 860px;
  margin-bottom: 0;
  line-height: 1.6;
}

.score-tile {
  display: grid;
  place-items: center;
  height: 132px;
  box-shadow: var(--shadow);
}

.score-tile span {
  font-size: 2.55rem;
  font-weight: 950;
}

.score-tile small {
  margin-top: -22px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  min-height: 88px;
  padding: 15px;
}

.metric span,
.metric strong {
  display: block;
}

.metric span {
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  margin-top: 9px;
  font-size: 1.55rem;
}

.tool-panel {
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ghost-button,
.primary-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 850;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #303642;
}

.primary-button {
  border: 1px solid #15171c;
  background: #15171c;
  color: #fff;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 200px 170px 170px;
  gap: 12px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #303642;
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 420px;
  padding: 13px;
  resize: vertical;
  line-height: 1.45;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

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

.project-card {
  display: grid;
  gap: 9px;
  min-height: 210px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.project-card.selected {
  border-color: #7fa1ff;
  background: #f2f6ff;
}

.card-top,
.score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-top b,
.decision {
  min-width: 74px;
  padding: 6px 8px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.78rem;
}

.support {
  background: #eafff7;
  color: var(--green);
}

.watch {
  background: #fff8df;
  color: var(--gold);
}

.avoid {
  background: #fff0ed;
  color: var(--red);
}

.project-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.score-line em {
  color: var(--ink);
  font-size: 2rem;
  font-style: normal;
  font-weight: 950;
}

.source-chip {
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #dbe6ff;
  border-radius: 8px;
  background: #f4f7ff;
  color: #3154a7;
  font-size: 0.78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.score-line small {
  margin-left: -6px;
}

.detail-panel {
  position: sticky;
  top: 24px;
  padding: 18px;
}

.detail-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.detail-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  place-items: center;
  min-height: 98px;
  margin: 16px 0;
  border: 1px solid #a9ddc9;
  border-radius: 8px;
  background: #ecfff7;
}

.detail-score strong {
  font-size: 2.4rem;
  color: var(--green);
}

.detail-score span {
  margin-top: -12px;
}

.research-box {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.research-box div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.research-box span {
  color: var(--muted);
  font-weight: 800;
}

.research-box strong {
  color: #303642;
}

.detail-panel p,
.detail-panel li {
  color: #3d4656;
  line-height: 1.5;
}

.score-stack {
  display: grid;
  gap: 10px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
}

.score-row i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--value), #edf1f8 var(--value));
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.model-list,
.insight-list,
.mission-list,
.item-list,
.action-grid,
.sprint-grid {
  display: grid;
  gap: 10px;
}

.model-item,
.insight-list article,
.mission-item,
.pick-item,
.evidence-card,
.risk-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.model-item {
  grid-template-columns: 58px 1fr;
}

.model-item span {
  display: grid;
  place-items: center;
  height: 42px;
  border-radius: 8px;
  background: #eaf0ff;
  color: var(--blue);
  font-weight: 950;
}

.model-item p,
.insight-list p,
.mission-item p,
.pick-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.trust-list {
  margin-bottom: 16px;
}

.trust-item span {
  background: #ecfff7;
  color: var(--green);
}

.section-subhead {
  margin-top: 4px;
}

.pick-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pick-item span {
  color: var(--blue);
  font-weight: 850;
}

.evidence-card div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.evidence-card span,
.risk-card span {
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 850;
}

.evidence-card ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.risk-card {
  border-color: #ead6a2;
  background: #fffdf5;
}

.risk-card p {
  margin-bottom: 0;
  color: #5d4b24;
  line-height: 1.45;
}

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

.action-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.action-card:hover {
  border-color: #7fa1ff;
  background: #f5f8ff;
}

.action-card span {
  color: var(--muted);
  line-height: 1.45;
}

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

.sprint-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sprint-card > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ecfff7;
  color: var(--green);
  font-weight: 950;
}

.sprint-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.intake-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wide {
  grid-column: 1 / -1;
}

.packet-panel {
  margin-top: 18px;
}

.muted {
  margin-bottom: 0;
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .app-shell,
  .topbar,
  .radar-layout,
  .content-grid,
  .pick-columns,
  .action-grid,
  .sprint-grid {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .detail-panel {
    position: static;
    height: auto;
  }

  .metric-grid,
  .project-grid,
  .intake-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 3.05rem;
  }
}

@media (max-width: 680px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  h1 {
    font-size: 2.1rem;
  }

  .filter-bar,
  .metric-grid,
  .project-grid,
  .intake-form {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: grid;
  }
}
