:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-subtle: #eef4f5;
  --ink: #18272d;
  --muted: #5d6c73;
  --line: #d8e3e6;
  --blue: #235e8c;
  --teal: #1f766d;
  --green: #23745d;
  --amber: #9a6421;
  --red: #934540;
  --shadow: 0 18px 42px rgba(24, 39, 45, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #e9f1f3 0%, var(--bg) 34%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.boundary-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: #16282f;
  color: #f6fbfb;
  font-size: 0.9rem;
}

.boundary-banner div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.boundary-banner span {
  color: #cfe3e6;
}

.package-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.package-nav a {
  border: 1px solid rgba(246, 251, 251, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  color: #f6fbfb;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.package-nav a:hover {
  background: rgba(246, 251, 251, 0.12);
}

.shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 8px 0 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.subtitle {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary-metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(24, 39, 45, 0.06);
}

.summary-metric strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

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

.toolbar label {
  font-weight: 800;
}

select {
  min-width: 220px;
  padding: 9px 34px 9px 12px;
  border: 1px solid #b9c9ce;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.toolbar-note {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.case-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 6px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.journey-complete {
  border-top-color: var(--green);
}

.journey-blocker {
  border-top-color: var(--red);
}

.journey-postponed {
  border-top-color: var(--amber);
}

.case-topline,
.readiness-section,
.blocker-section,
.detail-panel {
  padding: 18px;
}

.case-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.case-kicker {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: "Segoe UI Mono", Consolas, monospace;
  font-size: 0.78rem;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.procedure {
  margin: 0;
  color: var(--muted);
}

.journey-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.journey-pill-complete,
.chip-ready {
  border-color: #a8d6c9;
  background: #e5f5ef;
  color: #185846;
}

.journey-pill-blocker,
.chip-warning {
  border-color: #efb8b8;
  background: #fff0f0;
  color: #843030;
}

.journey-pill-postponed,
.chip-deferred {
  border-color: #e6c690;
  background: #fff7e8;
  color: #764912;
}

.chip-neutral,
.chip-muted {
  border-color: #cfdadd;
  background: #f4f7f8;
  color: #3f5057;
}

.chip-info {
  border-color: #a8c7dc;
  background: #e9f3f9;
  color: #1d557e;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 0;
}

.case-meta span {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: #344a51;
  font-size: 0.82rem;
  font-weight: 700;
}

.summary {
  margin: 12px 18px 0;
  color: #3d4f56;
  font-size: 0.94rem;
}

.ownership-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 0;
}

.context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
}

.care-context-chip {
  border: 1px solid #b8ced9;
  background: #eef7fb;
  color: #24566b;
}

.workflow-context-chip {
  border: 1px solid #bdd5cc;
  background: #eff8f4;
  color: #26604c;
}

h3 {
  margin-bottom: 10px;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.channel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.channel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.channel-label {
  color: #40545c;
  font-size: 0.86rem;
  font-weight: 750;
}

.blocker-section {
  border-top: 1px solid var(--line);
  background: #fffdfb;
}

.blocker-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #4c3c36;
}

.blocker-section li + li {
  margin-top: 8px;
}

.blocker-alert,
.clear-state {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 800;
}

.blocker-alert {
  border: 1px solid #e5bbb5;
  background: #fff4f1;
  color: #783d35;
}

.postponed-alert {
  border-color: #e6c690;
  background: #fff7e8;
  color: #764912;
}

.clear-state {
  border: 1px solid #a8d6c9;
  background: #e5f5ef;
  color: #185846;
}

.reference-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reference-panel {
  padding: 14px;
  border-radius: 8px;
}

.care-panel {
  border: 1px solid #b8ced9;
  background: #eef7fb;
}

.workflow-panel {
  border: 1px solid #c3d7cf;
  background: #eff8f4;
}

.reference-panel p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

dl {
  display: grid;
  grid-template-columns: minmax(112px, 0.72fr) minmax(0, 1fr);
  gap: 6px 10px;
  margin: 0;
}

dt {
  color: #5a6a70;
  font-size: 0.78rem;
  font-weight: 800;
}

dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #203239;
  font-family: "Segoe UI Mono", Consolas, monospace;
  font-size: 0.78rem;
}

.detail-panel {
  border-top: 1px solid var(--line);
  background: #f9fbfb;
}

summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.detail-grid {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.demo-narrative-section {
  padding-bottom: 2px;
}

.demo-narrative {
  margin: 0;
  color: #3d4f56;
}

.ai-draft {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ai-draft:first-child {
  border-top: 0;
}

.ai-draft p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.audit-list {
  margin: 0;
  padding-left: 22px;
}

.audit-list li {
  margin-bottom: 8px;
  color: #40545c;
  font-size: 0.86rem;
}

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

  .summary-strip {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

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

  .hero-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .boundary-banner,
  .toolbar,
  .case-topline {
    display: block;
  }

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

  .summary-strip {
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
  }

  .shell {
    width: min(100% - 24px, 1280px);
    padding-top: 22px;
  }

  .boundary-banner div + div,
  .package-nav,
  .toolbar-note,
  .journey-pill {
    margin-top: 10px;
  }

  select {
    width: 100%;
    min-width: 0;
    margin-top: 8px;
  }

  .reference-panel + .reference-panel {
    margin-top: 12px;
  }

  .channel-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
