:root {
  color-scheme: light;
  --canvas:#eef2f5; --rail:#e4ebef; --surface:#fbfcfd; --soft:#f2f5f7; --line:#dce4e9;
  --ink:#172532; --muted:#506373; --faint:#607384; --accent:#006b73; --accent-soft:#dbefee;
  --blocked:#e9edf0; --blocked-ink:#465866; --sun:#ffd45c; --sun-ink:#382901; --purple:#7462a5;
  --logo:#164c53; --logo-ink:#e0f6f2; --focus:#007b86; --shadow:0 12px 30px #172c3910;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-synthesis:none;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas:#151e25; --rail:#1a252e; --surface:#202d37; --soft:#25343e; --line:#354650;
  --ink:#edf5f8; --muted:#adbfc9; --faint:#9eb2be; --accent:#7cddd1; --accent-soft:#2b4a4d;
  --blocked:#2c373f; --blocked-ink:#beccd4; --sun:#ffd45c; --sun-ink:#382901; --purple:#b7a4eb;
  --logo:#a3e9df; --logo-ink:#143d42; --focus:#7cddd1; --shadow:0 12px 30px #0003;
}
*,*::before,*::after {box-sizing:border-box}
body {margin:0; background:var(--canvas); color:var(--ink); font-size:1rem; line-height:1.5}
button,input,select {font:inherit; color:inherit}
button,select {cursor:pointer}
button,a,input,select,summary {-webkit-tap-highlight-color:transparent; touch-action:manipulation}
button {background:none; border:0}
a {color:inherit; text-decoration:none}
:focus-visible {outline:3px solid var(--focus); outline-offset:3px}
[hidden] {display:none!important}
.skip {position:fixed; left:1rem; top:1rem; background:var(--surface); padding:.7rem 1rem; z-index:9; transform:translateY(-150%)}
.skip:focus {transform:none}
.icon {width:1.2rem; height:1.2rem; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle}
.shell {display:grid; grid-template-columns:15rem minmax(0,1fr); min-height:100vh}
.sidebar {display:flex; flex-direction:column; padding:1.45rem 1rem 1rem; background:var(--rail); border-right:1px solid var(--line); position:sticky; inset-block-start:0; height:100vh}
.brand {display:flex; gap:.75rem; align-items:center; padding:.5rem .5rem 1.65rem}
.mark {display:grid; place-items:center; width:2.65rem; height:2.65rem; flex:none; border-radius:.85rem; background:var(--logo); color:var(--logo-ink)}
.mark svg {width:1.8rem; height:1.8rem}
.wordmark {font-weight:800; letter-spacing:.15em; line-height:1.12}
.brand small {display:block; letter-spacing:0; font-size:.8125rem; color:var(--muted); margin-top:.3rem; font-weight:500}
nav {display:grid; gap:.3rem}
.nav {display:flex; min-height:2.7rem; align-items:center; gap:.7rem; padding:.58rem .65rem; color:var(--muted); border-radius:.62rem; font-weight:620; font-size:.92rem; position:relative}
.nav:hover {background:var(--soft); color:var(--ink)}
.nav[aria-current="page"] {background:var(--surface); color:var(--accent); box-shadow:0 1px 2px #21333c12}
.nav[aria-current="page"]::before {content:""; position:absolute; inset-inline-start:0; width:3px; height:1.15rem; border-radius:3px; background:var(--accent)}
.sidebar-bottom {margin-top:auto; border-top:1px solid var(--line); padding-top:1rem}
.identity {display:flex; gap:.65rem; align-items:center; padding:.25rem .4rem}
.identity strong,.identity small {display:block}
.identity small {color:var(--muted); font-size:.8125rem}
.avatar {width:1.8rem; height:1.8rem; display:inline-grid; place-items:center; flex:none; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:.75rem; font-weight:750}
.identity .avatar {width:2.25rem; height:2.25rem; font-size:.9rem}
.workspace {min-width:0}
.top {height:3.85rem; padding-inline:clamp(1rem, 4vw, 3rem); display:flex; align-items:center; justify-content:space-between; gap:.75rem; border-bottom:1px solid var(--line); font-size:.875rem; color:var(--muted)}
.top-right {display:flex; align-items:center; gap:.85rem}
.sample {font-size:.8125rem; border:1px solid var(--line); border-radius:2rem; padding:.22rem .65rem; white-space:nowrap; background:var(--soft)}
.icon-button {display:inline-grid; place-items:center; min-width:2.5rem; height:2.5rem; border:1px solid var(--line); border-radius:.62rem; background:var(--surface); color:var(--ink)}
.icon-button:hover,.button:hover {background:var(--soft)}
.content {max-width:83rem; margin-inline:auto; padding:2.15rem clamp(1rem, 4vw, 3rem) 3.5rem}
.heading {display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:1.45rem}
h1,h2,h3,p {margin:0}
h1,h2,h3 {text-wrap:balance; scroll-margin-top:1rem}
h1 {font-size:clamp(2.1rem, 5vw, 3.2rem); line-height:1.08; letter-spacing:-.055em; font-weight:760; overflow-wrap:anywhere}
h2 {font-size:1.3rem; letter-spacing:-.027em; line-height:1.2}
h3 {font-size:1.05rem; line-height:1.3}
.description {color:var(--muted); margin-top:.6rem; max-width:59ch}
.panel {background:var(--surface); border:1px solid var(--line); border-radius:1.08rem; box-shadow:var(--shadow); min-width:0}
.panel-head {padding:1rem 1.15rem; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.65rem; border-bottom:1px solid var(--line)}
.actions {display:flex; align-items:center; flex-wrap:wrap; gap:.5rem}
.button,.select {display:inline-flex; min-height:2.5rem; align-items:center; justify-content:center; gap:.4rem; border:1px solid var(--line); border-radius:.6rem; padding:.5rem .75rem; background:var(--surface); color:var(--ink); font-size:.875rem; font-weight:660; white-space:nowrap}
.button.primary {background:var(--logo); color:var(--logo-ink); border-color:var(--logo)}
.button.primary:hover {filter:brightness(.91)}
.button[aria-pressed="true"] {background:var(--accent-soft); color:var(--accent); border-color:var(--accent)}
.button:disabled {opacity:.58; cursor:default}
.tag {border:1px solid var(--line); background:var(--soft); border-radius:.36rem; padding:.13rem .42rem; color:var(--muted); font-size:.875rem; font-weight:620; width:max-content; max-width:100%}
.tag.good {background:var(--accent-soft); color:var(--accent); border-color:transparent}
.tag.block {background:var(--blocked); color:var(--blocked-ink); border-color:var(--line)}
.mention {display:inline-grid; place-items:center; width:1.3rem; height:1.3rem; flex:none; border-radius:50%; color:var(--sun-ink); background:var(--sun); font-size:.875rem; font-weight:850}
.stats {display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--line); border-radius:.92rem; background:var(--surface); margin-bottom:1.1rem; overflow:hidden}
.stat {padding:.85rem 1rem; min-width:0; display:flex; align-items:center; column-gap:.85rem; row-gap:.2rem; flex-wrap:wrap}
.stat + .stat {border-left:1px solid var(--line)}
.stat strong {font-size:1.55rem; line-height:1.2; font-variant-numeric:tabular-nums; letter-spacing:-.04em}
.stat span {color:var(--muted); font-size:.875rem}
.filter {position:relative}
.filter>summary {list-style:none; cursor:pointer}
summary::-webkit-details-marker {display:none}
.filter-box {position:absolute; right:0; top:calc(100% + .45rem); min-width:13.5rem; padding:.5rem; z-index:4; background:var(--surface); box-shadow:var(--shadow); border:1px solid var(--line); border-radius:.7rem}
.filter-box label {display:flex; align-items:center; gap:.5rem; padding:.45rem; min-height:2.5rem; white-space:nowrap; cursor:pointer}
input[type="checkbox"] {accent-color:var(--accent); width:1rem; height:1rem}
.tree {padding:.35rem .6rem .55rem}
.columns,.row {display:grid; grid-template-columns:minmax(0,1fr) minmax(7rem,15%) minmax(8rem,19%); gap:.75rem; align-items:center}
.columns {color:var(--faint); font-size:.8125rem; padding:.4rem .6rem .42rem 2.4rem; border-bottom:1px solid var(--line)}
.row {min-height:3.2rem; padding:.45rem .6rem; border-bottom:1px solid var(--line); font-size:.9rem}
.row.goal {min-height:3.45rem; font-size:1rem}
.row:hover {background:var(--soft)}
.row.blocked {background:var(--blocked)}
.closed-tasks {margin-top:1rem}
.closed-tasks>summary {cursor:pointer; list-style:none; font-weight:650; border-bottom:0}
.closed-tasks[open]>summary {border-bottom:1px solid var(--line)}
.closed-tasks[open]>summary>svg {transform:rotate(90deg)}
.closed-list {list-style:none; margin:0; padding:.25rem .6rem}
.closed-list>.row:last-child {border-bottom:0}
.node {display:flex; align-items:center; gap:.46rem; min-width:0; padding-inline-start:calc(var(--depth,0) * 1.25rem)}
.node-main {min-width:0}
.name {display:flex; width:fit-content; max-width:100%; align-items:center; gap:.4rem; font-weight:670; overflow-wrap:anywhere}
a.name:hover {color:var(--accent); text-decoration:underline; text-underline-offset:.2em}
.goal .name {font-weight:750}
.stage .name {font-weight:700}
.twisty,.leaf {width:1.55rem; min-width:1.55rem; height:1.75rem; display:inline-grid; place-items:center; color:var(--faint); padding:0}
.twisty {height:2rem; border-radius:.4rem}
.twisty:hover {background:var(--accent-soft); color:var(--accent)}
.twisty svg {width:.9rem; height:.9rem}
.twisty[aria-expanded="true"] svg {transform:rotate(90deg)}
.leaf svg {width:.95rem; height:.95rem}
.small {font-size:.8125rem; color:var(--muted)}
.person {display:flex; align-items:center; gap:.38rem; min-width:0; font-size:.875rem}
.reason {color:var(--blocked-ink); padding-top:.15rem; font-size:.875rem; line-height:1.25}
.empty {padding:1.2rem; color:var(--muted)}
.back {display:inline-flex; align-items:center; gap:.35rem; color:var(--accent); font-weight:650; margin-bottom:1.15rem; min-height:2.5rem}
.back:hover {text-decoration:underline}
.crumb {color:var(--muted); font-size:.875rem; margin-top:.5rem}
.detail-grid {display:grid; grid-template-columns:minmax(0,1.65fr) minmax(0,1fr); gap:1rem}
.section {padding:1.15rem}
.section > h2 {margin-bottom:.75rem}
.section + .section {border-top:1px solid var(--line)}
.keyvals {margin:0; display:grid; gap:.7rem}
.keyvals dt {font-size:.875rem; color:var(--muted)}
.keyvals dd {margin:.12rem 0 0}
.checklist {padding-left:1.25rem; margin:.55rem 0 0}
.comment {padding:.75rem 0 0}
.comment p {margin-top:.25rem}
.callout {margin-top:.75rem; padding:.65rem .85rem; border-radius:.55rem; background:var(--blocked); color:var(--blocked-ink)}
.analytics-grid {display:grid; grid-template-columns:minmax(0,1.65fr) minmax(16rem,1fr); gap:1rem; margin-bottom:1rem}
.bar-layout {padding:.85rem 1rem .65rem}
.bar-chart {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.36rem; position:relative; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%)}
.chart-day {min-width:0; height:8.25rem; display:flex; align-items:end; justify-content:center; gap:.24rem; border-radius:.4rem .4rem 0 0; position:relative; padding:0 .2rem; background:transparent}
.chart-day:hover,.chart-day[aria-pressed="true"] {background:var(--accent-soft)}
.bar {width:min(31%,1.15rem); border-radius:.27rem .27rem 0 0; background:var(--accent); min-height:1px; display:block}
.bar.ops {background:var(--purple)}
.chart-day::after {content:attr(data-counts); display:none; position:absolute; top:.2rem; left:50%; transform:translateX(-50%); background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:.35rem; white-space:nowrap; font-size:.75rem; padding:.1rem .22rem}
.chart-day:hover::after,.chart-day:focus-visible::after {display:block}
.bar-labels {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.36rem; font-size:.75rem; color:var(--muted); text-align:center; margin-top:.35rem}
.legend {display:flex; flex-wrap:wrap; gap:.5rem 1rem; margin-top:.65rem; color:var(--muted); font-size:.875rem}
.legend span {display:flex; align-items:center; gap:.35rem}
.legend i {display:block; width:.6rem; height:.6rem; border-radius:.15rem; background:var(--accent)}
.legend i.ops {background:var(--purple)}
.people-strip {display:grid; gap:.32rem; padding:.55rem .65rem}
.people-strip button {text-align:left; min-height:2.35rem; padding:.3rem .5rem; border-radius:.45rem; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.45rem; align-items:center; font-size:.875rem; width:100%}
.people-strip button:hover,.people-strip button[aria-pressed="true"] {background:var(--accent-soft); color:var(--accent)}
.people-strip .count {font-variant-numeric:tabular-nums; font-weight:710}
.table-wrap {overflow:auto}
table {border-collapse:collapse; width:100%; font-size:.875rem; text-align:left}
th,td {padding:.62rem .85rem; border-bottom:1px solid var(--line); vertical-align:middle}
th {color:var(--muted); background:var(--soft); font-weight:650}
tbody tr:last-child td {border-bottom:0}
tbody tr:hover {background:var(--soft)}
time,.login {font-variant-numeric:tabular-nums; white-space:nowrap}
.login {font-family:ui-monospace,Consolas,monospace; font-size:.875rem; white-space:normal; overflow-wrap:anywhere}
.source {font-weight:660; color:var(--accent)}
.source.ops {color:var(--purple)}
.table-foot {padding:.65rem .85rem; border-top:1px solid var(--line); color:var(--muted); font-size:.875rem}
.pulse {width:.48rem; height:.48rem; display:inline-block; border-radius:50%; background:var(--accent); flex:none}
.greenline {display:flex; align-items:center; gap:.4rem; color:var(--accent); font-size:.875rem; font-weight:650}
.filters {display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; margin-bottom:.85rem}
.filters label {display:flex; align-items:center; gap:.35rem; font-size:.875rem; color:var(--muted)}
.select {appearance:none; background-image:var(--select-icon); background-repeat:no-repeat; background-position:right .55rem center; background-size:.8rem; padding-right:1.7rem}
:root {--select-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23607384' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")}
.service {display:flex; align-items:center; gap:.55rem; font-weight:700}
.service-symbol {background:var(--accent-soft); color:var(--accent); border-radius:.5rem; width:1.95rem; height:1.95rem; display:grid; place-items:center; flex:none}
.service-symbol .icon {width:1rem; height:1rem}
.vault-cell .button {font-size:.8125rem}
.account-note {color:var(--muted); margin-top:.85rem; font-size:.875rem}
dialog {width:min(28rem,calc(100vw - 2rem)); max-height:calc(100dvh - 2rem); color:var(--ink); background:var(--surface); border:1px solid var(--line); padding:0; border-radius:1rem; box-shadow:0 1.75rem 4.5rem #07151c4d; overscroll-behavior:contain}
dialog::backdrop {background:#0b182575; backdrop-filter:blur(3px)}
.dialog-header {display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.1rem; border-bottom:1px solid var(--line)}
.dialog-content {padding:1.05rem 1.1rem}
.dialog-content p + p,.dialog-content .actions {margin-top:.85rem}
.dialog-content label {display:block; font-size:.875rem; font-weight:650; margin-top:.85rem}
.account-form :is(input,textarea) {width:100%; margin-top:.3rem; padding:.55rem .7rem; border:1px solid var(--line); border-radius:.6rem; background:var(--surface); color:var(--ink); font:inherit}
.account-form textarea {resize:vertical}
.account-form input:disabled {opacity:.6}
.code {display:block; min-height:2.6rem; width:100%; padding:.45rem .65rem; margin-top:.3rem; appearance:none; border:1px solid var(--line); border-radius:.55rem; background:var(--soft); font-variant-numeric:tabular-nums; letter-spacing:.13em}
.feedback {font-size:.875rem; color:var(--muted); min-height:1.15rem; margin-top:.35rem}
.sr-only {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}
@media(max-width:63rem) {
  .shell {grid-template-columns:12rem minmax(0,1fr)}
  .sidebar {padding-inline:.65rem}
  .content,.top {padding-inline:1.4rem}
  .stat {display:block}
  .stat span {display:block}
  .columns,.row {grid-template-columns:minmax(0,1fr) minmax(6.25rem,16%) minmax(6.2rem,20%)}
  .analytics-grid {grid-template-columns:1fr}
  .people-strip {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:45rem) {
  .shell {display:block}
  .sidebar {height:auto; position:static; padding:.6rem .8rem .65rem; border-right:0; border-bottom:1px solid var(--line)}
  .brand {padding:.15rem .25rem .6rem}
  .mark {width:2.05rem; height:2.05rem; border-radius:.65rem}
  .mark svg {width:1.45rem; height:1.45rem}
  .brand small {display:none}
  nav {grid-template-columns:repeat(3,minmax(0,1fr)); gap:.25rem}
  .nav {font-size:.8125rem; padding:.5rem .35rem; justify-content:center; gap:.32rem; white-space:nowrap}
  .nav .icon {width:.95rem;height:.95rem}
  .sidebar-bottom {display:none}
  .top {height:3.25rem; padding-inline:.9rem}
  .top-right {gap:.5rem}
  .top .icon-button {min-width:2.15rem;height:2.15rem}
  .content {padding:1.25rem .8rem 2.5rem}
  .heading {margin-bottom:1rem; align-items:start; flex-direction:column; gap:.5rem}
  .stats {grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat {padding:.6rem .75rem; display:flex}
  .stat:nth-child(3) {border-top:1px solid var(--line); border-left:0}
  .stat:nth-child(4) {border-top:1px solid var(--line)}
  .panel-head {padding:.8rem}
  .tree {padding:.25rem .35rem .35rem}
  .columns {display:none}
  .row {grid-template-columns:minmax(0,1fr) auto; gap:.12rem .4rem; margin:0; padding:.55rem .3rem; align-items:start}
  .node {padding-inline-start:calc(var(--depth,0) * .55rem); gap:.18rem}
  .node .name {font-size:.875rem}
  .row.goal .name {font-size:.94rem}
  .row .status {align-self:start}
  .row .status .tag {font-size:.75rem}
  .row>.person {grid-column:1; padding-inline-start:calc(1.73rem + var(--depth,0) * .55rem); font-size:.8125rem}
  .row>.person.none {display:none}
  .row>.person .avatar {width:1.3rem;height:1.3rem;font-size:.625rem}
  .row .reason {font-size:.8125rem}
  .filter-box {right:auto;left:0}
  .detail-grid {grid-template-columns:1fr}
  .table-wrap table {min-width:39rem}
  .table-wrap.accounts {overflow:visible}
  .table-wrap.accounts table {min-width:0}
  .table-wrap.accounts thead {clip-path:inset(50%);width:1px;height:1px;white-space:nowrap;position:absolute;overflow:hidden}
  .table-wrap.accounts tbody tr {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem .5rem;padding:.7rem .8rem;border-bottom:1px solid var(--line)}
  .table-wrap.accounts tbody tr:last-child {border-bottom:0}
  .table-wrap.accounts td {border:0;padding:0}
  .table-wrap.accounts td:nth-child(2) {grid-row:2;grid-column:1/-1}
  .table-wrap.accounts td:nth-child(3) {grid-row:3;grid-column:1}
  .table-wrap.accounts td:nth-child(4) {grid-row:3;grid-column:2}
}
@media(prefers-reduced-motion:reduce) {*,*::before,*::after {scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important}}

.depth-1 {--depth:1}
.depth-2 {--depth:2}
.depth-3 {--depth:3}
.signed-out nav,.signed-out .sidebar-bottom {display:none}
.login-panel {max-width:30rem}
.login-code {letter-spacing:normal}
.login-panel label {display:block; font-size:.875rem; font-weight:650}
.login-panel input {width:100%; margin:.3rem 0 .75rem; padding:.55rem .7rem; border:1px solid var(--line); border-radius:.6rem; background:var(--surface); color:var(--ink)}
.login-panel .actions {margin-top:.75rem}
.logout-button {min-height:2.15rem; background:var(--soft)}
#session-badge {padding:0; border:0; background:none}
.pane-actions,.read-mention {margin-top:.75rem}
.detail-crumb {margin-top:-.7rem; margin-bottom:1rem}
.plain-text {white-space:pre-wrap; overflow-wrap:anywhere}
.wrap-text,.identity strong,.identity small,.account-meta,.service>span {min-width:0; overflow-wrap:anywhere}
.account-meta {display:block; font-weight:400; white-space:pre-wrap}
.reveal-value {white-space:pre-wrap; user-select:text}
.activity-feedback {margin:0 0 .85rem}
.activity-feedback .button {margin-left:.5rem}
.date-input {min-height:2.5rem; border:1px solid var(--line); border-radius:.6rem; padding:.4rem .6rem; background:var(--surface); color:var(--ink)}
.chart-scroll {overflow-x:auto; padding:.2rem .12rem .38rem}
.bar-chart {grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(2.5rem,1fr); border:0; background:none}
.chart-column {min-width:0; text-align:center}
.chart-day {width:100%; border-bottom:1px solid var(--line); background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%)}
.bar-date {display:block; color:var(--muted); font-size:.75rem; margin-top:.2rem}
.pulse.offline {background:var(--faint)}
.journal-footer {display:flex; align-items:center; justify-content:space-between; gap:.5rem; flex-wrap:wrap}

@media(max-width:45rem) {
  .signed-out .brand {padding-bottom:.15rem}
  nav {grid-template-columns:minmax(0,.9fr) minmax(0,1.22fr) minmax(0,.92fr)}
  .nav {white-space:normal; line-height:1.25; min-width:0}
  .activity-filters label {min-width:80px}
  .chart-scroll {margin-inline:-.1rem}
}

@media print {
  #account-dialog {display:none}
}
