:root {
  color-scheme: light;
  --bg: #fff8f2;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-soft: #fff0ec;
  --ink: #2e2529;
  --muted: #8b7376;
  --line: #f0d9d6;
  --accent: #ff7b83;
  --accent-strong: #d65368;
  --accent-soft: #ffe4e0;
  --lavender: #9988ff;
  --lavender-soft: #eee9ff;
  --mint: #77d8c5;
  --mint-soft: #e4f8f3;
  --butter: #fff0b8;
  --peach: #ffc29d;
  --warn: #cb5a3a;
  --mark: #fff2a8;
  --shadow: 0 18px 48px rgba(184, 101, 98, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(125deg, rgba(255, 240, 184, 0.46) 0%, rgba(255, 248, 242, 0.9) 32%, rgba(238, 233, 255, 0.58) 68%, rgba(228, 248, 243, 0.72) 100%),
    var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 242, 236, 0.92)),
    var(--panel);
  box-shadow: 10px 0 36px rgba(184, 101, 98, 0.08);
  padding: 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--lavender));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 123, 131, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search {
  display: block;
  margin-top: 20px;
}

.search-label,
.toc-heading,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.search-control {
  position: relative;
  display: block;
  margin-top: 8px;
}

.search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 42px 0 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  outline: none;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 123, 131, 0.16);
}

.icon-button {
  position: absolute;
  right: 6px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.role-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.role-pill,
.ghost-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(184, 101, 98, 0.07);
}

.role-pill:hover,
.ghost-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.ghost-button:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  color: #b99fa3;
  background: #f8eeea;
}

.role-pill.active {
  background: linear-gradient(135deg, var(--accent), var(--lavender));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 123, 131, 0.28);
}

.doc-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.doc-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  border: 1px solid rgba(240, 217, 214, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  padding: 10px 12px 10px 10px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.doc-button::after {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
  transition: background 160ms ease, opacity 160ms ease;
}

.doc-button:hover {
  border-color: rgba(153, 136, 255, 0.34);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 18px rgba(184, 101, 98, 0.06);
}

.doc-button.active {
  border-color: rgba(255, 123, 131, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 240, 184, 0.28), rgba(255, 255, 255, 0.78) 54%, rgba(238, 233, 255, 0.46)),
    var(--panel-solid);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72), 0 8px 18px rgba(184, 101, 98, 0.08);
}

.doc-button.active::after {
  background: linear-gradient(180deg, var(--accent), var(--lavender));
}

.doc-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(240, 217, 214, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #b4878d;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.doc-button.active .doc-index {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--lavender));
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 123, 131, 0.2);
}

.doc-button:hover .doc-index {
  border-color: rgba(153, 136, 255, 0.42);
  color: #7b54d8;
}

.doc-copy {
  min-width: 0;
}

.doc-button strong {
  display: block;
  color: #2f272b;
  font-size: 14.5px;
  line-height: 1.3;
}

.doc-copy > span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: #8b7376;
  font-size: 12.5px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.doc-button.active .doc-copy > span {
  color: #7d6066;
}

.doc-button.active strong {
  color: #241d21;
}

.main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px clamp(18px, 4vw, 46px) 56px;
}

.toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(240, 217, 214, 0.9);
}

.toolbar h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.15;
  color: #251d21;
}

.eyebrow {
  margin: 0;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.insight-strip article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
  box-shadow: 0 10px 26px rgba(184, 101, 98, 0.07);
}

.insight-strip article:nth-child(1) {
  background: linear-gradient(135deg, rgba(255, 240, 184, 0.66), rgba(255, 255, 255, 0.92));
}

.insight-strip article:nth-child(2) {
  background: linear-gradient(135deg, rgba(255, 228, 224, 0.75), rgba(255, 255, 255, 0.92));
}

.insight-strip article:nth-child(3) {
  background: linear-gradient(135deg, rgba(238, 233, 255, 0.82), rgba(228, 248, 243, 0.72));
}

.insight-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.insight-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.toc-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(184, 101, 98, 0.08);
}

.toc-panel.collapsed .toc-list {
  display: none;
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.toc-list a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 9px;
  color: #7b54d8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.toc-list a:hover {
  background: var(--lavender-soft);
}

.content {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 248, 0.98)),
    var(--panel-solid);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 42px);
}

.content:focus {
  outline: none;
}

