:root {
  color-scheme: light; --bg:#f5f5f7; --surface:#fff; --sidebar:#fdfdfd;
  --ink:#202035; --muted:#686a80; --line:#dfdfea; --wash:#eeeef4;
  --accent:#5542b0; --tint:#ebe6fe; --shadow:0 6px 22px #26203a0b;
  font:15px/1.5 system-ui,sans-serif;
}
[data-theme=dark] {
  color-scheme:dark; --bg:#171723; --surface:#252536; --sidebar:#1e1e2d;
  --ink:#f3efff; --muted:#b5b5ca; --line:#3c3b50; --wash:#202030;
  --accent:#7258cc; --tint:#3c305c; --shadow:none;
}
* { box-sizing:border-box } [hidden] { display:none!important }
body { margin:0; color:var(--ink); background:var(--bg) }
a { color:inherit } h1,h2,h3,p { margin:0 } h1 { font-size:clamp(29px,4vw,43px); line-height:1.12; letter-spacing:-.045em; overflow-wrap:anywhere }
h2 { font-size:17px } h3 { font-size:15px; line-height:1.35 }
.sidebar { width:248px; position:fixed; inset:0 auto 0 0; display:flex; flex-direction:column; gap:22px; padding:25px 18px 16px; background:var(--sidebar); border-right:1px solid var(--line) }
.brand { display:flex; align-items:center; gap:10px; font-size:24px; font-weight:800; letter-spacing:-.04em; text-decoration:none }
.mark { display:inline-grid; place-items:center; width:36px; height:36px; border-radius:12px; background:var(--accent); color:white; font-size:24px }
.section-label,.eyebrow { color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.13em; text-transform:uppercase }
.project-nav { display:grid; gap:4px; overflow:auto; margin-top:-15px }
.project-nav a { display:flex; gap:8px; padding:8px 10px; text-decoration:none; border-radius:8px; overflow-wrap:anywhere }
.project-nav a:hover,.project-nav .active { background:var(--tint) }
.group { color:var(--muted); padding:8px 10px 2px; font-size:12px; font-weight:650; overflow-wrap:anywhere }
.sidebar-bottom { margin-top:auto; border-top:1px solid var(--line); padding-top:12px }
.profile-link { display:flex; align-items:center; gap:10px; text-decoration:none; overflow-wrap:anywhere }
.profile-link small { display:block; color:var(--muted) }
.avatar { width:36px; height:36px; border-radius:50%; background:var(--tint); display:grid; place-items:center; object-fit:cover; flex:none }
.workspace { margin-left:248px; padding:34px clamp(16px,3vw,46px); min-height:100vh }
.workspace > h1 { margin-bottom:22px }
.auth { min-height:100vh; display:grid; align-content:center; justify-items:center; gap:12px; padding:20px; background:radial-gradient(ellipse at 35% 20%,var(--tint),var(--bg) 65%); }
.auth .panel { width:min(100%,420px); padding:32px }
.login h1 { margin:26px 0 18px }
.panel,dialog { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:var(--shadow) }
.narrow { max-width:500px } .grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); align-items:start; gap:16px }
.panel h2 { margin-bottom:10px }
button,.button { font:inherit; font-weight:650; border-radius:8px; padding:7px 11px; border:1px solid var(--line); background:var(--surface); color:var(--ink); cursor:pointer; text-decoration:none }
button:hover,.button:hover { filter:brightness(.93) }
.primary { background:var(--accent); border-color:var(--accent); color:white }
.plain { background:none; border-color:transparent; color:var(--muted); font-size:13px; padding-inline:0 }
input,select,textarea { font:inherit; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:7px 9px; width:100%; min-width:0 }
textarea { resize:vertical } label { display:grid; gap:4px; font-size:13px; font-weight:650 } form { display:grid; gap:11px; margin-top:8px }
form > button { justify-self:start } fieldset { border:1px solid var(--line); border-radius:8px; }
.check { display:flex; gap:7px; align-items:center; padding:3px 0 } .check input { width:auto }
.muted,.metadata { color:var(--muted) }
.board-top { display:flex; align-items:end; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:22px }
.eyebrow { margin-bottom:6px } .actions { display:flex; gap:8px; flex-wrap:wrap }
.board { display:flex; gap:13px; overflow-x:auto; align-items:stretch; min-height:60vh; padding-bottom:12px }
.column { border:1px solid var(--line); background:var(--wash); border-radius:13px; flex:1 0 222px; min-width:0; padding:10px }
.column.target { background:var(--tint); border-color:var(--accent) }
.column h2 { display:flex; gap:7px; align-items:center; font-size:13px; margin:2px 0 12px; overflow-wrap:anywhere }
.column i { width:8px; height:8px; border-radius:50%; background:#907bd5; flex:none }
.column:nth-child(6n+2) i { background:#5c8bfa } .column:nth-child(6n+3) i { background:#e9a43b } .column:nth-child(6n+4) i { background:#de7d85 } .column:nth-child(6n+5) i { background:#3ca789 } .column:nth-child(6n) i { background:#788397 }
.count { color:var(--muted); background:var(--surface); padding:2px 7px; border-radius:12px; margin-left:auto; font-size:11px }
.cards { display:grid; gap:9px }
.card { border-radius:10px; padding:12px; background:var(--surface); border:1px solid var(--line); box-shadow:var(--shadow); overflow-wrap:anywhere }
.card:target { outline:2px solid var(--accent) } .card[draggable=true] { cursor:grab } .card.dragging { opacity:.45 }
.card p,.card a { font-size:13px; margin-top:7px } .card-id,.metadata { font-size:11px; margin:4px 0 6px } .card-id { color:var(--muted); font-variant-numeric:tabular-nums }
.move,.search,.date-fields,.status-edit { display:flex; gap:8px; align-items:end }
.move { font-size:12px } .move select { padding:4px } .move button { padding:3px 7px }
.date-fields > *, .status-edit > label:first-child { flex:1; min-width:0 }
.flash,.attention { background:var(--tint); border-radius:10px; padding:10px 14px; margin-bottom:14px; width:100% }
.flash.error { color:#a22941; background:#ffedf1; }
details { padding:7px 0; border-bottom:1px solid var(--line) } summary { cursor:pointer; font-weight:650 }
.attention { padding:10px 14px } .attention ul { margin:4px 0 0; padding-left:22px }
dialog { width:min(calc(100% - 22px),590px); max-height:90vh; overflow:auto } dialog::backdrop { background:#17152588 }
.dialog-head { display:flex; justify-content:space-between; align-items:center }
.empty { max-width:460px; margin:10vh auto; display:grid; gap:15px; justify-items:start }
.search { max-width:650px; margin-bottom:16px } .audit summary > * { margin-right:12px } .audit pre { white-space:pre-wrap; overflow-wrap:anywhere }
@media (max-width:720px) {
  .sidebar { position:static; width:auto; gap:10px; padding:12px 16px; border-right:0; border-bottom:1px solid var(--line) }
  .sidebar .section-label { display:none } .project-nav { margin:0; display:flex; flex-wrap:wrap }
  .sidebar-bottom { display:flex; justify-content:space-between; margin:0 } .sidebar-bottom form { margin:0 }
  .workspace { margin:0; padding:19px 14px } .board { min-height:47vh }
}

.password-panel { margin-top:14px }

.brand-logo { display:block; flex:none; width:108px; height:31px }
[data-theme=dark] .brand-logo { background:#fff; padding:4px; border-radius:6px }

.markdown-editor { display:grid; gap:4px }
.markdown-toolbar { display:flex; flex-wrap:wrap; gap:4px; padding:6px; border:1px solid var(--line); border-radius:8px 8px 0 0; background:var(--wash) }
.markdown-toolbar button { min-width:32px; padding:4px 7px; font-size:12px }
.markdown-editor textarea { margin-top:-5px; border-radius:0 0 8px 8px; font-family:ui-monospace,monospace }
.task-description { margin:7px 0; font-size:13px }
.task-description > * { margin:6px 0 }
.task-description h1,.task-description h2,.task-description h3 { font-size:15px; letter-spacing:normal; line-height:1.35 }
.task-description h2 { display:block }
.task-description ul,.task-description ol { padding-left:20px }
.task-description blockquote { border-left:3px solid var(--line); padding-left:8px; color:var(--muted) }
.task-description pre { overflow:auto; padding:8px; border-radius:6px; background:var(--wash); overflow-wrap:normal }
.task-description :not(pre) > code { background:var(--wash); border-radius:3px; padding:0 3px }
.task-description img { max-width:100%; height:auto }
.task-description table { display:block; overflow:auto; border-collapse:collapse }
.task-description :is(th,td) { border:1px solid var(--line); padding:3px 5px }
