@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Source+Serif+4:wght@400;600;700&display=swap");

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #171a1f;
  --muted: #5f6773;
  --accent: #a61e2d;
  --accent-deep: #7a1121;
  --line: rgba(23, 26, 31, 0.12);
  --shadow: 0 6px 18px rgba(23, 26, 31, 0.05);
  --radius: 10px;
  --sidebar-width: 290px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

body {
  padding: 22px;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 20px;
  height: calc(100vh - 44px);
}

.sidebar,
.slide {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar {
  border-radius: 14px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.sidebar__brand h1 {
  margin: 0;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 650;
}

.sidebar__controls {
  display: contents;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: "Avenir Next Condensed", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.slide-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 26px;
}

.slide-nav.active {
  display: flex;
}

.slide-nav__item {
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  transition: background 180ms ease, transform 180ms ease;
}

.slide-nav__item:hover,
.slide-nav__item:focus-visible {
  background: rgba(182, 77, 27, 0.09);
  outline: none;
  transform: translateX(2px);
}

.slide-nav__item.active {
  background: rgba(166, 30, 45, 0.08);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.mode-switch__button {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  cursor: pointer;
  padding: 12px 10px;
  font-family: "Avenir Next Condensed", "Gill Sans", "Trebuchet MS", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease;
}

.mode-switch__button.active {
  background: rgba(166, 30, 45, 0.08);
  border-color: rgba(166, 30, 45, 0.22);
}

.slide-nav__index {
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
  width: 28px;
}

.slide-nav__label {
  font-size: 0.95rem;
}

kbd {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 2px 7px;
  background: var(--surface-strong);
  font-family: inherit;
}

.deck {
  position: relative;
  display: none;
  min-height: 0;
}

.deck.active {
  display: block;
}

.app-status {
  max-width: 720px;
  padding: 18px 0;
}

.app-status h2 {
  margin: 4px 0 12px;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  line-height: 1.08;
  font-weight: 650;
}

.app-status__message {
  max-width: 72ch;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.app-status--error code,
.app-status__message code {
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

.workspace {
  padding: 28px 30px 40px;
  overflow-y: auto;
}

.workspace#brainstorm-deck {
  width: 100%;
  max-width: none;
  margin: 0;
}

.workspace,
.workspace .workspace-card,
.workspace .workspace__hero-copy,
.workspace .workspace-section__header,
.workspace .workspace-card p,
.workspace .workspace-card li {
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

.workspace__hero {
  display: grid;
  gap: 8px;
  padding: 4px 0 10px;
}

.workspace__hero-copy h2 {
  max-width: none;
  margin: 4px 0 10px;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  line-height: 1.08;
  font-weight: 650;
}

.workspace__hero-copy .hero__lead {
  max-width: none;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.workspace-section {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(29, 26, 23, 0.08);
  scroll-margin-top: 24px;
}

.workspace-section__header {
  margin-bottom: 14px;
}

.workspace-section__header h3 {
  margin: 4px 0 0;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 650;
}

.workspace-grid {
  display: grid;
  gap: 14px;
}

.workspace-grid + .workspace-grid {
  margin-top: 14px;
}

.workspace-section > .workspace-card + .workspace-card,
.workspace-section > .workspace-card + .workspace-grid,
.workspace-section > .workspace-grid + .workspace-card {
  margin-top: 14px;
}

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

.workspace-grid--2 {
  grid-template-columns: 1fr;
}

.workspace-grid--3 {
  grid-template-columns: 1fr;
}

.workspace-grid--4 {
  grid-template-columns: 1fr;
}

.workspace-grid--5 {
  grid-template-columns: 1fr;
}

.workspace-card {
  border: 1px solid rgba(29, 26, 23, 0.08);
  border-radius: 12px;
  padding: 22px 24px;
  background: #ffffff;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.workspace-card h4 {
  margin: 0 0 10px;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 650;
}

.workspace-card p {
  margin: 0 0 10px;
}

.workspace-card p,
.workspace-card li {
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.72;
  color: #2e2a27;
}

.workspace-card p:last-child,
.workspace-card ul:last-child,
.workspace-card ol:last-child {
  margin-bottom: 0;
}

.markdown-flow h3,
.markdown-flow h4 {
  margin-top: 0;
}

.markdown-flow p:last-child,
.markdown-flow ul:last-child {
  margin-bottom: 0;
}

.workspace-card ul {
  margin-top: 6px;
  margin-bottom: 10px;
  padding-left: 22px;
}

.workspace-card--question,
.workspace-card--research,
.workspace-card--thought,
.workspace-card--critique,
.workspace-card--warning,
.workspace-card--answer {
  background: #ffffff;
}

.workspace-card--interactive {
  cursor: pointer;
}

.note-stack__item.workspace-card--interactive {
  border-radius: 10px;
  margin: 0 -10px;
  padding: 8px 10px;
}

.workspace-card--interactive:hover,
.workspace-card--interactive:focus-visible {
  border-color: rgba(182, 77, 27, 0.24);
  background: #fffdfa;
  outline: none;
}

.workspace-card--interactive.is-feedback {
  border-color: rgba(182, 77, 27, 0.38);
  background: #fffaf5;
}

.workspace-card--interactive.is-comment-focus {
  border-color: rgba(182, 77, 27, 0.55);
  background: #fff7ef;
  box-shadow: 0 0 0 3px rgba(182, 77, 27, 0.12);
}

.workspace-card + .workspace-card {
  margin-top: 2px;
}

.note-stack {
  display: grid;
  gap: 18px;
}

.note-stack__item {
  padding: 0;
}

.note-stack__item h4 {
  margin-bottom: 6px;
}

.note-stack__item p:last-child {
  margin-bottom: 0;
}

.feedback-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(820px, calc(100vw - 32px));
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(29, 26, 23, 0.12);
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 28px 60px rgba(34, 25, 17, 0.22);
  overflow: hidden;
}

.feedback-drawer[hidden] {
  display: none;
}

.feedback-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(29, 26, 23, 0.08);
}

.feedback-drawer__header-copy {
  min-width: 0;
}

.feedback-drawer__header-actions {
  display: flex;
  align-items: center;
  gap: 0;
}

.feedback-drawer__title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.28rem;
  line-height: 1.2;
}

.feedback-drawer__subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
}

.feedback-drawer__close {
  border: 0;
  border-radius: 12px;
  background: rgba(29, 26, 23, 0.06);
  color: var(--ink);
  cursor: pointer;
  width: 38px;
  height: 38px;
  font-size: 1.15rem;
}

.feedback-drawer__body {
  display: grid;
  gap: 16px;
  padding: 20px 22px 22px;
  overflow-y: auto;
}

.feedback-drawer__thread,
.feedback-drawer__all {
  border: 1px solid rgba(29, 26, 23, 0.08);
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
}

.feedback-drawer__all {
  background: #faf6ef;
  border-color: rgba(182, 77, 27, 0.12);
}

.feedback-drawer__thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-drawer__label {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feedback-drawer__count,
.feedback-drawer__empty {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.96rem;
  line-height: 1.65;
}

.feedback-drawer__comments,
.feedback-drawer__all-list {
  display: grid;
  gap: 12px;
}

.feedback-drawer__comments {
  margin-top: 8px;
}

.feedback-drawer__all-list {
  margin-top: 8px;
}

.feedback-drawer__textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid rgba(29, 26, 23, 0.12);
  border-radius: 14px;
  padding: 14px 15px;
  background: #fffdfa;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.97rem;
  line-height: 1.6;
}

.feedback-drawer__composer {
  margin-top: 14px;
}

.feedback-drawer__composer .feedback-drawer__actions {
  margin-top: 12px;
}

.feedback-drawer__textarea:focus {
  outline: 2px solid rgba(182, 77, 27, 0.18);
  border-color: rgba(182, 77, 27, 0.22);
}

.feedback-drawer__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.feedback-drawer__button {
  border: 1px solid rgba(29, 26, 23, 0.12);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  padding: 11px 14px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
}

.feedback-drawer__button--primary {
  background: rgba(182, 77, 27, 0.12);
  border-color: rgba(182, 77, 27, 0.16);
  color: var(--accent-deep);
}

.feedback-drawer__button--danger {
  color: var(--accent-deep);
}

.feedback-comment {
  border: 1px solid rgba(29, 26, 23, 0.08);
  border-radius: 14px;
  background: #fffdfa;
  padding: 14px;
}

.feedback-comment__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
}

.feedback-comment__author {
  font-weight: 600;
  color: var(--ink);
}

.feedback-comment__text {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.96rem;
  line-height: 1.6;
  white-space: normal;
}

.feedback-comment__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.feedback-comment__button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
}

