/* The library, in the Signal Glass language of KQL Pilot: dark panes on a quiet ground, thin strokes, square corners, and a signal colour only where something is live. */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--fs-body)/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 550; margin: 0; letter-spacing: 0; }
h1 { font-size: 1.5rem; line-height: 1.25; }
h2 { font-size: 1.0625rem; line-height: 1.3; }
h3 { font-size: .9375rem; line-height: 1.3; }
p { margin: 0 0 8px; }
a { color: var(--accent); text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--mono); font-size: .8125rem; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 50; border: 1px solid var(--control-stroke); }
.skip:focus { top: 8px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

.app { --left: 256px; --right: 288px; display: grid; grid-template-columns: 64px var(--left) minmax(0, 1fr) var(--right); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; background: var(--ambient-backdrop, var(--bg)); }
.app[data-left="closed"] { --left: 0px; }
.app[data-right="closed"] { --right: 0px; }
.app[data-left="closed"] .sidebar-left, .app[data-right="closed"] .sidebar-right { visibility: hidden; overflow: hidden; border: 0; }
.ribbon { grid-column: 1; grid-row: 1; }
.sidebar-left { grid-column: 2; grid-row: 1; }
.workspace { grid-column: 3; grid-row: 1; }
.sidebar-right { grid-column: 4; grid-row: 1; }

.ribbon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; background: var(--paper); border-right: 1px solid var(--stroke); }
.ribbon-mark { width: 36px; height: 36px; margin-bottom: 8px; }
.ribbon-gap { flex: 1; }
.ribbon-button { display: grid; justify-items: center; gap: 2px; width: 56px; min-height: 48px; padding: 6px 2px; background: none; border: 0; border-radius: var(--radius); color: var(--dim); font-size: .6875rem; line-height: 1.1; }
.ribbon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: var(--icon-cap); stroke-linejoin: var(--icon-join); }
.ribbon-button:hover { background: var(--surface-hover); color: var(--ink); }
.ribbon-button[aria-pressed="true"] { color: var(--ink); background: var(--surface-subtle); box-shadow: inset 2px 0 0 var(--signal); }

.sidebar { min-width: 0; background: var(--paper); overflow-x: hidden; overflow-y: auto; }
.sidebar-left { display: flex; flex-direction: column; border-right: 1px solid var(--stroke); }
.sidebar-left > .pane { flex: none; }
.sidebar-right { border-left: 1px solid var(--stroke); }
.sidebar .bar-close { display: none; }
.pane { padding: 12px; }
.pane[hidden] { display: none; }
.credit { position: sticky; bottom: 0; margin: auto 0 0; padding: 10px 12px; background: var(--paper); border-top: 1px solid var(--stroke); color: var(--dim); font-size: .75rem; line-height: 1.4; }
.credit a { display: inline-flex; align-items: center; min-height: 24px; color: var(--ink); text-underline-offset: 3px; }
.credit a:hover { color: var(--signal); }
.pane-title { font-size: .875rem; letter-spacing: 0; color: var(--dim); margin: 0 0 12px; font-weight: 550; }
.hint { color: var(--quiet); font-size: var(--fs-small); }
.empty { color: var(--dim); font-size: var(--fs-small); padding: 8px 0; }

#tree { display: grid; gap: 2px; min-width: 0; }
#tree > *, .tree-children > * { min-width: 0; max-width: 100%; }
.tree-section { margin: 10px 0 2px; font-size: .75rem; color: var(--quiet); letter-spacing: 0; }
.tree-row { display: flex; align-items: center; gap: 6px; min-height: 32px; width: 100%; padding: 4px 8px; background: none; border: 0; border-radius: var(--radius); text-align: left; color: var(--dim); }
.tree-row:hover { background: var(--surface-hover); color: var(--ink); }
.tree-row[aria-selected="true"] { background: var(--surface-subtle); color: var(--ink); box-shadow: inset 2px 0 0 var(--signal); }
.tree-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row .count { font-size: .75rem; color: var(--quiet); font-variant-numeric: tabular-nums; }
.tree-row .caret { width: 14px; display: inline-block; color: var(--quiet); transition: transform var(--motion-fast); }
.tree-row[aria-expanded="true"] .caret { transform: rotate(90deg); }
.tree-children { margin-left: 14px; border-left: 1px solid var(--stroke); padding-left: 6px; display: grid; gap: 2px; }

