:root {
  color-scheme: var(--bolab-scheme);
  --ink: var(--bolab-ink);
  --muted: var(--bolab-muted);
  --soft: var(--bolab-soft);
  --sidebar: var(--bolab-sidebar);
  --canvas: var(--bolab-canvas);
  --rule: var(--bolab-rule);
  --strong-rule: var(--bolab-strong-rule);
  --accent: var(--bolab-accent);
  --tint: var(--bolab-tint);
  --tint-ink: var(--bolab-tint-ink);
  --green: var(--bolab-green);
  --amber-ink: var(--bolab-amber-ink);
  --danger: var(--bolab-danger);
  --surface: var(--bolab-surface);
  --raised: var(--bolab-raised);
  --primary: var(--bolab-primary);
  --primary-hover: var(--bolab-primary-hover);
  --primary-ink: var(--bolab-primary-ink);
  --side-width: 240px;
  --chat-width: 640px;
  --chat-gutter: 26px;
  font-family: var(--bolab-font);
  color: var(--ink);
  background: var(--sidebar);
}
:root[data-theme]:not([data-theme=dark]) .welcome-art { filter: invert(1) hue-rotate(180deg) brightness(1.22); mix-blend-mode: multiply; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .19em; }
a, button { -webkit-tap-highlight-color: transparent; }
::selection { background: #b2d5cd; color: #171717; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.65; }
button:disabled { opacity: .45; cursor: default; }
svg.ico { flex: none; width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.65; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; left: 10px; top: 10px; z-index: 12; transform: translateY(-200%); padding: 10px 14px; background: var(--surface); }
.skip:focus { transform: none; }
.shell { display: grid; grid-template-columns: var(--side-width) minmax(0,1fr) auto; height: 100dvh; padding: 8px 8px 8px 0; overflow: hidden; }
.side { min-height: 0; display: flex; flex-direction: column; background: var(--sidebar); padding: 6px 6px 4px; }
.side-head { display: flex; min-width: 0; align-items: center; gap: 7px; min-height: 38px; padding-inline: 9px 2px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand strong { font-size: 1rem; letter-spacing: .015em; }
.preview-label { padding: 1px 6px 2px; border-radius: 20px; border: 1px solid var(--strong-rule); color: var(--muted); font-size: .69rem; white-space: nowrap; }
.side-toggle { margin-left: auto; color: var(--muted); }
.side-scroll { display: flex; flex-direction: column; gap: 3px; min-height: 0; margin-top: 4px; padding: 2px 0; }
.side-nav, .session-list { display: grid; gap: 2px; }
.side-nav { flex: none; }
.side-history { min-height: 0; overflow: auto; scrollbar-width: none; padding: 2px 0; }
.side-history::-webkit-scrollbar { display: none; }
.nav-item, .session-item { display: flex; align-items: center; gap: 9px; min-height: 30px; width: 100%; padding: 5px 9px; background: transparent; border: 1px solid transparent; border-radius: 100px; text-align: left; text-decoration: none; color: var(--ink); font-size: .875rem; white-space: nowrap; }
.nav-item .ico { width: 16px; height: 16px; }
.nav-item span, .session-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover, .session-item:hover { background: var(--soft); color: var(--ink); }
.nav-item[aria-current=page], .session-item[aria-current=page] { color: var(--tint-ink); background: var(--tint); }
.side-new { font-weight: 620; }
.session-list { margin-top: 20px; }
.session-list + .session-list { margin-top: 13px; }
.session-head { display: flex; align-items: center; gap: 5px; margin: 0; padding: 4px 10px 6px; border: 0; background: transparent; color: var(--muted); text-align: left; font-size: .76rem; font-weight: 550; }
.session-head .ico { width: 13px; height: 13px; }
.session-head[aria-expanded=true] .ico { transform: rotate(90deg); }
.project-section-head { display: flex; align-items: center; gap: 4px; }
.project-section-head .session-head { flex: 1; }
.project-section-head .history-action[aria-current=page] { color: var(--tint-ink); background: var(--tint); }
.project-entries { display: grid; gap: 4px; }
.project-groups, .chat-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.project-groups { display: grid; gap: 5px; }
.project-group-label { margin: .32rem 0 0; padding: .24rem 10px; color: var(--muted); font-size: .73rem; font-weight: 600; overflow-wrap: anywhere; }
.hidden-sidebar-projects { color: var(--muted); font-size: .76rem; padding: .25rem .5rem; }
.hidden-sidebar-projects summary { cursor: pointer; min-height: 24px; line-height: 24px; }
.hidden-sidebar-projects ul { list-style: none; margin: .2rem 0 0; padding: 0; }
.hidden-sidebar-projects li { display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.hidden-sidebar-projects li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden-sidebar-projects .history-more { flex: none; }
.project-archive-list { max-height: 48vh; overflow: auto; }
.project-archive-list .session-item { text-align: left; width: 100%; overflow-wrap: anywhere; }
.project-group { min-width: 0; }
.project-heading { display: flex; align-items: center; min-width: 0; border-radius: 7px; }
.project-heading:has(.sidebar-project-link[aria-current=page]) { background: var(--tint); color: var(--tint-ink); }
.sidebar-project-link { flex: 1; min-width: 0; border-radius: 7px; font-weight: 610; }
.side-history :is(.sidebar-project-link, .session-item) > span {
  min-width: 0; overflow: hidden; text-overflow: clip;
}
.side-history :is(.sidebar-project-link, .session-item) > .sidebar-label-overflow {
  mask-image: linear-gradient(to right, #000 calc(100% - 1.05rem), transparent);
}
.session-item { border-radius: 7px; }
.sidebar-chats { min-width: 0; }
.project-chats { padding-inline-start: 26px; }
.session-item { color: var(--muted); font-size: .82rem; }
[data-sidebar-item] { position: relative; user-select: none; -webkit-touch-callout: none; }
.sidebar-dragging [data-sidebar-item] { cursor: grabbing; }
.sidebar-drag-source { opacity: .5; }
[data-sidebar-drop="project"] { outline: 1px solid var(--accent); outline-offset: -1px; background: var(--soft); }
[data-sidebar-drop="before"]::before, [data-sidebar-drop="after"]::after {
  content: ""; position: absolute; z-index: 1; inset-inline: 4px; height: 2px;
  pointer-events: none; border-radius: 1px; background: var(--accent);
}
[data-sidebar-drop="before"]::before { inset-block-start: 0; }
[data-sidebar-drop="after"]::after { inset-block-end: 0; }
.sidebar-item-menu {
  position: fixed; inset: auto; margin: 0; width: min(248px, calc(100vw - 12px));
  max-height: min(52dvh, 420px); overflow: auto; padding: 5px; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 8px; background: var(--raised); box-shadow: 0 6px 18px #0002;
}
.sidebar-item-menu button {
  display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 36px;
  padding: 6px 9px; text-align: start; overflow-wrap: anywhere; color: inherit;
  font-size: .84rem; border: 0; border-radius: 5px; background: transparent;
}
.sidebar-item-menu button:hover:not(:disabled) { background: var(--soft); }
.sidebar-item-menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidebar-item-menu button:disabled { color: var(--muted); opacity: .65; }
.sidebar-item-menu button .ico { width: 15px; height: 15px; flex: none; }
.sidebar-item-menu button .sidebar-menu-submenu { margin-inline-start: auto; }
.sidebar-item-menu .sidebar-icon-down { transform: rotate(180deg); }
.sidebar-item-menu .sidebar-icon-back { transform: rotate(180deg); }
.sidebar-item-menu .sidebar-menu-divider { border-block-start: 1px solid var(--rule); border-start-start-radius: 0; border-start-end-radius: 0; margin-top: 3px; }
.history-action, .history-more { border: 0; border-radius: 6px; color: var(--muted); background: transparent; }
.history-action:hover, .history-more:hover { color: var(--ink); background: var(--soft); }
.history-action { display: grid; place-items: center; width: 25px; min-height: 28px; padding: 0; flex: none; }
.history-action .ico { width: 14px; height: 14px; }
.history-action[aria-expanded=true] .ico { transform: rotate(90deg); }
.project-menu-button[aria-expanded=true] { color: var(--ink); background: var(--soft); }
.project-menu-button[aria-expanded=true] .ico { transform: none; }
.history-more { font-size: .77rem; padding: 5px 10px; min-height: 28px; }
@media (hover: hover) and (pointer: fine) {
  [data-project-chat] { opacity: 0; }
  .project-heading:hover [data-project-chat], [data-project-chat]:focus-visible { opacity: 1; }
  .project-menu-button { opacity: 0; pointer-events: none; }
  .project-heading:is(:hover, :focus-within) .project-menu-button,
  .project-menu-button[aria-expanded=true] { opacity: 1; pointer-events: auto; }
}
.side-foot { margin-top: auto; padding-top: 14px; }
.workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); background: var(--canvas); border: 1px solid var(--rule); border-radius: 22px; overflow: hidden; }
@media (min-width: 681px) {
  .workspace-start { grid-template-rows: minmax(0,1fr); }
  .workspace-start .top { display: none; }
  .shell.side-collapsed { grid-template-columns: 56px minmax(0,1fr) auto; }
  .side-collapsed .side-head { justify-content: center; flex-direction: column; gap: 2px; padding-inline: 0; }
  .side-collapsed .side-toggle { margin: 0; }
  .side-collapsed .brand { order: 1; }
  .side-collapsed .brand:not([data-showcase]), .side-collapsed .brand strong, .side-collapsed .preview-label, .side-collapsed .nav-item > span,
  .side-collapsed .side-history,
  .side-collapsed .account-trigger > span:not(.account-avatar), .side-collapsed .account-chevron { display: none; }
  .side-collapsed .nav-item, .side-collapsed .account-trigger { justify-content: center; padding-inline: 0; }
}
.top { min-height: 62px; padding: 11px clamp(20px,3vw,38px); display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); background: var(--canvas); }
.top-left, .top-actions, .toolbar, .composer-foot, .file-tools { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top h1 { font-size: .97rem; font-weight: 690; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top h1.top-title-with-back { overflow: visible; }
.top-title-back {
  position: relative; display: block; min-height: 36px; margin-inline: -6px 0; padding: 0 6px;
  border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.top-title-back:hover, .top-title-back:focus-visible { background: var(--soft); }
.top-title-back span {
  position: absolute; z-index: 2; inset-inline-start: 0; top: calc(100% + 4px); display: none;
  padding: 4px 8px; border-radius: 5px; background: var(--ink); color: var(--canvas);
  font-size: .75rem; font-weight: 500; pointer-events: none;
}
.top-title-back:hover span, .top-title-back:focus-visible span { display: block; }
.top .context-name { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--strong-rule); padding-left: 11px; }
.preview { font-size: .75rem; white-space: nowrap; color: var(--muted); }
.top-actions > .preview:not(:last-child) { padding-right: 12px; border-right: 1px solid var(--rule); }
.mobile-menu { display: none !important; }
main.main { min-height: 0; min-width: 0; overflow: auto; }
.lab-host { min-height: 0; min-width: 0; }
.lab-host iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--canvas); }
#research-tool-host:has(> iframe[data-source="/ester-studio/"]:not([hidden])) { overflow-x: auto; }
#research-tool-host > iframe[data-source="/ester-studio/"] { min-width: 900px; }
.button, .icon-button, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 7px 10px;
  background: var(--surface); border: 1px solid var(--strong-rule); border-radius: 6px; color: var(--ink);
  text-decoration: none; font-size: .81rem; font-weight: 610; white-space: nowrap;
}
.button:hover, .icon-button:hover, .chip:hover { background: var(--soft); color: var(--ink); }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.plain, .icon-button { border-color: transparent; background: transparent; }
.button[aria-pressed=true] { color: var(--tint-ink); background: var(--tint); }
.icon-button { min-width: 36px; padding: 6px; }
.button .ico, .chip .ico { width: 16px; height: 16px; }
.chat { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.transcript { min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #5c5c5c transparent; overscroll-behavior: contain; }
.transcript-inner, .composer-wrap { width: min(100%, calc(var(--chat-width) + 2 * var(--chat-gutter))); margin-inline: auto; padding-inline: var(--chat-gutter); }
.transcript-inner { padding-block: 34px 15px; }
.welcome-inner {
  position: relative;
  width: min(calc(100% - 2 * var(--chat-gutter)), var(--chat-width));
  margin-inline: auto;
  padding-block: clamp(35px, 11.7dvh, 104px) 12px;
}
.welcome h2 { font-size: 1.82rem; letter-spacing: -.027em; font-weight: 625; line-height: 1.28; text-wrap: balance; }
.welcome p { color: var(--muted); font-size: 1rem; line-height: 1.6; margin-top: 8px; }
.welcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  block-size: clamp(244px, calc(100dvh - 360px), 336px);
  gap: 10px;
  margin-top: 22px;
}
.welcome-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 22px;
  background: var(--surface);
  padding: 19px 20px;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
}
.welcome-card:hover { border-color: var(--strong-rule); }
.research-card { grid-row: span 2; }
.welcome-card-title { display: block; font-size: 1.04rem; font-weight: 620; }
.welcome-card-title span { margin-left: 4px; color: var(--muted); font-size: .7rem; font-weight: 560; letter-spacing: .12em; text-transform: uppercase; }
.welcome-card-copy { display: block; width: min(100%, 17ch); color: var(--muted); font-size: .85rem; line-height: 1.54; margin-top: 7px; }
.research-card .welcome-card-copy { width: 100%; }
.welcome-art {
  position: absolute;
  display: block;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: lighten;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
.art-research { inset: auto 13% 8% 13%; height: 58%; background-image: url('art/research.webp'); }
.art-guide, .art-handoff { inset: auto 6% 10% auto; width: 48%; height: 58%; }
.art-guide { background-image: url('art/guides.webp'); }
.art-handoff { background-image: url('art/handoff.webp'); }
@media (min-width: 1061px) {
  .welcome-inner { inset-inline-start: -8px; }
  .workspace:has(+ .inspector:not([hidden])) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
}
.composer-wrap { padding-block: 10px 12px; }
.composer-shell { background: var(--sidebar); border-radius: 22px; }
.composer-context { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 2px 10px 0; }
.composer-context .button { color: var(--muted); font-weight: 500; min-height: 31px; }
.composer { display: grid; padding: 0 9px; border: 1px solid var(--strong-rule); border-radius: 22px; background: var(--raised); }
.composer:focus-within { outline: 1px solid #a4c9c0; border-color: #a4c9c0; }
.composer textarea { width: 100%; min-height: 56px; max-height: 150px; field-sizing: content; resize: none; border: 0; outline: none; padding: 13px 7px; font-size: .92rem; line-height: 1.55; background: transparent; caret-color: var(--ink); }
.composer textarea::placeholder { color: var(--muted); }
.composer-foot { justify-content: space-between; min-height: 38px; gap: 6px; padding-bottom: 5px; }
.composer-foot .toolbar { gap: 3px; }
.composer-foot .toolbar .button, .composer-foot .toolbar .icon-button { min-height: 33px; color: var(--muted); }
.composer-foot .toolbar .button { padding-inline: 7px; min-width: 0; font-weight: 500; }
.composer-foot .toolbar .icon-button { flex: none; min-width: 30px; }
.composer-foot .toolbar span { text-overflow: ellipsis; overflow: hidden; }
.composer-foot .toolbar .composer-model { max-width: 200px; }
.send { flex: none; width: 28px; height: 28px; min-height: 28px; border-radius: 50%; padding: 0; }
.send:disabled { opacity: 1; color: #242424; background: #858585; border-color: #858585; }
.composer-files, .turn-files { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.composer-files { margin-top: 10px; }
.composer-files .chip, .turn-files .chip { min-height: 27px; max-width: 100%; font-size: .73rem; padding: 3px 6px; }
.composer-files .chip span, .turn-files .chip span { overflow: hidden; text-overflow: ellipsis; }
.turn { display: grid; gap: 17px; margin-bottom: 28px; }
.user-turn { justify-self: end; max-width: min(83%, 640px); background: var(--soft); border-radius: 12px 12px 4px 12px; padding: 10px 14px; font-size: .91rem; overflow-wrap: anywhere; }
.user-turn p { white-space: pre-wrap; }
.turn-files { margin-top: 7px; }
.agent-turn { display: grid; grid-template-columns: 28px minmax(0,1fr); column-gap: 12px; }
.agent-mark { display: block; }
.agent-content { display: grid; gap: 9px; min-width: 0; }
.agent-content > h3 { font-size: .85rem; font-weight: 675; padding-top: 4px; }
.agent-content > p, .agent-content li { color: var(--ink); font-size: .9rem; line-height: 1.67; }
.agent-content ul { margin: 0; padding-left: 1.3em; }
.research-reply { min-width: 0; overflow-wrap: anywhere; font-size: .92rem; }
.research-reply :is(h4,p,ul,ol,pre) { margin: .35em 0 .75em; }
.research-reply :is(ul,ol) { padding-left: 1.35em; line-height: 1.65; }
.research-reply pre { overflow: auto; padding: 10px; border-radius: 6px; background: var(--soft); }
.turn-status { color: var(--muted); }
.composer-context [data-panel=projects] { min-width: 0; }
.composer-context [data-panel=projects] span { overflow: hidden; text-overflow: ellipsis; }
.activity { max-width: 700px; border-block: 1px solid var(--rule); background: var(--soft); font-size: .82rem; }
.activity summary { padding: 9px 11px; cursor: pointer; font-weight: 630; color: var(--ink); }
.activity-list { display: grid; gap: 0; padding: 0 10px 5px; }
.activity-step { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: start; gap: 8px; padding: 8px 1px; border-top: 1px solid var(--strong-rule); color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.activity-step .ico { color: var(--accent); width: 15px; height: 15px; }
.page { width: min(100%, 1180px); margin-inline: auto; padding: 35px clamp(18px,4vw,52px) 55px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 24px; }
.page-head h2 { font-size: 1.78rem; line-height: 1.25; letter-spacing: -.03em; font-weight: 720; }
.page-head p { font-size: .88rem; color: var(--muted); margin-top: 7px; }
.page-head .button { margin-top: 4px; }
.panel { border-block: 1px solid var(--rule); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 47px; padding: 8px 14px; background: var(--soft); border-bottom: 1px solid var(--rule); }
.panel-head strong { font-size: .83rem; }
.section-nav { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; font-size: .82rem; color: var(--muted); }
.section-nav .button { padding-inline: 4px; border: 0; }
.search { display: flex; align-items: center; gap: 7px; border: 1px solid var(--strong-rule); border-radius: 8px; padding: 0 9px; min-height: 37px; width: min(340px,100%); color: var(--muted); }
.search:focus-within { border-color: #a4c9c0; }
.search .ico { width: 16px; height: 16px; }
.search input { width: 100%; padding: 8px 2px; border: 0; outline: 0; background: transparent; font-size: .84rem; }
.search input::placeholder { color: var(--muted); }
.knowledge-tools { justify-content: space-between; flex-wrap: wrap; margin-bottom: 13px; }
#move-library-files select { width: 100%; font: inherit; padding: .5rem; border: 1px solid var(--strong-rule); border-radius: 7px; background: var(--surface); color: var(--ink); }
.table-scroll { overflow: auto; }
.library-transfer:not([hidden]) {
  display: grid;
  gap: .65rem;
  margin-block: 0 .8rem;
  padding: .75rem .9rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  font-size: .84rem;
}
.library-transfer-item { display: grid; gap: .35rem; min-width: 0; }
.library-transfer-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; }
.library-transfer-heading small, .library-transfer-detail { color: var(--muted); }
.library-transfer-detail, .library-transfer-messages { min-width: 0; overflow-wrap: anywhere; }
.library-transfer progress { width: 100%; height: .55rem; accent-color: #3278d4; }
.library-transfer-result { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.library-transfer-error { color: var(--danger); }
.library-transfer-files { display: grid; gap: .35rem; margin: .45rem 0 0; padding: 0; list-style: none; }
.library-transfer-files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; }
.library-transfer-files button { text-align: start; text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.library-transfer-files small { color: var(--muted); }
.file-table tr[data-revealed-file] { background: color-mix(in srgb, #68a9ff 22%, var(--canvas)); }
.knowledge-page .table-scroll { container: knowledge-files / inline-size; }
.file-table { border-collapse: collapse; table-layout: fixed; width: 100%; text-align: start; font-size: .84rem; }
.file-select-col { width: 2.65rem; }
.file-date-col { width: 7.25rem; }
.file-size-col { width: 5rem; }
.file-action-col { width: 5rem; }
.file-table .file-date { white-space: nowrap; }
.file-table th { text-align: start; color: var(--muted); font-size: .75rem; font-weight: 600; }
.file-table td, .file-table th { padding: 11px 14px; border-bottom: 1px solid var(--rule); }
.file-table tr:last-child td { border-bottom: none; }
.file-table td.meta { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.file-table :is(th, td):first-child { padding-inline-end: 0; }
.file-table :is(th, td):last-child { padding-inline: 4px; text-align: center; }
.file-table .file-name { max-width: 100%; text-align: start; }
.file-title { min-width: 0; overflow-wrap: anywhere; }
.library-result-path { display: block; color: var(--muted); font-weight: 400; }
.knowledge-rules dl { display: grid; gap: .4rem; margin: 0; }
.knowledge-rules dl div { display: grid; grid-template-columns: 5em 1fr; gap: .5rem; }
.knowledge-rules dt { font-weight: 650; }
.knowledge-rules dd { margin: 0; }
.knowledge-rules code { overflow-wrap: anywhere; }
.knowledge-rule-example { color: var(--muted); }
.file-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.file-row-actions .library-delete { color: var(--danger); }
.library-delete-name { overflow-wrap: anywhere; font-weight: 650; }
@media (hover: hover) {
  .file-row-actions .library-delete { opacity: 0; pointer-events: none; }
  .file-table tr:hover .library-delete, .file-row-actions .library-delete:focus-visible {
    opacity: 1; pointer-events: auto;
  }
}
@container knowledge-files (max-width: 500px) {
  .file-select-col { width: 1.7rem; }
  .file-date-col { width: 5.25rem; }
  .file-size-col { width: 3rem; }
  .file-action-col { width: 4rem; }
  .file-table :is(th, td) { padding-inline: 6px; }
  .file-table td.meta { font-size: .72rem; }
  .file-table .icon-button { min-width: 26px; padding: 4px; }
  .file-table .file-name { gap: 5px; }
}
@container knowledge-files (max-width: 335px) {
  .file-name .file-icon { display: none; }
}
.file-table tbody tr:hover { background: var(--surface); }
.file-table tbody tr[data-folder-drag] {
  background: #68a9ff45;
  outline: 2px solid #428cf5;
  outline-offset: -2px;
}
:is(.workspace, .project-assistant)[data-file-drag] { position: relative; }
:is(.workspace, .project-assistant)[data-file-drag]::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  border: 2px solid #428cf5;
  border-radius: inherit;
  background: #68a9ff24;
  pointer-events: none;
}
:is(.workspace, .project-assistant)[data-file-drag]::before {
  content: attr(data-file-drag);
  position: absolute;
  z-index: 9;
  inset-inline-start: 50%;
  inset-block-end: 1rem;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .4rem .75rem;
  border: 1px solid #8abbfc;
  border-radius: 8px;
  background: #eaf3ff;
  color: #123761;
  text-align: center;
  font-size: .84rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  pointer-events: none;
}
input[type=checkbox] { accent-color: var(--accent); }
.file-name, .item-a { display: inline-flex; align-items: center; gap: 9px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: .85rem; font-weight: 635; text-decoration: none; }
.file-name:hover, .item-a:hover { color: var(--accent); }
.file-icon, .item-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: none; color: var(--muted); }
.file-icon.dir { color: var(--amber-ink); }
.file-icon .ico, .item-icon .ico { width: 17px; height: 17px; }
.list-row { width: 100%; min-height: 69px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 0; border-bottom: 1px solid var(--rule); text-align: left; background: transparent; text-decoration: none; color: var(--ink); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface); }
.list-row h3 { font-size: .89rem; }
.list-row p { margin-top: 4px; color: var(--muted); font-size: .81rem; }
.list-row > .ico:last-child { margin-left: auto; color: #a6a6a6; width: 16px; }
.tag { display: inline-flex; align-items: center; white-space: nowrap; color: var(--muted); font-size: .75rem; margin-left: auto; }
.list-row > .tag + .ico:last-child { margin-left: 3px; }
.empty-table { padding: 22px 15px; color: var(--muted); font-size: .86rem; }
.inspector { width: 320px; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--rule); border-left: 0; border-radius: 0 22px 22px 0; background: var(--surface); }
.inspector-head { min-height: 65px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; }
.inspector-head h2 { font-size: .92rem; }
.inspector-body { min-height: 0; overflow: auto; padding: 17px 15px; }
.inspector-body h3 { font-size: .94rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.inspector-body p { color: var(--muted); font-size: .84rem; }
.inspector-body .button { margin-top: 12px; }
.inspector-body .list-row { padding-inline: 0; background: transparent; gap: 8px; }
.inspector-body .list-row p { line-height: 1.35; overflow-wrap: anywhere; }
.setting-form { display: grid; gap: 12px; }
.setting-form label, .dialog-body label { display: grid; gap: 5px; font-size: .81rem; font-weight: 630; }
.setting-form select, .dialog-body input { padding: 8px; border: 1px solid var(--strong-rule); border-radius: 7px; background: var(--surface); }
.dialog-body { display: grid; gap: 13px; padding: 19px; }
.dialog-body h2 { font-size: 1.12rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 7px; }
dialog { width: min(430px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--rule); border-radius: 13px; color: var(--ink); }
dialog::backdrop { background: #0009; }
body:has(.workspace[data-file-drag], .project-assistant[data-file-drag]) > #notice { opacity: 0; }
.notice { pointer-events: none; position: fixed; bottom: 17px; right: 17px; z-index: 10; max-width: calc(100vw - 34px); padding: 9px 12px; border-radius: 9px; color: white; background: #303030; font-size: .82rem; box-shadow: 0 5px 16px #0006; }
.mobile-overlay { display: none; }
@media (max-width: 1060px) {
  :root { --side-width: 212px; }
  .inspector { position: fixed; right: 0; top: 0; bottom: 0; z-index: 5; width: min(345px,91vw); border: 0; border-radius: 0; box-shadow: -10px 0 29px #0007; }
}
@media (max-width: 680px) {
  :root { --chat-gutter: 17px; }
  .shell { grid-template-columns: minmax(0,1fr); padding: 5px; }
  .workspace { border-radius: 16px; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(278px,87vw); padding: 10px 9px; z-index: 8; transform: translateX(-100%); visibility: hidden; }
  .side-toggle { display: none; }
  .side .nav-item, .side .session-item { min-height: 42px; }
  .history-action { width: 34px; min-height: 40px; }
  .history-more { min-height: 40px; }
  .side.open { transform: none; visibility: visible; }
  .mobile-overlay:not([hidden]) { position: fixed; display: block; inset: 0; z-index: 7; background: #0008; }
  .mobile-menu { display: inline-flex !important; margin-left: -6px; }
  .top { min-height: 53px; padding: 7px 11px; gap: 7px; }
  .top-left, .top-actions { gap: 5px; }
  .top .context-name { display: none; }
  .top .preview { font-size: .65rem; }
  .top-actions .button { min-width: 34px; padding: 6px; }
  .composer-wrap { padding-bottom: 12px; }
  .welcome-inner { padding-top: 26px; }
  .composer textarea { min-height: 56px; }
  .welcome h2 { font-size: 1.52rem; }
  .welcome p { font-size: .89rem; }
  .welcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 131px 106px; block-size: auto; gap: 8px; margin-top: 17px; }
  .welcome-card { padding: 12px; border-radius: 16px; }
  .research-card { grid-column: span 2; grid-row: auto; }
  .research-card .welcome-card-copy { max-width: calc(100% - 116px); }
  .welcome-card-title { font-size: .96rem; }
  .welcome-card-title span { font-size: .63rem; }
  .welcome-card-copy { font-size: .76rem; }
  .art-research { inset: auto 8px 10px auto; width: 121px; height: 103px; }
  .art-guide, .art-handoff { inset: auto 5% 7% auto; width: 41%; height: 42%; }
  .composer-shell, .composer { border-radius: 17px; }
  .composer-foot .toolbar .button, .composer-foot .toolbar .icon-button { min-height: 41px; }
  .send { width: 34px; height: 34px; }
  .agent-turn { grid-template-columns: 24px minmax(0,1fr); gap: 8px; }
  .agent-mark { width: 24px; height: 24px; }
  .page { padding: 22px 13px 30px; }
  .page-head h2 { font-size: 1.42rem; }
  .page-head { flex-wrap: wrap; margin-bottom: 17px; }
  .list-row { padding-inline: 10px; }
  .list-row .tag { display: none; }
}
@media (max-width: 360px) {
  .welcome-card-title span { margin-left: 2px; }
  .guide-card .welcome-card-copy, .handoff-card .welcome-card-copy { max-width: 11ch; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.inspector-example { margin-top: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.inspector-body > p + h3 { margin-top: 14px; }

.candidate-page .panel + .panel { margin-top: 24px; }
.candidate-form { display: grid; gap: 16px; max-width: 480px; }
.candidate-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; }
.candidate-form input, .candidate-form select { width: 100%; padding: 9px; background: var(--surface); border: 1px solid var(--strong-rule); border-radius: 7px; }
.candidate-form p { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.candidate-form .candidate-status { color: var(--ink); }
.candidate-status:empty { display: none; }
.candidate-form button { justify-self: start; }
.candidate-table { border-collapse: collapse; width: 100%; font-size: .87rem; text-align: left; }
.candidate-table th, .candidate-table td { border-bottom: 1px solid var(--rule); padding: 10px 12px; min-width: 7em; overflow-wrap: anywhere; white-space: pre-wrap; }
.candidate-table th { background: var(--soft); }
.candidate-paging:not([hidden]) { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.candidate-page .page-head h2, .candidate-page .list-row { overflow-wrap: anywhere; }

#side-resize { display: none; }
@media (min-width: 681px) {
  .shell { position: relative; }
  .shell:not(.side-collapsed) > #side-resize {
    display: block; position: absolute; grid-area: 1 / 1 / 2 / 2; z-index: 3;
    right: -5px; top: 8px; bottom: 8px; width: 10px; cursor: col-resize; touch-action: none;
  }
  #side-resize::after {
    content: ''; position: absolute; inset: 0 4px; border-radius: 2px;
    background: var(--accent); opacity: 0; transition: opacity 120ms;
  }
  #side-resize:hover::after, #side-resize:focus-visible::after, .side-dragging #side-resize::after { opacity: .8; }
  .side-dragging, .side-dragging * { cursor: col-resize !important; user-select: none; }
  .side-dragging iframe { pointer-events: none; }
  @media (prefers-reduced-motion: no-preference) {
    .shell:not(.side-dragging) { transition: grid-template-columns 170ms ease-out; }
  }
}
.composer-shell { position: relative; }
.slash-menu {
  position: absolute; bottom: calc(100% + 6px); inset-inline: 0; z-index: 3;
  max-height: min(330px, 40dvh); overflow-y: auto; overscroll-behavior: contain;
  padding: 5px; border: 1px solid var(--strong-rule); border-radius: 14px;
  background: var(--raised); box-shadow: 0 5px 18px #0002;
}
.slash-option {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
  padding: 6px 10px; text-align: left; background: transparent; border: 0; border-radius: 8px;
}
.slash-option span { min-width: 0; }
.slash-option strong, .slash-option small { display: block; overflow-wrap: anywhere; }
.slash-option small, .slash-empty { color: var(--muted); font-size: .78rem; }
.slash-option .ico { width: 17px; flex: none; }
.slash-option:hover, .slash-option[aria-selected=true] { background: var(--soft); }
.slash-empty { padding: 10px; }