.feedback-comment__button--danger {
  color: var(--accent-deep);
}

.feedback-thread-preview {
  border: 1px solid rgba(29, 26, 23, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
  display: block;
  padding: 14px;
  text-align: left;
}

.feedback-thread-preview.is-active {
  border-color: rgba(182, 77, 27, 0.26);
  background: rgba(182, 77, 27, 0.1);
}

.feedback-thread-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-thread-preview__title {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.5;
}

.feedback-thread-preview__badge {
  min-width: 24px;
  border-radius: 999px;
  background: rgba(182, 77, 27, 0.12);
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  text-align: center;
}

.feedback-thread-preview__text {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}

.feedback-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(29, 26, 23, 0.18);
}

.feedback-backdrop[hidden] {
  display: none;
}

.slide {
  display: none;
  height: 100%;
  border-radius: 14px;
  position: relative;
  padding: 34px 40px 38px;
  overflow-y: auto;
  background: #ffffff;
}

.slide.is-active {
  display: block;
  animation: slideIn 260ms ease;
}

.slide::before {
  content: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.slide__tag {
  margin-bottom: 0;
}

.slide__counter {
  display: inline-block;
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
}

.slide-body {
  display: grid;
  gap: 18px;
}

.slide-card p:last-child,
.slide-card ul:last-child {
  margin-bottom: 0;
}

.slide h2 {
  margin: 0 0 24px;
  max-width: none;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.slide h3 {
  margin: 0 0 12px;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  line-height: 1.2;
}

.slide p,
.slide li {
  font-size: 1.02rem;
  line-height: 1.65;
}

.slide ul {
  margin: 0;
  padding-left: 20px;
}

.slide__lede {
  margin: 0 0 22px;
  max-width: 64rem;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.6;
  font-weight: 500;
}

.panel,
.metric-card,
.bullet-card,
.challenge,
.quote-panel,
.timeline__item {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel,
.quote-panel {
  padding: 0;
}

.metric-card,
.bullet-card,
.challenge,
.timeline__item {
  padding: 18px 18px 20px;
}

.metric-card strong {
  display: block;
  font-size: 1.5rem;
  margin-top: 10px;
}

.metric-card__label {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.bullet-card p,
.challenge p {
  margin: 0;
}

.panel--accent {
  background: linear-gradient(180deg, rgba(182, 77, 27, 0.14), rgba(255, 255, 255, 0.68));
}

.panel--dark {
  background: linear-gradient(160deg, #2d241d, #433329);
  color: #f5efe7;
}

.slide-list {
  display: grid;
  gap: 10px;
}

.slide-list li {
  margin-left: 2px;
}

.slide-list--tight {
  gap: 8px;
}

.slide-list--consulting {
  gap: 8px;
  padding-left: 18px;
}

.slide-list--executive {
  max-width: 62rem;
  gap: 14px;
  font-size: 1.02rem;
}

.slide-list--plain {
  padding-left: 18px;
}

.cover-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.cover-hero__copy {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.cover-hero__copy h2 {
  margin-bottom: 14px;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  max-width: 15ch;
}

.cover-hero__lede {
  margin-bottom: 16px;
  font-size: 1.08rem;
}

.summary-hero {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.summary-hero__lead {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--ink);
}

.insight-grid,
.system-grid,
.risk-grid,
.ops-grid,
.resource-grid,
.comparison-grid,
.close-grid,
.role-grid,
.summary-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

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

.insight-grid--3,
.summary-grid,
.detail-grid--3,
.close-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid--2 {
  grid-template-columns: 1.35fr 1fr;
}

.insight-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.summary-block,
.detail-block {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 0 0 16px;
  border-left: 2px solid rgba(166, 30, 45, 0.18);
}

.detail-block--wide {
  padding-right: 24px;
}

.detail-block__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.insight-card__label,
.ops-card__label,
.timeline-panel__label,
.resource-panel__label,
.close-card__label,
.comparison-card__label,
.risk-card__label,
.scope-panel__label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2px;
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.domain-board__lead {
  margin: 0;
  max-width: 58rem;
  font-size: 1.02rem;
  line-height: 1.5;
}

.scope-board {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.95fr;
  gap: 18px;
}

.gantt-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(29, 26, 23, 0.08);
}

.gantt {
  overflow-x: auto;
  padding-bottom: 6px;
}

.gantt__milestones,
.gantt__header,
.gantt__row,
.gantt__gate-lines {
  min-width: 880px;
}

.gantt__milestones,
.gantt__header,
.gantt__gate-lines {
  display: grid;
  grid-template-columns: 180px repeat(12, minmax(44px, 1fr));
  column-gap: 8px;
}

.gantt__milestones {
  position: relative;
  margin-bottom: 10px;
  align-items: end;
  min-height: 42px;
}

.gantt__milestone-slot,
.gantt__gate-slot,
.gantt__gate-lines-corner {
  min-height: 1px;
}

.gantt__milestone {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: center;
  width: max-content;
  max-width: 88px;
  text-align: center;
}

.gantt__milestone-dot {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto 6px;
  transform: rotate(45deg);
  background: var(--accent-deep);
}

.gantt__milestone-label {
  display: block;
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.gantt__matrix {
  position: relative;
}

.gantt__gate-lines {
  position: absolute;
  inset: 0;
  align-items: stretch;
  pointer-events: none;
}

.gantt__gate-line {
  justify-self: center;
  width: 2px;
  background: rgba(166, 30, 45, 0.12);
}

.gantt__corner,
.gantt__week {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-bottom: 1px solid rgba(23, 26, 31, 0.1);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}

.gantt__corner {
  justify-content: flex-start;
  padding: 0 8px 0 0;
}

.gantt__corner--blank {
  border-bottom: 0;
}

.gantt__body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.gantt__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: stretch;
}

.gantt__label {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 10px 8px 0 0;
}

.gantt__label-title {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.gantt__label-copy {
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.76rem;
  line-height: 1.4;
}

.gantt__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(44px, 1fr));
  gap: 8px;
  align-items: center;
}

.gantt__cell {
  height: 34px;
  background: rgba(15, 23, 42, 0.03);
  border-top: 1px solid rgba(23, 26, 31, 0.06);
  border-bottom: 1px solid rgba(23, 26, 31, 0.06);
}

.gantt__bar {
  position: relative;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 24px;
  border-radius: 3px;
  background: rgba(166, 30, 45, 0.9);
  color: #ffffff;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
  white-space: nowrap;
}

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

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

.team-table-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.team-table-wrap {
  overflow: hidden;
  border: 1px solid rgba(29, 26, 23, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.team-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.team-table th,
.team-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(29, 26, 23, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
  line-height: 1.5;
}

.team-table th {
  background: rgba(250, 245, 238, 0.9);
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-table td:first-child {
  width: 28%;
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 700;
  color: var(--ink);
}

.team-table tr:last-child td {
  border-bottom: 0;
}

.timeline-summary__item {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-left: 16px;
  border-left: 2px solid rgba(29, 26, 23, 0.12);
}

.timeline-summary__text {
  margin: 0;
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.52;
}

.scope-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 0 0 0 16px;
  border-left: 2px solid rgba(29, 26, 23, 0.12);
}

.scope-panel h3 {
  margin-bottom: 0;
}

.scope-panel--in {
  border-left-color: rgba(126, 154, 112, 0.42);
}

.scope-panel--out {
  border-left-color: rgba(182, 77, 27, 0.32);
}

.scope-panel--why {
  border-left-color: rgba(29, 26, 23, 0.22);
}

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

.risk-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.slide--risk-control h2 {
  max-width: 19ch;
}

.risk-board-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 16px 18px;
  border-top: 3px solid rgba(166, 30, 45, 0.84);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 242, 235, 0.9));
}

.risk-board-summary__label {
  display: inline-flex;
  align-items: center;
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.risk-board-summary p {
  margin: 0;
  max-width: 68rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}

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

.risk-control-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(29, 26, 23, 0.08);
  border-top: 3px solid rgba(166, 30, 45, 0.84);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(29, 26, 23, 0.05);
}

.risk-control-card__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.risk-control-card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(166, 30, 45, 0.1);
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.risk-control-card__head h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.risk-control-card__body {
  display: grid;
  gap: 12px;
}

.risk-control-card__row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid rgba(29, 26, 23, 0.08);
}

.risk-control-card__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.risk-control-card__label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.risk-control-card__row p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--ink);
}

