:root[data-theme="ivory"]{color-scheme:light;--ground:#F5F2EB;--surface:#FFFDF8;--soft:#F0ECE4;--ink:#302D28;--muted:#6B645A;--line:#DBD4C8;--teal:#75624A;--tint:#EBE3D5;--proof:#61758B;--partner:#896D7F;--question:#92563D;--shadow:#45382818;}

:root[data-theme="sage"]{color-scheme:light;--ground:#EEF0EA;--surface:#FBFCFA;--soft:#F3F5F0;--ink:#1A201D;--muted:#5B665F;--line:#CBD2CA;--teal:#0E6B63;--tint:#D9ECE8;--proof:#2F5FA8;--partner:#7B3B72;--question:#A22D32;--shadow:#1A201D29;}

:root[data-theme="forest"]{color-scheme:dark;--ground:#141816;--surface:#1D2320;--soft:#232A26;--ink:#E4E8E2;--muted:#A6B1A8;--line:#3D4841;--teal:#5CC4B8;--tint:#1E3A36;--proof:#86AEED;--partner:#C79AC0;--question:#F09B9F;--shadow:#00000055;}

:root[data-theme="porcelain"]{color-scheme:light;--ground:#F8F7F4;--surface:#FFFFFF;--soft:#F0EFEC;--ink:#30312F;--muted:#666965;--line:#DCDED8;--teal:#59665D;--tint:#E6EAE4;--proof:#527296;--partner:#856A86;--question:#97513E;--shadow:#35382F15;}

:root[data-theme="linen"]{color-scheme:light;--ground:#F0EAE0;--surface:#FAF6EE;--soft:#EAE1D4;--ink:#382F26;--muted:#6D5D4B;--line:#D8CDBD;--teal:#84562E;--tint:#EADAC3;--proof:#576E8A;--partner:#85607B;--question:#99483A;--shadow:#4A34231A;}

:root[data-theme="slate"]{color-scheme:light;--ground:#EEF2F6;--surface:#FBFCFE;--soft:#E6ECF2;--ink:#273341;--muted:#58687A;--line:#CCD5E0;--teal:#3D6285;--tint:#DCE7F1;--proof:#345F9A;--partner:#846586;--question:#9A5248;--shadow:#23384E1C;}

:root[data-theme="rose"]{color-scheme:light;--ground:#F5EFF0;--surface:#FFFBFC;--soft:#EFE5E8;--ink:#3C3035;--muted:#735D67;--line:#DFCFD6;--teal:#8A5268;--tint:#EDDCE3;--proof:#557594;--partner:#835A88;--question:#984E38;--shadow:#4828311A;}

@font-face{font-family:'Bricolage Grotesque';src:url('/fonts/bricolage-grotesque-latin-500-normal.woff2') format('woff2');font-weight:500;font-display:swap}

@font-face{font-family:'IBM Plex Sans';src:url('/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}

@font-face{font-family:'IBM Plex Sans';src:url('/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');font-weight:500;font-display:swap}

@font-face{font-family:'IBM Plex Mono';src:url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');font-weight:400;font-display:swap}

*{box-sizing:border-box}
body{margin:0;background:var(--ground);color:var(--ink);font-family:'IBM Plex Sans',sans-serif;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
h1,h2,h3{font-family:'Bricolage Grotesque',sans-serif;font-weight:500;line-height:1.2;margin:0}
h1{font-size:34px;letter-spacing:-1px}
h2{font-size:25px}
h3{font-size:17px}
p{margin:8px 0 0;white-space:pre-line}
button,select,input{font:inherit;color:inherit}
button,select{cursor:pointer}
button,select,input{background:var(--surface);border:1px solid var(--line);border-radius:5px;padding:8px 12px}
button:hover,summary:hover{background:var(--tint)}
button:disabled{cursor:wait;opacity:.65}
a{color:var(--teal)}
:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
[hidden]{display:none!important}
.mono,.eyebrow{font-family:'IBM Plex Mono',monospace;font-size:11px}
.eyebrow{color:var(--muted);letter-spacing:.025em}
.muted,.audit{color:var(--muted)}
.audit{font-size:12px}
.sr-only,.skip-link:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.skip-link:focus{display:block;padding:10px;background:var(--surface)}
.chrome{position:sticky;top:0;z-index:8;padding:16px 26px;display:flex;justify-content:space-between;align-items:center;gap:20px;background:var(--surface);border-bottom:1px solid var(--line)}
.wordmark{font-family:'Bricolage Grotesque';font-size:17px;letter-spacing:.13em;text-decoration:none;color:var(--ink)}
.account{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap}
.account #identity{color:var(--muted);font-size:12px}
label{display:flex;align-items:center;gap:8px;color:var(--muted)}
select{max-width:100%;min-width:0;background:var(--soft)}
.nav{display:flex;gap:25px;padding:12px 26px;border-bottom:1px solid var(--line);background:var(--surface);font-size:13px;flex-wrap:wrap}
.nav a{text-decoration:none;color:var(--muted)}
.nav [aria-current]{color:var(--teal);font-weight:500}
.heading{padding:28px 26px 24px;display:flex;justify-content:space-between;align-items:flex-end;gap:24px}
.heading h1{margin-top:8px}
.heading p{color:var(--muted)}
.counts{display:grid;gap:4px;text-align:right;font-size:12px;color:var(--muted);flex-shrink:0}
.counts strong{font-weight:500;color:var(--ink);font-size:15px}
.toolbar{padding:12px 26px;display:flex;align-items:center;gap:20px;flex-wrap:wrap;border-block:1px solid var(--line);background:var(--surface)}
.toolbar-note{margin-left:auto;color:var(--muted);font-size:12px}
.view-switch{display:flex;border:1px solid var(--line);border-radius:6px;overflow:hidden}
.view-switch button{border:0;border-radius:0}
.view-switch button+button{border-left:1px solid var(--line)}
.view-switch [aria-pressed=true]{background:var(--ink);color:var(--ground)}
.view-switch button:focus-visible{outline-offset:-3px}
.status-line{padding:10px 26px 0;color:var(--muted);font-size:12px;display:flex;align-items:center;gap:12px;min-height:35px}
.work{padding:16px 26px 26px;display:grid;grid-template-columns:minmax(0,1fr);gap:22px;align-items:start}
.surface{min-width:0}
.board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;align-items:stretch}
/* Stage identity stays consistent when filtering; tints derive from the active theme. */
.stage{--stage-accent:var(--teal);--stage-tint:color-mix(in srgb,var(--stage-accent) 7%,var(--surface))}
.stage[data-stage-id="stage/acquire"]{--stage-accent:var(--teal)}
.stage[data-stage-id="stage/sign"]{--stage-accent:var(--proof)}
.stage[data-stage-id="stage/onboard"]{--stage-accent:color-mix(in srgb,var(--teal) 55%,var(--proof))}
.stage[data-stage-id="stage/build"]{--stage-accent:var(--partner)}
.stage[data-stage-id="stage/launch"]{--stage-accent:var(--question)}
.stage[data-stage-id="stage/operate"]{--stage-accent:color-mix(in srgb,var(--teal) 65%,var(--question))}
.stage[data-stage-id="stage/scale"]{--stage-accent:color-mix(in srgb,var(--partner) 50%,var(--proof))}
.board>.stage{min-width:0;padding:8px;border:1px solid color-mix(in srgb,var(--stage-accent) 15%,var(--line));border-radius:9px;background:var(--stage-tint)}
.board>.stage>.stage-head{background:transparent;border-color:transparent;padding:8px 2px}
.board>.stage>.stage-head:hover{background:color-mix(in srgb,var(--stage-accent) 11%,var(--surface))}
.stage-head{padding:10px 9px;margin-bottom:10px;width:100%;text-align:left;background:var(--surface);border-radius:7px}
.stage-head strong{display:flex;justify-content:space-between;font-weight:500;margin-top:4px;font-size:16px}
.stage-head strong span{color:var(--muted)}
.card-stack{display:grid;gap:9px}
.card{display:block;width:100%;text-align:left;border-left:3px solid var(--teal);padding:12px 10px;border-radius:6px;background:var(--surface);line-height:1.35}
.card[data-offer=proof]{border-left-color:var(--proof)}
.card[data-offer=partner]{border-left-color:var(--partner)}
.card[aria-pressed=true]{background:var(--tint);border-color:var(--teal);box-shadow:0 0 0 1px var(--teal)}
.card:hover,.card:focus-visible{background:var(--stage-tint,var(--tint))}
.card-top{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;color:var(--muted);font-size:10px;margin-bottom:8px}
.card-title{display:block;font-size:16px;line-height:1.35;font-weight:500}
.card-status{display:grid;gap:4px;color:var(--muted);font-size:11px;margin-top:12px}
.card-summary{display:none;margin-top:10px;color:var(--muted)}
.open-items{display:block;color:var(--question);font-size:11px;margin-top:10px}
.focused-head{margin-bottom:18px}
.focused-head h2{margin-top:20px}
.focused-head>p{color:var(--muted);max-width:70ch}
.handoff{padding:14px 16px;border-left:2px solid var(--teal);background:var(--soft);margin-top:16px}
.handoff p{font-size:13px}
.work[data-focus=true] .board{grid-template-columns:1fr}
.work[data-focus=true] .card-summary{display:block}
.work[data-focus=true] .card{padding:16px}
.work[data-focus=true] .card-status{display:flex;gap:18px}
.work[data-focus=true] .stage-head{display:none}
/* Details always float over the existing layout; opening never changes board width. */
#sidebar{position:fixed;inset:0 0 0 auto;width:min(var(--tray-width,480px),calc(100vw - 40px));height:100dvh;min-width:0;background:var(--surface);border:1px solid var(--line);border-right:0;border-radius:12px 0 0 12px;overflow:visible;box-shadow:-12px 0 40px var(--shadow);z-index:10}
#sidebar:not([hidden]){animation:detail-slide-in 280ms cubic-bezier(.22,1,.36,1)}
@keyframes detail-slide-in{from{transform:translateX(calc(100% + 26px))}to{transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){#sidebar:not([hidden]){animation:none}}
.detail-header{padding:20px;border-bottom:1px solid var(--line)}
.detail-kicker{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;color:var(--muted)}
.detail-kicker button{font-size:12px}
.detail-status{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.detail-status>div>span{display:block}
.detail-status>div>span+span{margin-top:5px;font-size:13px}
.detail-status .eyebrow{font-size:10px}
.panel-nav{display:flex;background:var(--soft);border-bottom:1px solid var(--line)}
.panel-nav button{flex:1;min-width:0;border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 6px;background:transparent;color:var(--muted);font-size:12px}
.panel-nav [aria-pressed=true]{color:var(--teal);background:var(--surface);border-bottom-color:var(--teal)}
.detail-body{padding:20px;display:grid;gap:24px;line-height:1.6}
.detail-body ul{margin:8px 0 0;padding-left:20px}
.detail-body li{margin:5px 0}
.detail-body h3{font-size:16px}
.detail-footer{padding:14px 20px;border-top:1px solid var(--line);background:var(--soft);display:flex;justify-content:space-between;color:var(--muted);font-size:12px}
.field>p{margin-top:8px}
.context-item{padding:12px 0;border-bottom:1px solid var(--line)}
.context-item:last-child{border-bottom:0}
summary{cursor:pointer;color:var(--teal);border-radius:3px}
summary strong{font-weight:500}
.link-meta{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.question{border-left:3px solid var(--question);padding-left:12px;margin-top:10px}
.question summary,.warning{color:var(--question)}
.stage-context{background:var(--soft);padding:14px;border-radius:6px}
.stage-context .field{margin-top:18px}
.linked-content{margin-top:12px}
.linked-content .field{margin-top:14px}
.linked-content p{font-size:13px}
dl{margin:8px 0}
dt{color:var(--muted);font-size:12px;margin-top:10px;text-transform:capitalize}
dd{margin:2px 0 0}
dd p{margin:0}
.timeline{border-left:1px solid var(--line);padding-left:14px}
/* One left-to-right spine. Activity connectors inherit each stage's quiet tint. */
.map{display:grid;gap:18px;--map-gap:44px;--map-stage-width:320px}
.map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px}
.map-toolbar p{margin-top:3px;font-size:13px;color:var(--muted)}
.map-controls{display:flex;align-items:center;gap:5px;flex-shrink:0}
.map-controls button{font-size:12px;min-height:34px;padding:6px 10px}
.map-controls [aria-pressed=true]{background:var(--tint);border-color:var(--teal)}
.map-controls output{font-family:'IBM Plex Mono',monospace;font-size:11px;display:block;min-width:37px}
.map-controls button:disabled{cursor:default}
.map-viewport{overflow:auto;overscroll-behavior-x:contain;border-block:1px solid var(--line);border-radius:8px;scrollbar-color:var(--line) transparent;scroll-padding:24px;max-height:72dvh}
.map-canvas{width:max-content;padding:38px 18px 26px}
.branches{display:flex;gap:var(--map-gap);align-items:stretch}
.branch{position:relative;width:var(--map-stage-width);flex:none;--branch-line:color-mix(in srgb,var(--stage-accent) 30%,var(--line))}
.branch:has([aria-pressed=true]),.branch:has(.map-card:hover),.branch:focus-within{--branch-line:var(--stage-accent)}
.branch:not(:last-child):after{content:'';position:absolute;z-index:0;top:49px;left:100%;width:var(--map-gap);height:1px;background:var(--branch-line);transform-origin:left;transition:background 180ms}
.branch:not(:first-child):before{content:'';position:absolute;top:46px;left:-6px;width:6px;height:6px;border-top:1px solid var(--branch-line);border-right:1px solid var(--branch-line);transform:rotate(45deg)}
.branch .stage-head{position:relative;margin:0;height:100px;padding:14px 16px;border:1px solid var(--branch-line);background:var(--stage-tint);border-radius:10px;transition:background 180ms,border-color 180ms,box-shadow 180ms}
.branch .stage-head:hover,.branch .stage-head:focus-visible{background:color-mix(in srgb,var(--stage-accent) 13%,var(--surface));box-shadow:0 3px 12px var(--shadow)}
.branch .stage-head strong{font-size:21px;margin:4px 0 2px}
.branch .stage-caption{font-size:12px;color:var(--muted)}
.branch .stage-head>.eyebrow{display:flex;justify-content:space-between;align-items:center;font-size:10px}
.launch-milestone{color:var(--stage-accent);font-size:9px;letter-spacing:.08em}
.branch[data-stage-id="stage/launch"] .stage-head{border-top:3px solid var(--stage-accent);padding-top:12px}
.branch[data-stage-id="stage/scale"] .stage-head:before{content:'WHEN READY';position:absolute;right:calc(100% + 5px);top:15px;width:34px;text-align:center;font-family:'IBM Plex Mono',monospace;font-size:8px;line-height:1.4;color:var(--muted)}
.branch .card-stack{position:relative;display:grid;gap:10px;padding:24px 0 0 19px}
.branch .card-stack:before{content:'';position:absolute;left:7px;top:0;bottom:20px;width:1px;background:var(--branch-line);transform-origin:top;transition:background 180ms}
.map-card{position:relative;display:flex;align-items:center;gap:7px;width:100%;min-height:40px;padding:8px 9px;text-align:left;border:1px solid color-mix(in srgb,var(--stage-accent) 22%,var(--line));border-radius:7px;background:var(--surface);line-height:1.3;transition:background 160ms,border-color 160ms,box-shadow 160ms,transform 160ms}
.map-card:before{content:'';position:absolute;left:-13px;top:calc(50% - 9px);width:12px;height:9px;border-left:1px solid var(--branch-line);border-bottom:1px solid var(--branch-line);border-bottom-left-radius:8px;transition:border-color 160ms}
.map-card>.mono{font-size:10px;color:var(--muted);flex-shrink:0}
.map-card-title{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1;font-weight:500}
.map-card .item-count{margin:0;min-width:22px;padding:2px 5px;font-size:10px;flex-shrink:0}
.map-card:hover,.map-card:focus-visible{background:var(--stage-tint);border-color:var(--stage-accent);box-shadow:0 3px 10px var(--shadow);transform:translateY(-2px)}
.map-card[aria-pressed=true]{background:var(--stage-tint);border-color:var(--stage-accent);box-shadow:0 0 0 1px var(--stage-accent)}
.map-offer{font-size:9px;padding:2px 4px;border-radius:3px;background:var(--soft);color:var(--muted);flex-shrink:0}
.map-offer[data-offer=proof]{color:var(--proof)}
.map-offer[data-offer=partner]{color:var(--partner)}
.map-changed{color:var(--question);font-size:12px;flex-shrink:0}
.map-continuation{width:calc(2 * var(--map-stage-width) + var(--map-gap));margin:30px 0 0 auto;padding:12px 16px 0;border-top:1px solid var(--teal);position:relative;color:var(--muted);font-size:12px}
.map-continuation:before{content:'';position:absolute;left:0;top:-8px;height:8px;border-left:1px solid var(--teal)}
.map-continuation>span{display:flex;justify-content:space-between;color:var(--teal);font-weight:500;letter-spacing:.01em}
.map-continuation p{margin-top:4px}
.map-note{color:var(--muted);font-size:12px;margin:0;max-width:110ch}
.map[data-activities=false]{--map-stage-width:180px;--map-gap:36px}
.map[data-activities=false] .card-stack{display:none}
.work[data-focus=true] .map .stage-head{display:block}
.work[data-focus=true] .map{--map-stage-width:560px}
.work[data-focus=true] .map .branch:before,.work[data-focus=true] .map .stage-head:before{display:none}
/* Brief reveals communicate reading direction; nothing loops or implies live progress. */
.map[data-enter=true] .branch{animation:map-arrive 400ms cubic-bezier(.22,1,.36,1) both;animation-delay:var(--stage-delay,0ms)}
.branch:nth-child(2){--stage-delay:45ms}.branch:nth-child(3){--stage-delay:90ms}.branch:nth-child(4){--stage-delay:135ms}.branch:nth-child(5){--stage-delay:180ms}.branch:nth-child(6){--stage-delay:225ms}.branch:nth-child(7){--stage-delay:270ms}
.map[data-enter=true] .branch:not(:last-child):after{animation:map-connect 450ms ease-out both;animation-delay:var(--stage-delay,0ms)}
.map[data-enter=true] .card-stack{animation:map-arrive 450ms ease-out both;animation-delay:var(--stage-delay,0ms)}
@keyframes map-arrive{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}
@keyframes map-connect{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media(prefers-reduced-motion:reduce){.map *, .map *:before,.map *:after{animation:none!important;transition:none!important}.map-card:hover,.map-card:focus-visible{transform:none}}
.footer{padding:15px 26px;border-top:1px solid var(--line);background:var(--surface);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.legend{display:flex;gap:16px}
.legend span{border-left:3px solid var(--teal);padding-left:8px}
.legend span:nth-child(2){border-color:var(--proof)}
.legend span:nth-child(3){border-color:var(--partner)}
.empty{padding:55px 25px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:8px}
.auth{margin:70px auto;max-width:440px;padding:28px;border:1px solid var(--line);background:var(--surface);border-radius:10px}
.auth h1{font-size:28px;margin-top:12px}
.auth p{color:var(--muted)}
.auth form{display:grid;gap:18px;margin-top:24px}
.auth label{display:grid;gap:6px}
.auth input{width:100%}
.auth form button{background:var(--ink);color:var(--ground)}


@media(max-width:1100px){.board{grid-template-columns:repeat(4,minmax(0,1fr))}
.counts{max-width:240px}
}

@media(max-width:720px){.chrome,.heading,.toolbar{padding:16px;gap:14px}
.chrome{align-items:flex-start}
.account{gap:8px}
.account #identity{display:none}
.account label{font-size:12px}
.nav{padding:12px 16px;gap:16px}
.heading{display:block}
.heading h1{font-size:30px}
.counts{text-align:left;margin-top:14px;max-width:none}
.toolbar-note{margin-left:0}
.work,.work[data-focus=true]{padding:14px 16px 20px;grid-template-columns:minmax(0,1fr)}
.board{grid-template-columns:repeat(2,minmax(0,1fr))}
.status-line{padding:10px 16px 0}
#sidebar{inset:12px;width:auto;height:calc(100dvh - 24px);border-right:1px solid var(--line);border-radius:8px;box-shadow:0 12px 30px var(--shadow)}
.footer{padding:16px}
.auth{margin:30px 16px}
.detail-body,.detail-header{padding:18px}
.toolbar label{flex:1}
button,select,summary{min-height:40px}
}

@media(pointer:coarse){button,select,summary{min-height:44px}
}

@media(max-width:720px){.chrome{flex-wrap:wrap}.wordmark{white-space:nowrap}.account{margin-left:auto}}

/* Semantic question status stays independent of theme and offer colours. */
:root{--item-open-ink:#805215;--item-open-bg:#FBEDCA;--item-clear-ink:#2C6948;--item-clear-bg:#E1F0E5;--item-deferred-ink:#526377;--item-deferred-bg:#E9EEF4}
html[data-theme="forest"]{--item-open-ink:#EEC67B;--item-open-bg:#3D3320;--item-clear-ink:#91CDA6;--item-clear-bg:#223B2D;--item-deferred-ink:#B1C4DF;--item-deferred-bg:#293442}
.item-count,.item-status{display:inline-flex;align-items:center;justify-content:center;border-radius:5px;background:var(--soft);color:var(--muted);font-family:'IBM Plex Mono',monospace;font-size:11px;line-height:1.4;vertical-align:middle}
.item-count{min-width:25px;padding:3px 7px;margin-top:10px}
.item-status{padding:3px 7px;font-family:'IBM Plex Sans',sans-serif}
:is(.item-count,.item-status)[data-state=open]{color:var(--item-open-ink);background:var(--item-open-bg)}
:is(.item-count,.item-status)[data-state=clear]{color:var(--item-clear-ink);background:var(--item-clear-bg)}
:is(.item-count,.item-status)[data-state=deferred]{color:var(--item-deferred-ink);background:var(--item-deferred-bg)}
.item-guide h3 .item-count{margin:0 0 0 6px}
.item-guide summary{margin-top:12px}
.item-guide li .item-status{margin-right:4px}

/* A stable gutter keeps the underlying board stationary when the modal opens. */
html{scrollbar-gutter:stable}
html:has(#sidebar[aria-modal=true]){overflow:hidden}
#sidebar-content{height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border-radius:inherit}
#tray-backdrop{position:fixed;inset:0;background:rgb(15 20 18 / 38%);z-index:9;animation:tray-dim-in 200ms ease-out}
@keyframes tray-dim-in{from{opacity:0}to{opacity:1}}
#tray-resize{position:absolute;left:-6px;top:0;bottom:0;width:14px;cursor:ew-resize;touch-action:none;z-index:1;border-radius:12px 0 0 12px}
#tray-resize:after{content:'';position:absolute;left:5px;top:calc(50% - 24px);width:4px;height:48px;border-radius:4px;background:var(--line);transition:background 120ms}
#tray-resize:hover:after,#tray-resize:focus-visible:after{background:var(--teal)}
html[data-tray-resizing] *{cursor:ew-resize!important;user-select:none!important}
@media(max-width:720px){#tray-resize{display:none}}
@media(prefers-reduced-motion:reduce){#tray-backdrop{animation:none}}

@media(max-width:720px){.map-toolbar{align-items:flex-start;flex-direction:column;gap:12px}.map-controls{flex-wrap:wrap}.map-controls button{min-height:40px}.map-canvas{padding-inline:10px}.map{--map-stage-width:300px}.work[data-focus=true] .map{--map-stage-width:300px}}

/* Expansion is deliberate and stays stable while the pointer moves. */
.board .card{transition:background 180ms,border-color 180ms,box-shadow 180ms;scroll-margin-top:150px}
.board .card-preview,.board .card-status-preview{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows 260ms cubic-bezier(.22,1,.36,1),opacity 180ms}
.board .card-summary{display:block;min-height:0;overflow:hidden;margin:0;font-size:12px;line-height:1.55}
.board .card-summary:before{content:'';display:block;height:10px}
.board .card-status-clip{min-height:0;overflow:hidden}
.board .stage[data-expanded=true] :is(.card-preview,.card-status-preview),
.work[data-focus=true] .board :is(.card-preview,.card-status-preview){grid-template-rows:1fr;opacity:1}
.board .stage-heading{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:2px 7px;margin-bottom:10px;padding-top:5px}
.board .stage-count{grid-column:1 / -1;font-size:9px;font-weight:400;letter-spacing:.07em;line-height:1.4;padding-left:2px}
.board .stage-heading .stage-head{min-width:0;min-height:44px;margin:0;padding:4px 2px;border-color:transparent;background:transparent;border-radius:5px}
.board .stage-heading .stage-head strong{display:block;font-size:17px;line-height:1.3;margin:0}
.board .stage-heading .stage-head:hover{background:color-mix(in srgb,var(--stage-accent) 10%,var(--surface))}
.board .column-toggle{display:grid;place-items:center;flex-shrink:0;width:40px;min-height:44px;padding:6px;border:1px solid color-mix(in srgb,var(--stage-accent) 45%,var(--line));border-radius:7px;background:color-mix(in srgb,var(--stage-accent) 12%,var(--surface));color:var(--stage-accent);font-size:20px;line-height:1}
.board .column-toggle[aria-expanded=true]{border-color:var(--stage-accent);background:color-mix(in srgb,var(--stage-accent) 20%,var(--surface))}
.board .column-toggle:hover{border-color:var(--stage-accent);background:color-mix(in srgb,var(--stage-accent) 20%,var(--surface))}
.column-chevron{display:block;width:18px;height:18px;transform-box:view-box;transform-origin:50% 50%;transition:transform 180ms}
[aria-expanded=true] .column-chevron{transform:rotate(180deg)}
.board .stage[data-expanded=true],.board .stage:hover{border-color:color-mix(in srgb,var(--stage-accent) 45%,var(--line))}
.work[data-focus=true] .board .stage-heading{display:none}
@media(pointer:coarse){.board .stage-heading{grid-template-columns:minmax(0,1fr) 44px}.board .column-toggle{min-width:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){.board .card,.board .card-preview,.board .card-status-preview,.column-chevron{transition:none}}

/* Account actions stay in the top-right corner as the workspace scrolls. */
:root{--signout-ink:color-mix(in srgb,#98484E 80%,var(--question))}
html[data-theme=forest]{--signout-ink:color-mix(in srgb,#E6A0A4 80%,var(--question))}
#signout{flex-shrink:0;white-space:nowrap;color:var(--signout-ink);background:color-mix(in srgb,var(--signout-ink) 8%,var(--surface));border-color:color-mix(in srgb,var(--signout-ink) 28%,var(--line));transition:background 160ms,border-color 160ms}
#signout:hover,#signout:focus-visible{background:color-mix(in srgb,var(--signout-ink) 15%,var(--surface));border-color:var(--signout-ink)}
@media(max-width:720px){
  .chrome{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 12px}
  .chrome .wordmark{grid-column:1;grid-row:1}
  .chrome .account{display:contents}
  .chrome #signout{grid-column:2;grid-row:1;min-height:40px}
  .chrome .account label{grid-column:1 / -1;grid-row:2;justify-self:end}
  .chrome .account select{max-width:220px}
}
@media(prefers-reduced-motion:reduce){#signout{transition:none}}

/* A focused stage is a roomy card workspace, with handoff context on demand. */
.work[data-focus=true] .surface{width:100%;max-width:1200px;justify-self:center}
.work[data-focus=true] .board>.stage{padding:18px}
.work[data-focus=true] .board .card-stack{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.work[data-focus=true] .board .card{padding:18px}
.work[data-focus=true] .board .card-title{font-size:18px}
.work[data-focus=true] .board .card-summary{font-size:13px}
.work[data-focus=true] .board .card-status{display:grid;gap:4px}
.focused-head .handoff{padding:10px 14px}
.focused-head .handoff summary{font-size:13px}
#stage-focus-title{scroll-margin-top:155px}
.work[data-stage-motion=true][data-focus=true] .board>.stage{animation:stage-expand 300ms cubic-bezier(.22,1,.36,1) both;transform-origin:top center}
.work[data-stage-motion=true] .focused-head{animation:stage-heading-in 220ms ease-out both}
@keyframes stage-expand{from{opacity:.4;transform:translateY(10px) scaleX(.96)}to{opacity:1;transform:translateY(0) scaleX(1)}}
@keyframes stage-heading-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1100px){.work[data-focus=true] .board .card-stack{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.work[data-focus=true] .board .card-stack{grid-template-columns:1fr}.work[data-focus=true] .board>.stage{padding:10px}}
@media(prefers-reduced-motion:reduce){.board .card-status-preview{transition:none}.work[data-stage-motion=true] .board>.stage,.work[data-stage-motion=true] .focused-head{animation:none}}

/* Draft controls use the existing tray and theme tokens. */
.editor{border:1px solid var(--line);border-radius:12px;background:var(--soft);padding:18px;margin-bottom:24px}
.edit-label{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:16px 0;font-size:13px;font-weight:600}
.edit-label input,.edit-label textarea,.edit-label select{box-sizing:border-box;width:100%;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit;font-weight:400;line-height:1.6}
.edit-label textarea{resize:vertical;white-space:pre-wrap}
.edit-label input:focus,.edit-label textarea:focus,.edit-label select:focus{outline:2px solid var(--teal);outline-offset:2px}
.editor-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.editor-actions button{min-height:44px}
.write-notice{padding:12px;border-left:3px solid var(--teal);background:var(--tint);white-space:pre-wrap}
.change-preview,.conflict-comparison{border-top:1px solid var(--line);margin-top:20px;padding-top:12px;overflow-wrap:anywhere}
.change{border-bottom:1px solid var(--line);padding-bottom:12px}
.change p,.comparison p{white-space:pre-wrap}
.editor :disabled{opacity:.65;cursor:default}

.current-planning{margin-top:18px;padding-top:12px;border-top:1px solid var(--line);overflow-wrap:anywhere}
.current-planning h4{margin:10px 0}.editor select{max-width:100%}
.archive-directory {max-width:70rem;margin:auto;padding:1rem}
.archive-record {display:flex;flex-direction:column;width:100%;text-align:left;gap:.5rem;overflow-wrap:anywhere}
.filters {flex-wrap:wrap;align-items:end}
.filters label {display:flex;flex-direction:column;gap:.4rem;font-size:.8rem}
.filters .search-label {flex:1 1 16rem}
.filters input[type="search"] {width:100%;padding:.6rem;border:1px solid var(--line);border-radius:6px;font:inherit;background:var(--surface);color:var(--ink)}
.filters .check-label {flex-direction:row;align-items:center;padding:.6rem 0}
.filters .toolbar-note {flex-basis:100%}
.filters input[type="checkbox"] {accent-color:var(--teal)}
@media(max-width:720px){.filters label:not(.check-label){flex:1 1 100%}.filters select{max-width:100%;width:100%}.filters button{flex:1}}
.toolbar>label {white-space:nowrap}
.filters label {align-items:stretch;text-align:left}
.filters .check-label {align-items:center;white-space:normal}
@media(max-width:720px){.filters label:not(.check-label):not(.search-label){flex:1 1 40%;min-width:0}.filters .search-label{flex:1 1 100%}.filters .check-label{flex:1 1 100%}.filters select{font-size:12px}}
