:root {
  --green: #304cb2;
  --green-dark: #283b80;
  --green-soft: #eef1fb;
  --orange: #fdbc11;
  --orange-soft: #fff7d6;
  --red: #e61c23;
  --red-soft: #fdebed;
  --yellow: #765800;
  --yellow-soft: #fff8e6;
  --ink: #111b40;
  --muted: #626b7f;
  --line: #dce1ed;
  --canvas: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --shadow: 0 12px 32px rgba(40, 59, 128, 0.08);
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.sidebar {
  position: relative;
  z-index: 20;
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar::before {
  content: "";
  height: 5px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, var(--green) 0 34%, var(--red) 34% 67%, var(--orange) 67%);
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 67px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.brand img { width: 32px; height: 43px; object-fit: contain; }
.brand-copy strong { display: block; font-size: 15px; letter-spacing: -0.2px; }
.brand-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav-heading { padding: 20px 20px 7px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.nav-button, .workspace-button {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
}
.nav-button:hover { color: var(--ink); background: var(--canvas); }
.nav-button.active { color: var(--green); background: var(--green-soft); font-weight: 700; }
.nav-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.workspace-nav { display: none; margin: 3px 0 5px; padding-left: 38px; }
.workspace-nav.open { display: block; }
.workspace-button { display: block; padding: 7px 8px; border-left: 2px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.25; }
.workspace-button:hover { color: var(--ink); }
.workspace-button.active { color: var(--green); border-left-color: var(--orange); font-weight: 700; }
.sidebar-footer { margin-top: auto; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.sidebar-footer strong { color: var(--ink); }

.main { min-width: 0; overflow: hidden; }
.page { display: none; height: 100%; min-width: 0; }
.page.active { display: flex; flex-direction: column; }
.page-scroll { height: 100%; overflow: auto; }
.section-page { padding: 30px 34px 44px; }
.section-header { margin-bottom: 22px; }
.section-header h1 { margin: 0 0 5px; font-size: 22px; letter-spacing: -0.35px; }
.section-header p { max-width: 760px; margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.demo-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid #cbd3ed; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 10.5px; font-weight: 750; }
.demo-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

.home { display: grid; min-height: 100%; place-items: center; overflow: auto; padding: 42px 24px; }
.home-inner { width: min(720px, 100%); }
.home h1 { margin: 13px 0 7px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -1.2px; }
.home-subtitle { margin: 0 0 27px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.prompt-box { padding: 15px 16px 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.prompt-box textarea { width: 100%; min-height: 62px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; line-height: 1.5; }
.prompt-box textarea::placeholder, .chat-form input::placeholder { color: var(--muted); }
.prompt-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .ghost-button, .primary-button, .action-button, .tab-button, .filter-button, .connect-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}
.icon-button { display: grid; width: 31px; height: 31px; place-items: center; color: var(--muted); font-size: 18px; }
.resource-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.model-select { margin-left: auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 12px; font-weight: 650; }
.send-button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 9px; color: #fff; background: var(--green); cursor: pointer; }
.send-button:hover, .primary-button:hover { background: var(--green-dark); }
.send-button svg { width: 15px; height: 15px; }
.starters { margin-top: 27px; }
.eyebrow { margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.starter-card { display: grid; width: 100%; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; text-align: left; }
.starter-card:hover { border-color: #92a3da; box-shadow: 0 6px 16px rgba(48, 76, 178, 0.08); transform: translateY(-1px); }
.starter-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 850; }
.starter-card:nth-of-type(2) .starter-icon { color: #765800; background: var(--orange-soft); }
.starter-card:nth-of-type(3) .starter-icon { color: var(--red); background: var(--red-soft); }
.starter-copy strong { display: block; margin-bottom: 3px; font-size: 13px; }
.starter-copy span, .starter-type { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.starter-type { font-weight: 700; }

.topbar { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; gap: 12px; padding: 8px 19px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-title { font-size: 14px; font-weight: 750; }
.topbar-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.ghost-button, .primary-button, .action-button { padding: 6px 12px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.primary-button { color: #fff; border-color: var(--green); background: var(--green); }
.workspace-shell { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); }
.chat-panel { min-width: 0; border-right: 1px solid var(--line); background: var(--canvas); }
.chat-scenario { display: none; height: 100%; min-height: 0; flex-direction: column; }
.chat-scenario.active { display: flex; }
.chat-body { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 13px; overflow: auto; padding: 18px; }
.message { display: flex; gap: 9px; }
.message.user { justify-content: flex-end; }
.avatar { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #fff; background: var(--green); font-size: 9px; font-weight: 850; }
.bubble { max-width: 90%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12.5px; line-height: 1.55; }
.message.user .bubble { color: #fff; border-color: var(--green); background: var(--green); }
.gatekeeper { margin-top: 8px; padding: 9px 11px; border: 1px solid #cbd3ed; border-radius: 8px; color: var(--green-dark); background: var(--green-soft); font-size: 11.5px; line-height: 1.45; }
.gatekeeper strong { display: block; margin-bottom: 2px; }
.code-label { margin: 9px 0 4px; color: var(--green); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.code-block { overflow: auto; margin: 0; padding: 11px 12px; border-radius: 8px; color: #d7def6; background: #111b40; font: 10.5px/1.55 "SFMono-Regular", Consolas, monospace; white-space: pre; }
.chat-input-wrap { padding: 11px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form { display: flex; align-items: center; gap: 7px; padding: 7px 8px 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.chat-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 12.5px; }
.chat-form .model-select { max-width: 112px; background: transparent; }

.output-panel { min-width: 0; min-height: 0; background: var(--surface); }
.output-scenario { display: none; height: 100%; min-height: 0; flex-direction: column; }
.output-scenario.active { display: flex; }
.tabs { display: flex; flex: 0 0 auto; padding: 0 9px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.tab-button { padding: 10px 12px 8px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); background: transparent; font-size: 11.5px; font-weight: 750; }
.tab-button.active { color: var(--green); border-bottom-color: var(--orange); }
.output-header { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 10px 17px; border-bottom: 1px solid var(--line); }
.output-title { font-size: 13.5px; font-weight: 780; }
.output-header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.output-badge { padding: 4px 8px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 9.5px; font-weight: 800; }
.output-badge.orange { color: #765800; background: var(--orange-soft); }
.output-badge.red { color: #a30b20; background: var(--red-soft); }
.output-view { min-height: 0; flex: 1; overflow: auto; padding: 19px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.stat-number { color: var(--green); font-size: 23px; font-weight: 820; letter-spacing: -0.5px; }
.stat-number.red { color: var(--red); }
.stat-number.orange { color: #765800; }
.stat-label { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.3; }
.section-title { margin: 18px 0 9px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: 0.8px; text-transform: uppercase; }
.section-title:first-child { margin-top: 0; }
.alert { margin-bottom: 7px; padding: 9px 11px; border: 1px solid #f1cbd1; border-radius: 8px; background: var(--red-soft); font-size: 11.5px; line-height: 1.45; }
.alert.warning { border-color: #ead893; background: var(--yellow-soft); }
.coverage-list { display: flex; flex-direction: column; gap: 7px; }
.coverage-row { display: grid; grid-template-columns: minmax(155px, 1.1fr) minmax(100px, 2fr) 42px 72px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 11.5px; }
.coverage-name { font-weight: 700; }
.bar { height: 7px; overflow: hidden; border-radius: 999px; background: #dbe0ef; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.bar span.orange { background: var(--orange); }
.bar span.red { background: var(--red); }
.coverage-value { text-align: right; font-weight: 800; }
.status { padding: 3px 6px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); text-align: center; font-size: 9px; font-weight: 800; }
.status.warning { color: #765800; background: var(--orange-soft); }
.status.critical { color: #a30b20; background: var(--red-soft); }
.connection-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.connection-row { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.connection-row strong { display: block; margin-bottom: 4px; font-size: 12px; }
.connection-row span { color: var(--muted); font-size: 10.5px; line-height: 1.4; }

.document { max-width: 760px; margin: 0 auto; }
.document h1 { margin: 0 0 5px; font-size: 22px; letter-spacing: -0.5px; }
.document-meta { margin-bottom: 19px; padding-bottom: 13px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.document h2 { margin: 20px 0 7px; font-size: 15px; }
.document p, .document li { color: #35405c; font-size: 12.5px; line-height: 1.65; }
.document p { margin: 0 0 9px; }
.document ul { margin: 7px 0 12px; padding-left: 19px; }
.callout { margin: 14px 0; padding: 10px 12px; border-left: 3px solid var(--orange); border-radius: 0 8px 8px 0; color: var(--green-dark); background: var(--green-soft); font-size: 11.5px; line-height: 1.5; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 8px 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--surface-2); font-weight: 800; }

.slides { display: flex; max-width: 820px; margin: 0 auto; flex-direction: column; gap: 16px; }
.slide { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.slide-count { padding: 6px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9.5px; font-weight: 750; }
.slide-body { display: flex; min-height: 300px; aspect-ratio: 16 / 8.5; flex-direction: column; justify-content: center; padding: 25px 29px; background: var(--surface); }
.slide-body.title-slide { align-items: center; color: #fff; background: linear-gradient(135deg, var(--green-dark), var(--green) 60%, #3656cc); text-align: center; }
.title-slide::after { content: ""; width: 86px; height: 5px; margin-top: 19px; border-radius: 999px; background: linear-gradient(90deg, var(--red) 0 56%, var(--orange) 56%); }
.slide-body h2 { margin: 0 0 7px; font-size: 25px; letter-spacing: -0.65px; }
.slide-body h3 { margin: 0 0 13px; color: var(--green); font-size: 16px; }
.slide-body p { margin: 0; color: var(--muted); font-size: 11.5px; }
.title-slide p { color: rgba(255,255,255,.8); }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.metric { padding: 12px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); text-align: center; }
.metric strong { display: block; color: var(--green); font-size: 20px; }
.metric span { color: var(--muted); font-size: 9px; line-height: 1.3; }
.roadmap { display: grid; gap: 9px; }
.roadmap-item { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: start; font-size: 11.5px; line-height: 1.4; }
.roadmap-day { padding: 3px 6px; border-radius: 999px; color: #fff; background: var(--green); text-align: center; font-size: 8.5px; font-weight: 800; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); gap: 12px; }
.context-card, .integration-card { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.context-top, .integration-top { display: flex; gap: 10px; align-items: flex-start; }
.file-icon, .integration-icon { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 850; }
.context-card h2, .integration-card h2 { margin: 1px 0 4px; font-size: 12.5px; }
.context-card h2 { color: var(--green); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11.5px; }
.context-card p, .integration-card p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.card-footer { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 9.5px; }
.readonly { padding: 3px 7px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-weight: 800; }
.connect-button { margin-top: 12px; padding: 6px 11px; color: #fff; border-color: var(--green); background: var(--green); font-size: 10.5px; font-weight: 800; }
.connect-button.connected { color: var(--green-dark); border-color: transparent; background: var(--green-soft); cursor: default; }
.mcp-list { display: grid; gap: 8px; }
.mcp-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.mcp-copy { min-width: 0; }
.mcp-copy strong { display: block; margin-bottom: 3px; font-size: 11.5px; }
.mcp-copy code { color: var(--muted); font-size: 9.5px; }
.mcp-state { margin-left: auto; padding: 3px 7px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 9px; font-weight: 800; }

.skills-header { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.skills-header .section-header { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.filter-button { padding: 5px 10px; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.filter-button.active { color: var(--green-dark); border-color: #aebbe3; background: var(--green-soft); }
.skill-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.skill-table { min-width: 720px; }
.skill-table th, .skill-table td { border-width: 0 0 1px; padding: 9px 12px; }
.skill-table tr:last-child td { border-bottom: 0; }
.skill-name { color: var(--green); font-family: "SFMono-Regular", Consolas, monospace; font-weight: 800; }
.group { display: inline-block; padding: 3px 7px; border-radius: 999px; background: var(--surface-2); font-size: 9px; font-weight: 800; }
.group.security { color: #a30b20; background: var(--red-soft); }
.group.architecture { color: #765800; background: var(--orange-soft); }
.group.operations { color: var(--green-dark); background: var(--green-soft); }
.group.finance { color: #24547a; background: #e8f2fa; }
.group.hr { color: #8a3a68; background: #faedf5; }
.group.customer { color: #765314; background: var(--yellow-soft); }
.group.ai { color: #283b80; background: #e8ecfa; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(360px, calc(100vw - 40px)); padding: 10px 13px; border: 1px solid #aebbe3; border-radius: 9px; color: #fff; background: var(--green-dark); box-shadow: var(--shadow); font-size: 11.5px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 215px minmax(0, 1fr); }
  .workspace-shell { grid-template-columns: 360px minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .coverage-row { grid-template-columns: minmax(135px, 1fr) minmax(75px, 1.5fr) 38px; }
  .coverage-row .status { display: none; }
}
@media (max-width: 760px) {
  .shell { display: flex; height: 100dvh; flex-direction: column; }
  .sidebar { display: flex; width: 100%; flex: 0 0 auto; flex-flow: row wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar::before { width: 100%; height: 4px; }
  .brand { min-height: 50px; padding: 5px 10px; border: 0; }
  .brand img { width: 25px; height: 34px; }
  .brand-copy { display: none; }
  .nav-heading, .sidebar-footer { display: none; }
  .nav { min-width: 0; flex: 1; flex-flow: row wrap; justify-content: flex-end; padding: 0 7px 0 0; }
  .nav-button { width: 42px; justify-content: center; padding: 9px; }
  .nav-button span { display: none; }
  .workspace-nav { order: 5; width: 100%; flex-basis: 100%; margin: 0; padding: 0 7px 7px; overflow-x: auto; }
  .workspace-nav.open { display: flex; }
  .workspace-button { width: auto; min-width: max-content; padding: 7px 9px; border: 0; border-bottom: 2px solid var(--line); }
  .workspace-button.active { border-bottom-color: var(--orange); }
  .main { flex: 1; overflow: auto; }
  .page { height: auto; min-height: 100%; }
  .home { min-height: 100%; padding: 28px 16px 38px; place-items: start center; }
  .home h1 { margin-top: 10px; }
  .section-page { padding: 23px 17px 36px; }
  .workspace-shell { display: flex; flex: none; flex-direction: column; }
  .chat-panel { width: 100%; height: 510px; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .output-panel { min-height: 620px; flex: 0 0 auto; }
  .topbar { position: sticky; top: 0; z-index: 10; }
  .output-view { overflow: visible; }
  .slide-body { min-height: 280px; aspect-ratio: auto; }
  .skills-header { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .skill-table-wrap { overflow-x: auto; }
}
@media (max-width: 520px) {
  .prompt-actions { flex-wrap: wrap; }
  .resource-button { display: none; }
  .model-select { max-width: 130px; }
  .starter-card { grid-template-columns: 34px minmax(0, 1fr); }
  .starter-type { display: none; }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .topbar-actions { width: 100%; margin-left: 0; }
  .output-header { align-items: flex-start; flex-wrap: wrap; }
  .output-header-actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coverage-row { grid-template-columns: minmax(120px, 1fr) 40px; }
  .coverage-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .coverage-value { grid-column: 2; grid-row: 1; }
  .card-grid, .connection-list { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: repeat(2, 1fr); }
  .slide-body { padding: 22px 18px; }
  .chat-form .model-select { display: none; }
  .mcp-row { align-items: flex-start; flex-wrap: wrap; }
  .mcp-state { margin-left: 0; }
}
