/* Semantic colors follow the named palettes; secondary text stays readable. */
:root {
  color-scheme: dark;
  --bg: #282828;
  --panel: #252525;
  --surface: #32302f;
  --hover: #3c3836;
  --border: #45403b;
  --text: #d4be98;
  --muted: #b0a18b;
  --accent: #a9b665;
  --warm: #e78a4e;
  --yellow: #d8a657;
  --blue: #7daea3;
  --purple: #d3869b;
  --red: #ea6962;
  --on-accent: #282828;
  --explorer-default-width: 240px;
  --mono: 'Monaspace Argon', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: 'Monaspace Argon', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="gruvbox"] {
  --bg: #282828;
  --panel: #242424;
  --surface: #32302f;
  --hover: #3c3836;
  --border: #504945;
  --text: #ebdbb2;
  --muted: #bdae93;
  --accent: #b8bb26;
  --warm: #fe8019;
  --yellow: #fabd2f;
  --blue: #83a598;
  --purple: #d3869b;
  --red: #fb4934;
  --on-accent: #282828;
}

[data-theme="panda"] {
  --bg: #292a2b;
  --panel: #242526;
  --surface: #303234;
  --hover: #393b3e;
  --border: #45484b;
  --text: #e6e6e6;
  --muted: #aeb5bd;
  --accent: #19f9d8;
  --warm: #ffb86c;
  --yellow: #ffcc95;
  --blue: #45a9f9;
  --purple: #ff75b5;
  --red: #ff4b82;
  --on-accent: #242526;
}

[data-theme="dracula"] {
  --bg: #282a36;
  --panel: #232530;
  --surface: #303341;
  --hover: #3a3d4e;
  --border: #484c62;
  --text: #f8f8f2;
  --muted: #b6b9ce;
  --accent: #bd93f9;
  --warm: #ffb86c;
  --yellow: #f1fa8c;
  --blue: #8be9fd;
  --purple: #ff79c6;
  --red: #ff5555;
  --on-accent: #282a36;
}

[data-theme="monokai-pro"] {
  --bg: #2d2a2e;
  --panel: #272528;
  --surface: #353136;
  --hover: #403b41;
  --border: #514b52;
  --text: #fcfcfa;
  --muted: #b6b0b7;
  --accent: #a9dc76;
  --warm: #fc9867;
  --yellow: #ffd866;
  --blue: #78dce8;
  --purple: #ab9df2;
  --red: #ff6188;
  --on-accent: #2d2a2e;
}

