/* cmdctrl mockup skeleton: grayscale, thin separators, ample space. */
:root {
  --g0: #ffffff; --g1: #f7f7f7; --g2: #ebebeb; --g3: #d4d4d4; --g4: #8c8c8c; --g5: #555555; --g7: #111111;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 200px; --list-w: 280px; --narrow: 800px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--g7); background: var(--g0); min-height: 100dvh; display: flex; flex-direction: column; }
h1, h2, h3 { margin: 0 0 8px; font-weight: 600; line-height: 1.25; }
h1 { font-size: 20px; } h2 { font-size: 15px; } h3 { font-size: 14px; }
p { margin: 0 0 10px; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--g7); }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; }
small, .muted { color: var(--g5); }
.eyebrow { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--g5); margin: 0 0 4px; }
:focus-visible { outline: 2px solid var(--g7); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--g0); padding: 6px 10px; border: 1px solid var(--g7); z-index: 100; }
.skip-link:focus { left: 8px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--g3); flex-wrap: wrap; }
.topbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; font-size: 15px; padding: 4px 10px; border: 1px solid var(--g3); border-radius: 4px; }
.brand:hover { background: var(--g2); }
.brand[aria-current="page"] { background: var(--g7); color: var(--g0); border-color: var(--g7); }
.mock-badge { font-size: 11px; color: var(--g5); border: 1px dashed var(--g4); padding: 2px 8px; border-radius: 4px; }
select { font: inherit; padding: 4px 8px; border: 1px solid var(--g3); border-radius: 4px; background: var(--g0); color: var(--g7); }
.btn { padding: 4px 10px; border: 1px solid var(--g3); border-radius: 4px; background: var(--g0); cursor: pointer; }
.btn:hover { background: var(--g2); }

/* Shell: sidebar + main */
.shell { display: flex; flex: 1; min-height: 0; }
.sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); border-right: 1px solid var(--g3); padding: 20px 16px; overflow-y: auto; }
.sidebar[hidden] { display: none; }
.sidebar-ident { padding-bottom: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--g2); }
.sidebar-ident .name { font-weight: 600; font-size: 15px; }
.nav-list a { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 8px; border-radius: 4px; text-decoration: none; color: var(--g5); }
.nav-list a:hover { background: var(--g1); color: var(--g7); }
.nav-list a[aria-current="page"] { background: var(--g7); color: var(--g0); }
.nav-list li.sep { border-top: 1px solid var(--g2); margin: 10px 0; }
.nav-list .count { font-size: 12px; opacity: 0.7; }
.main { flex: 1; min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.page { padding: 24px 28px; max-width: 900px; }
.page-head { margin-bottom: 20px; }
.page > .muted { margin-bottom: 20px; }

/* Dashboard */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ws-card { border: 1px solid var(--g3); border-radius: 4px; padding: 14px 16px; }
.ws-card h2 { margin-bottom: 2px; }
.ws-card h2 a { text-decoration: none; }
.ws-card h2 a:hover { text-decoration: underline; }
.ws-card .path { margin-bottom: 8px; }

/* Sections and simple lists */
.section { padding: 16px 0; border-top: 1px solid var(--g2); }
.section:first-of-type { border-top: 0; padding-top: 0; }
.task-list li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.task-list .title { min-width: 0; }
.task-list li[data-status="done"] .title { color: var(--g5); }
.task-list .stage { margin-left: auto; font-size: 12px; color: var(--g5); flex: 0 0 auto; }
.task-list .source { font-size: 12px; color: var(--g5); }
.empty { color: var(--g5); font-style: italic; }

/* Status indicator (read-only). Shape carries the state: open = empty rounded
   square, in progress = dash inside, done = filled square with a check. */
.status { display: inline-flex; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; color: var(--g4); cursor: default; user-select: none; }
.status svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.status-progress { color: var(--g5); }
.status-progress .glyph { stroke-width: 2; }
.status-done { color: var(--g7); }
.status-done .box { fill: currentColor; }
.status-done .glyph { stroke: var(--g0); stroke-width: 1.75; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.column { border: 1px solid var(--g3); border-radius: 4px; padding: 12px; min-height: 160px; }
.column h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--g5); font-weight: 600; margin-bottom: 10px; }
.column h2 .status { margin-top: 0; }
.card { border: 1px solid var(--g3); border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; background: var(--g0); }

/* Notes / Artifacts: three panes counting the global sidebar (sidebar | list | reader) */
.split { display: flex; flex: 1; min-height: 0; }
.list-pane { width: var(--list-w); flex: 0 0 var(--list-w); border-right: 1px solid var(--g3); overflow-y: auto; padding: 20px 0; }
.list-pane h1 { padding: 0 16px; }
.item-list a { display: block; padding: 10px 16px; text-decoration: none; border-top: 1px solid var(--g2); }
.item-list li:last-child a { border-bottom: 1px solid var(--g2); }
.item-list a:hover { background: var(--g1); }
.item-list a[aria-current="true"] { background: var(--g2); }
.item-list a:focus-visible { outline-offset: -2px; }
.item-list .title { display: block; }
.item-list small { display: block; }
.reader-pane { flex: 1; min-width: 0; overflow-y: auto; padding: 24px 28px; }
.reader-pane article { max-width: 640px; }
.reader-pane .back { display: none; margin-bottom: 16px; }
.reader-pane pre { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; background: var(--g1); padding: 12px; border-radius: 4px; }
.reader-pane ul.bullets { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.related { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--g2); }

/* Narrow: sidebar collapses behind Menu; list and reader are shown one at a time */
@media (max-width: 800px) {
  .topbar { padding: 8px 12px; }
  #menu-toggle[hidden] { display: none; }
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--g3); display: none; }
  body.nav-open .sidebar:not([hidden]) { display: block; }
  .main { overflow: visible; }
  .page { padding: 16px; }
  .split { flex-direction: column; }
  .list-pane { width: auto; flex: none; border-right: 0; }
  .reader-pane { padding: 16px; }
  .split[data-selected="false"] .reader-pane { display: none; }
  .split[data-selected="true"] .list-pane { display: none; }
  .reader-pane .back { display: inline-block; }
  .board { grid-template-columns: 1fr; }
}
