@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&display=swap');
/* Shared local polish for the Ou AI OS pages. */
html {
  background: #030b16;
}

body, button, input, textarea, select { font-family: "IBM Plex Sans Thai", Inter, system-ui, sans-serif !important; }
.nova-chat-head-actions { display:flex; align-items:center; gap:8px; }
.nova-chat-head-actions button, .nova-chat-actions button { min-height:44px; border:1px solid rgba(72,201,255,.28); border-radius:8px; background:#0a2942; color:#e9f8ff; padding:8px 11px; font:inherit; cursor:pointer; }
.nova-route-meta { display:flex; flex-wrap:wrap; gap:6px; color:#b7cada; font-size:11px; }
.nova-route-meta span { padding:5px 7px; border:1px solid rgba(124,171,204,.18); border-radius:6px; background:rgba(255,255,255,.035); }
.nova-chat-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.nova-chat-actions[hidden] { display:none; }
.scene-name-fix::after { content:""; position:absolute; inset:-10px -14px; }
.os-feed article:nth-child(n+4) { display:none; }
.os-menu [data-action-title="Data & Insights"], .os-menu [data-action-title="Calendar"], .os-menu [data-action-title="Settings"] { display:none !important; }
.os-feed p, .subtitle, .team-card p, .task p, .step p { color:#b7c8d8 !important; }
.kb-tools, .task-tools { display:flex; gap:10px; margin:0 0 16px; }
.kb-tools input, .kb-tools select, .task-tools button, .task select { min-height:44px; border:1px solid var(--ux-border); border-radius:8px; background:#091b2e; color:#eaf7ff; padding:9px 12px; font:inherit; }
.kb-tools input { flex:1; min-width:0; }
.kb-card[role="button"] { cursor:pointer; }
.kb-dialog { width:min(560px,calc(100% - 28px)); border:1px solid rgba(78,202,255,.3); border-radius:10px; background:#071729; color:#eef9ff; padding:22px; box-shadow:0 30px 80px #000; }
.kb-dialog::backdrop { background:rgba(0,0,0,.72); }
.kb-dialog > button { float:right; min-height:44px; border:1px solid var(--ux-border); border-radius:8px; background:#0a2942; color:#fff; padding:8px 12px; }
.empty-state { color:var(--ux-muted); padding:24px; }
.task-tools button.active { border-color:#38c9ff; background:#0d3655; }
.task select { width:100%; margin-top:4px; }
.flow-state { display:inline-flex; margin-top:10px; color:#7ee7c5; font-weight:700; text-transform:none; }

/* Knowledge workspace */
.knowledge-page { background:#04111f; }
.knowledge-page .main { max-width:1480px; margin:0 auto; padding:24px 28px 40px; }
.knowledge-page .hero { grid-template-columns:minmax(0,1.5fr) minmax(300px,.5fr); gap:14px; margin-bottom:14px; }
.knowledge-page .hero-card, .knowledge-page .guard-card { border-radius:10px; box-shadow:none; }
.knowledge-page .hero-card { padding:24px 26px; background:linear-gradient(135deg,#0b2941,#081b2e 62%,#071625); }
.knowledge-page .page-kicker { color:#63dcff; font-size:12px; font-weight:700; }
.knowledge-page h1 { margin-top:6px; font-size:clamp(32px,4vw,50px) !important; letter-spacing:0; }
.knowledge-page .hero-card > p { max-width:780px; margin-top:10px; font-size:14px; line-height:1.7; color:#c1d2df; }
.knowledge-page .hero-actions { margin-top:16px; }
.knowledge-page .hero-actions a { min-height:44px; display:inline-flex; align-items:center; border-radius:7px; font-size:12px; }
.kb-summary { display:flex; gap:24px; margin-top:20px; }
.kb-summary div { display:grid; gap:2px; padding-right:24px; border-right:1px solid rgba(142,188,216,.16); }
.kb-summary div:last-child { border-right:0; }
.kb-summary strong { color:#eefaff; font-size:18px; }
.kb-summary span { color:#8eacbf; font-size:10px; }
.knowledge-page .guard-card { padding:20px; background:#081b2d; }
.knowledge-page .guard-card h2 { font-size:16px; }
.knowledge-page .guard-card ul { gap:8px; }
.knowledge-page .guard-card li { display:grid; gap:3px; padding:10px 12px; border:0; border-left:3px solid #34d399; border-radius:3px; background:rgba(52,211,153,.055); }
.knowledge-page .guard-card li strong { color:#dcfff1; font-size:11px; }
.knowledge-page .guard-card li span { color:#9dbbac; font-size:11px; line-height:1.45; }
.knowledge-page .kb-tools { position:sticky; top:10px; z-index:15; display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:10px; margin:0 0 20px; padding:10px; border:1px solid rgba(91,171,212,.18); border-radius:9px; background:rgba(5,20,35,.96); backdrop-filter:blur(16px); }
.kb-search, .kb-select { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; min-height:48px; padding:0 13px; border:1px solid rgba(120,174,207,.16); border-radius:7px; background:#081c30; }
.kb-search > span, .kb-select > span { color:#6ddcff; font-size:10px; font-weight:700; }
.kb-search input, .kb-select select { width:100%; min-height:44px; padding:0; border:0; outline:0; color:#edf9ff; background:transparent; }
.kb-results-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin:0 2px 12px; }
.kb-results-head h2 { font-size:19px; }
.kb-results-head p { margin-top:4px; color:#91aabd; font-size:12px; }
.kb-results-head > strong { color:#70e3ff; font-size:12px; }
.knowledge-page #kbGrid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.knowledge-page .kb-card { min-height:0; padding:15px 16px; gap:10px; border-radius:8px; box-shadow:none; background:#071a2c; transition:border-color .18s ease,background .18s ease; }
.knowledge-page .kb-card:hover, .knowledge-page .kb-card:focus-visible { transform:none; border-color:rgba(58,205,255,.55); background:#0a2237; }
.knowledge-page .kb-card header { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; }
.kb-index { display:grid; place-items:center; width:30px; height:30px; border-radius:6px; color:#70e5ff; background:#0b304b; font-size:10px; font-weight:700; }
.knowledge-page .kb-card h2 { font-size:15px; }
.knowledge-page .kb-card header small { display:block; margin-top:2px; color:#94adbe; font-size:10px; }
.knowledge-page .owner { border-radius:5px; color:#bdf9df; background:rgba(52,211,153,.12); text-transform:none; }
.knowledge-page .kb-card p { min-height:38px; color:#b4c6d4; font-size:11px; }
.knowledge-page .chips span { border-radius:5px; font-size:9px; }
.knowledge-page .sources { display:flex; align-items:center; gap:7px; padding-top:9px; border-top:1px solid rgba(127,176,207,.12); }
.knowledge-page .sources strong { color:#849daf; font-size:9px; }
.knowledge-page .sources span { color:#bed0dd; }
.knowledge-page .sources b { margin-left:auto; color:#6ddcff; font-size:10px; }
.route-section { margin-top:14px; border-top:1px solid rgba(132,175,202,.14); }
.route-section summary { min-height:44px; padding:14px 2px; color:#9db9cb; font-size:12px; cursor:pointer; }
.knowledge-page .routes { margin-top:0; }
.knowledge-page .synced-section { padding-top:8px; border-top:1px solid rgba(132,175,202,.14); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline:3px solid #38c9ff !important; outline-offset:2px; }

@media (max-width: 760px) {
  .knowledge-page .main { padding:12px 12px 86px !important; }
  .knowledge-page .hero { display:block; }
  .knowledge-page .hero-card { padding:18px; }
  .knowledge-page .hero-card > p { font-size:12px; line-height:1.55; }
  .knowledge-page .page-kicker { font-size:10px; }
  .knowledge-page h1 { font-size:34px !important; }
  .knowledge-page .hero-actions { display:grid; grid-template-columns:1fr 1fr; }
  .knowledge-page .hero-actions a:last-child { display:none; }
  .kb-summary { gap:12px; }
  .kb-summary div { flex:1; padding-right:10px; }
  .kb-summary strong { font-size:15px; }
  .knowledge-page .guard-card { margin-top:10px; padding:13px; }
  .knowledge-page .guard-card ul { grid-template-columns:1fr; }
  .knowledge-page .guard-card li:nth-child(n+3) { display:none; }
  .kb-tools { position:sticky; top:8px; z-index:20; padding:8px; background:#061426; border-radius:8px; }
  .knowledge-page .kb-tools { grid-template-columns:1fr; gap:7px; margin-top:12px; }
  .kb-search, .kb-select { grid-template-columns:62px minmax(0,1fr); }
  .knowledge-page .kb-results-head { align-items:start; }
  .knowledge-page .kb-results-head p { display:none; }
  .knowledge-page #kbGrid { grid-template-columns:1fr !important; }
  .knowledge-page .kb-card { padding:13px; }
  .knowledge-page .kb-card p { min-height:0; }
  .knowledge-page .chips { display:none; }
  .knowledge-page .route-section, .knowledge-page .synced-section { display:none; }
  .task-tools { overflow-x:auto; padding-bottom:4px; }
  .task-tools button { flex:0 0 auto; }
  .office-scene { min-height: clamp(300px, 76vw, 390px) !important; overflow:hidden; }
  .office-scene-image { width:112% !important; max-width:none !important; margin-left:-6%; }
  .scene-name-fix { min-height:34px !important; font-size:10px !important; }
  .scene-name-fix::after { inset:-14px -18px; }
  .nova-chat-card.chat-expanded { position:fixed !important; inset:12px 10px 70px !important; z-index:9999; margin:0 !important; display:grid; grid-template-rows:auto auto 1fr auto auto; background:#061426 !important; box-shadow:0 0 0 999px rgba(0,0,0,.72),0 20px 70px #000; }
  .nova-chat-card.chat-expanded .nova-chat-log { max-height:none !important; height:auto; }
  .nova-chat-card.chat-expanded #novaChatExpand::after { content:" / Close"; }
  .os-nav { grid-template-columns:repeat(5,minmax(0,1fr)) !important; }
  .os-nav button { min-height:58px !important; padding:5px 2px !important; display:flex !important; flex-direction:column; justify-content:center; gap:3px; }
  .os-nav button span { display:block !important; font-size:9px !important; line-height:1.1; }
  .os-nav button i { font-size:11px; }
  .os-nav button b { display:none !important; }
  .os-nav button span { position:static !important; visibility:visible !important; opacity:1 !important; width:auto !important; height:auto !important; clip:auto !important; }
  .os-nav button[data-mobile-label] span { display:none !important; }
  .os-nav button[data-mobile-label] { position:relative !important; padding-bottom:16px !important; }
  .os-nav button[data-mobile-label]::after { content:attr(data-mobile-label); position:absolute; left:2px; right:2px; bottom:3px; display:block; color:#b9cddd; font-size:8px; line-height:1; text-align:center; white-space:nowrap; }
  .os-nav button[data-mobile-label] i { display:none !important; }
  .os-nav button[data-mobile-label] { padding:8px 2px !important; }
  .os-nav button[data-mobile-label]::after { position:static; font-size:10px; line-height:1.15; color:#d8e9f7; }
  .team-card { display:grid !important; grid-template-columns:88px minmax(0,1fr); gap:12px; align-items:center; padding:10px !important; }
  .team-card img { width:88px !important; height:88px !important; grid-row:1 / span 4; border-radius:10px !important; }
  .team-card h3, .team-card small, .team-card p, .team-card .skills { grid-column:2; }
  .team-card p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
}

:root {
  --ux-surface: rgba(8, 22, 38, 0.92);
  --ux-surface-raised: rgba(12, 31, 52, 0.96);
  --ux-border: rgba(135, 177, 211, 0.16);
  --ux-muted: #9fb5c9;
}

body,
.shell,
.os-shell,
.main,
main,
section,
article,
aside,
nav,
div {
  min-width: 0;
}

body {
  font-family: "Leelawadee UI", "Segoe UI", Tahoma, Arial, sans-serif !important;
}

button,
a,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 3px;
}

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

.ux-quick-actions button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--ux-border);
  border-radius: 12px;
  color: #eaf7ff;
  background: linear-gradient(145deg, rgba(13, 39, 64, 0.9), rgba(5, 18, 32, 0.92));
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ux-quick-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(32, 220, 255, 0.42);
  background: linear-gradient(145deg, rgba(19, 53, 84, 0.96), rgba(7, 24, 42, 0.96));
}

.ux-quick-actions i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #06111f;
  background: #67e8f9;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.ux-quick-actions strong,
.ux-quick-actions small {
  display: block;
}

.ux-quick-actions strong {
  font-size: 11px;
}

.ux-quick-actions small {
  margin-top: 3px;
  color: var(--ux-muted);
  font-size: 9px;
}

.ux-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.ux-section-title span {
  color: #eff9ff;
  font-size: 14px;
  font-weight: 900;
}

.ux-section-title small {
  color: var(--ux-muted);
  font-size: 9px;
}

.reference-dashboard .os-right {
  grid-template-rows: auto auto auto auto auto minmax(160px, 1fr) !important;
}

@media (max-width: 1380px) {
  body {
    height: auto !important;
    min-height: 100vh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .page {
    min-height: 100vh !important;
    height: auto !important;
    padding: 0 !important;
  }

  .page > .topbar,
  .page > .main,
  .page > .team-board,
  .page > .footer {
    display: none !important;
  }

  .reference-dashboard {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    min-height: 100vh;
    overflow: visible !important;
    background: #020711;
  }

  .reference-dashboard .os-shell {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh;
    display: grid !important;
    grid-template-columns: 78px minmax(0, 1fr) !important;
    grid-template-rows: 70px auto auto 64px !important;
  }

  .reference-dashboard .os-left {
    grid-column: 1 !important;
    grid-row: 1 / 5 !important;
    padding: 16px 10px !important;
  }

  .reference-dashboard .os-brand {
    justify-content: center;
  }

  .reference-dashboard .os-brand > span:last-child,
  .reference-dashboard .os-menu span,
  .reference-dashboard .os-menu b,
  .reference-dashboard .os-left > div:last-child {
    display: none;
  }

  .reference-dashboard .os-menu button,
  .reference-dashboard .os-menu a {
    grid-template-columns: 1fr !important;
    justify-items: center;
    min-height: 46px;
    padding: 9px !important;
  }

  .reference-dashboard .os-top {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .reference-dashboard .office-core {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100%;
    aspect-ratio: 1792 / 1024;
    min-height: 0;
  }

  .reference-dashboard .os-right {
    grid-column: 2 !important;
    grid-row: 3 !important;
    min-height: 560px;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  .reference-dashboard .os-feed {
    max-height: 360px;
  }

  .reference-dashboard .os-right .nova-chat-card {
    border: 1px solid rgba(52, 211, 153, 0.24);
    background: linear-gradient(145deg, rgba(8, 43, 45, 0.9), rgba(4, 20, 31, 0.94));
  }

  .reference-dashboard .os-right .nova-chat-log {
    max-height: 220px;
  }

  .reference-dashboard .os-bottom {
    grid-column: 2 !important;
    grid-row: 4 !important;
  }
}

@media (max-width: 760px) {
  .reference-dashboard .os-shell {
    display: block !important;
  }

  .reference-dashboard .os-left {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 30;
    display: block !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
    border-right: 0 !important;
    border-top: 1px solid rgba(132, 169, 190, 0.16);
    border-bottom: 0;
    background: rgba(3, 12, 24, 0.96) !important;
    backdrop-filter: blur(18px);
  }

  .reference-dashboard .os-brand {
    display: none;
  }

  .reference-dashboard .os-mark {
    width: 28px;
    height: 28px;
    border-width: 4px;
  }

  .reference-dashboard .os-menu {
    width: calc(100vw - 20px) !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px !important;
    overflow: visible;
  }

  .reference-dashboard .os-menu::-webkit-scrollbar {
    display: none;
  }

  .reference-dashboard .os-menu button,
  .reference-dashboard .os-menu a {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    padding: 7px !important;
  }

  .reference-dashboard .os-menu > :nth-child(n + 6) {
    display: none;
  }

  .reference-dashboard .os-menu i {
    width: 24px;
    height: 24px;
  }

  .reference-dashboard .os-top {
    display: flex !important;
    min-height: 82px;
    padding: 14px 16px !important;
  }

  .reference-dashboard .os-top h1 {
    font-size: 20px !important;
  }

  .reference-dashboard .os-top-status {
    display: none !important;
  }

  .reference-dashboard .os-top-status > span:not(.os-pill) {
    display: none;
  }

  .reference-dashboard .os-pill {
    padding: 7px 9px !important;
    font-size: 10px !important;
  }

  .reference-dashboard .office-core {
    position: relative;
    width: 100%;
    min-height: 246px;
    aspect-ratio: 1792 / 1024;
  }

  .reference-dashboard .scene-name-fix {
    min-width: 0 !important;
    min-height: 16px !important;
    padding: 3px 5px !important;
    border-radius: 5px !important;
    font-size: 7px !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.42) !important;
  }

  .reference-dashboard .scene-name-fix::before {
    width: 11px !important;
    height: 11px !important;
    margin-right: 3px !important;
    border-radius: 3px !important;
    font-size: 6px !important;
  }

  .reference-dashboard .agent-detail {
    display: none;
  }

  .reference-dashboard .os-right {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 16px 12px 18px !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(132, 169, 190, 0.16);
    overflow: hidden !important;
  }

  .reference-dashboard .os-right > * {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .ux-quick-actions {
    margin-top: 12px;
  }

  .reference-dashboard .os-tabs {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    margin: 12px 0 !important;
  }

  .reference-dashboard .os-tabs button {
    min-width: 0;
    padding-inline: 3px;
    font-size: 9px;
  }

  .reference-dashboard .os-feed {
    max-height: none !important;
    overflow: visible !important;
  }

  .reference-dashboard .os-feed article:nth-of-type(n + 4) {
    display: none;
  }

  .reference-dashboard .os-feed article {
    grid-template-columns: 40px minmax(0, 1fr) !important;
  }

  .reference-dashboard .os-feed article > small {
    grid-column: 2;
    justify-self: start;
  }

  .reference-dashboard .os-right .nova-chat-card {
    width: 100%;
    max-width: 100%;
    margin-top: 16px !important;
    overflow: hidden;
  }

  .reference-dashboard .os-right .nova-chat-log {
    max-height: 300px !important;
  }

  .reference-dashboard .nova-chat-form {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 58px !important;
  }

  .reference-dashboard .nova-chat-form textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    resize: vertical;
  }

  .reference-dashboard .nova-chat-send {
    width: 58px;
    min-width: 0;
    padding-inline: 4px;
    font-size: 10px;
  }

  .reference-dashboard .nova-chat-log,
  .reference-dashboard .chat-bubble {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .reference-dashboard .os-bottom {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 14px 12px 82px !important;
  }

  .reference-dashboard .os-metric {
    min-height: 58px;
    padding: 10px;
    border: 1px solid rgba(132, 169, 190, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
  }

  .reference-dashboard .os-metric:last-child {
    grid-column: 1 / -1;
  }

  /* Shared secondary-page mobile navigation. */
  .shell,
  .os-shell:not(.reference-dashboard .os-shell) {
    width: 100% !important;
    overflow-x: hidden;
  }

  .shell > .side,
  body > .os-shell > .side {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 30 !important;
    width: 100%;
    display: block !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    border-right: 0 !important;
    border-top: 1px solid rgba(119, 171, 217, 0.2);
    border-bottom: 0;
    background: rgba(3, 12, 24, 0.96) !important;
    backdrop-filter: blur(18px);
  }

  .shell > .side .brand,
  body > .os-shell > .side .brand,
  .shell > .side .side-card,
  body > .os-shell > .side .side-card {
    display: none !important;
  }

  .shell > .side .menu,
  body > .os-shell > .side .menu {
    width: calc(100vw - 20px) !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px !important;
  }

  .shell > .side .menu a,
  body > .os-shell > .side .menu a {
    width: 100%;
    min-width: 0 !important;
    min-height: 48px;
    padding: 7px !important;
    border-radius: 11px !important;
    display: grid !important;
    place-items: center;
    color: #d9eaf7 !important;
    font-size: 10px !important;
    line-height: 1.1;
    text-align: center;
  }

  .shell > .side .menu > :nth-child(n + 6),
  body > .os-shell > .side .menu > :nth-child(n + 6) {
    display: none !important;
  }

  .shell > .side .menu a span:not(.icon):not(.nav-icon),
  body > .os-shell > .side .menu a span:not(.icon):not(.nav-icon),
  .shell > .side .menu em,
  body > .os-shell > .side .menu em {
    display: none !important;
  }

  .shell > .side .menu a .icon,
  .shell > .side .menu a .nav-icon,
  body > .os-shell > .side .menu a .icon,
  body > .os-shell > .side .menu a .nav-icon {
    display: none !important;
  }

  .shell > .side .menu a::after,
  body > .os-shell > .side .menu a::after { display:block; }
  .shell > .side .menu a:nth-child(1)::after,
  body > .os-shell > .side .menu a:nth-child(1)::after { content:"Command"; }
  .shell > .side .menu a:nth-child(2)::after,
  body > .os-shell > .side .menu a:nth-child(2)::after { content:"Agents"; }
  .shell > .side .menu a:nth-child(3)::after,
  body > .os-shell > .side .menu a:nth-child(3)::after { content:"Workflow"; }
  .shell > .side .menu a:nth-child(4)::after,
  body > .os-shell > .side .menu a:nth-child(4)::after { content:"Tasks"; }
  .shell > .side .menu a:nth-child(5)::after,
  body > .os-shell > .side .menu a:nth-child(5)::after { content:"Knowledge"; }

  .main {
    width: 100%;
    padding: 14px 14px 86px !important;
    overflow-x: hidden;
  }

  .main > * {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
  }

  .nova-card p,
  .brief p,
  .hero-card p,
  .kb-card p,
  .route-card p {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .team-hero,
  .hero,
  .top,
  .hero-card,
  .guard-card,
  .nova-card,
  .team-intro,
  .team-grid,
  .grid,
  .routes,
  .board,
  .matrix,
  .pipeline {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  .actions,
  .hero-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  .actions a,
  .hero-actions a {
    max-width: 100%;
    white-space: normal;
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px) !important;
    overflow-wrap: anywhere;
  }

  p,
  small,
  strong,
  span {
    overflow-wrap: anywhere;
  }

  .team-grid,
  .grid,
  .routes,
  .board,
  .matrix,
  .pipeline {
    grid-template-columns: 1fr !important;
  }

  .team-hero,
  .hero,
  .top {
    grid-template-columns: 1fr !important;
  }

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

  .kb-card,
  .route-card,
  .task,
  .step,
  .agent-card,
  .member-card {
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  .ux-section-title small {
    display: none;
  }

  .brief-grid,
  .brief {
    grid-template-columns: 1fr !important;
  }

  .reference-dashboard .os-top {
    align-items: flex-start !important;
    gap: 8px;
  }

  .reference-dashboard .os-top small {
    display: block;
    margin-top: 5px;
  }

  .ux-quick-actions {
    grid-template-columns: 1fr 1fr;
  }

  .ux-quick-actions button {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 54px;
    padding: 8px;
  }

  .ux-quick-actions i {
    width: 26px;
    height: 26px;
  }
}