[data-theme="catppuccin-frappe"] {
  --bg: #303446;
  --panel: #292c3c;
  --surface: #363a4f;
  --hover: #414559;
  --border: #51576d;
  --text: #c6d0f5;
  --muted: #b5bfe2;
  --accent: #a6d189;
  --warm: #ef9f76;
  --yellow: #e5c890;
  --blue: #81c8be;
  --purple: #ca9ee6;
  --red: #e78284;
  --on-accent: #232634;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font: 14px var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-feature-settings: "calt" 1, "liga" 1; }
html.theme-ready *, html.theme-ready *::before, html.theme-ready *::after {
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, fill 250ms ease, stroke 250ms ease;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; margin: 0; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 3px;
}
::selection { color: var(--on-accent); background: var(--accent); }
svg { display: block; }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; color: var(--muted); font-size: 19px; flex-shrink: 0; padding: 0; }
.icon-button:hover { color: var(--text); background: var(--surface); }
.muted { color: var(--muted); } .accent { color: var(--accent); } .blue { color: var(--blue); }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 10px; z-index: 30; background: var(--accent); color: var(--on-accent); padding: 12px; }
.skip-link:focus { top: 10px; }
.workspace { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.titlebar, .explorer, .tab-strip, .editor-path, .statusbar, .terminal-toolbar { user-select: none; -webkit-user-select: none; }
.titlebar { height: 38px; flex: 0 0 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.window-mark { display: flex; align-items: center; gap: 11px; white-space: nowrap; font-size: 12px; }
.window-controls { display: flex; gap: 7px; margin-right: 8px; }
.window-controls i { display: block; width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.window-controls i:nth-child(2) { background: #febc2e; }
.window-controls i:nth-child(3) { background: #28c840; }
.titlebar-project { display: flex; align-items: center; gap: 6px; }
.zed-icon-folder { width: 14px; height: 14px; flex-shrink: 0; }
.workspace-name { font-weight: 600; color: var(--text); }
.workspace-name:hover { color: var(--accent); }
.titlebar-worktree, .titlebar-branch { color: var(--muted); display: flex; gap: 5px; align-items: center; font-size: 12px; }
.worktree-icon { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.branch-icon { width: 13px; height: 13px; flex-shrink: 0; color: var(--accent); }
.titlebar-divider { color: var(--border); margin: 0 1px; }
.profile-button { width: 28px; height: 28px; padding: 2px; border-radius: 50%; flex-shrink: 0; }
.profile-button:hover, .profile-button:focus-visible { background: var(--surface); }
.profile-button img { display: block; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.social-menu { position: fixed; top: 40px; right: 8px; left: auto; margin: 0; min-width: 164px; padding: 5px; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 12px 30px #0006; }
.social-menu-name { display: block; padding: 7px 9px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--border); margin-bottom: 3px; }
.social-menu a { display: flex; justify-content: space-between; gap: 14px; padding: 7px 9px; border-radius: 3px; font-size: 12px; }
.social-menu a:hover, .social-menu a:focus-visible { background: var(--surface); }
kbd { font: 10px var(--mono); color: var(--muted); padding: 2px 4px; border: 1px solid var(--border); border-radius: 3px; background: var(--bg); }
.workbench { display: grid; grid-template-columns: var(--explorer-width, 240px) minmax(0, 1fr); flex: 1; min-height: 0; position: relative; }
.explorer-hidden .workbench { grid-template-columns: minmax(0, 1fr); }
body.git-panel-open .workbench { grid-template-columns: var(--explorer-width, 240px) minmax(0, 1fr) var(--git-panel-width, 320px); }
body.explorer-hidden.git-panel-open .workbench { grid-template-columns: minmax(0, 1fr) var(--git-panel-width, 320px); }
.git-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-left: 1px solid var(--border); background: var(--bg); position: relative; width: var(--git-panel-width, 320px); }
.git-panel[hidden] { display: none; }
.git-panel-header { display: flex; align-items: center; justify-content: space-between; height: 35px; flex-shrink: 0; padding: 0 8px 0 10px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text); background: var(--bg); }
.git-tabs { display: flex; align-items: center; gap: 4px; }
.git-tab { padding: 4px 10px; font: 12px var(--sans); color: var(--muted); background: transparent; border: none; border-radius: 3px; cursor: pointer; transition: all 100ms ease; }
.git-tab:hover { color: var(--text); background: var(--surface); }
.git-tab.active { color: var(--text); background: var(--surface); font-weight: 600; }
.git-panel-close { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 3px; color: var(--muted); }
.git-panel-close:hover { color: var(--text); background: var(--surface); }
.git-panel-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.git-view-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.git-view-pane[hidden], #git-changes-view[hidden], #git-history-view[hidden], [hidden] { display: none !important; }
.git-overall-header { padding: 10px 14px 8px; border-bottom: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.git-profile-badge { display: flex; align-items: center; gap: 9px; }
.git-avatar-badge { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.git-profile-text { display: flex; flex-direction: column; line-height: 1.25; }
.git-profile-title { font-size: 12px; font-weight: 600; color: var(--text); }
.git-profile-sub { font-size: 11px; color: var(--blue); text-decoration: none; }
.git-profile-sub:hover { text-decoration: underline; }
.git-repo-filters { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.git-repo-filters::-webkit-scrollbar { display: none; }
.git-filter-pill { font: 11px var(--sans); padding: 2px 8px; border-radius: 12px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); cursor: pointer; white-space: nowrap; transition: all 100ms ease; }
.git-filter-pill:hover { color: var(--text); background: var(--hover); }
.git-filter-pill.active { background: var(--hover); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.git-commit-list { display: flex; flex-direction: column; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.git-commit-row { position: relative; padding: 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); text-decoration: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: background 100ms ease; }
.git-commit-row:hover { background: var(--surface); }
.git-commit-msg { color: var(--text); font: 12px var(--sans); font-weight: 500; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }
.git-commit-meta { display: flex; align-items: center; gap: 5px; font: 11px var(--sans); color: var(--muted); white-space: nowrap; }
.git-avatar-mini { width: 14px; height: 14px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.git-author { color: var(--muted); }
.git-sep { color: var(--border); font-size: 10px; }
.git-time { color: var(--muted); }
.git-repo-pill { font: 10px/1 var(--mono); padding: 2px 4px; border-radius: 3px; background: var(--hover); color: var(--yellow); }
.git-hash { font: 10px/1 var(--mono); color: var(--muted); }
.git-commit-row:hover .git-hash { color: var(--yellow); }
.git-tooltip { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #1c1c1c; border: 1px solid var(--border); color: var(--text); font: 10px var(--mono); padding: 3px 6px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity 120ms ease; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); z-index: 10; white-space: nowrap; }
.git-commit-row:hover .git-tooltip { opacity: 1; }
#git-changes-view { padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.git-branch-banner { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--accent); padding: 7px 10px; background: var(--surface); border-radius: 4px; border: 1px solid var(--border); }
.git-section { display: flex; flex-direction: column; gap: 6px; }
.git-section-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.git-badge { font: 10px var(--mono); color: var(--muted); }
.git-clean-note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.git-repo-link { display: flex; justify-content: space-between; align-items: center; padding: 7px 9px; border-radius: 4px; background: var(--surface); font-size: 12px; color: var(--text); text-decoration: none; border: 1px solid var(--border); }
.git-repo-link:hover { color: var(--accent); border-color: var(--muted); }
.git-repo-quicklist { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.git-repo-quicklist a { color: var(--blue); text-decoration: none; }
.git-repo-quicklist a:hover { text-decoration: underline; }
.explorer { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--border); background: var(--bg); position: relative; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.explorer:hover { scrollbar-color: var(--border) transparent; }
.explorer::-webkit-scrollbar { width: 5px; }
.explorer::-webkit-scrollbar-track { background: transparent; }
.explorer::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.explorer:hover::-webkit-scrollbar-thumb { background: var(--border); }
.explorer::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.explorer-hidden .explorer { display: none; }
.explorer-resizer { position: absolute; top: 0; left: calc(var(--explorer-width, 240px) - 4px); width: 8px; bottom: 0; cursor: col-resize; z-index: 5; touch-action: none; background: transparent; outline: none; }
.explorer-hidden .explorer-resizer { display: none; }
.explorer-resizer:hover, .explorer-resizer:active { background: transparent; }
.explorer-resizer:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.explorer-resizing, .explorer-resizing * { cursor: col-resize !important; user-select: none !important; }
.project-tree-container { padding: 0 6px 0 2px; }
summary { list-style: none; cursor: pointer; user-select: none; }
summary::-webkit-details-marker { display: none; }
.folder-root, .folder-header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--text);
  border-radius: 3px;
  transition: background-color 100ms ease;
}
.folder-root { font-weight: 600; padding-left: 6px; }
.folder-root:hover, .folder-header:hover { background: var(--surface); }
.folder-icon { width: 14px; height: 14px; fill: var(--blue); flex-shrink: 0; }
.project-folder .folder-icon { fill: var(--yellow); }
.folder-open, details[open] > summary > .folder-icon > .folder-closed { display: none; }
details[open] > summary > .folder-icon > .folder-open { display: block; }
.folder-count { margin-left: auto; margin-right: 8px; font: 10px var(--mono); font-weight: 400; color: var(--muted); padding: 0 2px; }
.tree-contents { position: relative; margin-left: 13px; border-left: 1px solid var(--border); padding-left: 2px; }
.file-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 3px;
  transition: background-color 100ms ease, color 100ms ease;
}
.file-link:hover { background: var(--surface); color: var(--text); }
.file-link.active { background: var(--surface); color: var(--text); font-weight: 500; }
.tree-leaf-static {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 3px;
  user-select: none;
  transition: background-color 100ms ease, color 100ms ease;
}
.tree-leaf-static:hover { background: var(--surface); color: var(--text); }
.file-icon { color: var(--blue); font: 9px var(--mono); font-weight: 700; width: 14px; text-align: center; flex-shrink: 0; }
.file-icon.art { color: var(--purple); } .file-icon.interests { color: var(--warm); }
.icon-yml { color: var(--warm); font-size: 11px; }
.icon-svg { color: var(--purple); font-size: 11px; }
.icon-img { color: var(--purple); font-size: 11px; }
.icon-md { color: var(--blue); }
.icon-js { color: var(--yellow); }
.icon-html { color: var(--warm); }
.icon-css { color: var(--blue); }
.icon-git { color: var(--warm); font-size: 12px; }
.icon-json { color: var(--accent); }
.icon-test { color: var(--blue); font-size: 12px; }
.project-nav { position: relative; margin-left: 13px; border-left: 1px solid var(--border); padding: 1px 0 1px 2px; }
.project-file { min-height: 26px; height: 26px; padding: 0 6px; gap: 6px; }
.project-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-icon { font: 8px var(--mono); font-weight: 700; display: inline-grid; place-items: center; color: var(--yellow); width: 14px; height: 14px; border: 1px solid currentColor; border-radius: 2px; flex-shrink: 0; }
.language-rust, .language-swift { color: var(--warm); } .language-lua, .language-typescript { color: var(--blue); } .language-java { color: var(--purple); }
.local-marker { margin-left: auto; margin-right: 8px; color: var(--muted); font: 9px var(--mono); padding-left: 2px; }
.tiny-palette { display: flex; gap: 4px; }
.tiny-palette i { height: 5px; width: 18px; background: var(--accent); border-radius: 1px; }
.tiny-palette i:nth-child(2) { background: var(--yellow); } .tiny-palette i:nth-child(3) { background: var(--warm); } .tiny-palette i:nth-child(4) { background: var(--red); } .tiny-palette i:nth-child(5) { background: var(--purple); } .tiny-palette i:nth-child(6) { background: var(--blue); }
.editor { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.tab-strip {
  display: flex;
  align-items: stretch;
  height: 32px;
  flex: 0 0 32px;
  max-height: 32px;
  background: var(--panel);
  position: relative;
  box-sizing: border-box;
}
.tab-history-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  height: 32px;
  border-right: 1px solid var(--tab-border);
  border-bottom: 1px solid var(--tab-border);
  box-sizing: border-box;
  flex-shrink: 0;
}
.tab-history-btn {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 100ms ease;
}
.tab-history-btn:hover { color: var(--text); background: var(--surface); }
.tab-history-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.tab-history-btn svg { width: 13px; height: 13px; }
.tabs {
  display: flex;
  align-items: flex-end;
  align-self: stretch;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  height: 32px;
  box-sizing: border-box;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  padding: 0 10px;
  color: var(--muted);
  font: 12px var(--sans);
  white-space: nowrap;
  height: 31px;
  background: transparent;
  position: relative;
  user-select: none;
  text-decoration: none;
  box-sizing: border-box;
}
.tab:hover:not(.active) { color: var(--text); background: var(--surface); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab.active { color: var(--text); font-weight: 500; }
.tab-close {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 3;
  transition: all 100ms ease;
}
.tab-close:hover { background: var(--surface); color: var(--text); }
.tab-close:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.tab-close svg, .tab-close-icon { width: 11px; height: 11px; display: block; }
.tab-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  height: 32px;
  border-left: 1px solid var(--tab-border);
  border-bottom: 1px solid var(--tab-border);
  box-sizing: border-box;
  flex-shrink: 0;
  margin-left: auto;
  background: var(--panel);
  opacity: 1;
  pointer-events: auto;
}
.tab-action-btn {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 100ms ease;
}
.tab-action-btn:hover { color: var(--text); background: var(--surface); }
.tab-action-btn[aria-pressed="true"] { color: var(--accent); background: var(--surface); }
.tab-action-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.tab-action-btn svg { width: 13px; height: 13px; }
.editor-path {
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  color: var(--muted);
  font: 12px var(--sans);
  background: var(--bg);
  box-sizing: border-box;
}
.editor-path-left {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#breadcrumb {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-path-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  height: 32px;
}
.editor-path-btn {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 100ms ease;
}
.editor-path-btn:hover { color: var(--text); background: var(--surface); }
.editor-path-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.file-language { display: flex; align-items: center; gap: 6px; font: 11px var(--sans); white-space: nowrap; margin-left: 4px; }
.file-language .icon { width: 13px; height: 13px; }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 48px 50px; outline: none; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.content:focus-visible { outline: none; }
.page { overflow-wrap: anywhere; max-width: 1050px; margin: 0 auto 0 0; }
.readme-label { display: flex; gap: 8px; align-items: center; color: var(--muted); font: 11px var(--mono); padding-bottom: 20px; }
.readme-label > span:last-child { margin-left: 4px; }
.readme-intro h1 { margin: 4px 0 13px; font-size: 38px; line-height: 1.3; font-weight: 600; letter-spacing: -1.3px; }
.readme-subtitle { color: var(--accent); font: 12px/1.9 var(--mono); }
.readme-subtitle span { color: var(--muted); margin: 0 5px; }
.readme-intro > p:not(.readme-subtitle) { max-width: 66ch; color: var(--muted); font-size: 15px; line-height: 1.85; margin: 16px 0 0; }
.readme-links { display: flex; flex-wrap: wrap; gap: 23px; margin: 18px 0 25px; font-size: 12px; color: var(--blue); }
.readme-links a { padding: 5px 0; }
.readme-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.profile-code { border: 1px solid var(--border); border-radius: 4px; max-width: 850px; margin: 23px 0 28px; overflow: hidden; }
.code-title { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--border); font: 11px var(--mono); color: var(--muted); }
.code-title > span:first-child { display: flex; gap: 8px; align-items: center; }
.profile-code pre { margin: 0; padding: 13px 0 15px; color: var(--text); font: 12px/1.9 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.code-line { display: flex; padding-right: 15px; }
.line-number { width: 43px; padding-right: 15px; flex-shrink: 0; text-align: right; color: var(--muted); user-select: none; }
.code-line > span:last-child { min-width: 0; }
.syntax-keyword { color: var(--purple); font-weight: 400; } .syntax-string { color: var(--accent); font-weight: 400; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 25px 0 5px; }
.section-title h2 { font-size: 19px; font-weight: 500; margin: 0; }
.section-title > a { color: var(--muted); font-size: 11px; white-space: nowrap; }
.section-title > a:hover { color: var(--accent); }
.featured-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.featured-project { padding: 17px 0 14px; border-bottom: 1px solid var(--border); }
.featured-project a { display: block; }
.featured-project a:hover .featured-name { color: var(--accent); }
.featured-project-top { display: flex; align-items: center; gap: 10px; }
.project-number { color: var(--muted); font: 10px var(--mono); }
.featured-name { font: 13px var(--mono); color: var(--blue); }
.featured-arrow { color: var(--muted); margin-left: auto; }
.featured-project p { margin: 10px 0; font-size: 13px; color: var(--muted); line-height: 1.75; }
.project-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--accent); font: 10px/1.7 var(--mono); }
.project-meta .local { color: var(--muted); }
.home-postscript { display: flex; gap: 13px; align-items: flex-start; padding-top: 25px; }
.home-postscript > span { color: var(--warm); font-size: 20px; }
.home-postscript p { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 0; }
.home-postscript strong { color: var(--text); font-weight: 500; }
.eyebrow { color: var(--muted); font: 10px/1.7 var(--mono); letter-spacing: .6px; }
.page-eyebrow { margin-bottom: 10px; }
.page-heading { font-size: 32px; line-height: 1.3; font-weight: 600; letter-spacing: -.8px; margin: 12px 0 17px; }
.page-heading span { color: var(--accent); }
.page-lead { max-width: 800px; font-size: 15px; line-height: 1.9; color: var(--muted); }
.prose { max-width: 74ch; }
.prose h2 { font-size: 20px; font-weight: 500; margin: 30px 0 12px; letter-spacing: -.3px; }
.prose p { font-size: 15px; line-height: 1.95; color: var(--muted); }
.prose p strong { color: var(--text); font-weight: 500; }
.prose a:not(.primary-link) { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.inline-note { border-left: 2px solid var(--blue); padding: 12px 19px; margin: 25px 0; color: var(--muted); font: 12px/1.9 var(--mono); }
.inline-note strong { color: var(--text); font-weight: 400; }
.journey { display: grid; grid-template-columns: 100px minmax(0, 1fr); margin: 25px 0; }
.journey-year { color: var(--accent); font: 11px var(--mono); padding-top: 18px; }
.journey-detail { padding: 15px 0 18px 20px; border-left: 1px solid var(--border); }
.journey-detail h3 { font-size: 15px; font-weight: 500; margin: 0 0 8px; }
.journey-detail p { font-size: 13px; margin: 0; }
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0 17px; }
.filter { padding: 7px 12px; color: var(--muted); border: 1px solid transparent; border-radius: 4px; font-size: 12px; }
.filter:hover { background: var(--surface); color: var(--text); }
.filter[aria-pressed="true"] { background: var(--surface); border-color: var(--accent); color: var(--text); }
.projects-list { border-top: 1px solid var(--border); }
.project-row { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; gap: 10px; padding: 21px 8px 21px 0; border-bottom: 1px solid var(--border); align-items: start; }
.project-row:hover { background: var(--surface); }
.project-row .project-number { padding-top: 3px; }
.project-row h2 { font: 14px var(--mono); margin: 0 0 10px; color: var(--blue); }
.project-row p { font-size: 13px; line-height: 1.8; color: var(--muted); margin: 0 0 10px; }
.project-status { max-width: 150px; font: 10px/1.9 var(--mono); color: var(--muted); text-align: right; }
.public-label { color: var(--accent); }
.row-arrow { display: inline-block; padding-top: 11px; }
.back-link { display: inline-block; font-size: 12px; margin-bottom: 25px; color: var(--muted); }
.project-detail-status { color: var(--muted); font: 12px var(--mono); margin: 21px 0; }
.tech-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.tech-tag { padding: 5px 9px; border: 1px solid var(--border); color: var(--blue); font: 11px var(--mono); border-radius: 3px; }
.spec-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.spec-metric { padding: 4px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; font: 11px var(--mono); color: var(--accent); }
.arch-diagram { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 18px 20px; margin: 18px 0 24px; font: 12px/1.7 var(--mono); color: var(--accent); white-space: pre; overflow-x: auto; }
.arch-diagram code { font-family: inherit; color: inherit; }
.subsystem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 18px 0 24px; }
.subsystem-card { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 16px; }
.subsystem-card h4 { font: 13px var(--mono); color: var(--blue); margin: 0 0 6px; }
.subsystem-card p { font-size: 13px; line-height: 1.6; margin: 0; color: var(--muted); }
.project-deep-dive { margin: 18px 0; }
.project-deep-dive p { margin: 0 0 14px; line-height: 1.8; }
.detail-list { padding-left: 20px; font-size: 15px; color: var(--muted); line-height: 1.9; }
.detail-list li { padding: 5px 0; }
.code-block { background: var(--panel); border: 1px solid var(--border); border-radius: 3px; padding: 20px; margin: 25px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.9 var(--mono); color: var(--accent); }
.detail-footer { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 27px; }
.detail-footer > span { font-size: 12px; color: var(--muted); }
.primary-link { display: inline-flex; align-items: center; gap: 16px; padding: 9px 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }
.primary-link:hover { color: var(--accent); border-color: var(--accent); }
.text-link { display: inline-block; padding: 9px 0; font-size: 12px; }
.text-link:hover { color: var(--accent); } .text-link > span { margin-left: 7px; }
.color-study { display: flex; gap: 5px; height: 110px; margin: 28px 0 12px; }
.color-study > div { display: flex; align-items: flex-end; flex: 1; min-width: 0; padding: 10px; font: 11px var(--mono); color: var(--on-accent); background: var(--accent); }
.color-study > div:nth-child(2) { background: var(--yellow); } .color-study > div:nth-child(3) { background: var(--warm); } .color-study > div:nth-child(4) { background: var(--purple); } .color-study > div:nth-child(5) { background: var(--blue); }
.color-study-caption { color: var(--muted); font: 10px var(--mono); }
.hackathon-list { display: flex; flex-direction: column; gap: 16px; margin: 20px 0; }
.hackathon-card { padding: 16px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
.hackathon-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.hackathon-year { font: 12px var(--mono); color: var(--accent); font-weight: 600; }
.hackathon-badge { font: 11px var(--mono); padding: 2px 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; color: var(--text); }
.hackathon-card h3 { font-size: 16px; font-weight: 500; margin: 0 0 4px; color: var(--text); }
.hackathon-context { font: 12px var(--mono); color: var(--muted); margin: 0 0 10px; }
.hackathon-link { font: 12px var(--mono); color: var(--accent) !important; text-decoration: underline; text-underline-offset: 3px; display: inline-block; margin-top: 6px; }
.oss-list { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; }
.oss-card { padding: 14px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
.oss-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.oss-repo { font: 12px var(--mono); color: var(--blue); font-weight: 600; }
.oss-badge { font: 11px var(--mono); color: var(--accent) !important; text-decoration: underline; }
.oss-card h3 { font-size: 15px; font-weight: 500; margin: 0 0 6px; color: var(--text); }
.ecosystem-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 20px 0; }
.ecosystem-card { padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; display: flex; flex-direction: column; }
.eco-tag { font: 10px var(--mono); color: var(--accent); letter-spacing: .5px; margin-bottom: 6px; display: block; }
.ecosystem-card h3 { font-size: 15px; font-weight: 500; margin: 0 0 8px; color: var(--text); }
.ecosystem-card p { flex: 1; }
.interest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; margin: 30px 0; }
.interest-section { border-top: 1px solid var(--border); padding-top: 20px; }
.interest-section h2 { font-size: 21px; font-weight: 500; margin: 12px 0 17px; }
.music-row { display: flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--border); padding: 14px 0; font: 14px var(--mono); }
.music-row > span:first-child { color: var(--muted); font-size: 10px; }
.equalizer { margin-left: auto; color: var(--accent); font-size: 12px; letter-spacing: 2px; }
.anime-row { padding: 15px 0; border-bottom: 1px solid var(--border); font-size: 15px; line-height: 1.7; }
.anime-row span { display: block; color: var(--muted); font: 10px var(--mono); margin-top: 7px; }
.interest-footnote { color: var(--muted); font: 11px/1.9 var(--mono); margin-top: 20px; }
.terminal { display: flex; flex-direction: column; position: relative; flex: 0 0 var(--terminal-height, 240px); max-height: calc(100% - 32px); min-height: 0; background: var(--bg); border-top: 1px solid var(--border); }
.terminal[hidden] { display: none; }
.terminal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 18px; font: 12px/1.7 var(--mono); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.terminal-intro { margin-bottom: 12px; }
.terminal-intro p { color: var(--muted); margin: 6px 0 0; }
.terminal-welcome { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.terminal-welcome .accent { color: var(--accent); }
.terminal-hint { display: block; margin: 6px 0 12px; color: var(--muted); font-size: 10px; }
.inline-command { color: var(--blue); padding: 0; text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.inline-command:hover { color: var(--accent); }
.terminal-entry { margin-bottom: 12px; }
.terminal-entry-prompt { margin-bottom: 2px; }
.terminal-chevron { color: var(--purple); flex-shrink: 0; font-weight: 700; font-size: 13px; }
.terminal-typed { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.terminal-entry-output { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font: inherit; margin: 4px 0 0; }
.prompt-path { color: var(--blue); font-weight: 500; }
.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 26px;
  flex: 0 0 26px;
  padding: 0 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  background: var(--panel);
  box-sizing: border-box;
}
.statusbar-left, .statusbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  font: inherit;
  padding: 0 5px;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 100ms ease;
}
.status-btn:hover {
  color: var(--text);
  background: var(--surface);
}
.status-btn.selected,
.status-btn[aria-expanded="true"] {
  color: var(--accent);
}
.status-btn.selected:hover,
.status-btn[aria-expanded="true"]:hover {
  color: var(--accent);
  background: var(--surface);
}
.status-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
.status-btn.selected .sidebar-fill { opacity: 0.8; }
.status-btn:not(.selected) .sidebar-fill { opacity: 0.15; }
.status-icon {
  width: 20px;
  height: 20px;
  justify-content: center;
  padding: 0;
}
.status-icon svg { width: 13px; height: 13px; }
.status-separator { color: var(--border); margin: 0 2px; }
.status-diagnostics {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  width: 16px;
  color: var(--muted);
}
.status-diagnostics svg {
  color: var(--accent);
  width: 12px;
  height: 12px;
}
.status-item {
  color: var(--muted);
  font-size: 11px;
  user-select: none;
}
.status-cursor { font-variant-numeric: tabular-nums; }
.status-lang, .status-indent { cursor: default; }
.branch-label { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.branch-label .branch-icon { width: 12px; height: 12px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; background: var(--accent); }
.status-message { color: var(--muted); }
.palette-bullet { color: var(--yellow); font-size: 9px; }
.picker { padding: 0; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; width: min(540px, calc(100vw - 30px)); max-height: calc(100dvh - 100px); margin: 75px auto auto; box-shadow: 0 18px 65px #0006; overflow: auto; }
.picker::backdrop { background: #0005; }
.picker-heading { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px 0 20px; }
.picker-heading h2 { font-size: 15px; font-weight: 500; margin: 0; }
.picker-description { font-size: 12px; color: var(--muted); margin: 7px 20px 17px; }
.theme-options { display: grid; gap: 2px; padding: 0 8px; }
.theme-option { padding: 10px 12px; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid transparent; border-radius: 4px; }
.theme-option:hover { background: var(--surface); }
.theme-option[aria-pressed="true"] { background: var(--surface); border-color: var(--border); }
.theme-option-top { display: flex; align-items: center; gap: 12px; width: 205px; flex-shrink: 0; font-size: 13px; }
.theme-check { visibility: hidden; color: var(--accent); margin-left: auto; }
.theme-option[aria-pressed="true"] .theme-check { visibility: visible; }
.theme-chips { display: flex; align-items: center; gap: 4px; flex: 1; }
.theme-chip { width: 15px; height: 12px; border-radius: 2px; }
.favorite-label { margin-left: auto; font-size: 10px; color: var(--muted); }
.theme-preview { border-top: 1px solid var(--border); margin: 15px 20px 0; padding-top: 15px; display: grid; grid-template-columns: 1fr 150px; gap: 12px 15px; align-items: center; }
.small-label { font-size: 11px; color: var(--muted); }
.current-swatches { display: flex; gap: 3px; }
.current-swatches > span { height: 14px; flex: 1; border-radius: 2px; }
.theme-preview p { grid-column: 1 / -1; font: 11px var(--mono); color: var(--muted); margin: 0 0 12px; }
.picker-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding: 12px 20px; color: var(--muted); font-size: 11px; }
.picker-footer a:hover { color: var(--text); }.picker-footer kbd { font-size: 9px; }
.file-picker-search { display: flex; align-items: center; gap: 13px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--border); }
.file-picker-search > .icon { color: var(--muted); }
#file-query { flex: 1; min-width: 0; background: none; border: 0; height: 35px; outline: none; font-size: 14px; }
#file-query::placeholder { color: var(--muted); }
#file-query:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-results { padding: 7px; max-height: min(460px, 60dvh); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.file-result { display: flex; align-items: center; gap: 13px; width: 100%; padding: 10px 13px; border-radius: 4px; text-align: left; }
.file-result:hover, .file-result.active { background: var(--surface); }
.file-result > span:nth-child(2) { min-width: 0; }.file-result-name, .file-result-path { display: block; }
.file-result-name { font-size: 13px; }.file-result-path { color: var(--muted); font: 10px var(--mono); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; }
.file-result-enter { color: var(--muted); margin-left: auto; visibility: hidden; }.file-result.active .file-result-enter { visibility: visible; }
.empty-files { color: var(--muted); padding: 15px; font-size: 13px; line-height: 1.8; }
.drawer-backdrop { display: none; }
.noscript-message { position: fixed; top: 70px; left: 20px; right: 20px; padding: 25px; background: var(--surface); border: 1px solid var(--accent); z-index: 50; }
.noscript-message a { text-decoration: underline; }
@media (min-width: 1700px) {
  :root { --explorer-default-width: 270px; }
  .content { padding-left: 60px; padding-right: 60px; }
  .page:not(.prose) { max-width: 1140px; }
}
@media (max-width: 1100px) {
  :root { --explorer-default-width: 220px; }
  .content { padding-left: 30px; padding-right: 30px; }
  .window-mark { gap: 9px; }.workspace-alias, .titlebar-divider { display: none; }
}
@media (max-width: 760px) {
  .explorer-resizer { display: none; }
  .workbench, .explorer-hidden .workbench { grid-template-columns: minmax(0, 1fr); }
  .explorer, .explorer-hidden .explorer { display: none; position: fixed; top: 38px; left: 0; bottom: 26px; width: 260px; z-index: 12; box-shadow: 12px 0 35px #0004; }
  .explorer-open .explorer { display: flex; }
  .explorer-open .drawer-backdrop:not([hidden]) { display: block; position: fixed; inset: 38px 0 26px 260px; background: #0005; z-index: 11; }
  .window-controls { gap: 6px; margin-right: 4px; }.window-controls i { width: 9px; height: 9px; }
  .titlebar { padding: 0 10px; gap: 8px; }.titlebar-worktree, .titlebar-branch, .titlebar-divider { display: none; }
  .content { padding: 22px 24px 35px; }
  .editor-path { padding: 0 16px; font-size: 11px; }.file-language { font-size: 10px; }
  .tab { padding: 0 14px; }
  .readme-intro h1 { font-size: 34px; }
  .readme-subtitle { font-size: 11px; }
  .status-message { display: none; }.statusbar .status-dot { display: none; }
  .statusbar { padding-right: 6px; }.statusbar > div { gap: 6px; }
}
@media (max-width: 540px) {
  .window-controls { display: none; }
  .content { padding: 18px 16px 32px; }.file-language { display: none; }
  .readme-label { font-size: 10px; padding-bottom: 13px; }.readme-label > span:last-child { display: none; }
  .readme-intro h1 { font-size: 28px; letter-spacing: -.8px; }.readme-intro > p:not(.readme-subtitle) { font-size: 14px; }
  .readme-subtitle { max-width: 265px; line-height: 1.9; }.readme-subtitle span { margin: 0 1px; }
  .readme-links { gap: 16px; font-size: 12px; }
  .profile-code pre { font-size: 12px; }.code-title { padding: 9px 11px; font-size: 10px; }.code-title > span:last-child { font-size: 9px; }
  .line-number { width: 28px; padding-right: 8px; }.code-line { padding-right: 8px; }
  .featured-projects { grid-template-columns: 1fr; }.section-title h2 { font-size: 17px; }.section-title > a { font-size: 10px; }
  .featured-project p { font-size: 13px; }.featured-project { padding: 17px 0; }
  .page-heading { font-size: 28px; }.prose p, .page-lead, .detail-list { font-size: 14px; }
  .prose h2 { font-size: 19px; }.inline-note { font-size: 12px; padding: 10px 14px; }
  .journey { grid-template-columns: 72px minmax(0, 1fr); }.journey-year { font-size: 10px; }.journey-detail { padding-left: 15px; }
  .project-row { grid-template-columns: 23px minmax(0, 1fr); }.project-status { grid-column: 2; text-align: left; max-width: none; }.row-arrow { display: none; }
  .project-row h2 { font-size: 13px; }.filter { padding: 7px 9px; font-size: 11px; }
  .interest-grid { grid-template-columns: 1fr; }.color-study { height: 85px; gap: 3px; }.color-study > div { font-size: 9px; padding: 8px; }.color-study-caption { font-size: 8px; }
  .terminal-body { padding: 10px 14px; font-size: 12px; }.terminal-hint { display: none; }
  .statusbar { font-size: 10px; padding-left: 3px; }.statusbar > div { gap: 4px; }.branch-label { display: none; }
  .picker { margin-top: 52px; width: calc(100vw - 20px); max-height: calc(100dvh - 75px); }
  .theme-option { padding: 11px 10px; gap: 10px; }.theme-option-top { width: auto; flex: 1; min-width: 0; font-size: 12px; }.theme-chip { width: 8px; height: 11px; }.theme-chips { gap: 3px; flex: 0 0 auto; }.favorite-label { display: none; }
  .picker-footer { padding: 11px 15px; font-size: 10px; }.theme-preview { margin-left: 18px; margin-right: 18px; grid-template-columns: 1fr 110px; }
  .theme-preview p { font-size: 10px; }.picker-description { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html.theme-ready *, html.theme-ready *::before, html.theme-ready *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.terminal-resizer { position: absolute; top: -4px; left: 0; right: 0; height: 8px; cursor: row-resize; z-index: 5; touch-action: none; background: transparent; outline: none; }
.terminal-resizer:hover, .terminal-resizer:active { background: transparent; }
.terminal-resizer:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.terminal-resizing, .terminal-resizing * { cursor: row-resize !important; user-select: none !important; }
.picker-heading, .file-picker-search { cursor: grab; user-select: none; touch-action: none; }
.dialog-dragging, .dialog-dragging * { cursor: grabbing !important; user-select: none !important; }

.terminal-maximized .tab-strip, .terminal-maximized .editor-path, .terminal-maximized .content { display: none; }
.terminal-maximized .terminal { flex: 1; }
.terminal-maximized .terminal-resizer { display: none; }
.terminal-entry-output { padding: 4px 0 3px; line-height: 1.9; }
.terminal-error { color: var(--warm); }
.terminal-link { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.terminal-list { display: grid; gap: 1px; max-width: 800px; margin: 7px 0 10px; }
.terminal-list-row { display: grid; grid-template-columns: minmax(140px, 210px) minmax(0, 1fr); gap: 18px; padding: 4px 8px; text-align: left; font: inherit; border-radius: 3px; }
.terminal-list-row:hover, .terminal-list-row:focus-visible { background: var(--surface); }
.terminal-directory { color: var(--blue); }
.terminal-filename { color: var(--accent); overflow-wrap: anywhere; }
.terminal-file-detail { color: var(--muted); overflow-wrap: anywhere; }
.terminal-footnote { color: var(--muted); font: 11px/1.8 var(--mono); padding: 6px 8px; }
.terminal-completions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.terminal-completions button { border: 1px solid var(--border); color: var(--blue); padding: 3px 7px; font: inherit; border-radius: 3px; }
.terminal-completions button:hover { background: var(--surface); }
.terminal-fetch { display: flex; gap: 24px; align-items: flex-start; padding: 10px 8px 12px; }
.fetch-art { color: var(--accent); font: 15px/1.15 var(--mono); margin: 0; user-select: none; }
.fetch-info { min-width: 0; flex: 1; }
.fetch-title { color: var(--text); font-weight: 600; padding-bottom: 4px; }
.fetch-rows { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 2px 13px; margin: 4px 0 10px; }
.fetch-rows dt { color: var(--warm); }
.fetch-rows dd { color: var(--muted); margin: 0; overflow-wrap: anywhere; }
@media (max-width: 540px) {
  .status-cursor, .status-lang, .statusbar-right .status-separator:first-of-type { display: none; }
  .terminal-welcome { gap: 3px; flex-direction: column; }
  .terminal-intro p { line-height: 1.9; }
  .terminal-list-row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 6px 4px; }
  .terminal-file-detail { font-size: 10px; }
  .terminal-fetch { gap: 15px; padding: 12px 0 16px; }
  .fetch-art { font-size: 12px; }
  .fetch-rows { grid-template-columns: 48px minmax(0, 1fr); gap: 5px 9px; font-size: 10px; }
  .terminal-prompt-row1 { font-size: 11px; gap: 6px; }
}

.content::-webkit-scrollbar, .terminal-body::-webkit-scrollbar, .file-results::-webkit-scrollbar { width: 6px; height: 6px; }
.content::-webkit-scrollbar-track, .terminal-body::-webkit-scrollbar-track, .file-results::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb, .terminal-body::-webkit-scrollbar-thumb, .file-results::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.content:hover::-webkit-scrollbar-thumb, .terminal-body:hover::-webkit-scrollbar-thumb, .file-results:hover::-webkit-scrollbar-thumb { background: var(--border); }
.content::-webkit-scrollbar-thumb:hover, .terminal-body::-webkit-scrollbar-thumb:hover, .file-results::-webkit-scrollbar-thumb:hover { background: var(--muted); }

@media (max-width: 760px) {
  .folder-root, .folder-header, .file-link { min-height: 32px; }
  .statusbar { height: 38px; flex-basis: 38px; }
  .status-btn { min-height: 32px; }
  .status-icon { width: 32px; }
  .explorer, .explorer-hidden .explorer { bottom: 38px; }
  .explorer-open .drawer-backdrop:not([hidden]) { bottom: 38px; }
  body.git-panel-open .git-panel:not([hidden]) { display: flex; position: fixed; top: 38px; right: 0; bottom: 38px; width: min(300px, 85vw); z-index: 12; box-shadow: -4px 0 20px #0006; }
  .git-panel-open .drawer-backdrop:not([hidden]) { bottom: 38px; }
  .terminal-actions .tab-action-btn { width: 30px; height: 30px; }
  .terminal-toolbar { height: 38px; flex-basis: 38px; }
  #file-query { font-size: 16px; }
}

/* Pane chrome follows the pinned Zed reference; article typography stays local. */
.pane-layout { display: flex; flex: 1; min-height: 0; min-width: 0; overflow: hidden; }
.pane-group { display: flex; min-width: 0; min-height: 0; flex: 1; overflow: hidden; }
.pane-group.vertical { flex-direction: column; }
.editor-pane { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
.editor-pane { container-type: inline-size; }
.editor-pane .content { overscroll-behavior: contain; padding-inline: clamp(12px, 4cqw, 48px); }
.editor-pane { --tab-border: var(--border); --tab-active-bg: var(--surface); }
.editor-pane .tab-strip, .editor-pane .tab-actions { background: var(--bg); }
.editor-pane .tab-history-nav, .editor-pane .tabs, .editor-pane .tab-actions { height: 31px; }
.editor-pane .tabs { align-items: stretch; }
.editor-pane .tabs::after { content: ''; flex: 1; border-bottom: 1px solid var(--tab-border); }
[data-theme="gruvbox-material"] .editor-pane { --tab-border: #454545; --tab-active-bg: #373431; }
[data-theme="gruvbox"] .editor-pane { --tab-border: #454545; }
.pane-tab { border-right: 1px solid var(--tab-border); border-bottom: 1px solid var(--tab-border); }
.pane-tab.selected { border-bottom-color: transparent; background: var(--tab-active-bg); }
.pane-tab .file-icon { color: inherit; }
.pane-tab { position: relative; display: flex; flex-shrink: 0; height: 31px; }
.pane-tab .tab { padding-right: 30px; font-weight: 500; }
.pane-tab .tab-close { z-index: 3; }
.pane-tab:not(.selected):not(:hover):not(:focus-within) .tab-close { opacity: 0; }
.pane-tab .tab-close:focus-visible { opacity: 1; }
.preview-tab .tab-name { font-style: italic; }
.tab-close svg { width: 12px; height: 12px; }
.tab-history-btn:disabled { opacity: .4; cursor: default; }
.pane-separator { flex: 0 0 1px; background: var(--border); cursor: col-resize; position: relative; touch-action: none; z-index: 4; }
.vertical > .pane-separator { cursor: row-resize; z-index: 3; }
.pane-separator:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.pane-layout.single-pane .pane-group { display: contents; }
.pane-layout.single-pane .pane-separator { display: none; }
.pane-layout [hidden], .buffer-search[hidden] { display: none !important; }
.pane-layout.single-pane .editor-pane { flex: 1 !important; }
.pane-switcher { display: none; padding: 4px 8px; gap: 8px; align-items: center; font-size: 11px; background: var(--panel); border-bottom: 1px solid var(--border); }
.pane-switcher select { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); font: inherit; padding: 4px; }
.empty-pane { display: grid; justify-content: center; align-content: center; gap: 12px; min-height: 100%; color: var(--muted); text-align: center; }
.buffer-search { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 5px 8px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 11px; }
.buffer-search input { flex: 1; min-width: 90px; width: 100px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 5px 7px; font: 12px var(--sans); }
.buffer-search input[aria-invalid="true"] { border-color: var(--accent); }
.buffer-search button { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 25px; padding: 3px; background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 3px; font: 11px var(--mono); cursor: pointer; }
.buffer-search button:hover, .buffer-search button[aria-pressed="true"] { background: var(--surface); color: var(--text); border-color: var(--border); }
.buffer-search button:disabled { opacity: .4; cursor: default; }
.search-options { display: flex; }
.match-count { color: var(--muted); margin: 0 4px; }
.content mark[data-search-match] { background: var(--surface); color: var(--text); outline: 1px solid var(--accent); border-radius: 1px; }
.content mark.current-match { background: var(--accent); color: var(--bg); }
.file-result mark { background: transparent; color: var(--accent); font-weight: 700; }
.workspace-menu { position: fixed; z-index: 100; width: 190px; padding: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 5px; box-shadow: 0 8px 24px #0005; }
.workspace-menu button { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 3px; color: var(--text); background: transparent; font: 12px var(--sans); text-align: left; cursor: pointer; }
.workspace-menu button:hover, .workspace-menu button:focus-visible { background: var(--surface); }
.terminal-maximized .pane-layout, .terminal-maximized .pane-switcher { display: none; }
.editor.pane-zoomed #terminal, .editor.pane-zoomed #terminal-resizer { display: none !important; }
@media (max-width: 760px) { .pane-switcher.has-panes { display: flex; } }
@container (max-width: 560px) {
  .featured-projects, .interest-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 23px minmax(0, 1fr); gap: 10px; }
  .project-status { grid-column: 2; text-align: left; max-width: none; }
  .row-arrow { display: none; }
  .readme-intro h1 { font-size: 28px; }
}

@container (max-width: 400px) {
  .tab-history-nav { display: none; }
  .editor-path { padding-inline: 8px; }
  .editor-path-actions .file-language { display: none; }
  .buffer-search { gap: 2px; padding: 4px; }
  .readme-subtitle { font-size: 10px; }
  .journey { grid-template-columns: 1fr; }
}
#file-picker, #outline-picker { border-radius: 6px; background: var(--panel); margin-top: min(12vh, 90px); }
.statusbar button:focus-visible { outline-offset: -2px; }

@media (max-width: 760px) {
  .pane-layout .pane-group { display: contents !important; }
  .pane-layout .pane-separator, .pane-layout .editor-pane:not(.active-pane) { display: none !important; }
  .pane-layout .editor-pane.active-pane { display: flex !important; flex: 1 !important; }
}

#file-open-split { color: var(--text); font: inherit; padding: 3px 6px; border: 1px solid var(--border); border-radius: 3px; }
#file-open-split:hover { background: var(--surface); }
@media (max-width: 760px) { .buffer-search input, #outline-query { font-size: 16px; } }

/* Zed renders pane actions only while the pane or its context menu has focus. */
.editor-pane .tab-actions { display: none; }
.editor-pane.pane-focused .tab-actions, .editor-pane.menu-open .tab-actions { display: flex; }
.tab-action-btn:disabled, .editor-path-btn:disabled { opacity: .4; cursor: default; }
.content.scratch-file { padding: 0; display: flex; flex-direction: column; }
.scratch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--border); }
.scratch-toolbar button { padding: 3px 6px; border: 1px solid var(--border); border-radius: 3px; color: var(--text); }
.scratch-buffer { flex: 1; min-height: 0; width: 100%; resize: none; padding: 16px; border: 0; background: var(--bg); color: var(--text); font: 13px/1.7 var(--mono); tab-size: 2; }

.terminal-layout, .terminal-group { display: flex; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.terminal-group.vertical { flex-direction: column; }
.terminal-pane { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.terminal-session-host { display: flex; flex: 1; min-width: 0; min-height: 0; }
.terminal-toolbar { height: 32px; flex: 0 0 32px; display: flex; justify-content: space-between; align-items: center; padding: 0; background: var(--bg); border-bottom: 1px solid var(--border); box-sizing: border-box; }
.terminal-tabs { display: flex; align-items: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; height: 32px; box-sizing: border-box; }
.terminal-tabs::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
.terminal-tab { display: flex; align-items: center; flex-shrink: 0; padding: 0; background: var(--bg); color: var(--muted); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); height: 31px; box-sizing: border-box; }
.terminal-tab.selected { background: var(--surface); color: var(--text); border-bottom-color: transparent; }
.terminal-tab-select { display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; height: 100%; white-space: nowrap; font: 12px var(--sans); background: transparent; border: none; color: inherit; cursor: pointer; }
.terminal-tab-select svg { width: 13px; height: 13px; flex-shrink: 0; }
.terminal-tab-close { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: none; border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; margin-right: 6px; transition: all 100ms ease; }
.terminal-tab-close:not(:focus-visible) { opacity: 0; }
.terminal-tab:hover .terminal-tab-close, .terminal-tab:focus-within .terminal-tab-close { opacity: 1; }
.terminal-tab-close:hover { background: var(--surface); color: var(--text); }
.terminal-tab-close svg { width: 11px; height: 11px; }

.terminal-actions { display: none; align-items: center; gap: 4px; padding: 0 6px; height: 32px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); box-sizing: border-box; flex-shrink: 0; background: var(--panel); }
.terminal-focused .terminal-actions, .terminal-pane.menu-open .terminal-actions { display: flex; }
.terminal-body { min-width: 0; cursor: text; }
.terminal-prompt-box, .terminal-entry-prompt { display: flex; flex-direction: column; gap: 2px; }
.terminal-prompt-row1 { display: flex; align-items: baseline; gap: 8px; font: 12px/1.4 var(--mono); white-space: nowrap; flex-wrap: wrap; }
.prompt-user { color: var(--yellow); font-weight: 600; }
.prompt-arrow { color: var(--muted); }
.prompt-path { color: var(--blue); font-weight: 500; }
.prompt-branch { color: var(--warm); font-weight: 500; }
.prompt-time { color: var(--muted); font-size: 11px; }
.terminal-prompt-row2, .terminal-entry-command { display: flex; align-items: baseline; gap: 8px; min-height: 22px; font: inherit; }
.terminal-chevron { color: var(--purple); flex-shrink: 0; font-weight: 700; font-size: 13px; user-select: none; }
.terminal-form textarea { display: block; width: 0; flex: 1; min-width: 0; min-height: 22px; max-width: 100%; resize: none; overflow: hidden; border: 0; padding: 0; background: transparent; color: var(--text); font: inherit; line-height: 1.7; caret-color: var(--accent); outline: none; }
#terminal-input:focus-visible { outline: none; }
.terminal-entry-prompt .terminal-typed { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.terminal-pane-separator { flex: 0 0 1px; background: var(--border); cursor: col-resize; position: relative; touch-action: none; }
.terminal-group.vertical > .terminal-pane-separator { cursor: row-resize; }
.terminal-pane-separator:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.terminal-pane-switcher { display: none; background: var(--panel); color: var(--text); border: 1px solid var(--border); padding: 4px; font: 12px var(--sans); }
.terminal-maximized .terminal-group { display: contents; }
.terminal-maximized .terminal-pane:not(.active-terminal-pane), .terminal-maximized .terminal-pane-separator { display: none; }
.terminal-maximized .terminal-pane.active-terminal-pane { flex: 1 !important; }
@media (max-width: 760px) {
  .terminal-group { display: contents; }
  .terminal-pane:not(.active-terminal-pane), .terminal-pane-separator { display: none; }
  .terminal-pane.active-terminal-pane { flex: 1 !important; }
  .terminal-pane-switcher:not([hidden]) { display: block; }
  .terminal-form textarea { font-size: 16px; }
}


/* Zed-inspired rendered project-document viewer */
.page.project-document{width:100%;max-width:1220px;padding-bottom:42px}
.project-doc-filebar{display:flex;justify-content:space-between;align-items:center;gap:14px;min-height:31px;margin:-2px 0 24px;padding:0 0 10px;border-bottom:1px solid var(--border);color:var(--muted);font:11px/1.4 var(--mono)}
.project-doc-filepath{display:flex;align-items:center;gap:7px;min-width:0}.project-doc-filepath .file-icon{color:var(--blue);font:12px var(--sans)}.project-doc-filepath strong{color:var(--text);font-weight:500}
.doc-path-separator,.doc-breadcrumb-divider{color:var(--muted)}.project-doc-mode{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.doc-mode-dot,.outline-dot{width:6px;height:6px;display:inline-block;border-radius:50%;background:var(--green)}
.project-doc-grid{display:grid;grid-template-columns:minmax(0,790px) minmax(145px,185px);align-items:start;gap:clamp(24px,4vw,48px)}.project-doc-main{min-width:0}
.doc-frontmatter{padding:9px 12px;margin:0 0 24px;border-left:2px solid var(--border);background:color-mix(in srgb,var(--surface) 50%,transparent);font:11px/1.6 var(--mono)}
.doc-frontmatter-row{display:grid;grid-template-columns:66px minmax(0,1fr);gap:10px;padding:2px 0}.doc-frontmatter-row>span{color:var(--muted)}.doc-frontmatter-row strong{min-width:0;color:var(--text);font-weight:400;overflow-wrap:anywhere}
.project-doc-overview{padding-bottom:8px}.project-doc-overview .page-eyebrow{display:flex;align-items:center;gap:9px}.project-doc-overview .page-heading{margin:8px 0 12px;font-size:clamp(27px,3vw,34px);letter-spacing:-.85px}.project-doc-overview .page-lead{margin:0 0 10px;max-width:70ch}
.project-doc-summary{margin:12px 0 16px;color:var(--text)!important;font-size:14px!important;line-height:1.85!important}.project-doc-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin-top:15px;font-size:11px}.project-doc-source{color:var(--blue);text-decoration:none}.project-doc-source:hover,.project-reference-list a:hover{text-decoration:underline;text-underline-offset:3px}.project-doc-status,.project-doc-local{color:var(--muted);font-family:var(--mono)}
.project-doc-section{margin:27px 0 0;scroll-margin-top:18px}.project-doc-section>h2{display:flex;align-items:baseline;gap:9px;padding-bottom:8px;border-bottom:1px solid var(--border);margin:0 0 12px}.project-doc-section>h2:before{content:'#';color:var(--muted);font:13px var(--mono);opacity:.8}.project-doc-section p{margin:10px 0}
.project-doc-section code,.project-doc-summary code,.project-boundary-list code{padding:1px 4px;border:1px solid var(--border);border-radius:3px;background:var(--surface);color:var(--warm);font:.92em var(--mono);overflow-wrap:anywhere}
.project-doc-cards{display:grid;gap:8px;margin:14px 0 18px}.project-doc-card{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:12px 13px;border:1px solid var(--border);border-radius:4px;background:color-mix(in srgb,var(--panel) 66%,transparent)}.project-doc-card-index{color:var(--accent);font:11px var(--mono);padding-top:2px}.project-doc-card h3{margin:0 0 5px;color:var(--text);font-size:13px;line-height:1.5;font-weight:550}.project-doc-card p{margin:0;color:var(--muted);font-size:12px!important;line-height:1.75!important}.project-doc-validation .project-doc-card-index{color:var(--green)}.project-doc-steps .project-doc-card{border-left:2px solid color-mix(in srgb,var(--accent) 55%,var(--border))}
.project-document .subsystem-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:8px}.project-document .subsystem-card{padding:12px 13px;background:color-mix(in srgb,var(--panel) 65%,transparent)}.project-document .subsystem-card h3{margin:0 0 7px;color:var(--text);font-size:12px;font-weight:550}.project-document .subsystem-card p{font-size:12px;line-height:1.75}
.project-boundary-list{margin:8px 0;padding-left:21px}.project-boundary-list li{margin:8px 0;padding-left:3px;color:var(--muted);font-size:13px;line-height:1.8}.project-boundary-list li::marker{color:var(--warm)}
.project-code-heading{display:flex;justify-content:space-between;padding:7px 10px;border:1px solid var(--border);border-bottom:0;border-radius:4px 4px 0 0;background:var(--surface);color:var(--muted);font:10px var(--mono);text-transform:uppercase;letter-spacing:.06em}.project-document .code-block{margin-top:0;border-radius:0 0 4px 4px}
.project-reference-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}.project-reference-list li{padding:8px 0;border-bottom:1px solid var(--border);font-size:12px}.project-reference-list a{color:var(--blue);text-decoration:none}.project-reference-note{margin-top:12px!important;color:var(--muted);font:11px/1.7 var(--mono)!important}
.project-doc-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:30px;padding-top:17px;border-top:1px solid var(--border)}.project-doc-footer .primary-link{font-size:12px}.project-next-link{color:var(--muted);text-decoration:none;font-size:12px}.project-next-link:hover{color:var(--text)}
.project-outline{position:sticky;top:18px;align-self:start;min-width:0;border-left:1px solid var(--border);padding-left:12px}.project-outline-title{display:flex;justify-content:space-between;margin:2px 0 10px;color:var(--muted);font:10px var(--mono);letter-spacing:.08em}.project-outline-title span:last-child{color:var(--text)}.project-outline nav{display:grid;gap:2px}
.project-outline-link{display:grid;grid-template-columns:19px minmax(0,1fr);gap:5px;align-items:baseline;padding:5px 3px;border-radius:3px;color:var(--muted);font-size:11px;line-height:1.5;text-decoration:none}.project-outline-link>span:first-child{color:var(--muted);font:10px var(--mono);opacity:.7}.project-outline-link:hover,.project-outline-link:focus-visible{background:var(--surface);color:var(--text);outline:none}.project-outline-link[aria-current=location]{color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}.project-outline-link[aria-current=location]>span:first-child{color:var(--accent);opacity:1}
.project-outline-foot{display:flex;align-items:center;gap:7px;margin-top:18px;padding-top:9px;border-top:1px solid var(--border);color:var(--muted);font:10px var(--mono)}
@media(max-width:1000px){.project-doc-grid{grid-template-columns:minmax(0,1fr) 150px;gap:22px}.page.project-document{max-width:100%}}
@media(max-width:760px){.project-doc-filebar{align-items:flex-start}.project-doc-mode{font-size:10px}.project-doc-grid{display:flex;flex-direction:column;gap:20px}.project-doc-main{order:1;width:100%}.project-outline{position:static;order:0;width:100%;padding:8px 0 12px;border-left:0;border-bottom:1px solid var(--border)}.project-outline nav{display:flex;gap:4px;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin}.project-outline-link{display:inline-flex;flex:0 0 auto;gap:6px;padding:6px 8px;border:1px solid var(--border);white-space:nowrap}.project-outline-foot{display:none}.doc-frontmatter-row{grid-template-columns:54px minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.project-document *{scroll-behavior:auto!important}}


/* Project documents: a calmer Zed-inspired reading surface, without pretending every page must be raw Markdown. */
.project-reading-tools{display:flex;align-items:center;gap:6px;min-height:34px;padding:4px 14px;border-bottom:1px solid var(--border);background:var(--panel);font:10px var(--mono);color:var(--muted)}
.reading-tools-label{margin-right:auto;letter-spacing:.1em;font-size:9px}
.project-reading-tools button{border:1px solid var(--border);border-radius:4px;padding:5px 8px;background:var(--surface);color:var(--text);font:inherit;cursor:pointer}
.project-reading-tools button:hover,.project-reading-tools button:focus-visible{border-color:var(--accent);outline:none}
.project-reading-tools button[aria-pressed=true]{background:color-mix(in srgb,var(--accent) 13%,var(--surface));border-color:var(--accent)}
.project-document .project-doc-main{min-width:0}
.project-document .project-doc-section{scroll-margin-top:18px}
.project-document .project-doc-section h2{letter-spacing:-.025em}
.project-document .project-doc-overview .page-heading{letter-spacing:-.055em;line-height:1.08}
.project-document .project-doc-summary{max-width:72ch;font-size:14px;line-height:1.85;color:var(--text)}
.project-document .project-doc-section>p,.project-document .project-doc-section>ul{max-width:76ch;line-height:1.85}
.project-document .project-doc-card p,.project-document .subsystem-card p{line-height:1.75}
.project-document .doc-frontmatter{font-family:var(--mono)}
.project-document .project-outline{align-self:stretch}
.project-document .project-outline nav{position:sticky;top:12px}
.project-document.reading-focus .project-doc-grid{grid-template-columns:minmax(0, min(100%, 900px))}
.project-document.reading-focus .project-doc-main{max-width:900px;margin-inline:auto;width:100%}
.project-document.reading-focus .project-outline{display:none}
@media(max-width:760px){.project-reading-tools{flex-wrap:wrap;padding:6px 10px}.reading-tools-label{flex-basis:100%;margin:0}.project-document .project-outline nav{position:static}}
@media print{
  .project-reading-tools,.project-doc-filebar,.project-outline,.project-doc-footer,.statusbar,.terminal-dock,.explorer,.activity-bar{display:none!important}
  .project-document,.project-document .project-doc-main{max-width:none!important;width:100%!important}
  .project-document .project-doc-grid{display:block!important}
  .project-document .project-doc-section,.project-document .project-doc-overview{break-inside:avoid}
  .project-document{color:#222;background:#fff}
  .project-document a{color:#222;text-decoration:underline}
}


/* Reading flow: a lightweight progress rail, active outline, and explicit adjacent-project navigation. */
.project-reading-tools{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-height:38px;padding:6px 12px 10px}
.reading-tools-label{flex:0 0 auto;margin-right:2px;color:var(--accent);font-size:9px;letter-spacing:.12em}
.reading-section-label{min-width:0;max-width:clamp(90px,18vw,220px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font:11px var(--sans)}
.reading-progress-percent{flex:0 0 auto;color:var(--muted);font:10px var(--mono);font-variant-numeric:tabular-nums}
.reading-progress-track{position:absolute;bottom:0;left:0;right:0;height:2px;overflow:hidden;background:color-mix(in srgb,var(--border) 75%,transparent)}
.reading-progress-track>span{display:block;width:0;height:100%;background:var(--accent);transition:width .12s linear}
.project-reading-tools button{white-space:nowrap}
.project-reading-tools button:disabled{opacity:.38;cursor:default}
.project-document.outline-hidden .project-doc-grid{grid-template-columns:minmax(0,1fr)}
.project-document.outline-hidden .project-doc-main{max-width:880px;width:100%;margin-inline:auto}
.project-document.outline-hidden .project-outline{display:none}
.project-doc-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex-wrap:wrap}
.project-prev-link,.project-next-link{color:var(--muted);font-size:12px;text-decoration:none}
.project-prev-link:hover,.project-next-link:hover{color:var(--text)}
.project-prev-link:focus-visible,.project-next-link:focus-visible{outline:1px solid var(--accent);outline-offset:4px}
@media(max-width:760px){
  .project-reading-tools{gap:5px;padding:7px 10px 11px}
  .reading-tools-label{flex-basis:auto}
  .reading-section-label{max-width:35vw}
  .reading-progress-track{bottom:0}
  .project-doc-pagination{width:100%;justify-content:space-between;gap:8px}
  .project-prev-link,.project-next-link{max-width:49%;overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){.reading-progress-track>span{transition:none}}
@media print{
  .project-reading-tools{display:none!important}
  .project-doc-pagination{display:none!important}
}


/* Removed: document reading controls must remain in normal document flow. */

.project-document .project-doc-section,.project-document .project-doc-overview{scroll-margin-top:60px}
@media(max-width:760px){.project-document .project-doc-section,.project-document .project-doc-overview{scroll-margin-top:88px}}


/* Project execution-flow explorer: a clickable, animated architecture map. */
.execution-flow{margin:16px 0 20px;border:1px solid var(--border);border-radius:7px;overflow:hidden;background:color-mix(in srgb,var(--panel) 92%,transparent)}
.execution-flow-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:18px 18px 14px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 45%,transparent)}
.execution-flow-heading{min-width:0;max-width:720px}
.execution-flow-eyebrow{display:block;margin:0 0 8px;color:var(--accent);font:10px var(--mono);letter-spacing:.12em}
.execution-flow-heading h3{margin:0 0 8px;color:var(--text);font-size:16px;font-weight:600;letter-spacing:-.02em;line-height:1.35}
.execution-flow-heading p{margin:0;color:var(--muted);font-size:12px;line-height:1.75}
.execution-flow-key{display:flex;align-items:center;justify-content:flex-end;gap:8px 12px;flex-wrap:wrap;flex:0 0 auto;padding-top:18px;color:var(--muted);font:10px var(--mono)}
.execution-flow-key span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.flow-key-dot{display:inline-block;width:7px;height:7px;border-radius:2px;background:var(--blue)}
.flow-key-dot.process{background:var(--accent)}.flow-key-dot.decision{background:var(--warm)}.flow-key-dot.output{background:var(--green)}
.execution-scenarios{padding:12px 18px 10px;border-bottom:1px solid var(--border)}
.execution-scenarios-label{display:block;margin-bottom:8px;color:var(--muted);font:9px var(--mono);letter-spacing:.11em}
.execution-scenario-options{display:flex;flex-wrap:wrap;gap:6px}
.execution-scenario{padding:6px 9px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--muted);font:11px var(--sans);cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.execution-scenario:hover,.execution-scenario:focus-visible{border-color:var(--accent);color:var(--text);outline:none}
.execution-scenario.is-selected{border-color:color-mix(in srgb,var(--accent) 70%,var(--border));background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--text)}
.execution-scenario-description{margin:9px 0 0;color:var(--muted);font-size:11px;line-height:1.65}
.execution-flow-graph-scroll{overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;background-image:radial-gradient(color-mix(in srgb,var(--border) 68%,transparent) .7px,transparent .7px);background-size:14px 14px}
.execution-flow-graph{position:relative;width:100%;min-width:860px;container-type:inline-size}
.execution-flow-edges,.execution-flow-nodes{position:absolute;inset:0;width:100%;height:100%}
.execution-flow-edges{overflow:visible}
.execution-edge{color:var(--muted);transition:opacity .18s,color .18s}
.execution-edge path{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.55}
.execution-edge polygon{fill:currentColor;opacity:.65}
.execution-edge text{fill:var(--muted);font:11px var(--mono);paint-order:stroke;stroke:var(--panel);stroke-width:5px;stroke-linejoin:round}
.execution-edge.is-traced{color:var(--accent);opacity:1}
.execution-edge.is-traversed path{stroke:var(--green);stroke-width:2.4;opacity:.95}
.execution-edge.is-traversed polygon{fill:var(--green);opacity:1}
.execution-edge.is-current-edge path{stroke:var(--accent);stroke-width:3;stroke-dasharray:5 4;animation:execution-dash 1s linear infinite;opacity:1}
.execution-edge.is-current-edge polygon{fill:var(--accent);opacity:1}
.execution-flow-nodes{pointer-events:none}
.flow-node{position:absolute;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;padding:7px 9px;border:1px solid var(--border);border-radius:5px;background:color-mix(in srgb,var(--panel) 97%,var(--bg));color:var(--text);text-align:left;cursor:pointer;pointer-events:auto;overflow:hidden;box-shadow:0 4px 12px #0000000a;transition:opacity .18s,background .18s,border-color .18s,box-shadow .18s,transform .18s}
.flow-node:hover,.flow-node:focus-visible{border-color:var(--blue);outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 13%,transparent);z-index:2}
.flow-node-kind{color:var(--muted);font:clamp(8px,.9cqw,10px) var(--mono);text-transform:uppercase;letter-spacing:.08em}
.flow-node strong{display:block;max-width:100%;font:600 clamp(10px,1.12cqw,13px)/1.25 var(--sans);overflow-wrap:anywhere}
.flow-node-inspect{margin-top:2px;color:var(--muted);font:clamp(8px,.85cqw,10px) var(--mono);opacity:.7}
.flow-node-input{border-left:3px solid var(--blue)}.flow-node-processing,.flow-node-transform,.flow-node-adapter,.flow-node-analysis,.flow-node-search,.flow-node-io,.flow-node-view,.flow-node-simd,.flow-node-execution,.flow-node-parsing,.flow-node-discovery,.flow-node-setup{border-left:3px solid var(--accent)}
.flow-node-decision,.flow-node-gate{border-left:3px solid var(--warm)}.flow-node-output,.flow-node-validation,.flow-node-state{border-left:3px solid var(--green)}
.flow-node-error,.flow-node-blocked{border-left:3px solid var(--red)}.flow-node-fallback{border-left:3px solid var(--purple)}
.flow-node.is-off-path{opacity:.42}.flow-node.is-on-path{opacity:.92}
.flow-node.is-visited{border-color:color-mix(in srgb,var(--green) 60%,var(--border));background:color-mix(in srgb,var(--green) 7%,var(--panel))}
.flow-node.is-current-step{opacity:1;border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent),0 7px 20px #00000016;transform:translateY(-1px)}
.flow-node.is-current-step:after{position:absolute;top:5px;right:6px;content:"●";color:var(--accent);font-size:7px}
.flow-node.is-inspected{box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 24%,transparent)}
.execution-stepper{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 14px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 45%,transparent)}
.execution-stepper-actions{display:flex;gap:5px;flex-wrap:wrap}
.execution-stepper button{padding:6px 8px;border:1px solid var(--border);border-radius:4px;background:var(--panel);color:var(--text);font:11px var(--sans);cursor:pointer}
.execution-stepper button:hover,.execution-stepper button:focus-visible{border-color:var(--accent);outline:none}
.execution-stepper button:disabled{opacity:.35;cursor:default}
.execution-stepper button[data-flow-action="play"]{border-color:color-mix(in srgb,var(--accent) 55%,var(--border));color:var(--accent)}
.execution-step-counter{margin-left:auto;white-space:nowrap;color:var(--muted);font:10px var(--mono);font-variant-numeric:tabular-nums}
.execution-step-progress{height:2px;flex:1 0 100%;overflow:hidden;background:var(--border)}
.execution-step-progress span{display:block;width:0;height:100%;background:var(--accent);transition:width .2s}
.execution-inspector{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:18px;padding:17px 18px 18px;background:color-mix(in srgb,var(--surface) 28%,transparent)}
.execution-inspector-main{min-width:0}
.execution-inspector-kicker{margin-bottom:7px;color:var(--accent);font:9px var(--mono);letter-spacing:.1em}
.execution-inspector h4{margin:0 0 8px;font-size:14px;font-weight:600;line-height:1.4}
.execution-inspector p{margin:0;color:var(--muted);font-size:12px;line-height:1.8}
.execution-inspector .execution-inspector-why{margin-top:9px;padding-left:10px;border-left:2px solid var(--border);color:var(--text)}
.execution-inspector-io{display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:8px;margin:0}
.execution-inspector-io>div{min-width:0;padding:10px 11px;border:1px solid var(--border);border-radius:4px;background:var(--panel)}
.execution-inspector-io dt{margin-bottom:6px;color:var(--muted);font:9px var(--mono);text-transform:uppercase;letter-spacing:.08em}
.execution-inspector-io dd{margin:0;color:var(--text);font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.execution-text-fallback{margin:0 18px 14px;border-top:1px solid var(--border);padding-top:11px}
.execution-text-fallback summary{color:var(--muted);font-size:11px;cursor:pointer}
.execution-text-fallback[open] .arch-diagram{max-width:100%;overflow:auto;margin-top:12px}
.execution-flow-footnote{margin:0;padding:0 18px 15px;color:var(--muted);font:10px/1.7 var(--mono)}
@keyframes execution-dash{to{stroke-dashoffset:-18}}
@media(max-width:760px){
  .execution-flow-header{display:block;padding:14px 13px 12px}
  .execution-flow-key{justify-content:flex-start;padding-top:12px}
  .execution-scenarios{padding:11px 13px 10px}
  .execution-flow-graph{min-width:820px}
  .execution-stepper{gap:8px;padding:10px}
  .execution-stepper-actions{width:100%}
  .execution-stepper-actions button{flex:1}
  .execution-step-counter{margin-left:0}
  .execution-inspector{grid-template-columns:1fr;gap:12px;padding:14px}
  .execution-inspector-io{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){
  .execution-edge,.flow-node,.execution-scenario,.execution-step-progress span{transition:none}
  .execution-edge.is-current-edge path{animation:none;stroke-dasharray:none}
}
@media print{.execution-stepper,.execution-scenarios{display:none!important}.execution-flow-graph-scroll{overflow:visible}.execution-flow-graph{min-width:0!important}}


/* Let the graph use the available case-study width before requiring horizontal panning. */
.project-document .project-doc-grid{grid-template-columns:minmax(0,1fr) minmax(155px,185px);gap:clamp(22px,3vw,38px)}
@media(max-width:760px){.project-document .project-doc-grid{grid-template-columns:minmax(0,1fr)}}


/* Reading status lives in the breadcrumb row; actions remain a separate normal-flow row. */
.project-document .project-doc-filebar{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(190px,270px) auto;
  align-items:center;
  gap:10px 18px;
  min-height:31px;
  margin:-2px 0 0;
  padding:0 0 10px;
  border-bottom:1px solid var(--border);
  color:var(--muted);
  font:11px/1.4 var(--mono);
}
.project-document .project-doc-filepath{min-width:0}
.project-document .project-doc-mode{justify-self:end}
.project-document .reading-toolbar-context{
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  min-width:0;
  padding:0;
}
.project-document .reading-tools-label{
  display:inline-flex;
  position:static;
  align-items:center;
  justify-self:start;
  min-height:18px;
  margin:0;
  padding:2px 5px;
  border:1px solid var(--border);
  border-radius:3px;
  background:var(--surface);
  color:var(--accent);
  font:9px/1.2 var(--mono);
  letter-spacing:.1em;
  white-space:nowrap;
}
.project-document .reading-context-separator{color:var(--border);font:11px var(--mono)}
.project-document .reading-section-label{
  min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--text);font:11px/1.4 var(--sans);
}
.project-document .reading-progress-percent{color:var(--muted);font:10px/1.4 var(--mono);white-space:nowrap}
.project-document .reading-progress-track{
  position:relative;
  grid-column:1/-1;
  left:auto;right:auto;bottom:auto;
  display:block;width:100%;height:2px;min-width:0;margin-top:1px;
  overflow:hidden;border-radius:4px;
  background:color-mix(in srgb,var(--border) 85%,transparent);
}
.project-document .reading-progress-track>span{display:block;height:100%;border-radius:4px}
.project-document .reading-toolbar-actions{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px;
  min-width:0;margin:0 0 20px;padding:8px 0 0;
  border-bottom:0;
}
.project-document .reading-toolbar-actions button{
  min-width:0;padding:5px 9px;border:1px solid var(--border);border-radius:4px;
  background:var(--panel);color:var(--text);font:11px/1.25 var(--sans);
  white-space:nowrap;cursor:pointer;
}
.project-document .reading-toolbar-actions button:hover,
.project-document .reading-toolbar-actions button:focus-visible{border-color:var(--accent);outline:none}
.project-document .reading-toolbar-actions button[aria-pressed=true]{
  border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel));
}
.project-document .reading-toolbar-actions button:disabled{opacity:.38;cursor:default}
@media(max-width:760px){
  .project-document .project-doc-filebar{
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px 12px;align-items:center;
  }
  .project-document .project-doc-filepath{grid-column:1;grid-row:1}
  .project-document .project-doc-mode{grid-column:2;grid-row:1;font-size:10px}
  .project-document .reading-toolbar-context{grid-column:1/-1;grid-row:2;width:min(100%,420px);gap:7px}
  .project-document .reading-toolbar-actions{gap:5px;padding-top:8px}
  .project-document .reading-toolbar-actions button{flex:1 1 calc(50% - 5px);white-space:normal;text-align:center}
}
@media(max-width:430px){
  .project-document .project-doc-filebar{gap:9px 10px}
  .project-document .project-doc-mode{font-size:9px}
  .project-document .reading-toolbar-actions button{flex:1 1 calc(50% - 5px)}
}
@media(prefers-reduced-motion:reduce){.project-document .reading-progress-track>span{transition:none}}
@media print{
  .project-document .project-doc-filebar,
  .project-document .reading-toolbar-actions{display:none!important}
  .execution-flow-graph{min-width:0!important;width:100%!important}
  .flow-node{overflow:hidden}
}

/* Preserve each diagram's design-space size; the viewport scrolls rather than squeezing its nodes. */
.execution-flow-graph-scroll{max-width:100%;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
.execution-flow-graph{position:relative;min-width:0;container-type:inline-size}
.flow-node{min-width:0;min-height:0;padding:7px 9px;gap:3px;line-height:1.15;overflow:hidden;overflow-wrap:anywhere}
.flow-node-kind{display:block;flex:0 0 auto;max-width:100%;font-size:10px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flow-node strong{
  display:-webkit-box;flex:0 1 auto;min-width:0;max-width:100%;
  font:600 12px/1.2 var(--sans);overflow-wrap:anywhere;
  -webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
}
.flow-node-inspect{display:block;flex:0 0 auto;max-width:100%;margin-top:auto;font:9px/1.1 var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flow-node-environment{border-left:3px solid var(--blue)}
.flow-node-security{border-left:3px solid var(--warm)}
.execution-flow-header{flex-wrap:wrap;align-items:flex-start}
.execution-flow-heading{flex:1 1 360px;min-width:0}
.execution-flow-key{flex:0 1 330px;min-width:0;justify-content:flex-start;padding-top:7px}
.execution-flow-graph-scroll:focus-visible{outline:1px solid var(--accent);outline-offset:-2px}
.execution-flow-graph-scroll::-webkit-scrollbar{height:8px}
.execution-flow-graph-scroll::-webkit-scrollbar-thumb{background:var(--border);border:2px solid var(--panel);border-radius:6px}
.execution-flow-graph-scroll::-webkit-scrollbar-track{background:transparent}
@media(max-width:760px){
  .execution-flow-header{gap:12px}
  .execution-flow-key{flex:1 1 100%;gap:7px 11px}
}
@media print{
  .execution-flow-graph{min-width:0!important;width:100%!important}
  .flow-node{overflow:hidden}
}


/* Explain horizontal panning only when the flow extends beyond the available viewport. */
.execution-flow-pan-hint{
  display:flex;align-items:center;justify-content:flex-end;
  padding:7px 12px 0;color:var(--muted);font:9px/1.35 var(--mono);
  letter-spacing:.035em;
}
.execution-flow-pan-hint[hidden]{display:none!important}
