:root {
  color-scheme: dark;
  font: 15px/1.55 "Segoe UI", system-ui, sans-serif;
  color: #e4ebf1;
  background: #10151a;
  --panel: #182027;
  --line: #303e48;
  --muted: #a9b7c3;
  --accent: #9de1cf;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 2; background: var(--accent); color: #12231e; padding: .5rem; }
.skip:focus { top: .5rem; }
.shell { display: grid; grid-template-columns: 222px minmax(0,1fr); min-height: 100vh; }
.sidebar { background: #141b21; border-right: 1px solid var(--line); padding: 24px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .07em; margin: 0 0 24px 4px; }
.brand-mark { background: var(--accent); color: #112920; border-radius: 6px; width: 30px; height: 30px; display: grid; place-items: center; }
.navigation { display: grid; gap: 4px; }
.navigation button { text-align: left; background: transparent; color: var(--muted); border-color: transparent; }
.navigation button[aria-current] { background: #26363c; color: var(--accent); border-color: #3a5555; }
#nav-pending { float: right; margin-left: 6px; font-variant-numeric: tabular-nums; }
.workspace { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.workspace select { width: 100%; }
main { min-width: 0; width: 100%; padding: 0 clamp(16px,4vw,62px) 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; border-bottom: 1px solid var(--line); min-height: 70px; }
.topbar p { margin: 0; color: var(--muted); }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 18px; }
h1,h2,h3,h4,p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
.page-heading > * { margin: 0; }
h1 { font-size: clamp(23px,4vw,32px); }
h2 { font-size: 18px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
.muted, .task-meta { color: var(--muted); }
.notice { color: var(--accent); margin: 10px 0 0; }
.notice:empty { display: none; }
.panel,article,.filters { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 16px; margin-bottom: 12px; min-width: 0; }
.chat-panel { max-width: 900px; }
.messages { min-height: clamp(150px,40vh,420px); max-height: 60vh; overflow: auto; padding: 8px 0 16px; }
.message { max-width: 82%; border-radius: 8px; background: #202b33; padding: 12px; white-space: pre-wrap; }
.message.user { margin-left: auto; background: #284039; }
.chat-compose { border-top: 1px solid var(--line); padding-top: 12px; }
.filters { display: grid; grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr)); gap: 12px; }
.filters label { margin: 0; }
label { display: block; margin: 0 0 12px; color: var(--muted); }
label input:not([type=checkbox]),label select,label textarea { display: block; margin-top: 4px; }
input,select,textarea,button { font: inherit; border: 1px solid #43535f; border-radius: 6px; padding: 8px 10px; max-width: 100%; }
input,select,textarea { background: #11191f; color: #e4ebf1; width: 100%; }
textarea { resize: vertical; }
fieldset { min-width: 0; border: 1px solid var(--line); margin: 12px 0; }
button { cursor: pointer; background: var(--accent); color: #0e2820; font-weight: 600; }
button.secondary { background: #222e37; color: #e4ebf1; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
summary { cursor: pointer; color: var(--accent); padding: 5px 0; overflow-wrap: anywhere; }
details[open] > summary { margin-bottom: 8px; }
article button { margin: 4px 8px 6px 0; }
article details { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 4px; }
article .badge { display: inline-block; border: 1px solid #44645c; color: var(--accent); border-radius: 5px; padding: 2px 7px; margin-right: 6px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #11191f; padding: 12px; border-radius: 6px; }
@media (max-width: 660px) {
  .shell { display: block; }
  .sidebar { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin-bottom: 10px; }
  .navigation { display: flex; flex-wrap: wrap; }
  .navigation button { padding: 6px 8px; }
  .workspace { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 8px; padding-top: 8px; }
  .workspace label { margin: 0; }
  .workspace button { justify-self: start; }
  .topbar { min-height: 0; padding: 10px 0; }
  .page-heading { margin: 18px 0 14px; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters label:first-child { grid-column: 1 / -1; }
}
.login-panel { max-width: 420px; margin: 12vh auto 0; } .login-panel h1 { margin-bottom: 20px; }
