:root {
  --bg: #071018;
  --surface: #0d1b24;
  --surface-raised: #11232d;
  --surface-soft: #0a161e;
  --line: #203642;
  --line-strong: #31515e;
  --text: #e6f1f2;
  --muted: #89a3ab;
  --faint: #58747e;
  --cyan: #27d3c2;
  --cyan-dark: #123c3b;
  --amber: #f2b84b;
  --amber-dark: #3b301b;
  --red: #f06464;
  --red-dark: #3d2025;
  --nav-width: 208px;
  --copilot-width: 304px;
  --radius: 12px;
  font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 360px; background: var(--bg); font-size: 13px; line-height: 1.55; }
button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.prototype-ribbon { height: 28px; display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--amber); color: #201b10; font-size: 11px; letter-spacing: .02em; }
.prototype-ribbon strong { font-family: "IBM Plex Mono", monospace; letter-spacing: .12em; }
.app-shell { display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr) var(--copilot-width); height: 100vh; min-height: 650px; }
.navigation { display: flex; flex-direction: column; padding: 20px 14px 14px; border-right: 1px solid var(--line); background: #09141c; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--cyan); border: 1px solid var(--line-strong); background: var(--surface); border-radius: 9px; }
.brand-mark svg { width: 23px; height: 23px; }
.brand strong { display: block; font-size: 15px; letter-spacing: .02em; }
.brand span { display: block; margin-top: 1px; font: 9px "IBM Plex Mono", monospace; color: var(--faint); letter-spacing: .13em; }
.nav-caption { padding: 12px 10px 7px; color: var(--faint); font: 10px "IBM Plex Mono", monospace; letter-spacing: .12em; }
.nav-item { position: relative; display: flex; align-items: center; width: 100%; gap: 11px; padding: 10px 11px; margin: 2px 0; text-align: left; background: transparent; color: var(--muted); border-radius: 7px; transition: background .18s, color .18s; }
.nav-item svg { width: 17px; height: 17px; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { color: var(--cyan); background: var(--cyan-dark); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 2px; background: var(--cyan); }
.nav-item kbd { margin-left: auto; color: var(--faint); font: 10px "IBM Plex Mono", monospace; }
.nav-count { margin-left: auto; padding: 0 6px; border-radius: 8px; background: var(--surface-raised); color: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.live-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px #27d3c212; }
.nav-spacer { flex: 1; min-height: 24px; }
.system-card { padding: 12px; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.system-title { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; font-size: 12px; }
.system-row { display: flex; justify-content: space-between; margin-top: 5px; color: var(--faint); font-size: 10px; }
.system-row b { color: var(--muted); font-weight: 500; }
.profile { display: flex; align-items: center; gap: 9px; padding: 12px 7px 2px; border-top: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--cyan); background: var(--cyan-dark); font-weight: 700; }
.profile strong, .profile span { display: block; }
.profile strong { font-size: 12px; }
.profile span { color: var(--faint); font-size: 10px; }
.workspace { min-width: 0; overflow: auto; }
.topbar { position: sticky; top: 0; z-index: 20; height: 65px; display: flex; align-items: center; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--line); background: #071018f2; backdrop-filter: blur(14px); }
.page-identity { min-width: 150px; }
.page-identity span { display: block; color: var(--faint); font: 9px "IBM Plex Mono", monospace; letter-spacing: .12em; }
.page-identity strong { font-size: 14px; }
.search { display: flex; align-items: center; gap: 8px; width: min(300px, 30%); margin-left: auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); color: var(--faint); }
.search svg { width: 15px; height: 15px; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.search input::placeholder { color: var(--faint); }
.search kbd { font: 10px "IBM Plex Mono", monospace; }
.route-chip { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.route-chip span, .route-chip strong { display: block; }
.route-chip div > span { color: var(--faint); font-size: 9px; }
.route-chip strong { font: 10px "IBM Plex Mono", monospace; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-dot.ok { background: var(--cyan); box-shadow: 0 0 0 4px #27d3c212; }
.icon-button { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: transparent; color: var(--muted); }
.icon-button:hover { color: var(--text); background: var(--surface-raised); }
.icon-button svg { width: 16px; height: 16px; }
.clock { color: var(--muted); font: 10px "IBM Plex Mono", monospace; white-space: nowrap; }
.main-content { width: 100%; max-width: 1720px; margin: 0 auto; padding: 26px 26px 42px; }
.view { animation: view-enter .22s ease-out; }
@keyframes view-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { margin-bottom: 5px; color: var(--cyan); font: 9px "IBM Plex Mono", monospace; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(23px, 2vw, 31px); line-height: 1.25; letter-spacing: -.025em; }
.view-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 7px; font-weight: 600; white-space: nowrap; }
.primary-button { color: #062321; background: var(--cyan); }
.primary-button:hover { background: #55dfd2; }
.secondary-button { color: var(--text); background: var(--surface-raised); border: 1px solid var(--line); }
.primary-button svg { width: 15px; height: 15px; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.metric { position: relative; padding: 16px 18px; text-align: left; background: transparent; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric:hover { background: var(--surface-raised); }
.metric > span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin: 4px 0 1px; font: 26px "IBM Plex Mono", monospace; letter-spacing: -.04em; }
.metric strong small { margin-left: 4px; color: var(--muted); font: 11px "Noto Sans SC", sans-serif; }
.metric em { color: var(--faint); font-size: 10px; font-style: normal; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 16px; }
.secondary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel { min-width: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-heading > div { display: flex; align-items: center; gap: 8px; }
.panel-heading h2 { margin: 0; font-size: 13px; font-weight: 650; }
.section-index { color: var(--faint); font: 9px "IBM Plex Mono", monospace; }
.live-label { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); font: 9px "IBM Plex Mono", monospace; }
.live-label i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px #27d3c211; } }
.flywheel-panel { min-height: 410px; background-image: linear-gradient(#20364220 1px, transparent 1px), linear-gradient(90deg, #20364220 1px, transparent 1px); background-size: 32px 32px; }
.flywheel { position: relative; width: min(100%, 640px); height: 310px; margin: 0 auto; }
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit ellipse { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 7; }
.orbit .orbit-inner { stroke: #27d3c240; stroke-dasharray: 2 6; }
.orbit .flow-line { fill: none; stroke: var(--cyan); stroke-width: 1.3; stroke-dasharray: 4 9; opacity: .55; animation: dash 12s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -130; } }
.core-node { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 114px; height: 114px; border: 1px solid #27d3c277; border-radius: 50%; background: #0e282c; box-shadow: 0 0 0 12px #27d3c208; }
.core-node:hover { border-color: var(--cyan); }
.core-node span { color: var(--cyan); font: 8px "IBM Plex Mono", monospace; letter-spacing: .15em; }
.core-node strong { font: 32px "IBM Plex Mono", monospace; }
.core-node small { color: var(--muted); font-size: 10px; }
.orbit-node { position: absolute; display: flex; flex-direction: column; align-items: flex-start; min-width: 92px; padding: 9px 11px; text-align: left; border: 1px solid var(--line-strong); border-radius: 8px; background: #10232c; box-shadow: 0 5px 15px #00000020; transition: border-color .18s, transform .18s; }
.orbit-node:hover { border-color: var(--cyan); transform: translateY(-2px); }
.orbit-node i { position: absolute; top: 9px; right: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.orbit-node strong { font-size: 11px; }
.orbit-node span { color: var(--muted); font: 10px "IBM Plex Mono", monospace; }
.orbit-node.n1 { left: 8%; top: 12%; }
.orbit-node.n2 { left: 41%; top: 0; }
.orbit-node.n3 { right: 5%; top: 19%; }
.orbit-node.n4 { right: 11%; bottom: 8%; }
.orbit-node.n5 { left: 39%; bottom: 0; }
.orbit-node.n6 { left: 5%; bottom: 14%; }
.orbit-node.flash { animation: node-flash .7s ease; }
@keyframes node-flash { 50% { border-color: var(--cyan); box-shadow: 0 0 0 7px #27d3c217; } }
.flywheel-footer { display: flex; align-items: center; gap: 18px; color: var(--faint); font-size: 10px; }
.flywheel-footer > span { display: flex; align-items: center; gap: 5px; }
.flywheel-footer button { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--cyan); background: transparent; }
.flywheel-footer svg, .inline-link svg { width: 13px; height: 13px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.cyan { background: var(--cyan); }
.legend-dot.amber { background: var(--amber); }
.legend-dot.red { background: var(--red); }
.task-list { display: flex; flex-direction: column; }
.task-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; text-align: left; border-bottom: 1px solid var(--line); background: transparent; }
.task-row:hover strong { color: var(--cyan); }
.task-row > span:nth-child(2) { min-width: 0; flex: 1; }
.task-row strong, .task-row small { display: block; }
.task-row strong { font-size: 11px; }
.task-row small { margin-top: 3px; color: var(--faint); font-size: 9px; white-space: nowrap; }
.task-row > b { color: var(--cyan); font-size: 9px; font-weight: 500; white-space: nowrap; }
.task-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 7px; color: var(--muted); background: var(--surface-raised); }
.task-icon svg { width: 15px; height: 15px; }
.task-icon.running { color: var(--cyan); background: var(--cyan-dark); }
.task-icon.waiting { color: var(--amber); background: var(--amber-dark); }
.task-summary { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 15px; color: var(--muted); font-size: 10px; }
.task-summary strong { font: 15px "IBM Plex Mono", monospace; }
.task-summary small { font-size: 9px; }
.task-summary > div { grid-column: 1 / -1; height: 3px; background: var(--line); }
.task-summary > div i { display: block; height: 100%; background: var(--cyan); }
.status-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; font-size: 9px; white-space: nowrap; }
.status-badge.ok { color: var(--cyan); background: var(--cyan-dark); }
.status-badge.waiting { color: var(--amber); background: var(--amber-dark); }
.status-badge.neutral { color: var(--muted); background: var(--surface-raised); }
.memory-readout { display: flex; align-items: flex-end; justify-content: space-between; margin: 18px 0 12px; }
.memory-readout span { display: block; color: var(--muted); font-size: 10px; }
.memory-readout strong { font: 27px "IBM Plex Mono", monospace; }
.memory-readout small { margin-left: 3px; color: var(--muted); font-size: 10px; }
.memory-target { text-align: right; }
.memory-target strong { color: var(--muted); font-size: 18px; }
.memory-track { position: relative; height: 6px; margin: 12px 0; background: var(--line); }
.memory-track i { display: block; width: 88.75%; height: 100%; background: var(--amber); }
.memory-track > span { position: absolute; top: -4px; width: 1px; height: 14px; background: var(--text); }
.memory-track.large { height: 8px; margin: 16px 0 20px; }
.window-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--faint); font-size: 9px; }
.inline-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; padding: 0; color: var(--cyan); background: transparent; font-size: 10px; }
.pipeline-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.pipeline-mini > div { position: relative; min-width: 0; }
.pipeline-mini > div:not(:last-child)::after { content: ""; position: absolute; left: 24px; right: -5px; top: 11px; height: 1px; background: var(--line-strong); }
.pipeline-mini i { position: relative; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 8px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--faint); background: var(--surface); font: 8px "IBM Plex Mono", monospace; font-style: normal; }
.pipeline-mini svg { width: 12px; height: 12px; }
.pipeline-mini span, .pipeline-mini small { display: block; }
.pipeline-mini span { font-size: 10px; }
.pipeline-mini small { margin-top: 4px; color: var(--faint); font: 8px "IBM Plex Mono", monospace; white-space: normal; }
.pipeline-mini .complete i { color: var(--cyan); border-color: var(--cyan); }
.pipeline-mini .active i { color: var(--amber); border-color: var(--amber); }
.events-panel { margin-top: 16px; }
.event-row { display: grid; grid-template-columns: 64px 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px 0; text-align: left; border-top: 1px solid var(--line); background: transparent; }
.event-row time { color: var(--faint); font: 9px "IBM Plex Mono", monospace; }
.event-row strong, .event-row small { display: block; }
.event-row strong { font-size: 10px; }
.event-row small { margin-top: 2px; color: var(--faint); font-size: 9px; }
.event-row > b { color: var(--muted); font-size: 9px; font-weight: 500; }
.event-row:hover > b { color: var(--cyan); }
.event-mark { width: 6px; height: 6px; border-radius: 50%; }
.event-mark.ok { background: var(--cyan); }
.event-mark.waiting { background: var(--amber); }
.muted { color: var(--faint); font-size: 10px; }
.cyan-text { color: var(--cyan) !important; }
.amber-text { color: var(--amber) !important; }
.red-text { color: var(--red) !important; }
.text-button { padding: 0; color: var(--cyan); background: transparent; font-size: 10px; }
.task-workspace { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(340px, 1.5fr) minmax(210px, .75fr); gap: 16px; min-height: 610px; }
.thread { display: block; width: 100%; padding: 12px; margin-bottom: 7px; text-align: left; border: 1px solid transparent; border-radius: 8px; background: transparent; }
.thread:hover, .thread.active { border-color: var(--line-strong); background: var(--surface-raised); }
.thread.active { border-left-color: var(--cyan); }
.thread strong, .thread small, .thread span { display: block; }
.thread strong { font-size: 11px; }
.thread small { margin: 4px 0; color: var(--muted); font-size: 9px; }
.thread span { color: var(--faint); font-size: 9px; }
.conversation-panel { display: flex; flex-direction: column; }
.conversation { flex: 1; min-height: 400px; max-height: 500px; overflow: auto; }
.message { max-width: 90%; margin-bottom: 18px; }
.message > span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 9px; }
.message p { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: 11px; line-height: 1.8; }
.message.user { margin-left: auto; }
.message.user p { background: #18343a; }
.message.assistant p { border: 1px solid var(--line); background: var(--surface-soft); }
.evidence-block { margin-top: 8px; padding: 12px; border-left: 2px solid var(--cyan); background: var(--cyan-dark); }
.evidence-block strong { font-size: 10px; }
.evidence-block p { padding: 5px 0 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.message-form, .copilot-form { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.message-form input, .copilot-form input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--text); background: var(--surface-soft); font-size: 11px; }
.message-form input:focus, .copilot-form input:focus { border-color: var(--cyan); }
.message-form button, .copilot-form button { display: grid; place-items: center; width: 38px; border-radius: 7px; color: #062321; background: var(--cyan); }
.message-form svg, .copilot-form svg { width: 16px; height: 16px; }
.trace-step { position: relative; display: flex; gap: 10px; padding: 9px 0 18px; }
.trace-step:not(:last-of-type)::after { content: ""; position: absolute; left: 4px; top: 19px; bottom: 0; width: 1px; background: var(--line-strong); }
.trace-step i { width: 9px; height: 9px; margin-top: 4px; border: 1px solid var(--line-strong); border-radius: 50%; }
.trace-step.done i { border-color: var(--cyan); background: var(--cyan); }
.trace-step.active i { border-color: var(--amber); background: var(--amber); }
.trace-step strong, .trace-step span { display: block; }
.trace-step strong { font-size: 11px; }
.trace-step span { color: var(--faint); font-size: 9px; }
.trace-note { margin-top: 18px; padding: 10px; border: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.production-flow { display: grid; grid-template-columns: repeat(6, 1fr); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.production-flow button { position: relative; padding: 13px 15px; text-align: left; border-right: 1px solid var(--line); background: var(--surface); }
.production-flow button:last-child { border-right: 0; }
.production-flow i { display: block; color: var(--faint); font: 8px "IBM Plex Mono", monospace; font-style: normal; }
.production-flow strong { display: block; margin: 5px 0; font-size: 11px; }
.production-flow span { color: var(--cyan); font: 18px "IBM Plex Mono", monospace; }
.production-flow .attention { background: var(--amber-dark); }
.production-flow .attention span { color: var(--amber); }
.production-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 9px 8px; color: var(--faint); border-bottom: 1px solid var(--line-strong); font-size: 9px; font-weight: 500; }
td { padding: 13px 8px; border-bottom: 1px solid var(--line); font-size: 10px; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--faint); font-size: 9px; }
.device-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.device { padding: 12px 8px; text-align: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.device i { display: block; width: 6px; height: 6px; margin: 0 auto 6px; border-radius: 50%; background: var(--cyan); }
.device strong { display: block; font: 10px "IBM Plex Mono", monospace; }
.device span { color: var(--faint); font-size: 8px; }
.device.offline { border-color: #f0646444; }
.device.offline i { background: var(--red); }
.device-legend { display: flex; align-items: center; gap: 12px; margin-top: 15px; color: var(--faint); font-size: 9px; }
.device-legend > span { display: flex; align-items: center; gap: 4px; }
.device-legend button { margin-left: auto; }
.model-hero-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(220px, .65fr); gap: 16px; }
.evolution-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 25px; }
.evolution-step { position: relative; min-width: 0; padding: 13px 10px; border: 1px solid var(--line); background: var(--surface-soft); }
.evolution-step:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 40%; z-index: 2; color: var(--faint); }
.evolution-step > span { color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.evolution-step strong, .evolution-step small, .evolution-step b { display: block; }
.evolution-step strong { margin: 9px 0 5px; font-size: 11px; }
.evolution-step small { min-height: 28px; color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.evolution-step b { margin-top: 10px; color: var(--muted); font-size: 9px; font-weight: 500; }
.evolution-step.complete { border-top-color: var(--cyan); }
.evolution-step.complete b { color: var(--cyan); }
.evolution-step.active { border-top-color: var(--amber); }
.evolution-step.active b { color: var(--amber); }
.share-value { margin: 20px 0; color: var(--cyan); font: 46px "IBM Plex Mono", monospace; letter-spacing: -.06em; }
.share-value small { margin-left: 4px; font-size: 18px; }
.share-track { position: relative; height: 7px; background: var(--line); }
.share-track i { display: block; width: 22.4%; height: 100%; background: var(--cyan); }
.share-track span { position: absolute; left: 50%; top: -4px; width: 1px; height: 15px; background: var(--amber); }
.share-labels { display: flex; justify-content: space-between; margin-top: 7px; color: var(--faint); font-size: 9px; }
.local-share p { margin: 25px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.model-detail-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.3fr); gap: 16px; margin-top: 16px; }
.resource-number { display: flex; align-items: baseline; gap: 8px; }
.resource-number strong { color: var(--amber); font: 39px "IBM Plex Mono", monospace; }
.resource-number span { color: var(--muted); font: 13px "IBM Plex Mono", monospace; }
.resource-list { margin: 0; }
.resource-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 10px; }
.resource-list dt { color: var(--faint); }
.resource-list dd { margin: 0; text-align: right; }
.candidate-current { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-soft); }
.candidate-current span, .candidate-current strong { display: block; }
.candidate-current div > span { color: var(--faint); font-size: 9px; }
.candidate-current strong { font: 12px "IBM Plex Mono", monospace; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.score-grid > div { padding: 10px; border: 1px solid var(--line); }
.score-grid span, .score-grid strong, .score-grid small { display: block; }
.score-grid span { color: var(--muted); font-size: 9px; }
.score-grid strong { margin: 5px 0; font: 20px "IBM Plex Mono", monospace; }
.score-grid small { color: var(--faint); font-size: 8px; }
.candidate-note { padding: 10px; color: var(--muted); border-left: 2px solid var(--amber); background: var(--amber-dark); font-size: 10px; }
.copilot { display: flex; flex-direction: column; min-width: 0; padding: 18px 15px; border-left: 1px solid var(--line); background: #09141c; }
.copilot-heading { display: flex; align-items: center; justify-content: space-between; }
.copilot-heading > div { display: flex; align-items: center; gap: 9px; }
.copilot-mark { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--cyan); }
.copilot-mark svg { width: 16px; height: 16px; }
.copilot-heading strong, .copilot-heading span { display: block; }
.copilot-heading strong { font-size: 12px; }
.copilot-heading div > div > span { color: var(--faint); font-size: 9px; }
.copilot-context { margin: 20px 0 16px; padding: 12px; border: 1px solid var(--line); background: var(--surface-soft); }
.copilot-context span, .copilot-context strong, .copilot-context small { display: block; }
.copilot-context span { color: var(--faint); font-size: 9px; }
.copilot-context strong { margin: 3px 0; font-size: 12px; }
.copilot-context small { color: var(--faint); font-size: 9px; }
.copilot-suggestions > span { color: var(--faint); font-size: 9px; }
.copilot-suggestions button { display: flex; align-items: center; gap: 7px; width: 100%; padding: 11px 0; text-align: left; border-bottom: 1px solid var(--line); background: transparent; font-size: 10px; }
.copilot-suggestions button svg { width: 13px; height: 13px; margin-left: auto; color: var(--faint); }
.copilot-messages { flex: 1; min-height: 150px; margin: 18px 0; overflow: auto; }
.copilot-message { margin-bottom: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.copilot-message.user-message { background: #18343a; }
.copilot-message strong { color: var(--cyan); font-size: 9px; }
.copilot-message p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.copilot-fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 8px; color: #062321; background: var(--cyan); box-shadow: 0 8px 30px #00000055; }
.copilot-fab svg { width: 17px; height: 17px; }
.copilot-fab span { font-size: 11px; font-weight: 700; }
dialog { width: min(520px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--surface); box-shadow: 0 30px 100px #00000077; }
dialog::backdrop { background: #02070bd9; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-heading h2 { margin: 0; font-size: 18px; }
#dialog-content { margin: 18px 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
#dialog-content dl > div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
#dialog-content dd { margin: 0; color: var(--text); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: #142831; box-shadow: 0 8px 35px #00000055; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .18s, transform .18s; font-size: 11px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
@media (max-width: 1500px) {
  :root { --copilot-width: 0px; }
  .copilot { display: none; }
  .copilot-fab { display: flex !important; }
  .copilot.mobile-open { display: flex; position: fixed; right: 0; top: 0; bottom: 0; z-index: 40; width: 304px; --copilot-width: 304px; box-shadow: -20px 0 50px #00000066; }
}
@media (max-width: 1280px) {
  :root { --nav-width: 178px; }
  .main-content { padding: 22px 20px 36px; }
  .topbar { padding: 0 18px; gap: 12px; }
  .route-chip { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .flywheel-panel { min-height: 400px; }
  .task-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .trace-panel { display: none; }
  .production-layout, .model-detail-grid { grid-template-columns: 1fr; }
  .model-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 64px minmax(0, 1fr); }
  .navigation { padding: 16px 8px; }
  .brand { padding: 0 4px 22px; }
  .brand > div:last-child, .nav-caption, .nav-item span, .nav-item kbd, .nav-count, .system-card, .profile > div:last-child { display: none; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .nav-item.active::before { left: -8px; }
  .profile { justify-content: center; padding: 12px 0 0; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .secondary-grid, .production-layout { grid-template-columns: 1fr; }
  .search { display: none; }
  .production-flow { grid-template-columns: repeat(3, 1fr); }
  .production-flow button:nth-child(3) { border-right: 0; }
  .production-flow button:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .evolution-steps { grid-template-columns: 1fr; }
  .evolution-step:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -17px; }
}
@media (max-width: 640px) {
  .prototype-ribbon span { display: none; }
  .topbar { height: 58px; padding: 0 12px; }
  .page-identity { min-width: 0; }
  .clock { margin-left: auto; }
  .main-content { padding: 18px 12px 30px; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .view-heading p { font-size: 11px; }
  .metric { padding: 13px; }
  .metric strong { font-size: 22px; }
  .flywheel { height: 270px; transform: scale(.86); transform-origin: center; }
  .flywheel-footer { flex-wrap: wrap; }
  .pipeline-mini { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .pipeline-mini > div:nth-child(2)::after { display: none; }
  .window-meta { flex-direction: column; }
  .task-workspace { grid-template-columns: 1fr; }
  .thread-panel { display: flex; gap: 8px; overflow: auto; }
  .thread-panel .panel-heading { display: none; }
  .thread { min-width: 190px; }
  .event-row { grid-template-columns: 48px 8px minmax(0, 1fr); }
  .event-row > b { display: none; }
  .event-row small { white-space: normal; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Evolution intelligence hub */
.evolution-tabs { display: flex; gap: 3px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); overflow-x: auto; }
.evolution-tab { flex: 1; min-width: 110px; padding: 9px 12px; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; white-space: nowrap; }
.evolution-tab:hover { color: var(--text); background: var(--surface-raised); }
.evolution-tab.active { color: var(--cyan); background: var(--cyan-dark); }
.evo-view { animation: view-enter .2s ease-out; }
.evo-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .65fr); gap: 16px; }
.dream-list { display: grid; gap: 10px; }
.dream-item { display: block; width: 100%; padding: 14px; text-align: left; border: 1px solid var(--line); border-left: 2px solid var(--cyan); border-radius: 8px; background: var(--surface-soft); }
.dream-item:hover, .knowledge-item:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.dream-item.rejected { border-left-color: var(--faint); opacity: .65; }
.dream-item > div, .knowledge-item > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dream-item strong, .knowledge-item strong { display: block; margin: 10px 0 5px; font-size: 12px; }
.dream-item p, .knowledge-item p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.dream-item footer, .knowledge-item footer { display: flex; justify-content: space-between; margin-top: 10px; color: var(--faint); font: 9px "IBM Plex Mono", monospace; }
.confidence { color: var(--cyan); font: 9px "IBM Plex Mono", monospace; }
.dream-count { padding: 18px 0; border-bottom: 1px solid var(--line); }
.dream-count span { display: block; color: var(--muted); }
.dream-count strong { color: var(--cyan); font: 38px "IBM Plex Mono", monospace; }
.quality-rule { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.quality-rule i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; }
.quality-rule i.ok { background: var(--cyan); }
.quality-rule i.bad { background: var(--red); }
.quality-rule strong, .quality-rule span { display: block; }
.quality-rule strong { font-size: 11px; }
.quality-rule span { margin-top: 3px; color: var(--faint); font-size: 9px; }
.mini-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; color: var(--muted); font-size: 9px; }
.mini-flow b { color: var(--cyan); }
.neuron-map { position: relative; height: 390px; }
.neuron-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.neuron-map > svg path { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.neuron-map > svg .neuron-active-line { stroke: var(--cyan); stroke-dasharray: 5 8; opacity: .55; animation: dash 8s linear infinite; }
.neuron-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 126px; height: 126px; border: 1px solid var(--cyan); border-radius: 50%; background: #0e282c; box-shadow: 0 0 0 16px #27d3c208; }
.neuron-core span { color: var(--cyan); font: 8px "IBM Plex Mono", monospace; }
.neuron-core strong { font-size: 15px; }
.neuron-core small { color: var(--muted); }
.neuron-node { position: absolute; min-width: 126px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-raised); }
.neuron-node.selected { border-color: var(--cyan); box-shadow: 0 0 0 4px #27d3c211; }
.neuron-node strong, .neuron-node span, .neuron-node small { display: block; }
.neuron-node strong { font-size: 11px; }
.neuron-node span { margin-top: 4px; color: var(--cyan); font: 10px "IBM Plex Mono", monospace; }
.neuron-node small { color: var(--faint); font: 9px "IBM Plex Mono", monospace; }
.neuron-node.nn1 { left: 5%; top: 8%; }
.neuron-node.nn2 { right: 4%; top: 7%; }
.neuron-node.nn3 { right: 3%; bottom: 8%; }
.neuron-node.nn4 { left: 4%; bottom: 9%; }
.neuron-node.flash { animation: node-flash .7s ease; }
.neuron-weight { color: var(--cyan); font: 52px "IBM Plex Mono", monospace; letter-spacing: -.06em; }
.neuron-inspector .resource-list { margin-top: 20px; }
.neuron-inspector .candidate-note { margin-top: 22px; }
.distill-pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0; }
.distill-stage { position: relative; min-height: 105px; padding: 15px 12px; border: 1px solid var(--line); background: var(--surface-soft); }
.distill-stage:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 43%; color: var(--faint); }
.distill-stage i { color: var(--faint); font: 9px "IBM Plex Mono", monospace; font-style: normal; }
.distill-stage strong, .distill-stage span { display: block; }
.distill-stage strong { margin: 10px 0 5px; font-size: 11px; }
.distill-stage span { color: var(--faint); font-size: 9px; }
.distill-stage.complete { border-top-color: var(--cyan); }
.distill-stage.complete i, .distill-stage.active i { color: var(--cyan); }
.distill-stage.active { border-color: var(--amber); background: var(--amber-dark); }
.distill-result { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(230px, .55fr); gap: 16px; margin-top: 16px; }
.sample-user { padding: 11px 13px; margin-bottom: 12px; border-left: 2px solid var(--line-strong); color: var(--muted); background: var(--surface-soft); font-size: 11px; }
.four-parts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.four-parts > div { padding: 12px; border: 1px solid var(--line); }
.four-parts b { color: var(--cyan); font-size: 10px; }
.four-parts p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.feedback-actions { display: flex; gap: 7px; }
.feedback-table tr { cursor: pointer; }
.feedback-table tr.selected { background: var(--cyan-dark); }
.feedback-table td:first-child { border-left: 2px solid transparent; }
.feedback-table tr.selected td:first-child { border-left-color: var(--cyan); }
.feedback-table td strong, .feedback-table td small { display: block; }
.feedback-table td small { margin-top: 4px; color: var(--faint); }
.confidence-value, .hit-value { font: 12px "IBM Plex Mono", monospace; }
.loop-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.loop-step i { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--cyan); font: 8px "IBM Plex Mono", monospace; font-style: normal; }
.loop-step strong, .loop-step span { display: block; }
.loop-step strong { font-size: 11px; }
.loop-step span { color: var(--faint); font-size: 9px; }
.feedback-loop .candidate-note { margin-top: 20px; }
.knowledge-search { display: flex; align-items: center; gap: 7px; padding: 5px 7px 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.knowledge-search svg { width: 14px; height: 14px; color: var(--faint); }
.knowledge-search input { width: 230px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 10px; }
.knowledge-search button { padding: 5px 9px; border-radius: 5px; color: #062321; background: var(--cyan); font-size: 10px; }
.knowledge-meta { display: flex; justify-content: space-between; margin-bottom: 13px; color: var(--faint); font-size: 9px; }
.knowledge-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.knowledge-item { padding: 14px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.knowledge-item > div > span:last-child { color: var(--faint); font: 9px "IBM Plex Mono", monospace; }
.knowledge-empty { padding: 40px; text-align: center; color: var(--faint); }
@media (max-width: 1280px) {
  .evo-layout, .distill-result { grid-template-columns: 1fr; }
  .dream-side, .neuron-inspector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
  .dream-side .panel-heading, .neuron-inspector .panel-heading { grid-column: 1 / -1; }
  .dream-side .mini-flow { grid-column: 1 / -1; }
  .distill-pipeline { grid-template-columns: repeat(3, 1fr); }
  .distill-stage:nth-child(3)::after { display: none; }
}
@media (max-width: 700px) {
  .dream-side, .neuron-inspector, .knowledge-list, .four-parts { grid-template-columns: 1fr; }
  .neuron-map { height: 320px; transform: scale(.84); transform-origin: center; }
  .distill-pipeline { grid-template-columns: 1fr; }
  .distill-stage:not(:last-child)::after { content: "↓"; right: 50%; top: auto; bottom: -17px; }
  .distill-stage:nth-child(3)::after { display: block; }
  .knowledge-search input { width: 130px; }
  .knowledge-meta { flex-direction: column; gap: 4px; }
  .feedback-actions { flex-direction: column; }
}

/* Brief dock */
.brief-dock { overflow: hidden; }
.brief-context { margin: 18px 0 12px; padding: 10px 11px; border: 1px solid var(--line); background: var(--surface-soft); }
.brief-context span, .brief-context strong, .brief-context small { display: block; }
.brief-context span { color: var(--faint); font-size: 9px; }
.brief-context strong { margin: 3px 0; font-size: 11px; }
.brief-context small { color: var(--faint); font-size: 9px; }
.brief-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.brief-filters button { padding: 6px 4px; border-radius: 5px; color: var(--muted); background: transparent; font-size: 10px; }
.brief-filters button.active { color: var(--cyan); background: var(--cyan-dark); }
.brief-filters button span { display: inline-grid; place-items: center; min-width: 15px; height: 15px; margin-left: 2px; border-radius: 8px; color: #201b10; background: var(--amber); font: 8px "IBM Plex Mono", monospace; }
.brief-list { flex: 1; min-height: 0; margin-top: 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.brief-card { display: block; width: 100%; margin-bottom: 9px; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.brief-card:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.brief-card.unread { border-left-color: var(--cyan); }
.brief-card.unread .brief-meta i { background: var(--cyan); }
.brief-card.read { opacity: .68; }
.brief-meta { display: flex; align-items: center; gap: 8px; }
.brief-meta time { margin-left: auto; color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.brief-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.brief-source { color: var(--cyan); font-size: 9px; }
.brief-card > strong { display: block; margin: 9px 0 6px; font-size: 11px; line-height: 1.55; }
.brief-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.75; }
.brief-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--faint); font-size: 8px; }
.brief-card footer b { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-weight: 500; }
.brief-card footer svg { width: 11px; height: 11px; }
.brief-empty { flex: 1; display: grid; place-items: center; color: var(--faint); font-size: 10px; }
.brief-all { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--cyan); background: var(--surface); font-size: 10px; }
.brief-all svg { width: 13px; height: 13px; }

/* Model configuration workspace */
.model-tabs { max-width: 430px; }
.current-model-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; border-color: #27d3c244; background: #0d2228; }
.current-model-main { display: flex; align-items: center; gap: 16px; }
.provider-logo { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #27d3c266; border-radius: 12px; color: var(--cyan); background: var(--cyan-dark); font: 17px "IBM Plex Mono", monospace; }
.current-model-main h2 { margin: 0; font: 25px "IBM Plex Mono", monospace; }
.current-model-main p { display: flex; align-items: center; gap: 7px; margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.current-model-main p b { color: var(--cyan); font: 9px "IBM Plex Mono", monospace; }
.current-model-actions { display: flex; align-items: center; gap: 8px; }
.connection-ok { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; color: var(--cyan); font-size: 9px; }
.connection-ok i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.provider-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.provider-card { padding: 13px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.provider-card:hover, .provider-card.selected { border-color: var(--cyan); }
.provider-card.selected { background: var(--cyan-dark); }
.provider-card > div { display: flex; align-items: center; justify-content: space-between; }
.provider-mini-logo { display: grid; place-items: center; width: 29px; height: 25px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); font: 9px "IBM Plex Mono", monospace; }
.provider-card > strong { display: block; margin-top: 11px; font-size: 12px; }
.provider-card p { margin: 3px 0 10px; color: var(--faint); font: 9px "IBM Plex Mono", monospace; }
.provider-card footer { display: flex; justify-content: space-between; color: var(--faint); font-size: 9px; }
.provider-card footer b { color: var(--cyan); font-weight: 500; }
.config-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 14px; }
.config-bottom-grid { grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); margin-top: 14px; }
.route-config-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.route-order { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--cyan); font: 9px "IBM Plex Mono", monospace; }
.route-config-row > div:nth-child(2) { flex: 1; }
.route-config-row strong, .route-config-row small { display: block; }
.route-config-row strong { font-size: 11px; }
.route-config-row small { color: var(--faint); font-size: 9px; }
.route-arrows { display: flex; gap: 3px; }
.route-arrows button { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface-soft); }
.route-arrows button:hover { color: var(--cyan); border-color: var(--cyan); }
.route-config .candidate-note { margin-top: 14px; }
.range-field { display: block; margin: 13px 0 18px; }
.range-field > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.range-field output { color: var(--cyan); font: 12px "IBM Plex Mono", monospace; }
.range-field input { width: 100%; margin: 10px 0 4px; accent-color: var(--cyan); }
.range-field small { color: var(--faint); font-size: 9px; }
.credential-row { display: flex; align-items: center; gap: 12px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.credential-row > span { color: var(--muted); }
.credential-row strong { flex: 1; color: var(--faint); font: 12px "IBM Plex Mono", monospace; letter-spacing: .08em; }
.credential-row b { color: var(--cyan); font-size: 8px; font-weight: 500; }
.toggle-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle-row > span strong, .toggle-row > span small { display: block; }
.toggle-row > span strong { font-size: 10px; }
.toggle-row > span small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row > i { position: relative; width: 29px; height: 16px; flex: 0 0 auto; border-radius: 10px; background: var(--line-strong); transition: background .18s; }
.toggle-row > i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform .18s; }
.toggle-row input:checked + i { background: var(--cyan-dark); }
.toggle-row input:checked + i::after { background: var(--cyan); transform: translateX(13px); }
.health-score { display: flex; align-items: baseline; gap: 10px; padding: 5px 0 12px; }
.health-score strong { color: var(--cyan); font: 26px "IBM Plex Mono", monospace; }
.health-score span { color: var(--faint); font-size: 9px; }
.health-check { display: flex; align-items: center; gap: 7px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 9px; }
.health-check i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.health-check span { flex: 1; color: var(--muted); }
.health-check b { color: var(--cyan); font-weight: 500; }
.config-save-bar { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--amber); border-radius: 9px; background: #2b2719f5; box-shadow: 0 10px 30px #00000055; }
.config-save-bar > div { flex: 1; }
.config-save-bar strong, .config-save-bar span { display: block; }
.config-save-bar strong { color: var(--amber); font-size: 11px; }
.config-save-bar span { color: var(--muted); font-size: 9px; }
.model-edit-fields { display: grid; gap: 12px; }
.model-edit-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.model-edit-fields input, .model-edit-fields select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface-soft); }
@media (max-width: 1280px) {
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .config-grid, .config-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .current-model-panel { align-items: flex-start; flex-direction: column; }
  .current-model-actions { flex-wrap: wrap; }
  .provider-grid { grid-template-columns: 1fr; }
  .config-save-bar { align-items: flex-start; flex-wrap: wrap; }
}

/* Conversation attachments */
.composer-zone { position: relative; margin-top: 12px; }
.composer-zone .message-form { padding-top: 0; border-top: 0; }
.message-form .attach-button { width: 34px; flex: 0 0 auto; color: var(--muted); border: 1px solid var(--line); background: var(--surface-soft); }
.message-form .attach-button:hover { color: var(--cyan); border-color: var(--cyan); }
.composer-hint { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: var(--faint); font-size: 8px; }
.drop-hint { position: absolute; inset: -8px; z-index: 12; display: none; place-items: center; align-content: center; gap: 6px; border: 1px dashed var(--cyan); border-radius: 9px; color: var(--cyan); background: #0b2429f5; text-align: center; }
.drop-hint svg { width: 24px; height: 24px; }
.drop-hint strong, .drop-hint span { display: block; }
.drop-hint span { color: var(--muted); font-size: 9px; }
.composer-zone.dragging .drop-hint { display: grid; }
.attachment-list { display: flex; gap: 7px; padding: 0 0 10px; overflow-x: auto; }
.attachment-chip { position: relative; display: flex; align-items: center; gap: 8px; min-width: 150px; max-width: 220px; padding: 7px 28px 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.attachment-thumb { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 5px; color: var(--cyan); background: var(--cyan-dark); overflow: hidden; }
.attachment-thumb svg { width: 15px; height: 15px; }
.attachment-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attachment-info { min-width: 0; }
.attachment-info strong, .attachment-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-info strong { font-size: 9px; }
.attachment-info small { color: var(--faint); font-size: 8px; }
.attachment-remove { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--faint); background: transparent; }
.attachment-remove:hover { color: var(--red); background: var(--red-dark); }
.attachment-remove svg { width: 11px; height: 11px; }
.message-attachments { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.message-attachment { padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface-soft); font-size: 8px; }
@media (max-width: 700px) {
  .composer-hint { flex-direction: column; gap: 2px; }
  .attachment-chip { min-width: 135px; }
}

/* Social media matrix integration */
.offline-dot { background: var(--red) !important; box-shadow: 0 0 0 4px #f0646412 !important; }
.external-link { color: #062321; text-decoration: none; }
.integration-banner { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--amber); border-radius: 9px; background: var(--amber-dark); }
.integration-banner > div:first-child { display: flex; align-items: center; gap: 11px; }
.integration-banner > div:last-child { display: flex; align-items: center; gap: 10px; }
.integration-banner .status-dot { flex: 0 0 auto; background: var(--amber); }
.integration-banner strong { color: var(--amber); font-size: 11px; }
.integration-banner p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.social-tabs { max-width: 650px; }
.platform-identity { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.platform-logo { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--cyan); font: 12px "IBM Plex Mono", monospace; }
.platform-identity > div:nth-child(2) { flex: 1; }
.platform-identity strong, .platform-identity span { display: block; }
.platform-identity strong { font-size: 13px; }
.platform-identity div > span { color: var(--faint); font-size: 9px; }
.social-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.social-metrics > div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.social-metrics span, .social-metrics strong, .social-metrics small { display: block; }
.social-metrics span { color: var(--muted); font-size: 10px; }
.social-metrics strong { margin: 4px 0; font: 23px "IBM Plex Mono", monospace; }
.social-metrics small { color: var(--faint); font-size: 8px; }
.social-content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr); gap: 14px; }
.social-side > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 0; text-align: left; border-bottom: 1px solid var(--line); background: transparent; }
.social-side > button > svg:first-child { width: 18px; height: 18px; color: var(--cyan); }
.social-side > button > span { flex: 1; }
.social-side > button strong, .social-side > button small { display: block; }
.social-side > button strong { font-size: 11px; }
.social-side > button small { color: var(--faint); font-size: 9px; }
.social-side > button > svg:last-child { width: 13px; height: 13px; color: var(--faint); }
.social-side .candidate-note { margin-top: 18px; }
.real-frame-container { height: calc(100vh - 260px); min-height: 520px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.real-frame-head { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.real-frame-head span { color: var(--amber); font-size: 10px; }
#social-frame { display: block; width: 100%; height: calc(100% - 48px); border: 0; background: white; }
@media (max-width: 1100px) {
  .social-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .integration-banner { align-items: flex-start; flex-direction: column; }
  .social-metrics { grid-template-columns: repeat(2, 1fr); }
  .platform-identity { flex-wrap: wrap; }
}

/* Skills library and long-term memory */
.model-tabs { max-width: 780px; }
.skills-summary, .memory-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.skills-summary > div, .memory-summary > div { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.skills-summary span, .skills-summary strong, .skills-summary small, .memory-summary span, .memory-summary strong, .memory-summary small { display: block; }
.skills-summary span, .memory-summary span { color: var(--muted); font-size: 10px; }
.skills-summary strong, .memory-summary strong { margin: 4px 0; font: 20px "IBM Plex Mono", monospace; }
.skills-summary small, .memory-summary small { color: var(--faint); font-size: 8px; }
.skills-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.skills-toolbar select { min-width: 130px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface-soft); }
.skills-layout { display: grid; grid-template-columns: minmax(320px, .95fr) minmax(340px, 1.05fr); gap: 14px; }
.skill-list { display: grid; gap: 7px; }
.skill-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.skill-row:hover, .skill-row.selected { border-color: var(--cyan); background: var(--cyan-dark); }
.skill-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 7px; color: var(--cyan); background: var(--surface-raised); }
.skill-icon svg { width: 16px; height: 16px; }
.skill-row > span:nth-child(2) { min-width: 0; flex: 1; }
.skill-row strong, .skill-row small, .skill-row em { display: block; }
.skill-row strong { overflow: hidden; text-overflow: ellipsis; font: 10px "IBM Plex Mono", monospace; white-space: nowrap; }
.skill-row small { margin: 3px 0; color: var(--muted); font-size: 9px; }
.skill-row em { color: var(--faint); font-size: 8px; font-style: normal; }
.skill-row > b { color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.skill-description { color: var(--muted); font-size: 11px; line-height: 1.8; }
.skill-tags, .profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.skill-tags span, .profile-tags button { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--cyan); background: var(--cyan-dark); font-size: 8px; }
.skill-meta { margin-bottom: 14px; }
.skill-section { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.skill-section > span, .profile-section > span { color: var(--faint); font-size: 9px; }
.skill-section p, .skill-section ol { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.skill-section ol { padding-left: 18px; }
.skill-actions { display: flex; gap: 8px; margin-top: 16px; }
.skill-run-result { margin-top: 12px; padding: 11px; border-left: 2px solid var(--cyan); color: var(--muted); background: var(--cyan-dark); font-size: 10px; line-height: 1.8; }
.memory-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 14px; }
.memory-timeline-panel .knowledge-search input { width: 160px; }
.memory-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.memory-filters button { padding: 5px 8px; border-radius: 5px; color: var(--muted); background: var(--surface-soft); font-size: 9px; }
.memory-filters button.active { color: var(--cyan); background: var(--cyan-dark); }
.memory-list { display: grid; gap: 8px; }
.memory-item { padding: 12px; text-align: left; border: 1px solid var(--line); border-left: 2px solid var(--cyan); border-radius: 7px; background: var(--surface-soft); }
.memory-item:hover { background: var(--surface-raised); }
.memory-item > div { display: flex; align-items: center; justify-content: space-between; }
.memory-item time { color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.memory-item strong { display: block; margin: 8px 0 5px; font-size: 11px; }
.memory-item p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.8; }
.memory-item footer { display: flex; justify-content: space-between; margin-top: 9px; color: var(--faint); font-size: 8px; }
.memory-item footer b { color: var(--amber); font-weight: 500; }
.profile-identity { display: flex; align-items: center; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.avatar.large { width: 44px; height: 44px; font-size: 17px; }
.profile-identity strong, .profile-identity span, .profile-identity small { display: block; }
.profile-identity strong { font-size: 14px; }
.profile-identity span { color: var(--muted); font-size: 10px; }
.profile-identity small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.profile-section { margin-top: 15px; }
.profile-section textarea { width: 100%; min-height: 75px; margin-top: 7px; padding: 9px; resize: vertical; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-soft); font: 10px/1.8 "Noto Sans SC", sans-serif; }
.profile-section textarea:not([readonly]) { color: var(--text); border-color: var(--cyan); }
.profile-section .toggle-row { padding: 9px 0; }
.profile-context { margin: 16px 0; padding: 11px; border-left: 2px solid var(--cyan); background: var(--cyan-dark); }
.profile-context span { color: var(--cyan); font-size: 9px; }
.profile-context p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.8; }
.profile-save { width: 100%; }
.profile-save:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 1280px) {
  .skills-layout, .memory-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .skills-summary, .memory-summary { grid-template-columns: repeat(2, 1fr); }
  .skills-toolbar { align-items: stretch; flex-direction: column; }
  .memory-timeline-panel .knowledge-search input { width: 110px; }
}

.integration-banner.online { border-color: #27d3c255; background: var(--cyan-dark); }
.integration-banner.online .status-dot { background: var(--cyan); }
.integration-banner.online strong { color: var(--cyan); }

.model-version-picker { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.model-version-picker select { max-width: 360px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface-soft); }
.chat-actions { display: inline-flex; gap: 10px; margin-left: auto; }
.inference-live { color: var(--cyan); font: 10px "IBM Plex Mono", monospace; }
.inference-live.running::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 6px; border-radius: 50%; background: var(--cyan); animation: pulse 1s infinite; }
.trace-step.error { color: var(--red); }
.message-route { display: block; margin-top: 6px; color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.thread-empty { padding: 18px 6px; color: var(--faint); font-size: 10px; line-height: 1.8; }
#conversation-threads { display: grid; gap: 7px; }

.inference-log { display: grid; gap: 0; max-height: calc(100vh - 245px); overflow: auto; }
.inference-event { display: flex; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.inference-event > div { min-width: 0; flex: 1; }
.inference-event strong { display: block; color: var(--text); font-size: 11px; }
.inference-event p { margin: 4px 0; color: var(--muted); font: 9px/1.7 "IBM Plex Mono", monospace; overflow-wrap: anywhere; }
.inference-event time { color: var(--faint); font: 8px "IBM Plex Mono", monospace; }
.inference-event.running strong { color: var(--cyan); }
.inference-event.error strong { color: var(--red); }
.inference-event .event-mark { flex: 0 0 auto; margin-top: 5px; }

/* Brand sign-in */
.login-panel { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); min-height: 100vh; background: #071018; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(36px, 6vw, 88px); background: radial-gradient(circle at 18% 20%, #17413f 0, transparent 42%), radial-gradient(circle at 85% 75%, #3e3520 0, transparent 38%), #071018; }
.login-brand-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; }
.login-brand-top strong { display: block; font-size: 25px; letter-spacing: .02em; }
.login-brand-top span { display: block; margin-top: 4px; color: var(--faint); font: 10px "IBM Plex Mono", monospace; letter-spacing: .18em; }
.login-logo { width: 66px; height: 66px; object-fit: cover; border-radius: 17px; box-shadow: 0 12px 36px #00000044; }
.pixel-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(#27424c 1px, transparent 1px), linear-gradient(90deg, #27424c 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom right, #000, transparent 72%); }
.login-story { position: relative; z-index: 2; max-width: 650px; margin: 70px 0; }
.login-story > span { color: var(--cyan); font: 10px "IBM Plex Mono", monospace; letter-spacing: .18em; }
.login-story h1 { margin: 18px 0 24px; font-size: clamp(38px, 4.4vw, 66px); line-height: 1.15; letter-spacing: -.045em; }
.login-story p { max-width: 480px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.login-proof { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; }
.login-proof span { padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); background: #0d1b24aa; font-size: 10px; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; border-left: 1px solid var(--line); background: #0a151d; }
.login-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: #0e1c25; box-shadow: 0 28px 80px #00000044; }
.login-card-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--cyan); font-size: 12px; }
.login-card-brand img { width: 34px; height: 34px; border-radius: 9px; }
.login-card h2 { margin: 0; font-size: 26px; }
.login-card .sub { margin: 8px 0 26px; color: var(--muted); font-size: 12px; }
.login-card label:not(.remember) { display: block; margin: 15px 0 7px; color: var(--muted); font-size: 11px; }
.login-card input:not([type="checkbox"]) { width: 100%; min-height: 44px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; color: var(--text); background: #09151d; transition: border-color .18s, box-shadow .18s; }
.login-card input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #27d3c214; }
.login-card .remember { display: flex; align-items: center; gap: 7px; margin: 16px 0; color: var(--muted); font-size: 11px; }
.login-card .submit { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 45px; border-radius: 8px; color: #062321; background: var(--cyan); font-weight: 700; }
.login-card .submit:hover { background: #55dfd2; }
.login-error { min-height: 18px; color: var(--red); font-size: 11px; }
.login-security { margin: 22px 0 0; color: var(--faint); font-size: 9px; text-align: center; }
.brand-mark img { width: 29px; height: 29px; object-fit: cover; border-radius: 7px; }

/* Conversation, brief and administration */
.conversation-filters { display: flex; gap: 6px; margin-bottom: 10px; }
.conversation-filters button { flex: 1; padding: 6px 8px; border-radius: 5px; color: var(--muted); background: var(--surface-soft); font-size: 9px; }
.conversation-filters button.active { color: var(--cyan); background: var(--cyan-dark); }
.thread-main { display: block; width: 100%; padding: 0; text-align: left; background: transparent; }
.thread-main strong, .thread-main small, .thread-main span { display: block; }
.thread-actions { display: flex; gap: 10px; margin-top: 7px; }
.thread-actions button, .danger-link { padding: 0; color: var(--faint); background: transparent; font-size: 8px; }
.thread-actions button:hover, .danger-link:hover { color: var(--red); }
.thread-actions button:first-child:hover { color: var(--cyan); }
.brief-read-all { width: 100%; margin: 4px 0 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--cyan); background: var(--cyan-dark); font-size: 10px; }
.form-inline { display: grid; grid-template-columns: 1fr 1.25fr 1.4fr auto; gap: 12px; align-items: end; }
.form-inline label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.form-inline select, .form-inline input, #security-users-list select { min-height: 37px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface-soft); }
.system-tabs { max-width: 720px; }
#security-users-list select { max-width: 110px; }
#api-key-created { margin-top: 14px; overflow-wrap: anywhere; user-select: all; }
.provider-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

@media (max-width: 1280px) {
  .trace-panel { display: block; grid-column: 1 / -1; }
  .inference-log { max-height: 360px; }
  .form-inline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  .login-panel { grid-template-columns: 1fr; }
  .login-brand { min-height: 430px; padding: 40px; }
  .login-story { margin: 45px 0; }
  .login-story h1 { font-size: 42px; }
  .login-form-wrap { padding: 34px 20px; border-left: 0; border-top: 1px solid var(--line); }
  .config-grid, .config-bottom-grid { grid-template-columns: 1fr; }
  .current-model-panel { flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 700px) {
  .login-brand { min-height: 370px; padding: 28px 24px; }
  .login-logo { width: 52px; height: 52px; border-radius: 13px; }
  .login-brand-top strong { font-size: 21px; }
  .login-story { margin: 34px 0 20px; }
  .login-story h1 { margin: 14px 0 18px; font-size: 33px; }
  .login-story p { font-size: 12px; }
  .login-form-wrap { padding: 22px 14px; }
  .login-card { padding: 23px 20px; border-radius: 13px; }
  .main-content { min-width: 0; }
  .topbar { gap: 9px; overflow-x: auto; }
  .topbar button { min-width: 36px; min-height: 36px; }
  .view-heading { gap: 14px; }
  .view-heading .primary-button, .view-heading .external-link { width: 100%; }
  .provider-grid { grid-template-columns: 1fr; }
  .form-inline { grid-template-columns: 1fr; }
  .current-model-actions { align-items: stretch; flex-direction: column; }
  .current-model-actions button { width: 100%; }
  .model-version-picker { align-items: flex-start; flex-direction: column; }
  .model-version-picker select { width: 100%; max-width: 100%; }
  .thread { min-width: 210px; }
  .thread-actions button { min-height: 30px; padding: 4px 6px; }
  .cc-actions { flex-wrap: wrap; }
  .cc-actions button { min-height: 34px; }
  .copilot.mobile-open { width: min(92vw, 340px); }
  .inference-log { max-height: 420px; }
  .table-wrap { max-width: 100%; overflow-x: auto; }
  .memory-summary, .skills-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .metric-strip { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .login-proof span { padding: 5px 7px; }
  .page-identity strong { font-size: 12px; }
  .clock { display: none; }
}

@media (max-width: 700px) {
  .thread-panel { display: block; width: 100%; overflow: visible; }
  .thread-panel .panel-heading { display: flex; }
  .conversation-filters { display: flex; width: 100%; flex-direction: row; }
  .conversation-filters button { display: block; min-height: 34px; flex: 1; writing-mode: horizontal-tb; }
  #conversation-threads { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
  #conversation-threads .thread { min-width: 240px; max-width: 280px; }
  .conversation-panel .conversation { min-height: 280px; max-height: 48vh; }
  .trace-panel { display: block; }
}

/* Customer device authorization */
.terminal-commands { margin: 14px 0; padding: 15px; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--cyan); background: #061016; font: 10px/1.9 "IBM Plex Mono", monospace; white-space: pre-wrap; }
.device-screenshot { display: block; max-width: 100%; max-height: 360px; margin: 10px 0; border: 1px solid var(--line); border-radius: 7px; }

/* Fixed AI task workspace */
body.task-fixed-view .workspace { overflow: hidden; }
body.task-fixed-view .main-content { height: calc(100vh - 65px); padding-bottom: 14px; overflow: hidden; display: flex; flex-direction: column; }
body.task-fixed-view #view-tasks { min-height: 0; height: 100%; display: flex; flex-direction: column; }
body.task-fixed-view #view-tasks .view-heading { flex: 0 0 auto; margin-bottom: 14px; }
body.task-fixed-view #view-tasks .task-workspace { flex: 1; min-height: 0; height: auto; }
body.task-fixed-view #view-tasks .thread-panel,
body.task-fixed-view #view-tasks .conversation-panel,
body.task-fixed-view #view-tasks .trace-panel { min-height: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
body.task-fixed-view #view-tasks .thread-panel { overflow-y: auto; }
body.task-fixed-view #view-tasks .conversation-panel .conversation { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
body.task-fixed-view #view-tasks .inference-log { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
body.task-fixed-view #view-tasks .composer-zone,
body.task-fixed-view #view-tasks .panel-heading { flex: 0 0 auto; }
@media (max-width: 700px) {
  body.task-fixed-view .main-content { height: calc(100vh - 58px); padding: 12px 10px 10px; }
  body.task-fixed-view #view-tasks .view-heading { gap: 8px; margin-bottom: 8px; }
  body.task-fixed-view #view-tasks .view-heading .eyebrow,
  body.task-fixed-view #view-tasks .view-heading p { display: none; }
  body.task-fixed-view #view-tasks .view-heading h1 { font-size: 21px; }
  body.task-fixed-view #view-tasks .view-heading .primary-button { min-height: 38px; padding: 7px 12px; }
  body.task-fixed-view #view-tasks .task-workspace { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
  body.task-fixed-view #view-tasks .thread-panel { flex: 0 0 148px; height: 148px; padding: 10px; overflow-y: auto; }
  body.task-fixed-view #view-tasks .thread-panel .panel-heading { margin-bottom: 7px; }
  body.task-fixed-view #view-tasks .conversation-panel { flex: 1; min-height: 0; height: auto; }
  body.task-fixed-view #view-tasks .conversation-panel .panel-heading { margin-bottom: 7px; }
  body.task-fixed-view #view-tasks .trace-panel { flex: 0 0 160px; height: 160px; padding: 10px; }
  body.task-fixed-view #view-tasks .trace-note { display: none; }
  body.task-fixed-view #view-tasks .inference-log { max-height: none; }
  body.task-fixed-view #view-tasks .composer-zone { padding-top: 8px; }
  body.task-fixed-view #view-tasks .composer-hint span { display: none; }
  body.task-fixed-view #view-tasks .composer-hint { display: flex; }
}

/* Production device grid: fit panel width without horizontal overflow */
.device-panel { min-width: 0; }
.device-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.device { min-width: 0; overflow: hidden; }
.device strong { overflow-wrap: anywhere; word-break: break-all; line-height: 1.5; }
@media (max-width: 1280px) {
  .device-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (max-width: 640px) {
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.device-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.device-approve label { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 9px; }
.device-approve .secondary-button { min-height: 30px; padding: 5px 9px; font-size: 9px; }

/* Device pairing code */
.pairing-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 12px 0 4px; }
.pairing-code-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; letter-spacing: 3px; padding: 8px 14px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--cyan); background: var(--surface-soft); user-select: all; }
.sub-panel-title { margin: 16px 0 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* AI conversation: composer, message tools, conversation model */
.message-form textarea { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: var(--text); background: var(--surface-soft); font-size: 11px; font-family: inherit; line-height: 1.6; resize: none; max-height: 168px; overflow-y: auto; }
.message-form textarea:focus { border-color: var(--cyan); }
.message-tools { display: flex; align-items: center; gap: 10px; margin-top: 5px; color: var(--faint); font-size: 9px; }
.message.user .message-tools { justify-content: flex-end; }
.message-copy { padding: 0; color: var(--muted); background: none; border: 0; font-size: 9px; cursor: pointer; }
.message-copy:hover { color: var(--cyan); }
.message-route + .message-tools { margin-top: 3px; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.quick-prompts button { padding: 7px 11px; border: 1px dashed var(--line-strong); border-radius: 20px; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.quick-prompts button:hover { color: var(--cyan); border-color: var(--cyan); }
.thread-search { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.thread-search svg { width: 13px; height: 13px; color: var(--faint); flex: none; }
.thread-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 10px; }
.thread-main em { display: block; margin-top: 3px; color: var(--cyan); font-size: 8px; font-style: normal; letter-spacing: 0.3px; }
.conversation-route { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.conversation-model-label { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 9px; }
#conversation-model { max-width: 220px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface-soft); font-size: 9px; }
@media (max-width: 760px) {
  .conversation-model-label { width: 100%; }
  #conversation-model { flex: 1; max-width: none; }
  .conversation-route { justify-content: flex-start; }
}

/* Inline conversation rename */
.rename-form { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.rename-input { flex: 1 1 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--cyan); border-radius: 7px; outline: 0; color: var(--text); background: var(--surface-soft); font-size: 11px; }
.rename-form button { padding: 5px 10px; border-radius: 6px; color: #062321; background: var(--cyan); font-size: 9px; cursor: pointer; }
.rename-form button.secondary-button { color: var(--text); background: var(--surface-raised); border: 1px solid var(--line); }

/* Mobile: stack the conversation heading so the title keeps its width */
@media (max-width: 900px) {
  .conversation-panel > .panel-heading { flex-direction: column; align-items: stretch; gap: 8px; }
  .conversation-panel > .panel-heading > div { flex-wrap: wrap; min-width: 0; }
  .conversation-panel > .panel-heading h2 { min-width: 0; }
  .conversation-route { width: 100%; justify-content: flex-start; }
}

/* Live inference trace */
.inference-event .event-block { margin: 4px 0 0; padding: 8px 9px; max-height: 190px; overflow: auto; border-left: 2px solid var(--line-strong); border-radius: 4px; color: var(--muted); background: #071018; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-mark.running { background: var(--cyan); animation: eventPulse 1.2s ease-in-out infinite; }
@keyframes eventPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.82); } }
.inference-log { display: flex; flex-direction: column; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .event-mark.running { animation: none; } }

/* Evolution live flow */
.evo-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 0 0 14px; }
.evo-flow .flow-step { flex: 1 1 130px; min-width: 0; display: flex; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.evo-flow .flow-step i { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--cyan); font-size: 9px; font-style: normal; }
.evo-flow .flow-step strong { display: block; font-size: 11px; }
.evo-flow .flow-step span { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.evo-flow .flow-step.on { border-color: var(--cyan); box-shadow: 0 0 0 1px #31d0c822 inset; }
.evo-flow .flow-step.on i { border-color: var(--cyan); background: #123037; }
.evo-flow .flow-step.idle span { color: var(--faint); }
.evo-flow .flow-arrow { align-self: center; color: var(--faint); font-size: 11px; }
.evo-flow.compact .flow-step { flex: 1 1 100%; }
.evo-flow.compact { gap: 6px; }
@media (max-width: 900px) {
  .evo-flow .flow-step { flex: 1 1 100%; }
  .evo-flow .flow-arrow { display: none; }
}

/* Conversation heading must never squeeze the title, at any width */
.conversation-panel > .panel-heading { flex-wrap: wrap; align-items: flex-start; }
.conversation-panel > .panel-heading > div:first-child { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; }
.conversation-panel > .panel-heading h2 { min-width: 0; overflow-wrap: anywhere; }
.conversation-route { margin-left: auto; }

/* Evolution flow motion */
.flow-caption { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; margin-top: -2px; color: var(--faint); font-size: 9px; }
.evo-flow .flow-step.on { animation: flowGlow 3.4s ease-in-out infinite; }
.evo-flow .flow-step.on i { animation: flowRing 2.6s ease-in-out infinite; }
.evo-flow .flow-step.on:nth-child(3) { animation-delay: .2s; }
.evo-flow .flow-step.on:nth-child(5) { animation-delay: .4s; }
.evo-flow .flow-step.on:nth-child(7) { animation-delay: .6s; }
@keyframes flowGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(49,208,200,0.0) inset; } 50% { box-shadow: 0 0 0 1px rgba(49,208,200,0.35) inset; } }
@keyframes flowRing { 0% { box-shadow: 0 0 0 0 rgba(49,208,200,0.45); } 70% { box-shadow: 0 0 0 7px rgba(49,208,200,0); } 100% { box-shadow: 0 0 0 0 rgba(49,208,200,0); } }
@media (prefers-reduced-motion: reduce) {
  .evo-flow .flow-step.on, .evo-flow .flow-step.on i { animation: none; }
}

/* Flywheel continuous motion */
.orbit-node { animation: node-flash 4.8s ease-in-out infinite; }
.orbit-node.n2 { animation-delay: .5s; }
.orbit-node.n3 { animation-delay: 1s; }
.orbit-node.n4 { animation-delay: 1.5s; }
.orbit-node.n5 { animation-delay: 2s; }
.orbit-node.n6 { animation-delay: 2.5s; }
.orbit-node i { animation: eventPulse 2.2s ease-in-out infinite; }
.orbit-node.n2 i { background: #f5b95c; }
.core-node { animation: coreBreath 6s ease-in-out infinite; }
@keyframes coreBreath { 0%, 100% { box-shadow: 0 0 0 0 rgba(39,211,194,0.18); } 50% { box-shadow: 0 0 0 16px rgba(39,211,194,0); } }
@media (prefers-reduced-motion: reduce) {
  .orbit-node, .orbit-node i, .core-node { animation: none; }
}

/* Social platform matrix */
.platform-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.platform-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .18s, transform .18s; }
.platform-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.platform-card.active { border-color: var(--cyan); background: var(--surface-raised); }
.platform-card strong { font-size: 13px; }
.platform-card span { color: var(--muted); font-size: 10px; }
.platform-card em { margin-top: 4px; font-style: normal; }
.platform-logo { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-strong); color: var(--cyan); background: var(--surface-soft); font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.platform-subnav { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.platform-subnav button { padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }
.platform-subnav button.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.platform-subnav button:hover { color: var(--text); }
@media (max-width: 1100px) { .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .platform-card { padding: 12px; }
  .platform-card strong { font-size: 12px; }
}

/* Embedded consoles fill the available viewport */
.real-frame-container { display: flex; flex-direction: column; height: calc(100vh - 300px); min-height: 560px; }
.real-frame-head { flex: 0 0 auto; }
#social-frame, #zhichuang-frame { flex: 1 1 0; display: block; width: 100%; height: auto; min-height: 0; border: 0; background: #fff; }
@media (max-width: 900px) {
  .real-frame-container { height: calc(100vh - 340px); min-height: 480px; }
}

/* Zhichuang sales monitor */
.zc-sales { margin-bottom: 14px; }
.zc-sales-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.zc-sales-stats > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.zc-sales-stats span { display: block; color: var(--muted); font-size: 10px; }
.zc-sales-stats strong { display: block; margin-top: 4px; font-size: 18px; font-family: "IBM Plex Mono", monospace; }
@media (max-width: 900px) { .zc-sales-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Production & ROM workspace */
.production-frame { height: calc(100vh - 300px); min-height: 600px; }
.production-tabs { flex-wrap: wrap; }
@media (max-width: 900px) { .production-frame { height: calc(100vh - 340px); min-height: 480px; } }

/* Native ROM workspace */
.rom-actionbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rom-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rom-stats > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.rom-stats span { display: block; color: var(--muted); font-size: 10px; }
.rom-stats strong { display: block; margin-top: 3px; font-size: 16px; font-family: "IBM Plex Mono", monospace; }
#rom-rows tr.selected { background: var(--surface-raised); outline: 1px solid var(--cyan); }
#rom-rows tr { cursor: default; }