.detail-block--featured {
  grid-column: 1 / -1;
}

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

.timeline-panel {
  display: grid;
  gap: 20px;
  margin-bottom: 18px;
}

.timeline-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
}

.timeline-panel__head p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
}

.phase-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.phase-strip::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 3%;
  right: 3%;
  height: 2px;
  background: linear-gradient(90deg, rgba(182, 77, 27, 0.34), rgba(126, 154, 112, 0.3));
}

.phase-card {
  position: relative;
  padding: 42px 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(29, 26, 23, 0.08);
}

.phase-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.phase-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.phase-card__step,
.mini-phase-card__index {
  position: absolute;
  top: 12px;
  left: 16px;
  color: var(--accent-deep);
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.phase-card__range,
.mini-phase-card__range {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(182, 77, 27, 0.08);
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
}

.resource-panel {
  display: grid;
  gap: 18px;
}

.detail-card {
  display: grid;
  align-content: start;
}

.resource-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.resource-panel__head p {
  margin: 0;
  max-width: 24rem;
  color: var(--muted);
}

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

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

.count-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(250, 245, 238, 0.84);
  border: 1px solid rgba(29, 26, 23, 0.08);
}

.count-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.count-card span {
  display: block;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

.count-card--support {
  background: rgba(255, 250, 243, 0.9);
}

.close-lead {
  margin-bottom: 18px;
}

.close-card {
  display: grid;
  gap: 14px;
}

.close-card__body {
  margin: 0;
  font-size: 1.08rem;
}

.close-summary {
  margin-top: 18px;
}

.close-summary__text,
.warning-panel__text {
  margin: 0;
  font-size: 1rem;
}

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

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

.comparison-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.comparison-card--winner {
  border-left: 2px solid rgba(166, 30, 45, 0.3);
}

.role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.labor-ramp {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

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

.mini-phase-card {
  position: relative;
  padding-top: 40px;
}

.mini-phase-card p {
  margin: 0;
}

.warning-panel {
  border-left: 2px solid rgba(166, 30, 45, 0.24);
}

.quote-panel {
  margin-bottom: 18px;
}

.quote-panel__text {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.5;
}

@media (max-width: 1320px) {
  body {
    padding: 16px;
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 20;
    overflow: visible;
    padding: 14px 16px;
  }

  .sidebar__brand {
    min-width: 0;
  }

  .sidebar__controls {
    display: block;
  }

  .sidebar__brand .eyebrow {
    margin-bottom: 4px;
    font-size: 0.7rem;
  }

  .sidebar__brand h1 {
    font-size: 1.05rem;
    line-height: 1.15;
  }

  .mode-switch {
    margin-top: 0;
    grid-template-columns: repeat(2, auto);
    justify-content: end;
  }

  .mode-switch__button {
    white-space: nowrap;
    padding: 10px 12px;
  }

  #nav-groups {
    display: none !important;
  }

  #presentation-deck .slide {
    display: block !important;
    height: auto;
    margin-bottom: 16px;
  }

  #presentation-deck .slide:last-child {
    margin-bottom: 0;
  }

  #presentation-deck .slide.is-active {
    animation: none;
  }

  .slide {
    height: auto;
  }

  .scope-board,
  .timeline-summary,
  .summary-grid,
  .detail-grid--3,
  .detail-grid--2,
  .system-grid,
  .risk-control-grid,
  .risk-grid,
  .ops-grid,
  .phase-strip,
  .count-grid,
  .count-grid--support,
  .mini-phase-strip,
  .comparison-grid--three {
    grid-template-columns: 1fr;
  }

  .cover-hero,
  .timeline-panel__head,
  .resource-panel__head {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 920px) {
  .insight-grid--2,
  .insight-grid--3,
  .resource-grid,
  .close-grid,
  .comparison-grid,
  .role-grid,
  .timeline-summary,
  .summary-grid,
  .detail-grid--3,
  .detail-grid--2,
  .system-grid,
  .scope-board,
  .risk-control-grid,
  .risk-grid,
  .ops-grid,
  .phase-strip,
  .count-grid,
  .count-grid--support,
  .mini-phase-strip,
  .comparison-grid--three,
  .workspace-grid--2,
  .workspace-grid--3,
  .workspace-grid--4,
  .workspace-grid--5 {
    grid-template-columns: 1fr;
  }

  .feedback-drawer {
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }

  .slide {
    padding: 28px 22px 24px;
    border-radius: 12px;
  }

  .mode-switch {
    grid-template-columns: repeat(2, auto);
  }

  .mode-switch__button {
    font-size: 0.88rem;
  }

  .slide h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .risk-control-card__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline-panel__head,
  .resource-panel__head {
    align-items: start;
  }
}