.search-form input, .dialog input[type="text"], .field input, .field textarea, .dialog textarea, .dialog-form input { width: 100%; min-height: 36px; padding: 6px 10px; background: var(--code-bg); border: 1px solid var(--control-stroke); border-radius: var(--radius); color: var(--ink); }
textarea { resize: vertical; font-family: var(--mono); font-size: .8125rem; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--quiet); }
.operators { margin: 8px 0; font-size: var(--fs-small); }
.operators summary { cursor: pointer; color: var(--dim); min-height: 28px; display: flex; align-items: center; }
.operators ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.operators button { width: 100%; text-align: left; background: none; border: 0; padding: 4px 6px; border-radius: var(--radius); color: var(--dim); }
.operators button:hover { background: var(--surface-hover); color: var(--ink); }
.operators code { color: var(--accent); }
.result-count { color: var(--quiet); font-size: var(--fs-small); margin: 8px 0 4px; min-height: 20px; }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.result { display: block; width: 100%; text-align: left; padding: 8px 10px; background: var(--surface-subtle); border: 1px solid var(--stroke); border-radius: var(--radius); color: var(--ink); }
.result:hover, .result[aria-selected="true"] { background: var(--surface-hover); border-color: var(--control-stroke); }
.result .title { display: block; font-weight: 550; }
.result .meta { display: block; color: var(--quiet); font-size: .75rem; margin-top: 2px; }
.result .snippet { display: block; color: var(--dim); font-size: .8125rem; margin-top: 4px; overflow-wrap: anywhere; }
mark { background: var(--wash-strong); color: var(--ink); padding: 0 2px; border-radius: 1px; }
.taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.workspace { display: grid; grid-template-rows: 60px auto minmax(0, 1fr); min-width: 0; min-height: 0; outline: none; }
.tabstrip { display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px 0; background: var(--bg); border-bottom: 1px solid var(--stroke); min-width: 0; }
.tablist { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.tabtools { display: flex; gap: 6px; padding-bottom: 4px; flex: none; }
.tabtools .button[aria-pressed="true"] { background: var(--surface-subtle); border-color: var(--control-stroke); }
.tab { display: flex; align-items: center; gap: 6px; max-width: 240px; min-height: 34px; padding: 0 4px 0 12px; background: none; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; color: var(--dim); }
.tab.current { background: var(--paper); border-color: var(--stroke); color: var(--ink); box-shadow: inset 0 2px 0 var(--signal); }
.tab .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tab .close { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--radius); color: var(--quiet); font-size: 1.1rem; line-height: 1; }
.tab .close:hover { background: var(--surface-hover); color: var(--ink); }
.view { overflow: auto; background: var(--paper); min-height: 0; }