.content h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.content h2 {
  margin: 34px 0 12px;
  padding-top: 4px;
  color: #d65368;
  font-size: 23px;
  line-height: 1.25;
}

.content h3 {
  margin: 26px 0 10px;
  font-size: 18px;
}

.content p,
.content li {
  color: #3a3034;
  font-size: 15.5px;
  line-height: 1.76;
}

.content p {
  margin: 10px 0;
}

.content ul,
.content ol {
  padding-left: 22px;
}

.content a {
  color: #7b54d8;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content code {
  border: 1px solid #e4d7ff;
  border-radius: 6px;
  background: #f7f2ff;
  padding: 1px 5px;
  color: #6e52c9;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.content pre {
  overflow-x: auto;
  border-radius: var(--radius);
  background: #2d252b;
  padding: 16px;
  color: #fff8f2;
}

.content pre code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--panel-solid);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.55;
}

th {
  background: linear-gradient(135deg, var(--accent-soft), var(--lavender-soft));
  color: #4b323a;
  font-weight: 800;
}

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

.highlight {
  border-radius: 3px;
  background: var(--mark);
  padding: 0 2px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 26px;
  color: var(--muted);
}

.term-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.term-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 30px;
  border: 1px solid #ead9ff;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 242, 255, 0.94));
  color: #5f49b7;
  padding: 5px 8px;
  vertical-align: middle;
  box-shadow: 0 8px 18px rgba(125, 84, 216, 0.08);
}

.term-chip > span {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.term-chip small {
  color: #8b7376;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.term-chip.compact {
  background: rgba(255, 255, 255, 0.74);
}

.roadmap-page {
  display: grid;
  gap: 20px;
}

.roadmap-hero,
.parameter-guide,
.roadmap-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 16px 38px rgba(184, 101, 98, 0.09);
}

.roadmap-hero {
  background:
    linear-gradient(135deg, rgba(255, 240, 184, 0.62), rgba(255, 228, 224, 0.7) 48%, rgba(238, 233, 255, 0.82)),
    rgba(255, 255, 255, 0.92);
}

.roadmap-hero h1,
.roadmap-card h2 {
  margin-bottom: 10px;
}

.roadmap-hero p,
.roadmap-card header p,
.parameter-guide p {
  max-width: 760px;
  color: #5c4d52;
}

.role-kicker {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(255, 123, 131, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent-strong);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.role-map {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 20px;
}

.map-core {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 150px;
  border: 1px solid rgba(255, 123, 131, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 240, 184, 0.42)),
    rgba(255, 255, 255, 0.72);
  padding: 22px;
  text-align: left;
}

.map-core strong {
  display: block;
  font-size: 20px;
}

.map-core span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.map-nodes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
}

.map-node,
.module-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: #6d4cc5;
  padding: 8px 10px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.map-node {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 70px;
  justify-content: stretch;
  text-align: left;
}

.map-node span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), var(--lavender-soft));
  color: #8d55db;
  font-size: 12px;
  font-weight: 900;
}

.map-node strong {
  align-self: center;
  line-height: 1.3;
}

.map-node:hover,
.module-links a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(184, 101, 98, 0.12);
}

.roadmap-grid {
  display: grid;
  gap: 18px;
}

.roadmap-card {
  position: relative;
  overflow: hidden;
}

.roadmap-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  content: "";
  background: linear-gradient(180deg, var(--accent), var(--lavender));
}

.roadmap-card.peach::before {
  background: linear-gradient(180deg, #ff9b88, #ffd28a);
}

.roadmap-card.rose::before {
  background: linear-gradient(180deg, #ff6f86, #c58cff);
}

.roadmap-card.lavender::before {
  background: linear-gradient(180deg, #a996ff, #ffd1ee);
}

.roadmap-card.mint::before {
  background: linear-gradient(180deg, #6ed8c8, #a996ff);
}

.roadmap-card.butter::before {
  background: linear-gradient(180deg, #ffd76d, #ff9b88);
}

.roadmap-card.sky::before {
  background: linear-gradient(180deg, #8cc8ff, #a996ff);
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.path-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(240, 217, 214, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.step-index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--lavender-soft));
  color: #6d4cc5;
  font-size: 13px;
  font-weight: 900;
}

.path-step strong {
  display: block;
  font-size: 16px;
}

.path-step p {
  margin: 4px 0 0;
  color: #67565b;
  font-size: 14px;
  line-height: 1.55;
}

.roadmap-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
  margin-top: 16px;
}

.roadmap-footer > div {
  border: 1px solid rgba(240, 217, 214, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 250, 247, 0.78);
  padding: 14px;
}

.roadmap-footer h3 {
  margin-top: 0;
  color: #3a3034;
}

.answer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.answer-list li {
  line-height: 1.5;
}

.module-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-note {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.66);
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
}

.ai-assistant {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
}

.ai-toggle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--lavender));
  color: #fff;
  box-shadow: 0 18px 36px rgba(137, 101, 216, 0.26);
}

