:root {
  color-scheme: dark;
  --bg: #050814;
  --bg2: #08111f;
  --panel: rgba(10, 18, 33, .92);
  --panel2: rgba(14, 25, 45, .9);
  --panel3: rgba(8, 13, 26, .96);
  --line: rgba(174, 197, 230, .16);
  --line2: rgba(174, 197, 230, .28);
  --text: #eef6ff;
  --soft: #c9d7eb;
  --muted: #92a4bf;
  --faint: #63738a;
  --cyan: #62e6dc;
  --violet: #a892ff;
  --amber: #f6c76b;
  --green: #81e7a6;
  --red: #ff8795;
  --blue: #7cc8ff;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.aisop-page {
  background:
    radial-gradient(circle at 10% 8%, rgba(98, 230, 220, .13), transparent 32rem),
    radial-gradient(circle at 88% 0%, rgba(168, 146, 255, .16), transparent 34rem),
    linear-gradient(180deg, #050814 0%, #071020 50%, #030510 100%);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}
body.aisop-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(160, 181, 215, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 181, 215, .045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.14));
}
button, input { font: inherit; }
button { color: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.aisop-app {
  width: min(1800px, 100%);
  margin: 0 auto;
  padding: 20px 22px 24px;
  display: grid;
  gap: 14px;
}
.command-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(270px, 1.08fr) minmax(300px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(5, 9, 19, .86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.command-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-orb {
  width: 54px; height: 54px; border-radius: 18px; flex: 0 0 auto;
  display: grid; place-items: center;
  color: #06111a; font-weight: 900; letter-spacing: .07em;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 30px rgba(98, 230, 220, .28);
}
.eyebrow { margin: 0 0 5px; color: var(--cyan); font-size: .73rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 900; }
.command-brand h1 { margin: 0; font-size: clamp(1.18rem, 2vw, 1.72rem); letter-spacing: -.03em; }
.command-brand p:not(.eyebrow) { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.search-command { position: relative; min-width: 0; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line2); border-radius: 999px;
  background: rgba(14, 25, 45, .86); padding: 10px 14px;
}
.search-box span { color: var(--faint); }
#aisopSearch { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
#aisopSearch::placeholder { color: #6f819a; }
.search-results-panel {
  display: none;
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  z-index: 60;
  max-height: min(64vh, 720px);
  overflow: auto;
  border: 1px solid var(--line2);
  border-radius: 18px;
  background: rgba(5, 10, 21, .98);
  box-shadow: 0 24px 70px rgba(0,0,0,.48);
  padding: 10px;
}
.search-results-panel.visible { display: grid; gap: 8px; }
.search-summary { color: var(--muted); font-size: .82rem; padding: 5px 8px; }
.search-result { width: 100%; text-align: left; border: 1px solid rgba(174,197,230,.12); border-radius: 14px; background: rgba(255,255,255,.035); padding: 11px 12px; cursor: pointer; display: grid; gap: 5px; }
.search-result:hover, .search-result:focus-visible { outline: 0; border-color: rgba(98,230,220,.54); background: rgba(98,230,220,.07); }
.search-result strong { color: #fff; }
.search-result code { color: var(--muted); font-family: var(--mono); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result p { margin: 0; color: var(--soft); font-size: .84rem; line-height: 1.42; }
mark { background: rgba(246,199,107,.24); color: #ffe4a7; border-radius: 4px; padding: 0 2px; }
.mode-tabs { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.mode-tab, .small-button, .guide-chip, .chip-button, .doc-button, .id-pill-button {
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.045); color: var(--soft); cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.mode-tab { padding: 9px 12px; font-size: .84rem; font-weight: 800; }
.small-button { padding: 8px 11px; font-size: .8rem; font-weight: 800; }
.mode-tab:hover, .small-button:hover, .guide-chip:hover, .chip-button:hover, .doc-button:hover, .id-pill-button:hover,
.mode-tab:focus-visible, .small-button:focus-visible, .guide-chip:focus-visible, .chip-button:focus-visible, .doc-button:focus-visible, .id-pill-button:focus-visible {
  outline: 0; transform: translateY(-1px); border-color: rgba(98,230,220,.55); background: rgba(98,230,220,.08); color: #fff;
}
.mode-tab.active, .guide-chip.active { border-color: rgba(98,230,220,.75); color: var(--cyan); background: rgba(98,230,220,.1); }
.status-strip, .guided-paths {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.status-strip { padding: 0 4px; }
.status-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; color: var(--muted); background: rgba(255,255,255,.035); font-size: .77rem; font-weight: 800;
}
.status-chip.strong { color: var(--green); border-color: rgba(129,231,166,.35); background: rgba(129,231,166,.07); }
.status-chip.warn { color: var(--amber); border-color: rgba(246,199,107,.35); background: rgba(246,199,107,.08); }
.guide-chip { padding: 9px 12px; font-size: .84rem; font-weight: 850; }
.workbench-grid {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr) minmax(295px, 365px);
  gap: 16px;
  min-height: 740px;
  height: min(980px, calc(100vh - 240px));
}
.workbench-panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-title-row, .reader-toolbar {
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}
.panel-title-row h2, .doc-title-block h2 { margin: 0; line-height: 1.14; }
.panel-title-row h2 { font-size: .98rem; }
.mini-led { width: 11px; height: 11px; border-radius: 999px; background: var(--green); box-shadow: 0 0 16px rgba(129,231,166,.8); }
.panel-scroll { height: calc(100% - 64px); overflow: auto; padding: 12px; }
.reader-panel { display: grid; grid-template-rows: auto 1fr; }
.reader-toolbar { min-height: 74px; align-items: center; }
.doc-title-block { min-width: 0; }
.doc-title-block h2 { font-size: clamp(1.05rem, 1.4vw, 1.45rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-title-block code { display: block; margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.reader-scroll { height: 100%; overflow: auto; padding: 26px 32px 58px; }
.hero-card, .content-card, .side-card, .static-fallback-card, .health-card, .metric-card {
  border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.042); box-shadow: 0 18px 52px rgba(0,0,0,.18);
}
.hero-card { padding: clamp(22px, 4vw, 46px); max-width: 1120px; margin: 0 auto; }
.hero-card h1 { margin: 0; font-size: clamp(2rem, 4.8vw, 4.2rem); line-height: .96; letter-spacing: -.06em; max-width: 14ch; }
.hero-card > p { color: var(--soft); font-size: clamp(1rem, 1.35vw, 1.18rem); line-height: 1.62; max-width: 75ch; }
.overview-grid, .health-grid, .dashboard-grid, .path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.metric-card, .health-card { padding: 16px; }
.metric-card span, .health-card span { color: var(--cyan); text-transform: uppercase; letter-spacing: .09em; font-size: .7rem; font-weight: 900; }
.metric-card strong, .health-card strong { display: block; margin-top: 7px; color: #fff; font-size: 1.55rem; letter-spacing: -.04em; }
.metric-card p, .health-card p { margin: 8px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.46; }
.content-card { max-width: 1120px; margin: 0 auto 16px; padding: 24px; }
.content-card h1, .markdown h1 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1; letter-spacing: -.06em; }
.content-card h2, .markdown h2 { margin: 1.3em 0 .65em; font-size: 1.55rem; line-height: 1.16; border-top: 1px solid var(--line); padding-top: 1rem; }
.content-card h3, .markdown h3 { margin: 1.1em 0 .45em; font-size: 1.12rem; color: #dce8ff; }
.content-card p, .markdown p, .content-card li, .markdown li { color: #d8e2f1; line-height: 1.62; }
.content-card ul, .markdown ul, .content-card ol, .markdown ol { padding-left: 1.25rem; }
.markdown { max-width: 980px; margin: 0 auto; }
.markdown code, .content-card code {
  font-family: var(--mono); background: rgba(98,230,220,.1); border: 1px solid rgba(98,230,220,.18); color: #c5fff9; border-radius: 7px; padding: .08rem .28rem; font-size: .88em;
}
.code-block { position: relative; overflow: auto; padding: 16px; border: 1px solid rgba(174,197,230,.14); border-radius: 16px; background: rgba(4,8,17,.86); }
.code-block code { border: 0; background: transparent; color: #ddecff; padding: 0; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { border-bottom: 1px solid rgba(174,197,230,.11); padding: 10px 12px; text-align: left; vertical-align: top; }
th { color: var(--soft); background: rgba(255,255,255,.045); }
blockquote { border-left: 3px solid var(--cyan); margin: 1rem 0; padding: .4rem 1rem; color: var(--soft); background: rgba(98,230,220,.055); border-radius: 0 14px 14px 0; }
.doc-control-card { display: grid; gap: 10px; padding: 14px; margin: 0 0 18px; border: 1px solid rgba(98,230,220,.18); border-radius: 20px; background: rgba(98,230,220,.055); }
.meta-chip-row, .chip-row, .id-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip, .small-chip, .id-chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; background: rgba(255,255,255,.04); color: var(--muted); font-size: .76rem; font-family: var(--mono); }
.meta-chip strong { color: var(--soft); margin-right: 6px; font-family: var(--sans); }
.id-chip { color: var(--cyan); border-color: rgba(98,230,220,.28); cursor: pointer; }
.heading-anchor { margin-left: .45rem; color: var(--faint); font-size: .75em; opacity: .7; }
.heading-anchor:hover { opacity: 1; color: var(--cyan); }
.tree-section { margin-bottom: 12px; }
.tree-folder {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid transparent; border-radius: 14px; background: rgba(255,255,255,.025); color: var(--soft); padding: 9px 10px; cursor: pointer; text-align: left; font-weight: 900;
}
.tree-folder:hover { border-color: rgba(98,230,220,.25); background: rgba(98,230,220,.06); }
.folder-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { color: var(--faint); font-family: var(--mono); font-size: .76rem; }
.tree-items { display: grid; gap: 5px; padding: 7px 0 0 10px; }
.tree-items.collapsed { display: none; }
.doc-button {
  width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 14px; text-align: left; background: rgba(255,255,255,.022);
}
.doc-button.active { border-color: rgba(98,230,220,.62); color: var(--cyan); background: rgba(98,230,220,.09); }
.doc-icon { color: var(--violet); font-family: var(--mono); font-size: .72rem; }
.doc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.doc-badge { color: var(--faint); font-family: var(--mono); font-size: .68rem; }
.path-card { border: 1px solid rgba(98,230,220,.2); border-radius: 18px; padding: 13px; margin-bottom: 12px; background: rgba(98,230,220,.055); }
.path-card h3 { margin: 0; }
.path-card p { margin: 7px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.side-card { padding: 14px; margin-bottom: 12px; }
.side-card h3 { margin: 0 0 9px; font-size: .95rem; }
.side-card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .86rem; }
.kv { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 8px 0; border-bottom: 1px solid rgba(174,197,230,.1); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--faint); font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 900; }
.kv span:last-child { color: var(--soft); font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }
.outline-list { display: grid; gap: 5px; }
.outline-link { display: block; color: var(--muted); padding: 6px 8px; border-radius: 10px; font-size: .84rem; }
.outline-link.level-3 { padding-left: 18px; }
.outline-link.level-4, .outline-link.level-5, .outline-link.level-6 { padding-left: 28px; font-size: .78rem; }
.outline-link:hover { color: #fff; background: rgba(255,255,255,.05); text-decoration: none; }
.trace-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; margin-top: 14px; }
.trace-table button, .doc-ref-button { border: 0; background: transparent; color: var(--cyan); cursor: pointer; text-align: left; padding: 0; }
.doc-ref-list { display: grid; gap: 6px; }
.doc-ref-button { border: 1px solid rgba(174,197,230,.13); border-radius: 12px; padding: 8px; color: var(--soft); background: rgba(255,255,255,.025); }
.doc-ref-button:hover { border-color: rgba(98,230,220,.4); color: #fff; }
.id-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.id-card { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: rgba(255,255,255,.035); }
.id-card h3 { margin: 0; color: var(--cyan); font-family: var(--mono); font-size: .95rem; }
.id-card p { margin: 7px 0 0; color: var(--muted); font-size: .84rem; }
.id-pill-button { padding: 7px 10px; font-family: var(--mono); color: var(--cyan); }
.aisop-footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; padding: 2px 4px; }
@media (max-width: 1320px) {
  .command-bar { grid-template-columns: 1fr; }
  .mode-tabs { justify-content: flex-start; }
  .workbench-grid { grid-template-columns: 280px minmax(0,1fr); height: auto; min-height: 0; }
  .intelligence-panel { grid-column: 1 / -1; min-height: 380px; }
}
@media (max-width: 900px) {
  .aisop-app { padding: 14px; }
  .workbench-grid { grid-template-columns: 1fr; }
  .workbench-panel { min-height: 340px; }
  .reader-scroll { padding: 18px; }
  .overview-grid, .health-grid, .dashboard-grid, .path-grid, .id-index-grid { grid-template-columns: 1fr; }
  .reader-toolbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .command-brand { align-items: flex-start; }
  .brand-orb { width: 44px; height: 44px; border-radius: 15px; }
  .hero-card { padding: 20px; }
  .hero-card h1 { max-width: none; }
}



/* AISOP Web 01 finish pass */
.orientation-deck {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.orientation-lead,
.orientation-card,
.noscript-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(13, 25, 47, .92), rgba(7, 13, 27, .9));
  border-radius: 24px;
  padding: 18px 18px 17px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .22);
}
.orientation-lead h2 { margin: 0 0 8px; font-size: clamp(1.16rem, 2vw, 1.55rem); letter-spacing: -.025em; }
.orientation-lead p:not(.eyebrow) { margin: 0; color: var(--soft); line-height: 1.62; }
.orientation-card { display: grid; gap: 8px; min-height: 154px; }
.orientation-card span {
  width: 34px; height: 28px; display: grid; place-items: center; border-radius: 999px;
  color: #031018; font-weight: 950; font-size: .74rem; letter-spacing: .08em;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}
.orientation-card strong { font-size: 1.02rem; letter-spacing: -.015em; }
.orientation-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .92rem; }
.noscript-card { margin: 0 0 14px; }
.guide-landing { display: grid; gap: 18px; }
.guide-hero {
  border: 1px solid var(--line2);
  border-radius: 26px;
  padding: clamp(20px, 3vw, 30px);
  background:
    radial-gradient(circle at 92% 0%, rgba(168,146,255,.16), transparent 24rem),
    linear-gradient(145deg, rgba(14, 29, 55, .96), rgba(7, 13, 27, .94));
}
.guide-hero h1 { margin: 0 0 10px; font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.045em; }
.guide-hero p { color: var(--soft); line-height: 1.65; max-width: 76ch; }
.guide-step-list { display: grid; gap: 12px; }
.guide-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: rgba(8, 15, 30, .72);
  cursor: pointer;
}
.guide-step:hover { border-color: rgba(98,230,220,.48); background: rgba(15, 28, 52, .88); text-decoration: none; }
.guide-step-number {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px;
  color: #031018; background: var(--cyan); font-weight: 950;
}
.guide-step strong { display: block; margin-bottom: 3px; font-size: 1rem; }
.guide-step code { color: var(--muted); font-size: .78rem; white-space: normal; }
.guide-step .doc-badge { align-self: center; }
.empty-state {
  border: 1px dashed var(--line2);
  border-radius: 22px;
  padding: 22px;
  background: rgba(7, 13, 26, .72);
  color: var(--soft);
}
.empty-state h3 { margin: 0 0 8px; color: var(--text); }
.search-result.empty-search { cursor: default; }
.reader-toolbar, .panel-title-row { gap: 12px; }
.panel-jump { display: none; }
.doc-control-card { border-color: rgba(98,230,220,.22); }
.markdown { line-height: 1.68; }
.markdown h1, .markdown h2, .markdown h3 { scroll-margin-top: 118px; }
.markdown p, .markdown li { max-width: 88ch; }
.doc-ref-button { transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.doc-ref-button:hover { transform: translateY(-1px); }
.guide-chip { white-space: nowrap; }
.guide-chip.active { background: rgba(98, 230, 220, .16); border-color: rgba(98, 230, 220, .52); color: var(--text); }
.mode-tab.active { box-shadow: inset 0 -2px 0 var(--cyan); }
.id-card, .health-card, .metric-card, .content-card, .side-card { box-shadow: 0 14px 40px rgba(0,0,0,.18); }
@media (max-width: 1320px) {
  .orientation-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orientation-lead { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .orientation-deck { grid-template-columns: 1fr; }
  .panel-jump { display: inline-flex; }
  .guide-step { grid-template-columns: auto 1fr; }
  .guide-step .doc-badge { grid-column: 2; justify-self: start; }
}
@media (max-width: 620px) {
  .aisop-app { padding: 12px; gap: 12px; }
  .orientation-card, .orientation-lead { padding: 15px; border-radius: 20px; }
  .command-bar { border-radius: 22px; padding: 13px; }
  .reader-actions { width: 100%; }
  .reader-actions .small-button { flex: 1 1 auto; }
}


/* 20260521 mobile compatibility patch */
img, video, canvas, svg { max-width: 100%; height: auto; }
a, button, input, select, textarea { touch-action: manipulation; }
button, .button, .choice-button, .small-button, .mode-tab, .guide-chip, .chip-button, .doc-button, .id-pill-button { min-height: 44px; }
input, select, textarea { font-size: 16px; }
pre, code, .event-console, .table-scroll, .data-table { max-width: 100%; overflow-x: auto; }
.github-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.github-grid article { border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 18px; background: rgba(255,255,255,.045); }
.fineprint { color: var(--muted, #aab6cb); font-size: .92rem; line-height: 1.55; }
@media (max-width: 860px) {
  body { overflow-x: hidden; }
  .section-shell { width: min(100% - 24px, var(--max-width, 1180px)); padding-left: 0; padding-right: 0; }
  .hero-grid, .footer-grid, .portal-grid, .boundary-card, .contact-grid, .layout, .grid, .workbench-grid, .command-bar, .dashboard-shell, .operator-grid, .retroweb-shell, .retro-grid { grid-template-columns: 1fr !important; }
  .hero, .section-shell, .panel, .portal-card, .hero-card, .boundary-card, .doc-card { border-radius: 18px; }
  .portal-actions, .hero-actions, .button-row, .doc-actions { flex-direction: column; align-items: stretch; }
  .portal-actions .button, .hero-actions .button, .button-row .button, .button-row button, .doc-actions .button { width: 100%; justify-content: center; text-align: center; }
  .site-header, .topbar, .command-bar, .aisop-bridge { position: static !important; }
  .site-nav, .global-nav, .unified-nav, .aisop-bridge__nav, .mode-tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .site-nav a, .global-nav a, .unified-nav a, .aisop-bridge__nav a { white-space: nowrap; }
  .hero-copy h1, .section-heading h1, .section-heading h2 { overflow-wrap: anywhere; }
  .kpi-row, .service-grid, .persona-grid, .github-grid { grid-template-columns: 1fr !important; }
  .right-rail, aside, .explorer-panel, .reader-panel { min-width: 0; }
  table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 560px) {
  .hero-copy h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  .section-heading h1 { font-size: clamp(1.9rem, 9vw, 2.8rem); }
  .section-heading h2 { font-size: clamp(1.6rem, 8vw, 2.3rem); }
  .hero-lede, .lede { font-size: 1rem; }
  .hero-card, .portal-card, .panel, .boundary-card { padding: 16px !important; }
  .aisop-bridge__inner, .unified-sitebar-inner, .topbar-inner { gap: 10px; }
  .brand-copy span, .aisop-bridge__brand span:last-child { white-space: normal; }
  audio, video { width: 100%; }
}