.note { max-width: 880px; margin: 0 auto; padding: 24px 32px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.note > section, .note > header { min-width: 0; }
.note h1 { overflow-wrap: anywhere; }
.note > section { display: grid; gap: 10px; }
.note header { display: grid; gap: 10px; }
.note h2 { padding-top: 6px; border-top: 1px solid var(--stroke); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--surface-subtle); color: var(--dim); font-size: .75rem; }
.badge.ok { color: var(--ok); border-color: var(--ok-stroke); background: var(--ok-bg); }
.badge.warn { color: var(--warn); border-color: var(--warn-stroke); background: var(--warn-bg); }
.badge.info { color: var(--info); border-color: var(--info-stroke); background: var(--info-bg); }
.props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; padding: 12px 14px; background: var(--surface-subtle); border: 1px solid var(--stroke); border-radius: var(--radius); }
.props dt { color: var(--quiet); font-size: var(--fs-small); }
.props dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; background: var(--code-bg); border: 1px solid var(--stroke); border-radius: var(--radius); color: var(--ink); font-size: .8125rem; text-decoration: none; }
.chip:hover { border-color: var(--control-stroke); background: var(--surface-hover); }
.chip.tag::before { content: "#"; color: var(--ok); margin-right: 2px; }
.steps { margin: 0; padding-left: 24px; display: grid; gap: 4px; }
.steps li::marker { color: var(--quiet); }
.steps code { color: var(--dim); }
.codewrap { position: relative; background: var(--code-bg); border: 1px solid var(--stroke); border-radius: var(--radius); }
.codewrap pre { margin: 0; padding: 12px 0; overflow: auto; max-height: 460px; }
.codeline { display: grid; grid-template-columns: 44px minmax(0, 1fr); }
.codeline .n { text-align: right; padding-right: 12px; color: var(--quiet); user-select: none; font-variant-numeric: tabular-nums; }
.codeline .t { white-space: pre-wrap; overflow-wrap: anywhere; padding-right: 12px; }
.codeline.add { background: var(--ok-bg); }
.codeline.del { background: var(--danger-bg); }
.codeline.add .t::before { content: "+ "; color: var(--ok); }
.codeline.del .t::before { content: "- "; color: var(--danger); }
.tok-kw { color: var(--accent); }
.tok-str { color: var(--ok); }
.tok-slot { color: var(--warn); font-weight: 500; }
.tok-num { color: var(--info); }
.tok-fn { color: var(--ink); }
.tok-col { color: var(--signal-core); }
.copy { position: static; min-width: 112px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; background: var(--surface-subtle); border: 1px solid var(--control-stroke); border-radius: var(--radius); color: var(--ink); }
.button:hover { background: var(--surface-hover); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 550; }
.button.primary:hover { background: var(--accent-strong); }
.button[disabled], .button[aria-disabled="true"] { background: var(--disabled-bg); color: var(--quiet); border-color: var(--stroke); cursor: not-allowed; }
.button.small { min-height: 28px; padding: 0 10px; font-size: .8125rem; }
.field { display: grid; align-content: start; gap: 4px; }
.field label, .dialog-form label { color: var(--dim); font-size: var(--fs-small); display: block; margin: 8px 0 4px; }
.field label { margin: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.field .help { color: var(--quiet); font-size: .75rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stat { padding: 10px 12px; background: var(--surface-subtle); border: 1px solid var(--stroke); border-radius: var(--radius); }
.stat .value { display: block; font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--quiet); font-size: .75rem; }
.spark { width: 100%; height: 56px; background: var(--code-bg); border: 1px solid var(--stroke); border-radius: var(--radius); }
.spark rect { fill: var(--accent); }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.findings li { padding: 8px 10px; background: var(--surface-subtle); border: 1px solid var(--stroke); border-left: 3px solid var(--warn); border-radius: var(--radius); }
.findings li.none { border-left-color: var(--ok); }
.versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.versions li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 8px 10px; background: var(--surface-subtle); border: 1px solid var(--stroke); border-radius: var(--radius); }
.versions li[aria-current="true"] { border-color: var(--control-stroke); box-shadow: inset 2px 0 0 var(--signal); }
.versions .what { color: var(--dim); font-size: var(--fs-small); }
.notice { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--stroke); border-left-width: 3px; background: var(--surface-subtle); border-radius: var(--radius); }
.notice[data-tone="ok"] { border-left-color: var(--ok); }
.notice[data-tone="warn"] { border-left-color: var(--warn); }
.notice[data-tone="stop"] { border-left-color: var(--danger); }
.notice h3 { margin-bottom: 4px; }
.gates { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.gates li { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; font-size: var(--fs-small); }
.gates .state { font-weight: 550; }
.gates .pass { color: var(--ok); }
.gates .fail { color: var(--danger); }
details.disclosure { border: 1px solid var(--stroke); border-radius: var(--radius); padding: 0 12px; background: var(--surface-subtle); }
details.disclosure > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; color: var(--dim); }
details.disclosure[open] > summary { color: var(--ink); }
details.disclosure > div { padding: 4px 0 12px; display: grid; gap: 10px; }