.ai-toggle span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 900;
}

.ai-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  width: min(390px, calc(100vw - 28px));
  height: min(640px, calc(100vh - 112px));
  overflow: hidden;
  border: 1px solid rgba(240, 217, 214, 0.94);
  border-radius: 14px;
  background:
    linear-gradient(155deg, rgba(255, 240, 184, 0.34), rgba(255, 255, 255, 0.94) 36%, rgba(238, 233, 255, 0.76)),
    var(--panel-solid);
  box-shadow: 0 24px 64px rgba(112, 78, 140, 0.2);
}

.ai-panel[hidden] {
  display: none;
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(240, 217, 214, 0.86);
  background: rgba(255, 255, 255, 0.68);
}

.ai-kicker {
  display: block;
  color: #7b54d8;
  font-size: 12px;
  font-weight: 800;
}

.ai-header h2 {
  margin: 3px 0 0;
  font-size: 19px;
  line-height: 1.2;
}

.ai-close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 22px;
}

.ai-close:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
}

.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.ai-message {
  max-width: 92%;
  border: 1px solid rgba(240, 217, 214, 0.9);
  border-radius: 12px;
  padding: 11px 12px;
  box-shadow: 0 8px 18px rgba(184, 101, 98, 0.06);
}

.ai-message p,
.ai-message li {
  margin: 0;
  color: #3a3034;
  font-size: 14px;
  line-height: 1.65;
}

.ai-message p + p,
.ai-message ul + p,
.ai-message p + ul {
  margin-top: 8px;
}

.ai-message ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.ai-message code {
  border: 1px solid #e4d7ff;
  border-radius: 6px;
  background: #f7f2ff;
  padding: 1px 5px;
  color: #6e52c9;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.ai-message.user {
  align-self: flex-end;
  border-color: rgba(153, 136, 255, 0.28);
  background: linear-gradient(135deg, rgba(238, 233, 255, 0.9), rgba(255, 255, 255, 0.92));
}

.ai-message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.82);
}

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

.ai-prompts button,
.ai-sources button {
  border: 1px solid rgba(240, 217, 214, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #6d4cc5;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.ai-prompts button:hover,
.ai-sources button:hover {
  border-color: rgba(153, 136, 255, 0.46);
  background: var(--lavender-soft);
}

.ai-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(240, 217, 214, 0.95);
}

.ai-sources span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(240, 217, 214, 0.86);
  background: rgba(255, 255, 255, 0.7);
}

.ai-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  padding: 10px 11px;
  font-size: 14px;
  line-height: 1.5;
}

.ai-form textarea:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 4px rgba(153, 136, 255, 0.15);
}

.ai-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-form-footer span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-form-footer button {
  flex: 0 0 auto;
  min-width: 72px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--lavender));
  color: #fff;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(255, 123, 131, 0.2);
}

.ai-form-footer button:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main {
    padding-top: 18px;
  }

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

  .toolbar-actions {
    justify-content: flex-start;
  }

  .insight-strip {
    grid-template-columns: 1fr;
  }

  .doc-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .doc-button {
    flex: 0 0 220px;
  }

  .role-map,
  .roadmap-footer {
    grid-template-columns: 1fr;
  }

  .map-nodes,
  .path-steps {
    grid-template-columns: 1fr;
  }

  .ai-assistant {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 560px) {
  .sidebar {
    padding: 16px;
  }

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

  .content {
    padding: 18px;
  }

  .content h1 {
    font-size: 27px;
  }

  .ai-panel {
    right: -2px;
    width: calc(100vw - 20px);
    height: min(590px, calc(100vh - 100px));
  }

  .ai-prompts {
    grid-template-columns: 1fr;
  }
}