.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.linklist button { width: 100%; text-align: left; background: none; border: 0; border-radius: var(--radius); padding: 6px 8px; min-height: 32px; color: var(--ink); }
.linklist button:hover { background: var(--surface-hover); }
.linklist .why { display: block; color: var(--quiet); font-size: .75rem; }
.group-title { margin: 14px 0 4px; font-size: .8125rem; color: var(--quiet); letter-spacing: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--stroke); background: var(--paper); position: sticky; top: 0; z-index: 2; }
.tabs button { flex: 1; min-height: 40px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--dim); font-size: var(--fs-small); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--signal); }

.graphpage { display: grid; grid-template-columns: minmax(0, 1fr) 264px; height: 100%; min-height: 0; }
.graphpage.local { grid-template-columns: minmax(0, 1fr); height: 320px; }
.graph { position: relative; min-width: 0; min-height: 0; background: var(--graph-surface); overflow: hidden; }
.graph > svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.graph > svg:active { cursor: grabbing; }
.graph .link { stroke: var(--control-stroke); stroke-opacity: .55; }
.graph .link.similar { stroke-dasharray: 4 3; }
.graph .link.joins { stroke: var(--info); }
.graph .link.dim, .graph .node.dim, .graph .graph-label.dim { opacity: .12; }
.graph .node { cursor: pointer; }
.graph .node .shape { stroke: var(--bg); stroke-width: 1.5; }
.graph .node:focus-visible .shape, .graph .node[data-active="true"] .shape { stroke: var(--focus); stroke-width: 3; }
.graph .graph-label { fill: var(--ink); font-size: 11px; paint-order: stroke; stroke: var(--bg); stroke-width: 4px; pointer-events: none; }
.graph-panel { overflow: auto; padding: 8px 12px; background: var(--paper); border-left: 1px solid var(--stroke); display: grid; align-content: start; gap: 6px; }
.graph-panel details { border-bottom: 1px solid var(--stroke); padding-bottom: 8px; }
.graph-panel summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-weight: 550; }
.graph-panel .control { display: grid; gap: 2px; margin: 8px 0; font-size: var(--fs-small); color: var(--dim); }
.graph-panel .check { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: var(--fs-small); color: var(--dim); }
.graph-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.graph-panel input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.legend { display: grid; gap: 4px; }
.legend span { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--dim); }
.legend svg { width: 16px; height: 16px; }
.graph-note { position: absolute; left: 12px; bottom: 10px; color: var(--quiet); font-size: .75rem; background: var(--paper); padding: 2px 8px; border: 1px solid var(--stroke); border-radius: var(--radius); max-width: calc(100% - 24px); }
.graph-list { position: absolute; left: -9999px; }
.node-query .shape { fill: var(--accent); }
.node-table .shape { fill: var(--info); }
.node-column .shape { fill: var(--quiet); }
.node-tag .shape { fill: var(--ok); }
.node-technique .shape { fill: var(--warn); }
.node.source-seed .shape { fill: var(--accent); }
.node.source-catalog .shape { fill: var(--signal-core); }
.node.source-investigation .shape { fill: var(--info); }
.node.source-community .shape { fill: var(--ok); }
.linkbutton { width: 100%; min-height: 32px; text-align: left; background: none; border: 0; border-radius: var(--radius); padding: 6px 8px; color: var(--ink); }
.linkbutton:hover { background: var(--surface-hover); }
.coltable { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.coltable th, .coltable td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--stroke); }
.coltable th { color: var(--quiet); font-weight: 550; }
.coltable td:last-child, .coltable th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.status { grid-column: 2 / 5; grid-row: 2; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: var(--paper); border-top: 1px solid var(--stroke); color: var(--quiet); font-size: .75rem; overflow: hidden; white-space: nowrap; }
.status .spacer { flex: 1; }

.dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; background: var(--paper); color: var(--ink); border: 1px solid var(--control-stroke); border-radius: var(--radius-floating); box-shadow: 0 16px 48px #000000a0; }
.dialog-wide { width: min(760px, calc(100vw - 32px)); }
.dialog::backdrop { background: #100e0fcc; }
.dialog-form { padding: 20px 24px 24px; }
.dialog-form h2 { margin-bottom: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; }
.keys dt { color: var(--accent); font-family: var(--mono); font-size: .8125rem; }
.keys dd { margin: 0; color: var(--dim); }
#switcher-results { margin-top: 10px; max-height: 50vh; overflow: auto; }

@media (max-width: 1100px) { .app { --left: 248px; --right: 288px; } .note { padding: 20px 20px 80px; } }
@media (max-width: 760px) { .app, .app[data-left], .app[data-right] { --left: 0px; --right: 0px; grid-template-columns: 56px 0 minmax(0, 1fr) 0; } .sidebar-left, .sidebar-right { position: fixed; top: 0; bottom: 0; z-index: 10; width: min(320px, calc(100vw - 56px)); left: 56px; box-shadow: 0 0 32px #000000b0; visibility: visible; }
  .sidebar-right { left: auto; right: 0; } .sidebar .bar-close { display: block; margin: 8px 12px 0 auto; } .app[data-left="closed"] .sidebar-left, .app[data-right="closed"] .sidebar-right { display: none; } .graphpage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .grid2 { grid-template-columns: 1fr; } .ribbon-button { width: 48px; }
  .tabstrip { flex-wrap: wrap; row-gap: 4px; } .tablist { flex: 1 1 100%; order: 2; } .tabtools { order: 1; flex-wrap: wrap; padding-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .ribbon-button[aria-pressed="true"], .tab[aria-selected="true"], .tree-row[aria-selected="true"] { outline: 2px solid Highlight; } .graph .node .shape { stroke: CanvasText; } .badge, .chip, .result, .stat { border-color: CanvasText; } .button.primary { border-color: ButtonText; } }

[hidden] { display: none !important; }
.ui-icon { flex: none; vertical-align: middle; }
.icon-button.button { width: 34px; height: 34px; padding: 0; flex: none; }
.brand-home { display: grid; place-items: center; min-height: 44px; }
.library-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--stroke); background: var(--bg); min-width: 0; }
.wordmark { font: 550 .9375rem var(--font-display); color: var(--ink); text-decoration: none; flex: none; margin-right: 12px; }
.wordmark span { color: var(--signal); padding: 0 1px; }
.library-bar .search-form { position: relative; flex: 1; min-width: 0; }
.library-bar .search-form > span { position: absolute; left: 10px; top: 9px; color: var(--quiet); pointer-events: none; }
.library-bar .search-form input { padding-left: 36px; height: 38px; }
.browse-tab { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; min-height: 34px; padding: 0 10px; color: var(--quiet); }
.browse-tab[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }
.app[data-view="home"], .app[data-view="graph"] { --right: 0px; }
.app[data-view="home"] .sidebar-right, .app[data-view="graph"] .sidebar-right { display: none; }
.browse-note { max-width: 1080px; gap: 24px; padding-top: 28px; }
.browse-note .browse-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.browse-heading .hint { margin: 6px 0 0; }
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 16px; }
.filterbar select { width: 100%; max-width: 280px; min-height: 36px; padding: 0 28px 0 10px; background: var(--code-bg); border: 1px solid var(--control-stroke); border-radius: var(--radius); }
.filterbar .check { display: flex; align-items: center; gap: 6px; font-size: .875rem; min-height: 36px; }
.filterbar input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--accent); }
.search-summary { display: flex; align-items: start; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--stroke); }
.search-summary .operators { margin: 0; max-width: 70%; }
.search-summary .result-count { margin-top: 4px; }
#search-results { gap: 0; }
#search-results .result { background: none; border: 0; border-bottom: 1px solid var(--stroke); padding: 18px 4px; text-decoration: none; border-radius: 0; }
#search-results .result:hover, #search-results .result:focus-visible { background: var(--surface-subtle); }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#search-results .title { font-family: var(--font-display); font-size: .9375rem; line-height: 1.4; }
#search-results .snippet { font-size: .875rem; line-height: 1.5; margin: 7px 0 10px; }
#search-results .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .75rem; }
.result-table { color: var(--dim); }
.ready-label { color: var(--ok); }
.result-heading > .ui-icon { color: var(--quiet); }
.load-more { margin: 20px auto 0; }
.search-empty { padding: 36px 0; display: grid; justify-items: start; gap: 16px; }
.code-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--stroke); }
.code-label { flex: 1; font: .75rem var(--mono); color: var(--quiet); }
.query-purpose { color: var(--dim); font-size: .9375rem; line-height: 1.6; }
.query-note { gap: 18px; }
.note .note-detail { border: 0; border-top: 1px solid var(--stroke); border-radius: 0; background: none; padding: 0; }
.note-detail > summary { min-height: 42px; font-weight: 550; }
.note-detail > summary::before { content: "+"; width: 24px; flex: none; color: var(--quiet); }
.note-detail[open] > summary::before { content: "-"; }
.note-detail h2 { display: none; }
.note-detail .props { background: none; border: 0; padding: 0; }
.note-detail > div > section { display: grid; gap: 12px; }
.query-note .badges { gap: 12px; }
.query-note > header .badge { border: 0; padding: 0; background: none; }
.query-note .fields { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.form-actions { display: flex; gap: 8px; margin-top: 16px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.time-control { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.field .time-control > input[type="text"] { flex: 1 1 0; width: auto; min-width: 0; }
.field .time-control .icon-button.button { width: 36px; height: 36px; }
.field .time-control .native-picker { position: absolute; right: 0; bottom: 0; width: 36px; height: 36px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.field .time-control .native-picker.visible { position: static; flex: 1 1 100%; width: auto; height: auto; min-height: 36px; padding: 6px 10px; border: 1px solid var(--control-stroke); opacity: 1; pointer-events: auto; }
.field .help[data-tone="error"] { color: var(--danger); }
.field .help[data-tone="warn"] { color: var(--warn); }
.copy-fallback { display: block; width: 100%; min-height: 160px; padding: 12px; border: 1px solid var(--control-stroke); color: var(--ink); background: var(--code-bg); }
.graphpage { display: block; position: relative; }
.graphpage > .graph { height: 100%; }
.graph-tools { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.graph-tools .button { background: var(--paper); }
.graph-panel { position: absolute; top: 58px; left: 12px; bottom: 12px; width: min(284px, calc(100% - 24px)); z-index: 3; border: 1px solid var(--control-stroke); border-radius: var(--radius-floating); padding: 12px; box-shadow: 0 8px 24px #00000060; }
.graph-panel input[type="search"] { width: 100%; min-height: 36px; padding: 6px 8px; color: var(--ink); background: var(--code-bg); border: 1px solid var(--control-stroke); border-radius: var(--radius); }
.graph-caption { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 4px; max-width: min(420px, calc(100% - 24px)); padding: 10px 12px; background: var(--paper); border: 1px solid var(--stroke); border-radius: var(--radius); pointer-events: none; }
.graph-caption strong { font-size: .9375rem; font-weight: 550; overflow-wrap: anywhere; }
.graph .node .hit-area { pointer-events: all; stroke: none; }
.graph .node[data-active="true"] .shape { stroke: var(--accent); }
.graph .node:focus-visible .shape { stroke: var(--focus); }
.column-search { min-height: 36px; width: 100%; border: 1px solid var(--control-stroke); border-radius: var(--radius); padding: 6px 10px; color: var(--ink); background: var(--code-bg); }
.table-scroll { max-width: 100%; overflow: auto; }
.linklist .why { line-height: 1.5; margin-top: 4px; }
.chip { max-width: 100%; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) { .dialog[open] { animation: panel-enter var(--motion-enter) var(--motion-easing); } }
@keyframes panel-enter { from { transform: translateY(4px); } to { transform: translateY(0); } }
@media (max-width: 1100px) { .app { --left: 224px; } .library-bar { padding-inline: 12px; } }
@media (max-width: 760px) { .library-bar { padding: 10px 8px; gap: 6px; } .wordmark { display: none; } .browse-note .browse-heading { flex-wrap: wrap; } .browse-heading .button { min-height: 32px; } .filterbar > label { min-width: 0; max-width: 100%; } .filterbar select { max-width: 100%; } .note { padding-inline: 16px; } .tabstrip { flex-wrap: nowrap; } .tablist { order: 0; flex: 1; } .tabtools { order: 0; } .query-note h1 { overflow-wrap: anywhere; } }
