/* Flow consumes the same local chrome snapshot as CRM and Library. */
:root{--flow-brand:#3b4f6a;--flow-brand-hover:#304158;--primary:var(--flow-brand)}
html[data-theme=dark]{--primary:#b7c9e2}
.btn.primary{background:var(--flow-brand);border-color:var(--flow-brand);color:#fff}
.btn.primary:hover{background:var(--flow-brand-hover);border-color:var(--flow-brand-hover)}
input[type=checkbox]{accent-color:var(--flow-brand)}
.layout.marsa-chrome{--mc-glass:color-mix(in srgb,var(--panel) 94%,transparent);--mc-ink:var(--ink);--mc-muted:var(--muted);--mc-chip:var(--card);--mc-edge:var(--edge);--mc-solid:var(--panel);--mc-accent:var(--primary);--mc-selection:#b7c9e2}
.sidebar.marsa-chrome-sidebar{background:var(--flow-brand);color:#f5f8fd}
[data-theme=dark] .sidebar.marsa-chrome-sidebar{background:linear-gradient(160deg,var(--flow-brand),#27374d)}
.sidebar .brand .muted,.sidebar .brand small,.sidebar .nav-title,.sidebar .profile small{color:#d0dced}
.sidebar .brand img{filter:brightness(0) invert(1)}
.sidebar .nav-link{color:#edf3fc;min-height:44px;border-radius:12px}
.sidebar .nav-link:is(.active,:hover){color:#fff;background:#ffffff24}
.sidebar .nav-link.active:before{background:#b7c9e2}
.sidebar .nav-group:not(.sidebar-foot .nav-group){display:flex;flex-direction:column;justify-content:flex-start;gap:4px;flex:1;min-height:70px;overflow:auto;scrollbar-width:thin}
.sidebar #flow-nav>*{flex-shrink:0}
.sidebar .sidebar-foot{padding-top:4px}
.sidebar .profile{border-radius:12px;background:#ffffff15;padding:8px}.sidebar .profile button{color:inherit}
.sidebar .divider{margin:6px 0;border-color:#ffffff32}
.sidebar .nav-link:focus-visible{outline:2px solid #d0dced}
.topbar .search:focus-within{outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 17%,transparent)}
.topbar .search input:focus-visible{outline:none}
.project-card{min-width:0}.project-card h3{overflow-wrap:anywhere}
.project-card .row.wrap{gap:5px}.project-card .row.wrap .btn{padding-inline:9px}
.pin-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,215px),1fr));align-items:start;gap:24px 20px;padding:26px 20px 30px;border:1px solid var(--edge);border-radius:18px;background:repeating-linear-gradient(0deg,transparent 0 28px,color-mix(in srgb,var(--edge) 48%,transparent) 28px 29px),var(--panel)}
.pin-board>.empty{grid-column:1/-1}
:is(.pinned-note,.note-dialog){--paper:#ffead8;--pin:#df7445}
.pinned-note{--tilt:-1.3deg;position:relative;border:1px solid var(--edge);color:var(--ink);background:var(--card);text-align:start;padding:17px 9px 9px;border-radius:16px;box-shadow:0 7px 18px -13px #20334666;transform:rotate(var(--tilt));transition:transform .18s var(--ease),box-shadow .18s var(--ease);min-width:0}
.pinned-note:nth-child(even){--tilt:1.3deg}:is(.pinned-note,.note-dialog)[data-tone=sky]{--paper:#e1ebff;--pin:#4c7bdc}:is(.pinned-note,.note-dialog)[data-tone=lilac]{--paper:#eee1fc;--pin:#8b59cb}:is(.pinned-note,.note-dialog)[data-tone=mint]{--paper:#d9f0e7;--pin:#379f86}
.note-pin{position:absolute;top:-5px;inset-inline-start:calc(50% - 7px);width:15px;height:13px;border-radius:50%;background:linear-gradient(145deg,color-mix(in srgb,var(--pin),white 33%),var(--pin));box-shadow:0 3px 0 var(--pin),0 6px 2px #24393b45}
.note-paper{display:flex;flex-direction:column;gap:7px;min-height:134px;padding:15px;background:var(--paper);border-radius:10px;color:#263348}
.note-paper small{font-size:11px;color:#425362}.note-paper strong{font-size:16px}.note-paper>span{font-size:13px;line-height:1.65;white-space:pre-line;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.note-paper>*{overflow-wrap:anywhere}
[data-theme=dark] .note-paper{background:color-mix(in srgb,var(--pin) 18%,var(--card));color:var(--ink)}[data-theme=dark] .note-paper small{color:var(--muted)}
@media(hover:hover){.pinned-note:hover{transform:translateY(-2px);box-shadow:0 12px 20px -14px #20334688}}
@media(max-width:760px){.pin-board{padding:22px 14px;gap:20px}.topbar .btn{min-width:44px;min-height:44px}.project-card .btn{min-height:44px}}
@media(max-height:600px){html body .layout.marsa-chrome .sidebar.marsa-chrome-sidebar{overflow-y:auto}.sidebar .nav-group:not(.sidebar-foot .nav-group){flex:none;overflow:visible}}
@media(prefers-reduced-motion:reduce){.pinned-note,.pinned-note:hover{transform:none;transition:none}}
.discard-prompt{display:grid;gap:18px;padding:24px}
.project-card .project-open{background:var(--soft);color:var(--primary);border-color:transparent}
.space-head>a{display:inline-flex;align-items:center;gap:7px;min-height:44px;color:var(--muted)}
.space-head h1{margin:0 0 14px;text-align:start;overflow-wrap:anywhere}
.space-nav{display:flex;flex-wrap:wrap;gap:4px;border-block-end:1px solid var(--edge);padding-bottom:8px;margin-bottom:20px}
.space-nav a{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:10px;color:var(--muted)}
.space-nav a[aria-current=page]{background:var(--soft);color:var(--primary);font-weight:bold}
.space-nav a:hover{background:var(--panel)}
.space-body .page-head h1{font-size:1.25rem}.space-body .page-head .eyebrow{display:none}
.space-body .panel+.panel,[data-page=team] .panel+.panel{margin-block-start:16px}
.space-body .two-col>.panel+.panel{margin-block-start:0}
.project-card h3 a{color:inherit}
[data-page=team] .toolbar .row{align-items:end}.space-body .list-item{width:100%;text-align:start}
[data-page=team] .table-wrap{overflow-x:auto}
@media(max-width:760px){.space-nav{gap:2px}.space-nav a{padding-inline:9px;font-size:12px}[data-page=team] .toolbar .row{flex:1;flex-wrap:wrap}.space-body{min-width:0}}
.space-body>.metrics{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}
.space-more{position:relative;margin:0;border:none;background:none}
.space-more summary{min-height:44px;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:10px;color:var(--muted);cursor:pointer;list-style:none}
.space-more summary::after{content:'⌄'}.space-more summary::-webkit-details-marker{display:none}
.space-more[open] summary,.space-more:has([aria-current=page]) summary{background:var(--soft);color:var(--primary)}
.space-more>div{position:absolute;inset-inline-end:0;z-index:8;display:grid;width:max-content;min-width:160px;padding:6px;border:1px solid var(--edge);border-radius:12px;background:var(--card);box-shadow:var(--shadow)}
@media(max-width:760px){.space-more>div{position:static;min-width:0}.space-more[open]{width:100%}.space-more[open]>div{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}}
.space-waiting{margin-block-start:16px}

.sheet-scroll{container-type:inline-size;max-width:100%;max-height:72vh;overflow:auto;overscroll-behavior:contain}
.content-sheet{width:100%;border-collapse:separate;border-spacing:0;text-align:start}
.content-sheet th,.content-sheet td{padding:7px 9px;border-inline-end:1px solid var(--edge);border-bottom:1px solid var(--edge);vertical-align:top;text-align:start}
.content-sheet th{position:sticky;top:0;z-index:2;background:var(--panel);color:var(--ink);white-space:nowrap}
.content-sheet tbody[data-sheet-day]{--day-fill:var(--card)}
.content-sheet tbody[data-sheet-day]>tr:not(.sheet-input-row)>td:not(.sheet-active){background:var(--day-fill)}
.content-sheet .sheet-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.content-sheet time{direction:ltr;display:inline-block}
.content-sheet .sheet-weekday{white-space:nowrap;color:var(--muted)}
.content-sheet .sheet-col-media_type{min-width:120px}.content-sheet .sheet-col-title{min-width:160px}
.content-sheet td a{display:inline-block;margin-inline:3px}
.sheet-entry,.sheet-cell,.sheet-add{border:0;border-radius:6px;text-align:start;background:transparent;color:inherit}
.sheet-entry{width:100%;display:grid;gap:2px;margin-bottom:4px;padding:6px 8px;background:var(--soft);white-space:normal;overflow-wrap:anywhere}
.sheet-entry small,.sheet-editor-head span,.sheet-actions small{color:var(--muted)}
.sheet-entry span{font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sheet-cell{min-height:38px;white-space:pre-line;overflow-wrap:anywhere}.sheet-cell:hover,.sheet-add:hover{background:var(--soft);color:var(--primary)}
.sheet-add{display:inline-grid;place-items:center;width:32px;min-height:32px;color:var(--muted)}
.content-sheet td.sheet-active{padding:0;background:var(--panel)}
.sheet-editor{position:sticky;inset-inline-start:0;width:min(100%,100cqw);padding:14px;border:2px solid var(--primary);border-radius:12px;display:grid;gap:10px}
.sheet-editor-head,.sheet-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sheet-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sheet-editor label{display:grid;gap:5px;font-size:12px}
.sheet-editor :is(input,select,textarea){width:100%;min-width:0}.sheet-actions small{margin-inline-end:auto}
.sheet-editor [role=alert]{color:var(--red)}.sheet-editor [role=alert]:empty{display:none}
@media(max-width:760px){.sheet-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-cell,.sheet-add{min-height:44px}.sheet-add{width:44px}
:is([data-page=calendar],[data-page=work-calendar]) .toolbar.between{flex-wrap:wrap}:is([data-page=calendar],[data-page=work-calendar]) .toolbar.between>.row{max-width:100%;flex-wrap:wrap}}
.sheet-input-row td{background:var(--soft)}
.sheet-input-row :is(input,select,textarea){width:100%;min-width:95px}.sheet-input-row textarea{min-width:135px}
.content-sheet :is(.sheet-date,thead th:first-child){position:sticky;inset-inline-start:0;background:var(--panel);z-index:1}
.content-sheet thead th:first-child{z-index:3}
@media(max-width:760px){
 .content-sheet tbody .sheet-date{position:static}
 .content-sheet thead th:first-child{inset-inline-start:auto}
}

.agenda-project{display:inline-flex;align-items:center;padding:3px 8px;font-size:12px;white-space:nowrap;color:var(--ink);background:var(--soft);border-radius:20px}
.sheet-global .sheet-col-content{min-width:200px}
@media(max-width:760px){:is([data-page=calendar],[data-page=work-calendar]) .segmented{max-width:100%;flex-wrap:wrap}}
/* Material identity uses the stored media key, independent of project, status and display order. */
[data-media="photo"]{--media-accent:#4784e2}
[data-media="design"]{--media-accent:#9860da}
[data-media="post"]{--media-accent:#29976a}
[data-media="carousel"]{--media-accent:#e7a325}
[data-media="video"]{--media-accent:#e46953}
[data-media="reel"]{--media-accent:#ce548e}
[data-media="motion"]{--media-accent:#209eb6}
[data-media="animation"]{--media-accent:#666ad8}
[data-media]{--media-fill:color-mix(in srgb,var(--media-accent) 22%,var(--card));--media-ink:color-mix(in srgb,var(--media-accent) 30%,var(--ink))}
html[data-theme=dark] [data-media]{--media-fill:color-mix(in srgb,var(--media-accent) 26%,var(--panel));--media-ink:var(--ink)}
.media-badge{display:inline-flex;align-items:center;gap:5px;width:max-content;max-width:100%;padding:2px 8px;border-radius:20px;font-size:12px;line-height:1.6;white-space:nowrap;background:var(--media-fill);color:var(--media-ink)}
.media-badge::before{content:"";width:7px;height:7px;flex:none;border-radius:50%;background:var(--media-accent)}
html[data-theme] :is(.calendar-card,.work-card,.sheet-entry)[data-media]{background:var(--media-fill);color:var(--media-ink);border:1px solid var(--edge);filter:none}
:is(.calendar-card,.sheet-entry)[data-media]:hover{box-shadow:inset 0 0 0 1px var(--media-accent)}
.sheet-entry[data-media] small{color:var(--media-ink)}.card-project .media-badge{font-size:11px}
select[data-media]{background-color:var(--media-fill);color:var(--media-ink);border:1px solid var(--edge)}
.bar-row[data-media] progress{accent-color:var(--media-accent)}
.sheet-global{min-width:1040px}.sheet-global td:nth-child(4){min-width:90px}.sheet-global td:nth-child(7){min-width:98px}.sheet-global td:nth-child(8){min-width:140px}
.content-sheet .sheet-date .sheet-cell{white-space:nowrap}.sheet-global .sheet-date{min-width:96px}

.work-slot{display:grid;gap:2px;width:100%;margin-block:3px;padding:6px 8px;text-align:start;border:1px solid var(--edge);border-radius:9px;background:var(--card);color:var(--ink)}
.work-slot small,.work-slot span{font-size:11px;color:var(--muted)}.work-slot.past-complete{background:var(--panel);color:var(--muted);border-color:color-mix(in srgb,var(--edge) 65%,var(--panel))}
.work-slot.past-complete strong{font-weight:400}
.work-slot.past-complete:is(:hover,:focus-visible){color:var(--ink);border-color:var(--primary)}
.work-slot strong{overflow-wrap:anywhere}.work-slot:hover{border-color:var(--primary)}
.planner,.plan-step{display:grid;gap:10px}.plan-step{border:1px solid var(--edge);border-radius:12px;padding:10px;min-width:0}.plan-step legend{font-weight:700}.plan-step [data-effective]{color:var(--primary)}
.stage-chain{padding:0;list-style:none;display:grid;gap:3px;font-size:11px}.stage-chain b{font-variant-numeric:tabular-nums}.workflow-links{margin-block:12px}

.card-calendars{display:flex;flex-wrap:wrap;gap:4px;margin-block-start:5px}.card-calendars a{font-size:11px;color:inherit;background:var(--panel);padding:2px 6px;border:1px solid var(--edge);border-radius:7px}
#dialog:has(#quick-task){width:min(460px,calc(100vw - 24px))}
#dialog:has(#work-form){width:min(620px,calc(100vw - 24px))}
#dialog .assignee-picker>summary{display:flex;align-items:center;gap:8px}
#dialog .assignee-picker>summary small{margin-inline-start:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65%}
.assignee-picker [data-people]{max-height:190px;overflow:auto}.work-extra{display:grid;gap:10px;min-width:0;padding:8px 0;border-block-start:1px solid var(--edge)}
.work-extra section>h3{display:flex;align-items:center;gap:8px;margin:0;font-size:.94rem}.work-extra section+section{border-top:1px solid var(--edge);padding-top:12px}

#dialog:has(.record-page){width:min(800px,calc(100vw - 24px));background:var(--card)}
#dialog:has(.record-page) .dialog-head{border-bottom:0;padding-bottom:0;background:var(--card)}
#dialog:has(.record-page) .dialog-body{background:var(--card);padding-top:4px}
#dialog:has(.record-page) #dialog-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.record-page .record-title{font-size:clamp(1.35rem,3vw,1.85rem);font-weight:700;width:100%;border:1px solid transparent;background:transparent;padding:5px 6px;border-radius:8px;min-width:0}
.record-page .record-title:hover,.record-page .record-title:focus{border-color:var(--edge)}
.record-properties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px;padding-block:7px 12px}
.record-property{display:flex;align-items:center;gap:8px;min-width:0;font-size:14px}
.record-property>span:first-child{display:inline-flex;align-items:center;gap:6px;color:var(--muted);white-space:nowrap}
.record-property>input,.record-property>.select-wrap{flex:1;min-width:0}
.record-property :is(input,select){min-height:38px;padding-block:4px}
.record-properties .assignee-picker{align-self:start}
.record-description{border-block-start:1px solid var(--edge);padding-top:12px}.record-description textarea{resize:vertical;background:transparent;border-color:transparent}.record-description textarea:is(:hover,:focus){border-color:var(--edge)}
@media(max-width:650px){.record-properties{grid-template-columns:1fr}.record-property>span:first-child{min-width:92px}}
#dialog .assignee-picker{position:relative;align-self:start;border:0;background:transparent;min-width:0}
#dialog .assignee-picker>summary{border:0;border-radius:20px;background:var(--soft);padding:6px 12px;min-height:36px;font-size:13px}
#dialog .assignee-picker>summary:focus:not(:focus-visible){outline:none}
#dialog .assignee-picker[open]{z-index:3}
#dialog .assignee-picker>.details-content{position:absolute;inset-inline:0;top:calc(100% + 4px);min-width:min(230px,100%);background:var(--card);box-shadow:0 8px 22px -10px #17294055;border:1px solid var(--edge);border-radius:12px;padding:12px}
.member-rows{display:grid;gap:2px;max-height:154px;overflow:auto}.member-rows label{position:relative;display:flex;align-items:center;gap:8px;padding:6px;border-radius:8px;cursor:pointer}.member-rows input{position:absolute;opacity:0;width:1px;height:1px}.member-rows label:focus-within{outline:2px solid var(--primary);outline-offset:-2px}.member-rows label:has(input:checked){background:var(--soft)}
.member-avatar{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--soft);color:var(--primary);font-size:12px}
.member-tick{margin-inline-start:auto;opacity:0;color:var(--primary)}.member-rows input:checked~.member-tick{opacity:1}.picker-hint{display:block;padding:8px;color:var(--muted)}
.picker-done{display:block;margin-inline-start:auto;color:var(--primary);background:transparent;border:0;padding:5px 9px;border-radius:8px;font:inherit}

#dialog .planner>[data-add-step]{justify-self:start}

/* Properties share one label line and one value line. */
#dialog .record-properties{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:8px 12px;align-items:start;padding:10px 0}
.record-properties .record-property{display:grid;gap:5px;align-content:start}
.record-properties .record-property>span:first-child{min-width:0;font-size:12px;color:var(--muted)}
#dialog .record-properties .assignee-picker>summary{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:20px 38px;align-items:center;gap:4px;background:none;border-radius:7px;padding:0;color:var(--muted)}
#dialog .record-properties .assignee-picker summary>b{font-size:12px;font-weight:500}
#dialog .record-properties .assignee-picker summary>small{grid-column:1/-1;margin:0;max-width:100%;width:100%;height:38px;line-height:38px;padding-inline:9px 22px;border-radius:8px;background:var(--soft);color:var(--ink)}
#dialog .record-properties .assignee-picker summary::after{position:absolute;inset-inline-end:6px;bottom:10px}
#dialog .record-properties .assignee-picker>.details-content{width:min(260px,75vw)}
.record-properties .record-property :is(input,select){height:38px;border-radius:8px;font-size:13px;width:100%}
@media(max-width:650px){#dialog .record-properties{grid-template-columns:repeat(2,minmax(0,1fr))}#dialog .record-properties .assignee-picker>.details-content{inset-inline:auto 0}}
.ops-head{display:flex;align-items:center;gap:20px;margin-block:8px 14px;flex-wrap:wrap}
.ops-head h1{margin:0;margin-inline-end:auto;font-size:clamp(24px,2.4vw,34px)}
.ops-numbers{display:flex;gap:22px}.ops-numbers>div{display:grid;gap:1px}.ops-numbers small{font-size:12px;color:var(--muted)}.ops-numbers strong{font-size:22px;font-weight:500;font-variant-numeric:tabular-nums}
.operations>.toolbar{gap:7px;flex-wrap:wrap;margin:0 0 14px}.operations>.toolbar .search{flex:1;min-width:130px}.operations>.toolbar .segmented{border-radius:22px}.operations>.toolbar .segmented .btn{border-radius:20px}
.operations>.board{gap:12px}.operations .column{border:0;border-block-start:3px solid var(--edge);border-radius:0;background:transparent;padding:0}
.operations .column[data-status=open]{border-color:#7db4cc}.operations .column[data-status=planned]{border-color:#b592d4}.operations .column[data-status=active]{border-color:#e2ba58}.operations .column[data-status=review]{border-color:#df9bab}.operations .column[data-status=done]{border-color:#78bfa7}
.operations .column-head{padding:8px 4px}.operations .column-list{padding:1px;max-height:max(360px,calc(100dvh - 245px));gap:8px}
.operations .work-card{border-radius:16px;padding:11px;box-shadow:none}.operations .work-card:not([data-media]){background:var(--card);color:var(--ink)}
.card-sequence{margin-top:7px}.card-sequence>summary{cursor:pointer;font-size:12px}
@media(min-width:1000px){.operations .column{flex:0 0 max(168px,calc((100% - 48px)/5))}}
@media(max-width:650px){.ops-head{gap:8px}.ops-numbers{order:3;width:100%;gap:18px}.operations>.toolbar .segmented{max-width:100%}}
#dialog:has(#work-form){width:min(820px,calc(100vw - 24px))}
@media(min-width:721px){#dialog .record-properties:has([name=publication]){grid-template-columns:repeat(5,minmax(0,1fr))}}
.operations .card-sequence{border:0;background:transparent}
.operations .card-sequence>summary{padding:3px 0;min-height:24px;background:none;color:inherit}

.stage-rail{list-style:none;padding:0;margin:8px 0;display:grid}
.stage-rail li{position:relative;padding-inline-start:21px;min-width:0}
.stage-rail.multiple li:not(:last-child)::after{content:"";position:absolute;inset-inline-start:5px;top:20px;bottom:-16px;border-inline-start:1px dashed var(--muted);opacity:.5}
.stage-rail li::before{content:"";position:absolute;inset-inline-start:1px;top:14px;width:9px;height:9px;box-sizing:border-box;border:2px solid var(--muted);border-radius:50%;background:var(--card)}
.stage-rail li[data-state=active]::before{border-color:var(--primary);background:var(--primary)}
.stage-rail li[data-state=done]::before{border-color:var(--green);background:var(--green)}
#dialog .rail-details,.rail-stage{width:100%;background:transparent;border:0;border-radius:0;text-align:start}
#dialog .rail-details>summary,.rail-stage{display:flex;align-items:baseline;gap:8px;padding:9px 0;font:inherit;color:inherit}
.rail-details summary strong,.rail-stage strong{flex:1;overflow-wrap:anywhere}.rail-details summary small,.rail-count{color:var(--muted)}
.rail-body{padding:0 0 12px;display:grid;gap:5px;font-size:13px}.rail-body span{display:flex;gap:6px;align-items:center}.rail-body button{justify-self:start}
.rail-count{font-size:12px}.card-sequence .rail-stage{display:grid;gap:2px;font-size:12px}.card-sequence .rail-stage:hover strong{text-decoration:underline}
.operations .mini-card{border-radius:11px;padding:6px 8px}
.mini-card .card-title,.mini-context{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-card .card-title{line-height:1.45;font-weight:700}.mini-context{opacity:.82;font-size:11px;margin:1px 0 3px}
.mini-meta{display:flex;align-items:center;gap:4px;min-width:0}.mini-meta .pill,.mini-meta .avatar-control{font-size:10px;min-height:22px;padding:1px 4px}
@media(hover:none){.mini-meta button{min-height:32px}}
.operations .column,.operations .column-list>div,.operations .mini-card{min-width:0}
.operations .column-list{grid-template-columns:minmax(0,1fr)}
.operations .board{gap:9px}
.operations .column{flex:0 0 clamp(148px,13vw,172px)}
.operations .column-list{gap:6px}
.operations .mini-card{border-radius:10px;padding:4px 6px}
.mini-card .card-title{font-size:12px;line-height:1.4}
.mini-context{font-size:10px;line-height:1.35;margin:1px 0 2px}
.mini-meta{gap:3px}.mini-meta .avatar{width:18px;height:18px;font-size:9px}
.mini-meta .pill{font-size:10px;min-height:20px;line-height:1.25;padding:1px 4px}
.mini-meta .icon{width:12px;height:12px}
@media(hover:hover){.mini-meta .avatar-control{min-height:20px}}
@media(max-width:650px){.operations .column{flex-basis:148px}}

/* Lane tint, hover lift and held-card motion follow CRM's customer board. */
.operations.content{padding:4px 10px 12px}
.operations .board{padding:0 1px 8px;gap:9px;overscroll-behavior-x:none}
.operations .column{--lane-color:#7db4cc;flex:0 0 clamp(160px,14vw,185px);max-width:185px;padding:5px;border:0;border-radius:13px;background:color-mix(in srgb,var(--lane-color) 11%,var(--card));transition:background .18s,box-shadow .18s}
.operations .column[data-status=planned]{--lane-color:#b592d4}.operations .column[data-status=active]{--lane-color:#e2ba58}.operations .column[data-status=review]{--lane-color:#df9bab}.operations .column[data-status=done]{--lane-color:#78bfa7}
html[data-theme=dark] .operations .column{background:color-mix(in srgb,var(--lane-color) 17%,#102330)}
.operations .column.over{outline:0;box-shadow:inset 0 0 28px color-mix(in srgb,var(--lane-color) 28%,transparent);background:color-mix(in srgb,var(--lane-color) 18%,var(--card))}
.operations .column-head{padding:2px 3px 5px}.operations .column-head small{background:var(--card);padding:1px 6px;border-radius:6px}
.operations .column-list{min-height:80px;max-height:calc(100dvh - 180px);gap:7px}
.operations .mini-card,.customer-board-held-card{border-radius:10px;padding:4px 6px;box-shadow:0 1px 3px #18344206;cursor:grab;transition:transform .28s cubic-bezier(.2,.8,.2,1),box-shadow .28s ease}
.mini-card .card-title{font-size:12px;font-weight:700;line-height:1.4;white-space:nowrap;display:block;overflow:hidden}.mini-context{margin:1px 0 2px}
.customer-board-drag-layer{position:fixed;inset:0;pointer-events:none;z-index:10000;overflow:visible}.customer-board-drag-layer canvas{position:absolute;inset:0;opacity:0}
.customer-board-drag-layer .customer-board-held-card{position:absolute;left:0;top:0;margin:0;transform:rotate(-3deg) scale(1.035);transform-origin:center;animation:none;transition:none;box-shadow:0 20px 38px #18344238,0 4px 12px #18344220;will-change:transform,translate}
.flow-card-shell::before,.flow-card-shell::after{content:"";display:block;height:0;transition:height .22s cubic-bezier(.2,.8,.2,1)}
.flow-card-shell.insert-before::before,.flow-card-shell.insert-after::after{height:20px}
.board-tools{margin-block:8px}.board-tools>summary{font-size:12px;color:var(--muted);cursor:pointer}
@media(prefers-reduced-motion:reduce){.customer-board-drag-layer .customer-board-held-card{transform:none}.operations .column,.operations .mini-card,.flow-card-shell::before,.flow-card-shell::after{transition:none}}
.mobile-status{display:none}
@media(max-width:700px){
 .operations .board{display:block}.operations .column{display:none;max-width:none}.operations .column.mobile-current{display:block}
 .operations .column-head .mobile-status{display:block;width:auto;height:36px;font-weight:700}.operations .desktop-status{display:none}
 .operations .column-list{max-height:calc(100dvh - 150px)}
}
@media(min-width:701px){
 .main:has(>.operations){display:flex;flex-direction:column;justify-content:flex-start}
 
 .main:has(>.operations)>.operations{margin:0;width:100%;max-width:none}
 .operations .column-list{max-height:calc(100dvh - 98px)}
}
.ops-strip{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--edge);border-radius:13px;padding:7px 12px;margin:2px 0 8px}
.ops-date{display:grid;gap:1px;min-width:100px}.ops-date small{font-size:10px;color:var(--muted)}
.ops-mode{display:flex;align-items:center;gap:7px;border-inline-start:1px solid var(--edge);padding-inline-start:14px;margin-inline-end:auto}.ops-mode select{border:0;background:transparent;min-height:32px;width:auto;font-size:12px}
.ops-people{display:flex;align-items:center}.ops-people .avatar{margin-inline-start:-5px;border:2px solid var(--card);width:28px;height:28px}.ops-strip .btn{min-height:34px;padding:5px 10px;font-size:12px}
.ops-strip [data-action=new-work]{background:var(--ink);color:var(--card);border-color:var(--ink)}
.ops-filters .toolbar{display:flex;flex-wrap:wrap;margin:0 0 8px}
@media(max-width:700px){.ops-strip{gap:5px;padding:5px 7px}.ops-date{min-width:0}.ops-date small,.ops-people,.ops-mode b{display:none}.ops-mode{padding-inline-start:5px}.ops-strip .btn{min-height:36px;padding:4px 6px}.ops-mode select{max-width:95px}}
.ops-menu{display:none}
@media(max-width:700px){.main:has(>.operations){display:flex;flex-direction:column}.main:has(>.operations)>.operations{margin:0;width:100%}.ops-menu{display:inline-flex}.ops-menu.icon-btn{width:32px;min-width:32px}}

/* Pastel board: tags, title, optional note/progress, people and date. */
@media(min-width:701px){.operations .column{flex:1 0 174px;max-width:250px}}
.operations.content{padding:6px 14px 14px}
.operations .board{gap:12px;padding-block:5px 10px}
.operations .column,.operations .column:not(.over){border:1px solid var(--edge);border-radius:16px;background:var(--panel);padding:7px}
.operations .column-head{padding:4px 3px 9px;margin-block-end:8px;border-bottom:1px solid var(--edge)}
.operations .column-list{gap:8px}
.operations .mini-card,.customer-board-held-card{border-radius:12px;padding:10px;box-shadow:none}
html[data-theme] .operations .mini-card[data-media],html[data-theme] .customer-board-held-card[data-media]{border:1px solid color-mix(in srgb,var(--media-accent) 17%,transparent);background:color-mix(in srgb,var(--media-accent) 26%,var(--card))}
.operations .mini-card:not([data-media]){background:color-mix(in srgb,#9684cd 17%,var(--card))}
.mini-top{display:flex;align-items:center;gap:3px;min-width:0}
.mini-top>span{background:color-mix(in srgb,var(--card) 60%,transparent);padding:2px 5px;border-radius:4px;font-size:9px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-top>span:first-child{flex:none}
.mini-card .card-title{margin:7px 0;font-size:13px;font-weight:700;line-height:1.45;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.mini-note{margin:0 0 9px;font-size:11px;line-height:1.5;opacity:.85;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.mini-progress{margin-block:8px 10px;font-size:10px}
.mini-meta{justify-content:space-between;margin-top:6px}.mini-meta .avatar-control{background:transparent;border:0}
.mini-meta .pill{background:color-mix(in srgb,var(--card) 55%,transparent)}
.main:has(>.operations){min-height:100dvh}

/* Workspace header uses the same location, controls and appearance switch as CRM. */
.crm-header-breadcrumb{display:flex;align-items:center;gap:9px;min-width:0}.crm-header-breadcrumb i{color:var(--edge);font-style:normal}
.flow-wordmark{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:14px;font-weight:700;direction:ltr}
.flow-wordmark img{width:24px;height:20px}
.crm-header-date{font-size:11px;color:var(--muted);white-space:nowrap}
.crm-header-company{display:flex;align-items:center;gap:8px}
.crm-appearance{position:relative;isolation:isolate;display:grid;grid-template-columns:44px 44px;gap:4px;direction:ltr}
.crm-appearance button{position:relative;z-index:1;border:0;background:transparent}
.crm-appearance-indicator{position:absolute;left:2px;top:2px;transition:transform .24s ease}
html body .layout.marsa-chrome .crm-workspace-header .crm-navigation-trigger{display:none}
@media(max-width:760px){
html body .layout.marsa-chrome.marsa-chrome .crm-workspace-header{flex-wrap:nowrap;min-height:54px;padding:4px 8px;gap:3px}
html body .layout.marsa-chrome.marsa-chrome .crm-workspace-header :is(.marsa-chrome-tools,.marsa-chrome-location){width:auto;gap:3px;flex-wrap:nowrap}
html body .layout.marsa-chrome.marsa-chrome .crm-workspace-header .crm-navigation-trigger{display:inline-grid}
.crm-workspace-header .crm-header-date,.crm-workspace-header .crm-header-company,.crm-workspace-header .crm-header-logout,.crm-workspace-header .crm-back-control,.crm-workspace-header .flow-wordmark,.crm-workspace-header .crm-header-breadcrumb i{display:none!important}
}
.crm-header-secondary{display:contents}.flow-header-more{display:none!important}
@media(max-width:760px){
.flow-header-more{display:inline-grid!important}
.crm-header-secondary{display:none}
.crm-header-secondary.is-open{display:flex;position:absolute;inset-inline:10px;top:calc(100% + 4px);align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:12px;background:var(--card);box-shadow:var(--shadow);border:1px solid var(--edge);border-radius:13px}
.crm-header-secondary.is-open .crm-header-company,.crm-header-secondary.is-open .crm-header-logout{display:inline-flex!important}
}
[data-theme=dark] .flow-wordmark img{filter:brightness(0) invert(1)}

.operations .mini-card:hover{transform:none;box-shadow:none;z-index:auto}
.mini-status,.mini-parent{display:block;font-size:11px;line-height:1.6;color:inherit;opacity:.85}
.mini-card .mini-meta{justify-content:flex-start;gap:6px;padding-top:6px;border-top:1px solid color-mix(in srgb,currentColor 12%,transparent)}
.mini-meta small{font-size:11px;overflow-wrap:anywhere}
.mini-schedule{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:5px}
.mini-schedule .pill,.mini-schedule a{font-size:10px}.mini-schedule .card-calendars{margin:0}
.mini-card .stage-rail{margin:5px 0}.mini-card .rail-stage{display:grid;gap:1px;padding:4px 0;font-size:11px;cursor:pointer}
.mini-card .stage-rail li::before{top:8px}.mini-card .stage-rail.multiple li:not(:last-child)::after{top:14px;bottom:-8px}
.board-daybar,.day-filters,.board-date{display:flex;align-items:center;gap:5px}
.board-daybar{justify-content:space-between;gap:8px;padding:6px 8px;margin-block:2px 6px;border:1px solid var(--edge);border-radius:12px;background:var(--card)}
.day-filters{flex-wrap:wrap}.day-filters .btn,.board-daybar>.btn,.board-date{min-height:34px;font-size:12px;padding:4px 10px}
.day-filters .btn,.board-date,.clear-day{background:transparent;border:0;color:var(--muted)}
.day-filters [aria-pressed=true],.board-date.selected{background:var(--soft);color:var(--primary);border-radius:9px}
.board-daybar .day-filters .roll-yesterday{gap:5px;color:var(--primary);border-inline-start:1px solid var(--edge);white-space:nowrap}
.roll-yesterday .icon{width:14px;height:14px}.roll-yesterday small{font-variant-numeric:tabular-nums}
.roll-yesterday:enabled:hover{background:var(--soft)}.roll-yesterday:disabled{cursor:default}
.board-date{position:relative;cursor:pointer;gap:4px}.board-date input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;min-height:0}.board-date input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;cursor:pointer}
.board-date:focus-within{outline:2px solid var(--primary);border-radius:9px}.clear-day{padding:4px}.board-daybar>.btn{white-space:nowrap}
@media(max-width:600px){.day-filters{gap:1px}.day-filters .btn,.board-date{padding-inline:5px}}

/* The lane itself owns the full-height drop surface, including when empty. */
.operations .column{height:max(290px,calc(100dvh - 158px));box-sizing:border-box;display:flex;flex-direction:column}
.operations .column-list{flex:1;min-height:0;max-height:none;align-content:start;overflow-y:auto}
/* The compact card stays in its lane; its detail row grows to its natural height. */
.operations .mini-card,.customer-board-held-card{
 min-height:var(--held-slot-height,0);box-sizing:border-box;display:grid;align-content:start;
 grid-template-rows:auto;gap:5px;
}
.mini-card .card-title{margin:0}
.mini-card.shows-details .card-title{display:block;overflow:visible;white-space:normal}
.mini-front{min-width:0}.mini-front .mini-progress{margin:0}
.mini-card>.mini-meta{margin:0;justify-content:space-between}
.mini-reveal{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows .22s cubic-bezier(.2,.8,.2,1),visibility 0s .22s}
.mini-reveal-clip{min-height:0;overflow:hidden}
.mini-back{display:grid;gap:6px;padding-block:7px 2px;min-height:54px;font-size:11px;overflow-wrap:anywhere;opacity:0;transform:translateY(-3px);transition:opacity .16s ease,transform .2s ease}
.mini-back p{margin:0;white-space:pre-line}
.shows-details .mini-reveal{grid-template-rows:1fr;visibility:visible;transition-delay:0s}
.shows-details .mini-back{opacity:1;transform:none}
@media(max-width:700px){.operations .column:not(.mobile-current){display:none}.operations .column.mobile-current{display:flex}}
@media(prefers-reduced-motion:reduce){.mini-reveal,.mini-back{transition:none}}

.mini-top>span:first-child{flex:0 1 auto}
.mini-top>span:nth-child(2){flex:none}
.mini-front .mini-status{display:flex;justify-content:space-between;gap:6px;font-size:10px}
.mini-card .mini-priority{position:relative;display:inline-flex;align-items:center;gap:4px;font-size:11px}
.mini-priority .icon{color:#16724a;fill:currentColor}
.mini-priority[data-level=medium] .icon{color:#a65108}
.mini-priority[data-level=high] .icon{color:#ba283c}
[data-theme=dark] .mini-priority[data-level=low] .icon{color:#81dab1}
[data-theme=dark] .mini-priority[data-level=medium] .icon{color:#ffbb70}
[data-theme=dark] .mini-priority[data-level=high] .icon{color:#ff8695}
.mini-priority select{position:absolute;inset:0;width:100%;height:100%;min-height:0;opacity:0;cursor:pointer}
.mini-priority:focus-within{outline:2px solid var(--primary);outline-offset:2px;border-radius:4px}
#dialog:has(#board-assignment){position:fixed;inset:auto;margin:0;width:min(254px,calc(100vw - 16px));border-radius:13px;background:var(--card);box-shadow:0 8px 26px #1424392b}
#dialog:has(#board-assignment) .dialog-head{padding:5px 9px;gap:4px}
#dialog:has(#board-assignment) .dialog-head>div{margin-inline-end:auto}
#dialog:has(#board-assignment) .dialog-head small{display:none}
#dialog:has(#board-assignment) h2{margin:0;font-size:13px}
#dialog:has(#board-assignment) :is(.assignment-save,[data-close]){display:grid;place-items:center;padding:0;width:28px;height:28px;min-width:0;min-height:0;border:0;border-radius:8px}
#dialog:has(#board-assignment) [data-close]{background:transparent;color:var(--muted)}
.assignment-save{background:var(--soft);color:var(--primary);cursor:pointer}
.assignment-save:disabled{font-size:0;opacity:.6}
.assignment-save:disabled::after{content:'…';font-size:16px}
#dialog:has(#board-assignment) .dialog-body{padding:8px 10px}
#board-assignment{display:grid;gap:5px}
#board-assignment .field{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px;font-size:12px}
#board-assignment select{font-size:12px;min-height:32px;padding-block:3px}
#board-assignment .picker-hint{font-size:11px;padding:4px 0}
#dialog:has(.discard-prompt) .assignment-save{visibility:hidden}
@media(pointer:coarse){#dialog:has(#board-assignment) :is(.assignment-save,[data-close]){width:44px;height:44px}#board-assignment :is(select,.member-rows label){min-height:44px}}
#board-assignment [data-people]{max-height:36dvh;overflow:auto}
@media(hover:none){.mini-card .mini-meta :is(.avatar-control,.mini-priority){min-height:44px;min-width:44px}}

#dialog:has(#board-assignment)::backdrop{background:transparent;backdrop-filter:none}

.mini-card>.mini-meta{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;column-gap:5px;container:mini-footer / inline-size}
.mini-owners{display:inline-flex;align-items:center;gap:5px;min-width:0}
.mini-owners>.avatars{min-width:0;max-width:100%}.mini-owners .waiting-team{min-width:0}
.mini-owners>.mini-priority{flex:none;white-space:nowrap}
.mini-deadline{margin:0;white-space:nowrap}
.mini-deadline .deadline-short{display:none}
@container mini-footer (max-width:175px){
 .mini-owners{gap:3px}.mini-owners>.mini-priority>span{display:none}
 .mini-owners .assignee-stack{--face-size:18px}
}
@container mini-footer (max-width:155px){
 .mini-meta:has(.assignee-stack) .deadline-long{display:none}
 .mini-meta:has(.assignee-stack) .deadline-short{display:inline}
}
@media(hover:none){.mini-card .mini-deadline{min-height:44px}}

.waiting-team{max-width:8em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
#board-assignment .assignment-people{display:grid;gap:3px;border-top:1px solid var(--edge);padding-top:6px}
#board-assignment .assignment-people>small{color:var(--muted)}

.board-daybar{flex-wrap:wrap}
.lane-fold,.rail-toggle{padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.lane-fold{order:3;width:26px;height:28px;border-radius:6px;font-size:18px;color:var(--muted)}
.lane-fold:hover{background:var(--soft)}
@media(min-width:701px){
 .operations .column.is-collapsed{flex:0 0 38px;min-width:38px;max-width:38px;padding:5px}
 .operations .column.is-collapsed .column-head{flex-direction:column;gap:8px;padding:0;border:0;margin:0}
 .is-collapsed .desktop-status{writing-mode:vertical-rl;white-space:nowrap}
 .is-collapsed .lane-fold{order:-1}
 .operations .column.is-collapsed :is(.column-list,[data-add-status]){display:none}
}
@media(max-width:700px){.lane-fold{display:none}}
.rail-toggle{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;color:#edf3fc}
.rail-toggle:hover,.rail-toggle:focus-visible{background:#ffffff24}
@media(min-width:761px){
 .layout.marsa-chrome.compact-sidebar{--mc-rail-width:64px}
 html body .layout.marsa-chrome.compact-sidebar .sidebar{padding-inline:6px}
 .compact-sidebar .sidebar :is(.brand>div,.nav-link>span,.profile>div){display:none}
 .compact-sidebar .sidebar .nav-title{font-size:0;border-top:1px solid #ffffff32;height:1px;margin:8px}
 .compact-sidebar .sidebar :is(.nav-link,.profile){justify-content:center;padding-inline:3px}
 html body .layout.marsa-chrome.compact-sidebar .brand{flex-direction:column;gap:3px;height:auto;padding:0 0 5px}
 .compact-sidebar .brand img{width:26px;height:26px;object-fit:contain}
}
@media(max-width:760px){.rail-toggle{display:none}}

.cal-tools{display:grid;gap:7px;min-width:0;margin-bottom:10px}
.cal-heading,.cal-title,.cal-actions,.cal-controls,.cal-find,.cal-navigation,.cal-period,.cal-month,.cal-switch{display:flex;align-items:center;gap:8px;min-width:0}
.cal-heading,.cal-controls{justify-content:space-between;flex-wrap:wrap}
.cal-title,.cal-actions,.cal-navigation{flex-wrap:wrap}
.cal-title h1{margin:0;font-size:18px;line-height:1.45}
.cal-title small{color:var(--muted);font-size:11px;white-space:nowrap}
.cal-actions{margin-inline-start:auto;gap:5px}
.cal-actions .cal-switch{font-size:12px;text-decoration:none;color:var(--primary);margin-inline-end:4px;min-height:36px}
.cal-controls{padding-block-start:8px;border-block-start:1px solid var(--edge);gap:8px 14px}
.cal-tools :is(.btn,select,.search input,.crm-filter-toggle){font-size:12px;min-height:36px;height:36px;border-radius:10px}
.cal-find{flex:1 1 210px;max-width:355px;gap:6px}
.cal-find .search{display:flex;flex:1;min-width:0;width:auto}
.cal-find .crm-filter-toggle{flex:none;transition:background-color .16s ease,border-color .16s ease}
.cal-find .crm-filter-toggle:is(:hover,:has(small)){background:var(--soft);border-color:color-mix(in srgb,var(--primary) 35%,var(--edge));color:var(--primary)}
.cal-navigation{margin-inline-start:auto;gap:5px}

.cal-period{gap:1px;padding-inline:2px;border:1px solid var(--edge);border-radius:10px;background:var(--card)}
.cal-period .icon-btn{width:29px;height:32px;min-height:32px;border:0;padding:5px;background:transparent}
.cal-period .icon-btn:hover{background:var(--soft)}
.cal-month{position:relative;cursor:pointer;white-space:nowrap;font-size:12px;font-weight:bold;padding-inline:3px}
.cal-month input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.cal-month input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;cursor:pointer}
.cal-month:focus-within{outline:2px solid var(--primary);border-radius:5px}
.cal-applied{align-items:center;gap:5px}
#dialog.calendar-filters .flow-filter-grid>.field,#dialog.calendar-filters .filter-members{background:transparent;border:0;padding:0}
#dialog.calendar-filters .flow-filter-grid>.field>span:first-child{font-size:12px;color:var(--muted)}
#dialog.calendar-filters .filter-members{grid-column:1/-1;border-top:1px solid var(--edge);padding-top:6px}
#dialog.calendar-filters .filter-members summary{font-size:13px;padding:8px}
#dialog.calendar-filters .dialog-head,#dialog.calendar-filters .dialog-foot{background:var(--card)}
@media(max-width:760px){
 .cal-actions .cal-switch{font-size:11px}
 .cal-tools :is(.btn,select,.search input,.crm-filter-toggle){min-height:40px;height:40px}
 .cal-find{max-width:none}.cal-navigation{margin-inline-start:0}
 .cal-actions{row-gap:2px}.cal-title h1{font-size:16px}
}
@media(max-width:480px){
 .cal-title{gap:4px;flex-direction:column;align-items:flex-start}
 .cal-heading{align-items:center}.cal-actions{max-width:100%}
 .cal-find,.cal-navigation{flex-basis:100%}

 .cal-actions :is(.cal-switch,[data-action=all-projects],[data-action=plan]){width:36px;min-height:40px;justify-content:center;padding:4px;margin:0}
 .cal-actions :is(.cal-switch,[data-action=all-projects],[data-action=plan]) span{display:none}
 .cal-actions .cal-switch .icon{display:block}
}
@media(prefers-reduced-motion:reduce){.cal-find .crm-filter-toggle{transition:none}}

.pinned-note .note-paper{width:100%;border:0;text-align:start;cursor:pointer}
.note-grip{position:absolute;top:-10px;left:calc(50% - 22px);width:44px;height:30px;padding:0;border:0;border-radius:10px;background:transparent;touch-action:none;cursor:grab;z-index:1}
.note-grip .note-pin{top:6px}
.pin-board .pinned-note.in-hand{z-index:4;transform:rotate(-3deg) scale(1.035);box-shadow:0 16px 35px -12px #172a4b66;will-change:translate;user-select:none}
.in-hand .note-grip{cursor:grabbing}
.pin-board .pinned-note.note-target{outline:2px solid var(--pin);outline-offset:3px;transform:scale(.98)}
#dialog.note-dialog{width:min(450px,calc(100vw - 20px));border-radius:20px;background:var(--card)}
.note-dialog .dialog-head{position:absolute;z-index:1;top:12px;inset-inline-end:12px;border:0;padding:0;background:transparent}
.note-dialog .dialog-head>div{position:absolute;overflow:hidden;clip-path:inset(50%);width:1px;height:1px}
.note-dialog .dialog-head [data-close]{min-width:28px;width:28px;height:30px;min-height:30px;padding:4px;border:0;background:transparent}
.note-dialog .dialog-body{padding:16px 18px}
.note-heading,.note-byline,.note-foot,.note-format{display:flex;align-items:center;gap:6px}
.note-heading{min-height:40px;border-bottom:1px solid var(--edge);padding:0 0 10px;padding-inline-end:31px}
.note-heading h2,.note-heading input{min-width:0;flex:1;font-size:16px;font-weight:700;margin:0;overflow-wrap:anywhere}
.note-heading .btn,.note-foot>.btn{min-height:30px;font-size:12px;padding:3px 11px}
.note-symbol,.note-byline>span{border-radius:7px;background:var(--soft);color:var(--primary)}
.note-symbol{display:grid;place-items:center;width:30px;height:30px;flex:none}
.note-byline{margin-block:12px;color:var(--muted);font-size:11px}.note-byline>span{padding:2px 7px}
.note-reading,#note-editor textarea{min-height:130px;max-height:45dvh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;font-size:14px}
.note-reading mark,.note-paper mark{color:inherit;background:color-mix(in srgb,var(--primary) 24%,transparent)}
#note-editor textarea{width:100%;resize:vertical}
#note-editor:not(.editing) :is(.note-heading input,textarea,.note-settings),#note-editor.editing :is(.note-heading h2,.note-reading){display:none}
.note-settings{margin-block:6px;border:0;background:transparent}.note-settings summary{font-size:12px;color:var(--muted)}
.note-foot{justify-content:space-between;padding-top:12px}.note-format{background:var(--panel);border-radius:20px;padding:2px}
.note-format button{border:0;background:transparent;color:var(--ink);min-width:30px;height:28px;border-radius:12px;font-family:serif;font-size:14px}
.note-format button:hover{background:var(--soft)}.note-format button[data-format="_"]{font-style:italic}
@media(pointer:coarse){.note-grip,.note-format button{height:44px}.note-foot>.btn,.note-heading .btn{min-height:44px}}
@media(prefers-reduced-motion:reduce){.pin-board .pinned-note:is(.in-hand,.note-target){transform:none}}

.crm-filter-toggle{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 14px;border:1px solid var(--edge);border-radius:11px;background:var(--card);color:var(--ink);font:inherit;font-size:13px;cursor:pointer}
.crm-filter-toggle[aria-expanded=true]{background:#004460;color:white}.crm-filter-toggle small{font-size:10px;border-radius:8px;padding:1px 5px;background:var(--soft);color:var(--ink)}
.board-daybar>.crm-filter-toggle{margin-inline-end:auto}
.board-daybar .day-filters{gap:3px;padding:2px;border:1px solid var(--edge);border-radius:14px;background:var(--card)}
.day-filters [data-board-day]{min-height:44px;padding:7px 10px;border:1px solid transparent;border-radius:11px}
.day-filters [data-board-day][aria-pressed=true]{color:#004460;background:#e3f0f7;border-color:#98bdcf}
[data-theme=dark] .day-filters [data-board-day][aria-pressed=true]{color:#edf4f7;background:#24475a;border-color:#6b9bb3}
#dialog.flow-filter-dialog[open]{inset:0;margin:auto;width:min(920px,calc(100vw - 48px));max-width:none;height:fit-content;max-height:calc(100dvh - 64px);border-radius:18px;padding:0;background:var(--card);animation:none}
#dialog.flow-filter-dialog::backdrop{background:#07182766;backdrop-filter:none}
.flow-filter-dialog .dialog-head,.flow-filter-dialog .dialog-foot{padding:12px 20px}.flow-filter-dialog .dialog-head small{display:none}
.flow-filter-dialog .dialog-head h2{font-size:15px;margin:0}
.flow-filter-dialog .dialog-head [data-close]{width:44px;height:44px;background:var(--panel);border:0;border-radius:10px}
.flow-filter-grid{display:grid;align-items:start;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.flow-filter-grid>.field,.flow-filter-grid>.filter-members{min-width:0;border:1px solid var(--edge);padding:8px 10px;border-radius:11px;background:var(--panel);margin:0}
.filter-members .check-list{display:grid;max-height:175px;overflow:auto}.filter-members summary{padding:7px 0;cursor:pointer}
@media(max-width:1000px){.flow-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){#dialog.flow-filter-dialog[open]{width:100%;inset:auto 0 0;margin:0;max-height:90dvh;border-radius:20px 20px 0 0}.flow-filter-grid{grid-template-columns:minmax(0,1fr)}}

.filter-chips{display:flex;gap:5px;flex-wrap:wrap;grid-column:1/-1}
.filter-chips:empty{display:none}
.filter-chip{padding:4px 9px;border:1px solid var(--edge);border-radius:14px;background:var(--soft);color:var(--ink);font-size:12px;cursor:pointer}

#dialog.note-dialog,.note-dialog .dialog-body{background:var(--paper);color:#263348}
[data-theme=dark] #dialog.note-dialog,[data-theme=dark] .note-dialog .dialog-body{background:color-mix(in srgb,var(--pin) 18%,var(--card));color:var(--ink)}
#note-editor :is(input[name=title],textarea){background:color-mix(in srgb,var(--card) 42%,transparent);border-color:color-mix(in srgb,var(--pin) 32%,var(--edge))}
.pinned-note .note-paper{cursor:grab;touch-action:none;user-select:none}
.in-hand .note-paper{cursor:grabbing}
.note-target::after{content:"";position:absolute;inset-block:5px;width:3px;background:var(--pin);border-radius:4px;pointer-events:none}
.note-target[data-insert=before]::after{inset-inline-start:-8px}
.note-target[data-insert=after]::after{inset-inline-end:-8px}
@media(max-width:520px){.note-target::after{inset-inline:5px;width:auto;height:3px}.note-target[data-insert=before]::after{inset-block:-8px auto;inset-inline:5px}.note-target[data-insert=after]::after{inset-block:auto -8px;inset-inline:5px}}

.work-scope .btn[aria-pressed=true]{background:var(--soft);color:var(--primary);border-color:var(--edge)}
.operations .mini-meta .mini-deadline.late-date,.late-date{color:#9a2633;background:#ffe6e7;border-color:#eaa6ab}
[data-theme=dark] .operations .mini-meta .mini-deadline.late-date,[data-theme=dark] .late-date{color:#ffd5db;background:#612937;border-color:#a65363}
.day-filters .overdue-filter[aria-pressed=true]{color:#9a2633;background:#ffe6e7}
.date-month{display:flex;align-items:center;justify-content:space-between}
.date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}
.date-days small{color:var(--muted)}.date-days button{border:1px solid transparent;background:transparent;color:var(--ink);min-height:36px;border-radius:8px;cursor:pointer}
.date-days button[aria-current=date]{border-color:var(--primary)}.date-days button:is(:hover,:focus-visible){background:var(--soft)}
.date-days button[aria-pressed=true]{background:var(--primary);color:var(--card)}.date-days button:disabled{opacity:.4;cursor:default}

.mini-top:has(.mini-complete){position:relative;padding-inline-start:29px;min-height:25px}
.mini-complete{position:absolute;inset-inline-start:0;top:0;width:25px;height:25px;padding:3px;display:grid;place-items:center;color:inherit;background:var(--card);border:1px solid var(--edge);border-radius:7px;opacity:0;pointer-events:none;cursor:pointer;transition:opacity .15s ease}
.mini-card:is(:hover,:focus-within) .mini-complete{opacity:1;pointer-events:auto}
.mini-complete:hover:not(:disabled){background:var(--green);color:var(--card)}
.mini-complete:disabled{cursor:default}
.mini-front .mini-progress{display:flex;align-items:center;gap:7px}
.mini-progress progress{appearance:none;display:block;flex:1;min-width:0;height:5px;border:0;border-radius:6px;overflow:hidden;background:color-mix(in srgb,currentColor 15%,transparent)}
.mini-progress progress::-webkit-progress-bar{background:transparent}
.mini-progress progress::-webkit-progress-value{background:var(--media-accent,var(--primary));border-radius:6px}
.mini-progress progress::-moz-progress-bar{background:var(--media-accent,var(--primary));border-radius:6px}
.mini-progress bdi{font-size:10px}
.mini-card .mini-top{justify-content:flex-end}
.operations .column-list{overflow-anchor:none}

dialog.flow-date-picker[open]{position:fixed;inset:auto;margin:0;width:min(278px,calc(100vw - 12px));max-height:calc(100dvh - 12px);overflow:auto;padding:0;border-radius:14px;background:var(--card);box-shadow:0 8px 28px #152c4033;animation:picker-appear .15s ease-out}
.flow-date-picker::backdrop{background:transparent;backdrop-filter:none}
.flow-date-picker header,.flow-date-picker footer{display:flex;align-items:center;gap:8px;padding:7px 10px;border-bottom:1px solid var(--edge)}
.flow-date-picker header div{min-width:0;flex:1;display:grid}.flow-date-picker header small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.flow-date-picker header [data-close]{display:grid;place-items:center;width:28px;height:28px;padding:4px;border:0;background:transparent;color:var(--muted);cursor:pointer}
.flow-date-picker .picker-body{display:grid;gap:5px;padding:6px 10px}
.flow-date-picker .date-month .btn{width:28px;min-height:28px;height:28px}.flow-date-picker .date-month strong{font-size:13px}
.flow-date-picker .date-days{gap:2px}.flow-date-picker .date-days button{min-height:28px;font-size:12px}
.flow-date-picker .month-choices{grid-template-columns:repeat(3,1fr)}
.flow-date-picker footer{justify-content:flex-end;border-bottom:0;border-top:1px solid var(--edge)}
.flow-date-picker footer .btn,.flow-date-picker input{min-height:30px;font-size:12px}
.flow-date-picker .inline-error:empty{display:none}
@keyframes picker-appear{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(pointer:coarse){.flow-date-picker .date-days button{min-height:36px}}
@media(prefers-reduced-motion:reduce){dialog.flow-date-picker[open]{animation:none}}

#page.content{padding-block-start:12px}
.page-head,.space-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px}
.page-head h1,.space-head h1{margin:0;font-size:18px;line-height:1.45}
.page-head>.row{flex-wrap:wrap;justify-content:flex-end;gap:5px}
.page-head .btn,.flow-list-tools .btn{min-height:36px;font-size:12px}
.flow-list-tools{gap:8px;margin-bottom:10px}.flow-list-tools .search{display:flex;flex:1 1 160px;max-width:280px}
.cal-controls .search input,.flow-list-tools .search input{border-radius:11px}
.space-head{justify-content:flex-start;padding-block:2px}
.space-head a{font-size:12px}
.board-daybar>.crm-filter-toggle{margin-inline-end:0}
@media(max-width:760px){.page-head{flex-wrap:wrap}.flow-list-tools .search{display:flex}.page-head .btn,.flow-list-tools .btn{min-height:40px}}

.customer-board-held-card .mini-complete{visibility:hidden}

.board-task-actions{display:inline-flex;align-items:center;gap:8px;margin-inline-start:auto;flex:none}
.board-task-actions .work-scope{display:inline-flex;gap:3px;padding:2px;border-radius:10px}
.board-task-actions .work-scope .btn{min-width:58px;min-height:38px;padding:6px 12px;border-radius:7px;font-size:12px}
.board-task-actions .board-add{min-height:44px;min-width:44px;gap:6px;padding:8px 15px;font-size:13px;border-radius:10px;white-space:nowrap}
@media(max-width:700px){
 .board-task-actions .board-add{width:44px;height:44px;padding:0;justify-content:center}
 .board-task-actions .board-add .icon{width:20px;height:20px}
 .board-task-actions .board-add span{display:none}
 .board-task-actions .work-scope .btn{min-height:44px}
}

.cal-views{display:inline-flex;align-items:center;gap:2px;max-width:100%;padding:2px;border:1px solid var(--edge);border-radius:10px;background:var(--panel)}
.cal-views button{border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);padding:4px 8px;min-height:32px;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.cal-views button:is(:hover,:focus-visible){color:var(--ink);background:var(--card)}
.cal-views button[aria-pressed=true]{background:var(--soft);color:var(--primary);border-color:color-mix(in srgb,var(--primary) 24%,var(--edge))}
.cal-controls .cal-find{flex:1 1 185px;max-width:320px}
@media(max-width:760px){
 .cal-controls .cal-find{max-width:none}
 .cal-views{order:1;flex:1 0 100%;overflow-x:auto}
 .cal-views button{flex:1;min-height:40px;padding-inline:6px}
}
@media(max-width:480px){
 .cal-controls .cal-find,.cal-navigation{flex:1 1 auto}
 .cal-navigation{justify-content:flex-end;margin-inline-start:auto}
}

.content-sheet :is(.sheet-weekday,.sheet-date){vertical-align:middle;background:var(--day-fill)}
.content-sheet tbody+tbody>tr:first-child>td{border-top:1px solid var(--edge)}
.sheet-change-date{max-width:180px}

.cal-kind{display:inline-flex;align-items:stretch;padding:3px;gap:3px;border:1px solid var(--edge);border-radius:12px;background:var(--panel)}
.cal-kind a{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding-inline:12px;border:1px solid transparent;border-radius:9px;text-decoration:none;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap}
.cal-kind a:hover{color:var(--ink);background:var(--card)}
.cal-kind a[aria-current=page]{border-color:var(--edge);color:var(--primary);background:var(--card)}
.cal-inline-filters{display:flex;align-items:end;flex-wrap:wrap;gap:6px 10px;min-width:0}
.cal-inline-filters>.field,.cal-inline-filters>.search{min-width:0;flex:1 1 116px}
.cal-inline-filters>.search{display:flex;width:auto;flex-grow:1.3}
.cal-inline-filters>.field{margin:0;gap:2px}
.cal-inline-filters>.field>span:first-child{font-size:11px;color:var(--muted)}
.cal-inline-filters .select-wrap,.owner-filter-trigger{width:100%}
.owner-filter-trigger .icon:last-child{margin-inline-start:auto}
.owner-filter-panel{position:fixed;inset:auto;margin:0;width:min(216px,90vw);max-height:40dvh;overflow:auto;padding:7px;border:1px solid var(--edge);border-radius:10px;background:var(--card);color:var(--ink);box-shadow:0 8px 24px #131f3824}
.owner-filter-panel .check-list{display:grid;gap:3px}
@media(max-width:760px){
 .cal-kind a{min-height:40px;padding-inline:8px}
 .cal-browse .cal-views{order:0;flex:0 1 auto}
 .cal-inline-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .cal-inline-filters>.search{grid-column:1/-1}
}
@media(max-width:480px){
 .cal-heading{display:grid;grid-template-columns:1fr auto;gap:4px}
 .cal-title{display:contents}
 .cal-kind{grid-column:1/-1}
 .cal-kind a{flex:1}
 .cal-browse .cal-views{width:100%}
}

.board-daybar>.owner-filter-trigger{width:auto;max-width:min(220px,100%);min-height:38px;gap:6px}
.board-daybar>.owner-filter-trigger span{overflow:hidden;text-overflow:ellipsis}
@media(max-width:760px){.board-daybar>.owner-filter-trigger,.owner-filter-panel .check-list label{min-height:44px}}

/* Keep the two segments and the stand-alone controls on one height rhythm. */
.board-daybar{--bar-height:44px;--segment-height:calc(var(--bar-height) - 6px)}
.board-daybar :is(.day-filters,.work-scope){min-height:var(--bar-height);padding:2px;border:1px solid var(--edge);border-radius:10px;align-items:center}
.board-daybar .day-filters :is(.btn,.board-date,.clear-day),.board-daybar .work-scope .btn{height:var(--segment-height);min-height:var(--segment-height);padding-block:0;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;font-size:12px}
.board-daybar :is(.owner-filter-trigger,.board-add){height:var(--bar-height);min-height:var(--bar-height);border-radius:10px;font-size:13px}
@media(pointer:coarse){.board-daybar{--bar-height:50px}}
@media(max-width:600px){
 .board-daybar .day-filters{width:100%;flex-wrap:nowrap;overflow-x:auto}
 .board-daybar .day-filters>*{flex:1 0 auto;white-space:nowrap}
 .board-daybar .board-task-actions{gap:4px}
 .board-daybar>.owner-filter-trigger{flex:1;min-width:0}
}

#dialog:has(.material-create,#calendar-entry){width:min(640px,calc(100vw - 16px));max-height:calc(100dvh - 16px)}
#dialog:has(.material-create,#calendar-entry) :is(.dialog-head,.dialog-foot){flex:none;padding:9px 14px}
#dialog:has(.material-create,#calendar-entry) .dialog-body{padding:8px 14px;min-height:0;overflow:auto}
#dialog:has(.material-create) #dialog-title{position:static;width:auto;height:auto;clip-path:none;font-size:16px}
#dialog .material-create{gap:8px}
#dialog .material-create .record-title{font-size:16px;border-color:var(--edge);height:44px}
#dialog .material-create .record-properties{padding-block:2px;gap:6px 10px}
#dialog .material-create .record-description{padding-top:6px}
#dialog .material-create .record-description textarea{min-height:50px;height:58px;background:var(--panel);border-color:var(--edge)}
#dialog .work-extra .details-content{padding:6px 0}
.work-extra section{min-width:0}
#dialog .material-create [data-distribution]>.details-content{display:grid;gap:8px}
#dialog .material-create .assignee-picker>.details-content{position:static;width:100%;box-shadow:none}
.planner details.plan-step{padding:0;min-width:0}
.plan-step summary{display:flex;align-items:center;gap:6px;padding:6px 10px;min-height:40px}
.plan-step summary strong{min-width:0;overflow-wrap:anywhere}
.plan-step-body{display:grid;gap:7px;padding:8px 10px;min-width:0}
.plan-step-body .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.plan-step-body [data-remove-step]{justify-self:start}
@media(max-width:600px){
 #dialog .material-create>.record-properties{grid-template-columns:repeat(2,minmax(0,1fr))}
 .material-create>.record-properties>.record-property:first-child{grid-column:1/-1}
 #dialog:has(.material-create) .dialog-foot>.row:empty{display:none}
 #dialog:has(.material-create,#calendar-entry) .dialog-foot .primary{min-height:44px}
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 .operations .mini-card.hover-lift:hover{position:relative;z-index:1;transform:translateY(-1px) scale(1.012);box-shadow:0 5px 14px #18344212}
}

/* Filter text stays compact independently of the size of its control. */
:is(.cal-inline-filters,.flow-list-tools) :is(.search input,.select-wrap select,.owner-filter-trigger),
.board-daybar>.owner-filter-trigger,.owner-filter-panel .check-list{font-size:.6875rem}

/* Separate groups at their headings, keeping controls and media colors intact. */
:root{
 --section-rule:color-mix(in srgb,var(--edge) 85%,var(--muted));
 --section-heading:color-mix(in srgb,var(--soft) 62%,var(--card));
}
.panel>:is(.panel-head,h2:first-child,h3:first-child){
 padding-block-end:8px;margin-block-end:10px;border-block-end:1px solid var(--section-rule)
}
#dialog:has(.record-page) .dialog-head{border-block-end:1px solid var(--section-rule);padding-block-end:8px}
.record-page .record-description{border-color:var(--section-rule)}
.record-page .record-description>.field>span:first-child{font-weight:700;color:var(--ink)}
#dialog .work-extra{gap:12px;padding:0;border:0}
#dialog .work-extra>section+section{padding:0;border:0}
#dialog .work-extra>section>h3,
#dialog :is([data-distribution],#production-section)>summary{
 background:var(--section-heading);color:var(--ink);border-radius:8px 8px 0 0;
 border-block-end:1px solid var(--section-rule)
}
#dialog .work-extra>section>h3{padding:6px 10px;font-size:13px;line-height:1.55}
#dialog .work-extra>section>.details-content{padding:8px 4px 0;gap:10px}
#dialog :is([data-distribution],#production-section):not([open])>summary{border-color:transparent;border-radius:inherit}
#dialog [data-distribution]>.details-content{padding:10px;gap:8px}
#dialog [data-distribution] .stage-rail{margin:0}
#dialog [data-distribution] .stage-rail li+li{border-block-start:1px solid var(--edge)}
#dialog [data-distribution] .planner:not(:first-child){padding-block-start:8px;border-block-start:1px solid var(--edge)}
#dialog [data-distribution] .details-content>[data-action=stage-new]{justify-self:start}

#dialog.checklist-dialog{width:min(850px,calc(100vw - 28px));background:var(--card)}
#dialog.checklist-dialog .dialog-body{padding:14px 18px 18px}
.calendar-checklist{display:grid;gap:12px}
.follow-toolbar,.follow-tabs,.follow-actions,.follow-name,.follow-link,.follow-date{display:flex;align-items:center;gap:6px}
.follow-toolbar{justify-content:space-between;flex-wrap:wrap}
.follow-toolbar>.btn{min-height:32px;padding:5px 11px;font-size:12px}
.follow-tabs{border:1px solid var(--edge);background:var(--panel);border-radius:10px;padding:3px;gap:2px}
.follow-tabs button{min-height:28px;border:0;border-radius:7px;background:transparent;color:var(--muted);padding:3px 9px;font-size:12px}
.follow-tabs button[aria-pressed=true]{background:var(--card);color:var(--primary);box-shadow:0 1px 4px #132e491b}
.follow-tabs small{font-variant-numeric:tabular-nums;margin-inline-start:3px}
.follow-scroll{overflow:auto;border:1px solid var(--edge);border-radius:12px}
.follow-table{width:100%;border-spacing:0;table-layout:fixed;text-align:start;font-size:13px}
.follow-table th,.follow-table td{text-align:start;padding:9px 10px}
.follow-table th{background:var(--panel);color:var(--muted);font-size:11px;font-weight:600}
.follow-table th:first-child{width:38%}.follow-table th:nth-child(2){width:25%}.follow-table th:nth-child(3){width:18%}
.follow-table tbody tr+tr td{border-block-start:1px solid var(--edge)}
.follow-table tbody tr:hover{background:color-mix(in srgb,var(--soft) 35%,var(--card))}
.follow-table .follow-edit{background:var(--soft)}
.follow-name{gap:8px}.follow-name input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--primary);flex:none}
.follow-title{padding:0;border:0;background:transparent;line-height:1.4;color:var(--ink);text-align:start;font-weight:600;overflow-wrap:anywhere}
.follow-title:hover{color:var(--primary)}.follow-name:has(input:checked)>.follow-title{color:var(--muted);text-decoration:line-through}
.follow-link,.follow-date,.follow-task{position:relative;max-width:100%;min-height:29px;padding:3px 6px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);font-size:12px;text-align:start}
.follow-link .icon,.follow-date .icon,.follow-task .icon{width:14px;height:14px;flex:none}
.follow-link>span:not(.select-wrap){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.follow-link>.select-wrap{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}.follow-link select{width:100%;height:100%;cursor:pointer}
.follow-task{color:var(--primary);padding-inline:7px;background:var(--soft)}
.follow-link:hover,.follow-link:focus-within,.follow-date:hover{border-color:var(--edge);background:var(--card)}
.follow-edit input[name=title]{width:100%;min-height:31px;padding:4px 8px;font-size:13px}
.follow-edit .follow-actions .btn{min-height:27px;width:27px;padding:4px;border-radius:7px}.follow-actions{gap:3px}.follow-actions .icon{width:14px;height:14px}
.follow-table td.follow-empty{text-align:center;color:var(--muted);font-size:13px;padding:25px}
#follow-form{display:none}


.story-panel{display:grid;gap:12px;padding:12px;border:1px solid var(--edge);border-radius:13px;background:color-mix(in srgb,var(--panel) 90%,#808080);color:var(--ink)}
.story-panel .btn,.story-panel input[type=date]{min-height:30px;font-size:12px;padding:4px 8px}
.story-panel .icon-btn{width:30px}
.story-panel header strong{font-size:14px}
.story-panel section{border-block-start:1px solid var(--edge);padding-block-start:9px}
.story-panel section header{font-size:12px;margin-block-end:5px}
.story-row{display:flex;align-items:center;gap:7px}
.story-row button{flex:1;display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;background:none;border:0;padding:5px 0;text-align:start;font-size:12px}
.story-row span{overflow-wrap:anywhere}
.story-row input{accent-color:#657380;width:15px;height:15px;min-height:15px}
.story-row input:checked+button span{text-decoration:line-through;color:var(--muted)}
.story-repeat{display:flex;flex-wrap:wrap;gap:10px}
.story-repeat label{display:flex;align-items:center;gap:5px}
.home-stories-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(180px,17vw,248px);gap:12px;align-items:start}
.home-stories-layout>.board{min-width:0}
.story-panel section header a,.story-jump{font-size:12px}
.project-stories-layout{display:grid;grid-template-columns:minmax(280px,530px) minmax(200px,290px);gap:16px;align-items:start}
.stories-month{display:grid;gap:5px;padding:14px;border:1px solid var(--edge);border-radius:14px;background:var(--card)}
.stories-month header,.stories-month a{display:flex;justify-content:space-between;align-items:center;gap:10px}
.stories-month header{margin-bottom:6px}.stories-month input{width:145px;min-height:32px;padding:4px}
.stories-month a{color:var(--ink);border-radius:8px;padding:7px}.stories-month a[aria-current=date]{background:var(--soft)}
.flow-project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),220px));gap:18px;justify-content:start}
.flow-project-tile{position:relative;isolation:isolate;overflow:hidden;aspect-ratio:4/5;border:1px solid color-mix(in srgb,#8b7d9b 36%,var(--edge));border-radius:22px;background:#f6f2f7;color:#362e42;box-shadow:0 5px 16px #2720330a}
html[data-theme=dark] .flow-project-tile{background:#302b40;color:#f9f6ff}
.flow-project-photo{display:block;position:absolute;inset:0;width:100%;height:100%;border-radius:22px}
.flow-project-photo img{display:block;width:100%;height:100%;border-radius:inherit;object-fit:cover;object-position:center}
.flow-project-copy{position:absolute;inset-inline:16px;inset-block:calc(57% + 12px) 10px;display:flex;flex-direction:column;gap:6px;opacity:0;visibility:hidden;transform:translateY(10px)}
.flow-project-tile:is(:hover,:focus-within) .flow-project-photo{height:57%;padding:8px}
.flow-project-tile:is(:hover,:focus-within) .flow-project-copy{opacity:1;visibility:visible;transform:none}
.flow-project-copy h2{font-size:16px;line-height:1.35;margin:0}.flow-project-copy h2 a,.project-tile-meta a{color:inherit}
.project-tile-meta{display:flex;gap:6px;align-items:center;min-width:0;line-height:1.4}
.project-tile-meta small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;opacity:.72}.project-tile-meta a{display:inline-flex;gap:4px;align-items:center;font-size:11px}.project-tile-meta .icon{width:13px;height:13px}
.project-explore{margin-top:auto;display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:4px 0;color:inherit;font-size:11px}
.project-explore span{flex:1;text-align:center}.project-explore .icon{border-radius:50%;background:#fff6fb;color:#6956ae;padding:7px;width:32px;height:32px}
.project-tile-menu{position:absolute;top:15px;inset-inline-start:15px;border:0;background:transparent;z-index:2;opacity:0;pointer-events:none}
.flow-project-tile:is(:hover,:focus-within,:has(.project-tile-menu[open])) .project-tile-menu{pointer-events:auto;opacity:1}
.project-tile-menu summary{width:40px;height:40px;min-height:0;display:grid;place-items:center;padding:0;background:#ffffff2a;backdrop-filter:blur(10px);color:white;border:1px solid #ffffff80;border-radius:50%;font-size:20px;line-height:1}
.project-tile-menu summary:after{display:none}
.project-tile-menu>div{position:absolute;inset-inline-start:0;min-width:120px;background:var(--card);color:var(--ink);border:1px solid var(--edge);padding:5px;border-radius:10px;box-shadow:var(--shadow)}
.project-tile-menu>div>*{display:block;background:none;border:0;padding:6px;text-align:start;color:inherit;font-size:12px}
@media(prefers-reduced-motion:no-preference){.flow-project-photo{transition:height .22s ease,padding .22s ease}.flow-project-copy{transition:opacity .18s ease,transform .22s ease}.project-tile-menu{transition:opacity .22s ease}.flow-project-tile{transition:transform .25s ease,box-shadow .25s ease}.flow-project-tile:hover{transform:translateY(-5px);box-shadow:0 18px 36px #52468025}}
.mini-card.drag-source-hidden{opacity:0!important;transition:none!important;animation:none!important}

.rail-toggle{border:1px solid #ffffff44;background:#ffffff12}
.rail-toggle svg{display:block;width:18px;height:18px}
.compact-sidebar .rail-direction{transform-box:fill-box;transform-origin:center;transform:scaleX(-1)}

.flow-logo{display:block;height:auto;width:126px;overflow:visible;color:inherit}
.flw-home{display:block;color:inherit;min-width:0}.flw-home:hover{text-decoration:none;color:inherit}
.flow-wordmark .flow-logo{width:78px}
.flow-logo .marsa-letter:nth-child(1){--letter-delay:280ms}
.flow-logo .marsa-letter:nth-child(2){--letter-delay:420ms}
.flow-logo .marsa-letter:nth-child(3){--letter-delay:560ms}
.compact-sidebar .flw-home .flow-logo{width:28px}
.compact-sidebar .flw-home .flow-glyphs{display:none}
.flow-logo .marsa-mark-reveal { stroke-dasharray: 1; stroke-dashoffset: 0; }
.flow-logo-motion .marsa-mark-reveal { animation: marsa-mark-draw 620ms cubic-bezier(.25,.7,.3,1) both; }
.flow-logo-motion .marsa-mark-complete { animation: marsa-mark-complete 620ms steps(1, end) both; }
.flow-logo-motion .marsa-letter {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: marsa-letter-grow 440ms cubic-bezier(.18,.8,.25,1) var(--letter-delay) both;
}
@keyframes marsa-mark-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes marsa-mark-complete { from { opacity: 0; } to { opacity: 1; } }
@keyframes marsa-letter-grow {
  0% { opacity: 0; clip-path: inset(100% 0 0); transform: translateY(3px) scale(.72,.5); }
  65% { opacity: 1; clip-path: inset(0); transform: translateY(-.6px) scale(1.025,1.07); }
  100% { opacity: 1; clip-path: inset(0); transform: none; }
}

@media(prefers-reduced-motion:reduce){.flow-logo-motion :is(.marsa-letter,.marsa-mark-complete,.marsa-mark-reveal){animation:none}}

.sidebar .flow-settings,.sidebar .flow-account{border:0;background:none;color:inherit;margin:0}
.sidebar .flow-settings{margin-block-start:auto;padding-block-start:12px}
.sidebar .flow-settings summary,.flow-footer-home{display:flex;align-items:center;gap:10px;padding:8px 12px;min-height:40px;color:inherit;font-size:13px;border-radius:10px}
.sidebar .flow-settings summary::after{font-size:13px}
.sidebar .flow-settings>div{display:grid;margin-inline-start:12px;border-inline-start:1px solid #ffffff33;padding-inline-start:5px}
.flow-footer-home span{flex:1}.flow-footer-home>.icon:last-child{width:15px}
.sidebar .flow-account{border:1px solid #ffffff30;border-radius:13px;background:#ffffff0d}
.flow-account .avatar{background:#58799a;border-color:#c9dbe8;outline:1px solid #6ab8c0;outline-offset:2px}
.flow-account-copy{display:grid}.flow-account-copy small,.flow-version{color:#c4d9dd}
html body .layout.marsa-chrome .flow-account .marsa-chrome-account-row::after{display:none}
.flow-version{display:block;text-align:left;padding:6px 10px 0;font-size:10px}
.compact-sidebar .flow-settings summary span,.compact-sidebar .flow-settings summary::after,.compact-sidebar .flow-account-copy,.compact-sidebar .flow-version,.compact-sidebar .flow-footer-home :is(span,.icon:last-child){display:none}
.compact-sidebar .flow-footer-home,.compact-sidebar .flow-settings summary{justify-content:center}
html body .layout.marsa-chrome.compact-sidebar .flow-account .marsa-chrome-account-row::after{display:none}

/* The everyday record stays short; each production task has one visible row. */
#dialog:has(.record-page){width:min(720px,calc(100vw - 32px))}
#dialog .record-page{gap:9px}
#dialog .record-page .record-title{font-size:1.25rem}
#dialog .record-description textarea{min-height:42px;height:52px}
.record-subtasks{border-block-start:1px solid var(--edge);padding-block:9px;min-width:0}
.record-subtasks h3{display:flex;align-items:center;gap:7px;margin:0 0 5px;font-size:13px}
.subtask-line,.plan-inline{display:flex;align-items:center;gap:8px;min-width:0;padding-block:5px}
.subtask-line+.subtask-line,.plan-step+.plan-step{border-block-start:1px solid var(--edge)}
.subtask-check{width:20px;height:20px;flex:none;border:1px solid var(--muted);border-radius:50%;background:transparent;color:var(--green);display:grid;place-items:center;padding:1px}
.subtask-check:enabled:hover{border-color:var(--green);background:var(--panel)}
.subtask-title{background:transparent;border:0;color:var(--ink);text-align:start;padding:3px 0;font:inherit;font-size:13px}
.subtask-title:hover{text-decoration:underline}
.subtask-line small{margin-inline-start:auto;color:var(--muted);font-size:11px;text-align:end}
.plan-inline>input{flex:1;min-width:0}
.plan-inline .assignee-picker{flex:0 1 160px}
#dialog .record-more,#dialog .plan-options{border:0;border-block-start:1px solid var(--edge);border-radius:0;background:transparent}
#dialog :is(.record-more,.plan-options)>summary{min-height:28px;padding:4px 0;color:var(--muted);font-size:12px}
#dialog .record-more>.work-extra{padding-block:8px}
.stage-done-action{display:inline-flex;align-items:center;gap:4px;max-width:100%;white-space:normal;font-size:11px;line-height:1.4;padding:4px 7px;color:inherit;cursor:pointer}
#dialog:has(.record-more:not([open])) .production-spacer{display:none}

#dialog .record-properties .record-flag{position:relative;display:inline-grid;place-items:center;align-self:end;justify-self:start;width:36px;height:36px;border:1px solid var(--edge);border-radius:8px;background:var(--card)}
#dialog .record-flag .icon{width:17px;height:17px}
#dialog .record-flag select{height:100%;min-height:0}
#dialog .internal-brief{border-block-start:1px solid var(--edge);padding-block:8px}
.internal-brief h3{display:flex;align-items:center;gap:7px;font-size:13px;margin:0 0 6px}
.brief-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px}
#dialog .brief-fields textarea{min-height:46px;height:52px}
#dialog .storyboard-panel{--story-tint:#fff0f1;--story-rule:#efc4cb;background:var(--story-tint);border:1px solid var(--story-rule);border-radius:10px;padding:10px;color:var(--ink)}
[data-theme=dark] #dialog .storyboard-panel{--story-tint:#38272e;--story-rule:#68424c}
.storyboard-panel .scene{background:color-mix(in srgb,var(--story-tint) 60%,var(--card));border-color:var(--story-rule);margin-block-start:6px}
@media(min-width:721px){
 #dialog .record-page>.record-properties{grid-template-columns:repeat(3,minmax(0,1fr)) auto}
 #dialog .record-page>.record-properties:has([name=publication]){grid-template-columns:repeat(3,minmax(0,1fr))}
}

#dialog .record-page>.stage-properties{display:flex;flex-direction:column;gap:9px}
.stage-properties>div{display:grid;width:100%;min-width:0;gap:10px}
.stage-owners{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}
.stage-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.stage-date{min-width:0}

/* Work details share the same people strip, writing surface and two task panels. */
#dialog:has(.work-sheet){--sheet-well:color-mix(in srgb,var(--bg) 72%,var(--card));width:min(790px,calc(100vw - 36px));border-radius:14px;background:var(--card)}
#dialog:has(.work-sheet) .dialog-head{background:var(--panel);padding:8px 18px;border-bottom:0}
#dialog:has(.work-sheet) .dialog-head .icon-btn{min-height:28px;width:28px;height:28px;border-radius:50%;padding:4px}
#dialog:has(.work-sheet) .dialog-body{padding:10px 18px}
#dialog .work-sheet{gap:10px}
#dialog .work-sheet .record-title{font-size:17px;height:32px;padding:0 4px;border-color:transparent}
#dialog .work-sheet .record-title:focus-visible{border-color:var(--primary)}
#dialog .work-sheet .material-idea{height:46px;padding:6px 12px;border:1px solid var(--edge);border-radius:9px;background:color-mix(in srgb,var(--sheet-well) 34%,var(--card));font-size:18px}
#dialog .work-sheet .material-idea:focus{outline:0;border-color:color-mix(in srgb,var(--primary) 65%,var(--edge));box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent)}
.sheet-people,.sheet-people>[data-person-chips]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.sheet-people{justify-content:space-between}
.sheet-person{display:inline-flex;align-items:center;gap:6px;font-size:12px}
.sheet-person i{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;font-size:10px;font-style:normal;background:var(--soft);color:var(--primary)}
#dialog .sheet-people>.assignee-picker{margin-inline-start:auto}
#dialog .sheet-people>.assignee-picker summary{background:var(--sheet-well);font-size:12px;min-height:30px}
.sheet-people>.assignee-picker [data-assignee-label]{display:none}
#dialog .sheet-people>.assignee-picker .details-content{width:248px;inset-inline:auto 0}
.record-writing,.sheet-columns>section,.sheet-progress{background:var(--sheet-well);border-radius:9px;padding:12px;min-width:0}
#dialog .record-writing .record-properties{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:0}
.record-writing .record-property{display:flex;align-items:center;gap:4px}
#dialog .record-writing .record-property>span:first-child{font-size:11px}
#dialog .record-writing .record-property :is(select,input),#dialog .sheet-toolbar .record-flag{height:30px;min-height:30px;border-radius:16px;width:auto;max-width:100%;background:var(--card);border-color:transparent;font-size:12px}
#dialog .sheet-toolbar .record-flag{width:30px;align-self:center}
#dialog .sheet-toolbar .record-flag select{inset:0;width:100%;height:100%}
#dialog .record-writing .record-description{border:0;padding:10px 0 5px}
#dialog .record-writing .record-description textarea{background:transparent;min-height:45px;height:48px;padding:4px;border:1px solid transparent}
#dialog .record-writing .record-description textarea:focus{border-color:var(--primary)}
#dialog .sheet-dates>.stage-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
#dialog .sheet-dates .select-wrap{min-width:0}
.sheet-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sheet-columns:empty{display:none}
#dialog .sheet-columns>section{margin:0;padding:12px;border:0}
.sheet-columns>section:only-child{grid-column:1/-1}
#dialog .sheet-columns .brief-fields{grid-template-columns:minmax(0,1fr);gap:8px}
#dialog .sheet-columns .record-refs{display:flex;flex-direction:column}
#dialog .sheet-columns :is(.brief-fields,.record-refs) textarea,
#dialog .record-writing .record-description .post-copy{display:block;width:100%;border:1px solid var(--edge);border-radius:9px;padding:7px 10px;background:var(--card);color:var(--ink);font-size:13px;line-height:1.55;resize:vertical}
#dialog .sheet-columns .brief-fields textarea{height:48px;min-height:48px}
#dialog .sheet-columns :is(.brief-fields,.record-refs) textarea{font-size:12px}
#dialog .sheet-columns textarea::placeholder{font:inherit;color:var(--muted);opacity:1}
#dialog .sheet-columns .record-refs textarea{flex:1;min-height:48px}
#dialog .record-writing .record-description .post-copy{min-height:116px;height:clamp(116px,16vh,152px);padding:10px 12px}
#dialog .record-description .post-copy::placeholder{color:var(--muted)}
#dialog :is(.sheet-columns textarea,.record-description .post-copy):focus{border-color:var(--primary);outline:0;box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 14%,transparent)}
.sheet-columns .subtask-line{display:grid;grid-template-columns:auto 1fr;gap:2px 7px;background:var(--card);border:0;border-radius:12px;padding:5px 8px;margin:4px 0}
.sheet-columns .subtask-line small{grid-column:2;margin:0;text-align:start;font-size:10px}
.sheet-columns .subtask-title{padding:0;font-size:12px}
.sheet-columns .subtask-check{width:16px;height:16px;grid-row:span 2}
.sheet-columns .subtask-check:has(svg){background:#7652cc;color:white;border-color:#7652cc}
.sheet-columns .subtask-check:disabled{opacity:.9;cursor:default}
#dialog .sheet-columns .planner>[data-add-step]{min-height:28px;background:var(--card);border-radius:16px;font-size:12px}
.sheet-progress>div{display:flex;justify-content:space-between;align-items:center;font-size:12px}
.sheet-progress bdi{background:var(--card);padding:2px 6px;border-radius:5px}
.sheet-progress progress{display:block;width:100%;height:5px;margin-block-start:9px;border:0;border-radius:6px;overflow:hidden;appearance:none;background:var(--edge)}
.sheet-progress progress::-webkit-progress-bar{background:var(--edge)}
.sheet-progress progress::-webkit-progress-value{background:#38a870;border-radius:6px}
.sheet-progress progress::-moz-progress-bar{background:#38a870}
#dialog:has(.work-sheet) .dialog-foot{padding:10px 18px;background:var(--card);justify-content:space-between}
#dialog:has(.work-sheet) .dialog-foot .btn{border-radius:18px;min-height:33px;font-size:12px}
.sheet-save{order:1}
#dialog:has(.work-sheet) .dialog-foot>.row{flex:0 1 auto}
.record-writing{display:grid;gap:4px}

.stage-timing{width:100%;border-block-start:1px solid var(--edge);padding-block-start:8px}
.schedule-choice{display:inline-flex;padding:2px;gap:2px;border-radius:8px;background:var(--card);border:1px solid var(--edge)}
.schedule-choice label{position:relative;cursor:pointer}
.schedule-choice input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.schedule-choice span{display:flex;align-items:center;gap:5px;padding:4px 9px;border-radius:6px;font-size:12px;color:var(--muted)}
.schedule-choice input:checked+span{color:var(--primary);background:var(--soft);font-weight:600}
.schedule-choice input:focus-visible+span{outline:2px solid var(--primary)}
.stage-timing .icon{width:15px;height:15px}
.stage-time-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-block:8px}
.stage-time-cell{min-width:0;border:1px solid var(--edge);background:var(--card);border-radius:8px;padding:7px 10px}
.stage-time-date,.stage-predecessor,.stage-time-date>span,.stage-predecessor>span:first-child{display:flex;align-items:center;gap:6px}
.stage-time-date>span,.stage-predecessor>span:first-child{color:var(--muted);font-size:12px;white-space:nowrap}
#dialog .stage-time-date input{margin-inline-start:auto;min-width:0;width:9em;height:29px;min-height:0;padding:3px 5px;font-size:12px;border:1px solid var(--edge);border-radius:5px}
#dialog .stage-time-date input:disabled{border-color:transparent;background:transparent;color:var(--ink);opacity:1}
.stage-predecessor{gap:10px;padding-block-start:7px;border-block-start:1px solid var(--edge)}
.stage-predecessor .select-wrap{display:inline-grid;min-width:0;max-width:min(100%,28rem)}
#dialog .stage-predecessor select{width:auto;max-width:100%;min-width:7rem;height:auto;min-height:32px;padding:3px 10px;padding-inline-end:28px;border:1px solid var(--edge);border-radius:8px;background:var(--card);font-size:12px;line-height:1.6;text-overflow:ellipsis;cursor:pointer}
.stage-predecessor .select-wrap>.icon{top:50%;inset-inline-end:9px;transform:translateY(-50%);width:12px;height:12px}
#dialog .stage-predecessor select:is(:hover,:focus-visible){border-color:var(--primary);background:var(--soft)}

#dialog .sheet-toolbar .toolbar-choice:not([hidden]){
 display:inline-flex;position:relative;align-items:center;justify-content:center;gap:3px;
 height:32px;padding:0 7px;background:var(--card);border:1px solid var(--edge);border-radius:8px;color:var(--ink)
}
.toolbar-choice [data-choice-symbol]{display:grid;place-items:center}
.toolbar-choice .icon{width:16px;height:16px}
.toolbar-choice .choice-arrow{width:10px;height:10px;color:var(--muted)}
#dialog .sheet-toolbar .toolbar-choice select{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer}
.toolbar-choice:focus-within{outline:2px solid var(--primary);outline-offset:2px}
.toolbar-choice:has(select):hover{box-shadow:0 0 0 1px var(--muted)}
.toolbar-choice:is([data-value=done],[data-value=published]){--ink:var(--green)}
.toolbar-choice[data-value=active]{--ink:var(--primary)}
#dialog .sheet-dates .stage-time-pair{display:grid;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#dialog .stage-time-cell{padding:6px 9px}
#dialog .stage-time-date{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
#dialog .stage-time-date input{margin:0;border-color:transparent;background:var(--panel);text-align:center;font-variant-numeric:tabular-nums}
#dialog .stage-time-date input:enabled:hover{border-color:var(--edge);cursor:pointer}
#dialog .stage-clock{margin-block-start:5px}

#dialog .work-sheet>.record-subtasks{background:var(--sheet-well);border:0;border-radius:9px;padding:10px 12px}
#dialog .record-subtasks:not(:has(.subtask-line,.plan-step)){background:none;padding:0}
#dialog .record-subtasks:not(:has(.subtask-line,.plan-step,.planner)){display:none}
#dialog .sheet-progress[hidden]{display:none}
.record-refs h3{display:flex;align-items:center;gap:7px;margin:0 0 6px;font-size:13px}
#dialog .record-refs textarea{height:68px;min-height:44px;font-size:12px}
.reference-links:empty{display:none}
.reference-links{display:grid;gap:4px;margin-block-start:7px}
.reference-links a{display:flex;align-items:flex-start;gap:6px;padding:5px 7px;border-radius:7px;color:var(--accent);font-size:11px;line-height:1.5;text-decoration:none;overflow-wrap:anywhere}
.reference-links a bdi{min-width:0;word-break:break-word}
.reference-links a svg{width:13px;height:13px;flex:none;margin-block-start:2px}
.reference-links a:hover{background:color-mix(in srgb,var(--accent) 8%,transparent);text-decoration:underline}
.reference-links a:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 24%,transparent)}
#dialog .work-sheet .subtask-line{background:var(--card);border:0;border-radius:7px;padding:5px 9px;margin:3px 0}
#dialog .subtask-check:has(svg){background:#7652cc;border-color:#7652cc;color:white}
#dialog .subtask-check:disabled{cursor:default}
.subtask-edit{padding:10px;background:var(--card);border:1px solid var(--edge);border-radius:8px;margin-block:4px}
.subtask-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 9px}
.subtask-fields>.field:first-child{grid-column:span 2}
.subtask-fields .field{min-width:0}
#dialog .subtask-edit :is(input,select,textarea){font-size:12px;min-height:30px}
.subtask-edit>[role=alert]{color:var(--red)}
.subtask-actions{display:flex;gap:6px;margin-block-start:5px}
#dialog .work-sheet :is([data-add-step],[data-add-production],[data-action=scene-add],[data-remove-step],.subtask-actions .btn):not([hidden]){
 display:inline-flex;align-items:center;justify-content:center;gap:4px;justify-self:start;width:max-content;
 min-height:25px;height:25px;padding:2px 7px;border-radius:6px;font-size:11px;line-height:1.25
}
#dialog .work-sheet :is([data-add-step],[data-add-production],[data-action=scene-add]){background:var(--card);color:var(--primary);border:1px solid var(--edge)}
#dialog .work-sheet :is([data-add-step],[data-add-production],[data-action=scene-add],[data-remove-step],.subtask-actions) .icon{width:13px;height:13px}

/* The cover introduces the project; its sections occupy the next viewport. */
.space-head.project-profile{position:relative;isolation:isolate;display:flex;align-items:flex-end;padding:16px 20px;margin:0;height:clamp(270px,42vh,400px);overflow:hidden;background:#293949;border-radius:14px 14px 0 0}
.profile-banner{position:absolute;inset:0}
.profile-banner::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(10,22,37,.83),transparent 80%);pointer-events:none}
.profile-banner>img,.profile-cover-preview{width:100%;height:100%;object-fit:cover;object-position:center}
.profile-banner>.profile-cover-edit,.profile-enter{position:absolute;z-index:1;display:grid;place-items:center;width:32px;height:32px;padding:5px;border:1px solid #ffffff69;border-radius:9px;background:#172836b8;color:white}
.profile-banner>.profile-cover-edit{inset-inline-end:14px;top:12px;min-height:0}
.profile-enter{inset-inline-end:14px;bottom:12px}
.profile-enter:hover,.profile-cover-edit:hover{background:#182938}
.profile-identity{position:relative;min-width:0;color:#fff}
.profile-identity a,.profile-identity small{font-size:12px;color:#e8eef5}
.space-head.project-profile h1{font-size:24px;line-height:1.3;margin:0}
.profile-tabs+.space-body{min-height:calc(100dvh - var(--mc-header-height,80px) - 38px)}
.space-nav.profile-tabs{position:sticky;top:var(--mc-header-height,80px);z-index:8;align-items:center;gap:3px 5px;background:var(--card);border:1px solid var(--edge);border-radius:0 0 12px 12px;padding:4px 9px;margin-bottom:12px}
.space-nav.profile-tabs a,.profile-tabs .space-more summary{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:4px 8px;font-size:12px;border-radius:6px;text-decoration:none;white-space:nowrap}
.profile-tabs .icon{width:15px;height:15px}
.profile-tabs .profile-return{display:none}
#page.profile-docked{padding-block-start:0}
#page.profile-docked>.project-profile{display:none}
@media(prefers-reduced-motion:no-preference){
 #page.profile-docked>:is(.profile-tabs,.space-body){translate:0 var(--profile-pull,0px);transition:translate .16s cubic-bezier(.2,.7,.3,1)}
}
.profile-docked>.profile-tabs .profile-return{display:inline-grid;place-items:center;margin-inline-start:auto;width:30px;min-height:30px;padding:0;border:1px solid var(--edge);border-radius:8px;background:var(--card);color:var(--muted)}
.profile-return .icon{transform:rotate(180deg)}
.profile-return:hover{color:var(--primary);background:var(--soft)}
.space-nav.profile-tabs a[aria-current=page]{background:var(--soft);color:var(--primary)}
.profile-cover-preview{aspect-ratio:3/1;height:auto;border-radius:10px;background:var(--panel)}


/* One intro page, with the photograph and the analytics on separate surfaces. */
.space-head.project-profile{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(120px,1fr) auto;align-items:stretch;justify-content:stretch;gap:0;height:80dvh;min-height:440px;padding:0;background:var(--panel)}
.profile-photo-area{position:relative;isolation:isolate;display:flex;align-items:flex-end;min-height:0;padding:16px 22px}
.profile-photo-area .profile-identity{z-index:1;text-shadow:0 1px 9px #142438}
.profile-photo-area h1{font-size:clamp(25px,3vw,38px)}
.project-profile .profile-enter{inset:auto;inset-inline-end:14px;top:54px;background:#172836cf}
.project-analytics{
 --wave-a:#ce57c8;--wave-b:#8270dc;--wave-c:#f7b5df;--slice-0:#9185d4;--slice-1:#b87bc1;--slice-2:#da6690;--slice-3:#f09977;--slice-4:#469e93;
 min-width:0;padding:12px 16px;color:var(--ink);background:radial-gradient(ellipse at 16% 30%,#dedcf4,transparent 66%),linear-gradient(130deg,#eef2fa,#f9e9f2)
}
[data-theme=dark] .project-analytics{--wave-a:#db77db;--wave-b:#9081fa;--wave-c:#f7b9de;--slice-0:#ad9fec;--slice-1:#d998db;--slice-2:#f68aaf;--slice-3:#ffb399;--slice-4:#7cd8c8;background:radial-gradient(ellipse at 16% 30%,#342f52,transparent 68%),linear-gradient(130deg,#17283a,#332838)}
.space-head.project-profile{grid-template-rows:30% minmax(0,1fr);min-height:510px}
.project-analytics{display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;padding:clamp(10px,1.5vw,20px);--line-count:#7955be;--line-done:#bd437a}
[data-theme=dark] .project-analytics{--line-count:#ba9cf7;--line-done:#fb9bc8}
.project-analytics>[data-cover-charts]{min-height:0}
.overview-numbers,.overview-numbers dl,.overview-numbers dl>div,.glass-chart header{display:flex;align-items:center;gap:8px}
.overview-numbers{justify-content:space-between;flex-wrap:wrap}.overview-numbers dl{margin:0;flex:1;justify-content:space-evenly;flex-wrap:wrap}
.overview-numbers h2,.glass-chart h3{font-size:14px;margin:0}.overview-numbers dd{font-size:19px;font-weight:700;margin:0}
.overview-numbers dt,.glass-chart small{font-size:11px}
.glass-charts{height:100%;display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);grid-auto-rows:minmax(0,1fr);gap:10px}
.glass-charts:has(> :nth-child(3))>.wave-chart{grid-row:span 2}
.glass-chart{min-width:0;min-height:0;display:flex;flex-direction:column;padding:clamp(9px,1.1vw,16px);border:1px solid color-mix(in srgb,var(--card) 82%,transparent);border-radius:13px;background:color-mix(in srgb,var(--card) 68%,transparent);box-shadow:0 5px 18px -14px #35345566,inset 0 1px 0 #ffffff28;backdrop-filter:blur(14px);overflow:auto}
.glass-chart header{justify-content:space-between;margin-bottom:8px}
.glass-chart header small,.chart-empty{color:var(--muted)}
.chart-empty{margin:auto;text-align:center;font-size:12px}
.series-legend{display:flex;gap:10px;flex-wrap:wrap}
.series-legend span{display:inline-flex;align-items:center;gap:4px;font-size:12px}
.series-legend span::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--line-count)}
.series-legend span+span::before{background:var(--line-done)}
.series-legend b{min-width:2ch;text-align:center}
.trend-frame{flex:1;min-height:70px;display:grid;grid-template-columns:2ch 1fr;gap:5px;direction:ltr;margin-top:8px}
.trend-frame svg{width:100%;height:100%;min-height:0}
.trend-scale{display:flex;flex-direction:column;justify-content:space-between;padding-block:0;font-size:10px;color:var(--muted);position:relative}
.trend-scale span{position:absolute;right:0;transform:translateY(-50%);top:10%}.trend-scale span:nth-child(2){top:50%}.trend-scale span:last-child{top:90%}
.trend-grid,.series-line,.period-guide,.trend-point{vector-effect:non-scaling-stroke;fill:none}
.trend-grid{stroke:var(--edge);stroke-width:1}.series-line{stroke:currentColor;stroke-width:2.5}
.line-count{color:var(--line-count)}.line-done{color:var(--line-done)}
.period-guide{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 4}
.trend-point{stroke:currentColor;stroke-width:6;stroke-linecap:round}
.period-buttons{display:flex;direction:ltr;padding-left:calc(2ch + 5px)}
.period-buttons button{flex:1;min-width:0;padding:4px 1px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.period-buttons button[aria-pressed=true]{color:var(--ink);background:var(--card);font-weight:700}
.media-bars{display:grid;align-content:center;gap:6px 15px;flex:1}
.media-bars.split{grid-template-columns:repeat(2,minmax(0,1fr))}
.media-bars>div{min-width:0}
.media-bars>div>div{display:flex;align-items:baseline;justify-content:space-between;gap:5px;font-size:12px}
.media-bars progress{display:block;width:100%;height:6px;margin-top:3px;appearance:none;border:0;border-radius:9px;overflow:hidden;background:var(--edge)}
.media-bars progress::-webkit-progress-bar{background:var(--edge)}
.media-bars progress::-webkit-progress-value{background:var(--media-accent);border-radius:9px}
.media-bars progress::-moz-progress-bar{background:var(--media-accent);border-radius:9px}
.status-ring{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:clamp(12px,2vw,24px)}
.ring-disc{position:relative;width:clamp(65px,8vw,110px);flex-shrink:0;display:grid;place-items:center}
.ring-disc svg{width:100%;aspect-ratio:1;transform:rotate(-90deg);fill:none;stroke-width:11}
.ring-disc>div{position:absolute;display:grid;text-align:center;line-height:1.4}
.ring-disc b{font-size:19px}.ring-disc small{color:var(--muted)}
.status-ring ul{list-style:none;display:grid;gap:3px;padding:0;margin:0;min-width:0;flex:1;max-width:195px}
.status-ring li{display:flex;align-items:center;gap:6px;font-size:12px}
.status-ring li::before{content:'';width:7px;height:7px;border-radius:50%;background:var(--segment)}
.status-ring li b{margin-inline-start:auto}
.status-ring [data-state]{--segment:var(--slice-0);stroke:var(--segment)}
.status-ring :is([data-state=planned],[data-state=scheduled]){--segment:var(--slice-1)}
.status-ring :is([data-state=active],[data-state=in_production],[data-state=postponed]){--segment:var(--slice-2)}
.status-ring :is([data-state=review],[data-state=cancelled]){--segment:var(--slice-3)}
.status-ring :is([data-state=done],[data-state=published]){--segment:var(--slice-4)}

.upcoming-panel{background:var(--card);border:1px solid var(--edge);border-radius:14px;overflow:hidden}
.upcoming-panel>header,.up-filters{display:flex;align-items:center;gap:8px}
.upcoming-panel>header{justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--edge)}
.upcoming-panel h3{display:flex;align-items:center;gap:8px;margin:0;font-size:16px}
.upcoming-panel>header .btn{min-height:30px;font-size:12px}
.up-filters{flex-wrap:wrap;padding:12px 16px 4px}
.up-filter{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--edge);border-radius:7px;padding-inline-start:7px;font-size:12px}
.up-filter>span:first-child{color:var(--muted)}
.up-filter select{width:auto;min-height:29px;height:29px;border:0;font-size:12px;background:transparent;padding-block:0}
.up-list{display:grid;gap:7px;padding:10px 16px 14px}
.up-timeline{list-style:none;margin:0;padding:0}
.up-step{position:relative}
.up-step:not(:last-child)::after{content:"";position:absolute;inset-inline-start:16px;top:50%;height:100%;width:2px;background:var(--edge);pointer-events:none}
.up-step[data-point=done]::after{background:var(--green)}
.up-step button{position:relative;display:grid;align-items:center;grid-template-columns:18px 76px minmax(0,1fr);gap:14px;width:100%;min-height:68px;padding:8px;border:0;border-radius:9px;text-align:start;color:var(--ink);background:transparent}
.up-step button:is(:hover,:focus-visible){background:var(--panel)}
.up-point{z-index:1;display:grid;place-items:center;width:16px;height:16px;justify-self:center;border:2px solid var(--edge);border-radius:50%;background:var(--card)}
.up-step[data-point=next] .up-point{border-color:var(--green)}
.up-step[data-point=done] .up-point{background:var(--green);border-color:var(--green);color:var(--card)}
.up-point .icon{width:12px;height:12px}
.up-step time,.up-event{display:grid;gap:2px}
.up-step time b{font-size:20px;line-height:1.1}
.up-event strong{font-size:14px}
.up-event small,.up-step time small,.up-empty{font-size:12px;color:var(--muted)}
.up-list>[data-action=up-more]{justify-self:center}

/* Project calendar: actions first, browsing and filtering together below. */
@media(min-width:761px){
 .project-cal-tools{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:8px}
 .project-cal-tools .cal-heading{grid-column:1/-1;border-bottom:1px solid var(--edge);padding-bottom:6px}
 .project-cal-tools .cal-browse{display:contents}
 .project-cal-tools .cal-views{grid-row:2;grid-column:1}
 .project-cal-tools .cal-inline-filters{grid-row:2;grid-column:2;display:flex;align-items:center;flex-wrap:nowrap;gap:5px}
 .project-cal-tools .cal-inline-filters>.field{flex:1 1 0}
 .project-cal-tools .cal-inline-filters>.field>span:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .project-cal-tools .cal-navigation{grid-row:2;grid-column:3;flex-wrap:nowrap}
 .project-cal-tools .owner-filter-trigger{overflow:hidden}
 .project-cal-tools .owner-filter-trigger span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

.assignment-trigger{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-height:30px;padding:4px 9px;border:1px solid var(--edge);border-radius:9px;background:var(--card);color:var(--ink);font-size:12px}
.assignment-trigger small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.assignment-trigger .icon{width:15px;height:15px;flex:none}
.assignee-picker:has(.assignment-menu:popover-open)>.assignment-trigger,.assignment-trigger:focus-visible{border-color:var(--primary);background:var(--soft)}
.assignment-menu{position:fixed;inset:auto;margin:0;width:min(268px,calc(100vw - 16px));max-height:min(350px,calc(100dvh - 16px));overflow:auto;padding:12px;background:var(--card);color:var(--ink);border:1px solid var(--edge);border-radius:14px;box-shadow:0 10px 28px #0a17252e;text-align:start}
.assignment-menu:popover-open{display:grid;gap:8px}
.assignment-menu .field{margin:0}
.assignment-menu select{min-height:32px;height:32px;font-size:12px}
.assignment-menu .member-rows{display:grid;gap:3px}
.assignment-menu .member-rows label{display:flex;min-height:30px;border:1px solid transparent;border-radius:8px;padding:4px 7px;font-size:12px}
.assignment-menu .member-rows label:has(input:checked){background:var(--soft);color:var(--primary);border-color:color-mix(in srgb,var(--primary) 42%,var(--edge))}
.assignment-menu footer{display:flex;justify-content:flex-end;padding-top:7px;border-top:1px solid var(--edge)}
.assignment-menu footer button{display:inline-flex;align-items:center;gap:4px;padding:4px 12px;border:0;border-radius:12px;background:var(--primary);color:var(--on-primary,#fff);font-size:12px}
.assignment-menu footer .icon{width:14px;height:14px}
.compact-team{display:inline-flex;align-items:center;width:fit-content;max-width:100%;justify-self:start;color:var(--ink)}
.compact-team>.icon{top:50%;transform:translateY(-50%);width:13px;height:13px;pointer-events:none}
.compact-team>.team-symbol{inset-inline:8px auto;color:var(--primary)}
.compact-team>.team-chevron{inset-inline:auto 8px;width:10px;height:10px}
.compact-team select,#dialog .compact-team select{appearance:none;field-sizing:content;width:auto;min-width:82px;max-width:min(200px,100%);height:30px;min-height:30px;padding:2px 26px;border:1px solid var(--edge);border-radius:8px;background:var(--panel);color:var(--ink);font-size:12px;line-height:1.4;text-overflow:ellipsis;cursor:pointer}
.compact-team:hover select,#dialog .compact-team:hover select{background:var(--soft)}
#dialog .compact-team select:focus,.compact-team select:focus-visible{outline:0;border-color:var(--edge);box-shadow:0 0 6px 2px color-mix(in srgb,var(--primary) 38%,transparent)}
#dialog .sheet-toolbar .assignment-trigger{height:32px;width:34px;min-height:32px;padding:0;justify-content:center;border-radius:8px}
.sheet-toolbar .assignment-trigger :is(b,small,.icon:last-child){display:none}
.sheet-people:has([data-person-chips]:empty){display:none}
.material-dates{display:inline-flex;align-items:center;gap:5px}
.material-date{display:inline-flex;align-items:center;gap:4px;height:32px;width:118px;padding-inline:7px;border:1px solid var(--edge);border-radius:8px;background:var(--card);cursor:pointer}
.material-date>.icon{flex:none;width:15px;height:15px;color:var(--muted)}
.material-date:focus-within{border-color:var(--primary)}
#dialog .sheet-toolbar .material-date input{flex:1;min-width:0;height:30px;min-height:30px;border:0;background:transparent;padding:0;font-size:12px;text-align:center;cursor:pointer}
.material-date input::-webkit-calendar-picker-indicator{display:none}


.planner .plan-compose,.planner .plan-summary{display:flex;align-items:center;gap:5px;border:0;border-bottom:1px solid var(--edge);border-radius:0;padding:5px 0;min-width:0}
.planner .plan-compose{display:grid;grid-template-columns:12px minmax(84px,1fr) auto auto 30px 30px auto;gap:6px}
.planner .plan-compose>[data-key=title]{min-width:0;width:100%;height:30px;min-height:30px;line-height:1.4;padding:3px 5px;border:1px solid transparent;border-radius:5px;background:transparent;font-size:13px}
.planner .plan-compose>[data-key=title]:focus{outline:none;box-shadow:none;background:var(--card);border-color:var(--edge)}
.planner .plan-compose[data-assigned=false] .assignment-trigger small{display:none}
.planner .plan-compose[data-assigned=false] .assignment-trigger{width:30px;padding:0;justify-content:center}
.plan-compose>.plan-date,.plan-compose>.assignee-picker{align-self:center}
.plan-compose>.plan-date{display:flex}
.plan-date bdi{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.plan-picker-settings{display:grid;gap:7px}
.plan-picker-settings>label{display:flex;align-items:center;gap:6px;font-size:12px}
.plan-picker-settings>label input{width:auto;min-height:0}
.plan-clock-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.plan-clock-fields input{min-width:0}
.plan-marker{width:12px;height:12px;border:1.5px dashed var(--muted);border-radius:50%;flex:none}
.plan-compose .assignment-trigger{max-width:116px;height:30px;min-height:30px}
.plan-compose .assignment-trigger b,.plan-compose .assignment-trigger>.icon:last-child{display:none}
.plan-compose .assignment-trigger small{max-width:74px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.plan-icon,.plan-save{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;height:30px;min-width:30px;padding:4px;border:1px solid var(--edge);border-radius:7px;background:var(--card);color:var(--ink);cursor:pointer}
.plan-icon .icon,.plan-save .icon{width:15px;height:15px}
.plan-flag select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.plan-flag[data-level=low]{color:var(--green)}.plan-flag[data-level=medium]{color:var(--amber,#bd7819)}.plan-flag[data-level=high]{color:var(--red,#cb4855)}
.plan-save{background:var(--ink);color:var(--card);border-color:transparent;font-size:12px;padding-inline:8px;text-decoration:none}
.planner .plan-compose :is(.plan-save,.plan-icon,.assignment-trigger){align-self:center;min-height:30px;height:30px;border-radius:7px;margin:0}
.plan-summary [data-edit-step]{flex:1;min-width:0;display:flex;align-items:center;gap:7px;border:0;background:transparent;text-align:start;color:var(--ink);padding:5px}
.plan-summary strong{overflow-wrap:anywhere}.plan-summary small{margin-inline-start:auto;color:var(--muted)}
@media(max-width:600px){
 .planner .plan-compose{grid-template-columns:12px minmax(0,1fr) auto repeat(2,30px) auto}
 .plan-compose>[data-key=title]{grid-column:2/-1}
 .plan-compose>.assignee-picker{grid-column:2;min-width:0}
 .plan-compose .assignment-trigger{max-width:min(116px,100%)}
}

#dialog .dialog-head>.toolbar-choice{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:3px;height:30px;padding-inline:7px;margin-inline-start:auto;border:1px solid var(--edge);border-radius:8px;background:var(--card)}
#dialog .dialog-head>.toolbar-choice select{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
#dialog .work-sheet>.sheet-toolbar{display:flex;align-items:center;flex-wrap:nowrap;gap:5px;padding:6px;overflow-x:auto;scrollbar-width:thin}
#dialog .dialog-head small:empty{display:none}
.sheet-toolbar :is(.assignment-trigger,.toolbar-choice,.record-flag,.material-date){transition:transform .14s ease,background-color .14s ease,border-color .14s ease}
@media(hover:hover){
 #dialog .sheet-toolbar :is(.assignment-trigger,.toolbar-choice,.record-flag,.material-date):hover{background:var(--soft);border-color:var(--primary);transform:translateY(-1px)}
}
@media(prefers-reduced-motion:reduce){
 #dialog .sheet-toolbar :is(.assignment-trigger,.toolbar-choice,.record-flag,.material-date){transition:none;transform:none}
}
#dialog .sheet-toolbar>*{flex-shrink:0}
.assignee-stack{display:inline-flex;align-items:center;isolation:isolate;vertical-align:middle}
.assignee-stack .assignee-face,.assignee-stack>.assignee-more{box-sizing:border-box;display:inline-grid;place-items:center;min-width:var(--face-size,27px);height:var(--face-size,27px);padding-inline:3px;border:2px solid var(--card);border-radius:999px;background:var(--soft);color:var(--primary);font-size:10px;font-weight:600;line-height:1}
.assignee-stack>*+*{margin-inline-start:-5px}
.assignee-stack .assignee-face[data-tone="1"]{background:color-mix(in srgb,var(--green) 15%,var(--card));color:var(--green)}
.assignee-stack>.assignee-more{background:var(--panel);color:var(--muted)}
.work-card .assignee-stack{--face-size:23px}
.assignee-stack-edit{display:inline-flex;align-items:center;background:transparent;border:0;padding:0;border-radius:99px;cursor:pointer}
#dialog :is(.assignment-trigger,.assignee-stack-edit):focus-visible,
#dialog .assignee-picker:has(>.assignment-menu:popover-open)>.assignment-trigger,
#dialog :is(.sheet-toolbar,.dialog-head) :is(.toolbar-choice,.record-flag,.material-date):focus-within{
 outline:0;border-color:var(--edge);box-shadow:0 0 6px 2px color-mix(in srgb,var(--primary) 38%,transparent);
}
#dialog .sheet-toolbar .material-date input:focus-visible{outline:0;box-shadow:none}
@media(forced-colors:active){
 #dialog :is(.assignment-trigger,.assignee-stack-edit):focus-visible,#dialog .compact-team select:focus,#dialog :is(.toolbar-choice,.record-flag,.material-date):focus-within{outline:2px solid Highlight}
}
.assignee-token,.team-choice{display:inline-flex;align-items:center;position:relative}
.team-choice{gap:4px;justify-self:start;width:fit-content;max-width:100%}
.chip-remove{display:inline-grid;place-items:center;width:17px;height:17px;border:0;padding:2px;border-radius:50%;color:var(--muted);background:var(--panel);cursor:pointer}
.chip-remove .icon,.member-tick .icon{width:11px;height:11px}
.chip-remove:hover,.chip-remove:focus-visible{background:var(--soft);color:var(--ink)}
.team-choice:not(:has(option:checked:not([value=""])))>[data-clear-team]{display:none}
.assignee-token>.chip-remove{position:absolute;top:-4px;inset-inline-end:-1px;z-index:1;width:13px;height:13px;background:var(--card);border:1px solid var(--edge)}
.assignee-token:hover,.assignee-token:focus-within{z-index:2}
.assignee-picker:has(.member-rows input:checked,.compact-team option:checked:not([value=""]))>.assignment-trigger{position:relative;color:var(--primary);background:var(--soft)}
.assignee-picker:has(.member-rows input:checked,.compact-team option:checked:not([value=""]))>.assignment-trigger::after{content:'✓';position:absolute;inset-inline-start:2px;bottom:2px;display:grid;place-items:center;width:11px;height:11px;border-radius:50%;font:700 9px/1 system-ui;background:var(--primary);color:var(--card)}
:root{--flow-menu-shadow:0 10px 28px color-mix(in srgb,var(--ink) 16%,transparent)}
.flow-choice-menu,.assignment-menu,.owner-filter-panel,.project-tile-menu>div,.space-more>div,
dialog.flow-date-picker[open],#dialog:has(#board-assignment){
 border:1px solid var(--edge);border-radius:14px;background:var(--card);color:var(--ink);box-shadow:var(--flow-menu-shadow)
}
.flow-choice-menu{position:fixed;inset:auto;margin:0;padding:6px;width:max-content;max-width:min(320px,calc(100vw - 12px));max-height:min(320px,calc(100dvh - 16px));overflow:auto;overscroll-behavior:contain;text-align:start}
.flow-choice-menu:focus{outline:0}
.flow-choice-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:30px;padding:5px 9px;border-radius:8px;cursor:pointer;font-size:12px;color:var(--ink)}
.flow-choice-row::after{content:'';width:1em}
.flow-choice-row[aria-selected=true]::after{content:'✓';color:var(--primary)}
.flow-choice-row[aria-selected=true],.flow-choice-row.pointed{background:var(--soft);color:var(--primary)}
.flow-choice-row:hover{background:var(--panel)}
.flow-choice-row[aria-disabled=true]{opacity:.45;cursor:default}
.flow-choice-menu small{display:block;padding:5px 9px;color:var(--muted)}
.owner-filter-panel .check-list label,.space-more>div a,.project-tile-menu>div>*{min-height:30px;border:0;border-radius:8px;background:transparent;color:var(--ink);padding:5px 9px;font-size:12px}
.owner-filter-panel .check-list label:hover,.space-more>div a:hover,.project-tile-menu>div>:hover{background:var(--panel)}
.owner-filter-panel .check-list label:has(input:checked),.space-more>div a[aria-current=page]{background:var(--soft);color:var(--primary)}

/* Script library: the paper itself reflects whether the text has been used. */
.script-card{--script-color:#3b996b;display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;padding:16px 18px;text-align:start;border-radius:15px;border:1px solid color-mix(in srgb,var(--script-color) 23%,var(--edge));background:color-mix(in srgb,var(--script-color) 15%,var(--card));color:var(--ink);transition:box-shadow .16s,border-color .16s}
.script-card[data-tone=linked]{--script-color:#df8a33}.script-card[data-tone=published]{--script-color:#d85862}
.script-card:hover,.script-card:focus-visible{border-color:color-mix(in srgb,var(--script-color) 60%,var(--edge));box-shadow:var(--shadow)}
.script-card>strong{font-size:15px;overflow-wrap:anywhere}
.script-meta,.script-badges{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;font-size:11px}
.script-meta>span,.script-badges>span{display:inline-flex;align-items:center;gap:4px}.script-meta .icon,.script-badges .icon{width:14px;height:14px}
.script-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:pre-line;overflow-wrap:anywhere;text-align:start;line-height:1.55;font-size:13px;min-height:3.1em}
.script-badges{margin-top:auto;gap:6px}.script-badges>span{border-radius:7px;padding:3px 7px;background:color-mix(in srgb,var(--card) 72%,transparent)}
.draft-index{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin-block:12px 18px}
.draft-index>a,.idea-bar,.idea-bar>div,.draft-tool,.idea-empty,.idea-archived{display:flex;align-items:center;gap:8px}
.draft-index>a{padding:18px;border:1px solid var(--edge);border-radius:14px;background:var(--card);color:var(--ink)}.draft-index>a:hover{background:var(--soft);text-decoration:none}.draft-index>a>.icon:last-child{margin-inline-start:auto;width:15px}
.idea-board{border:1px solid var(--edge);border-radius:16px;background:var(--card);overflow:hidden}
.idea-bar{justify-content:space-between;padding:9px 14px;border-bottom:1px solid var(--edge)}
.idea-bar>div:first-child{font-weight:700}.idea-bar .draft-tool{min-height:30px;padding:4px 9px;font-size:12px}.draft-tool[aria-pressed=true]{color:var(--primary);background:var(--soft)}
.idea-hint{padding:7px 14px;color:var(--primary);background:var(--soft);font-size:12px}
.idea-viewport{overflow:auto;max-height:65vh;overscroll-behavior:contain;scrollbar-width:thin;background:var(--panel);background-image:radial-gradient(circle,var(--edge) 1px,transparent 1.2px);background-size:18px 18px}
.idea-plane{position:relative;isolation:isolate}.idea-threads{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.idea-threads line{stroke:var(--muted);stroke-width:2;opacity:.77}
.idea-paper,.idea-palette label{--paper:#ffe39a;--paper-ink:#312c31}
:is(.idea-paper,.idea-palette label)[data-tone=peach]{--paper:#ffc698}
:is(.idea-paper,.idea-palette label)[data-tone=rose]{--paper:#f6b6ce}
:is(.idea-paper,.idea-palette label)[data-tone=lilac]{--paper:#d9c2fa}
:is(.idea-paper,.idea-palette label)[data-tone=sky]{--paper:#b9ddf8}
:is(.idea-paper,.idea-palette label)[data-tone=mint]{--paper:#bde7ba}
html[data-theme=dark] .idea-paper{background:color-mix(in srgb,var(--paper) 71%,#283248)}
.idea-paper{position:absolute;width:186px;height:140px;padding:23px 12px 10px;color:var(--paper-ink);background:var(--paper);border-radius:3px 7px 11px 3px;box-shadow:0 4px 9px -5px #121c3459;transition:box-shadow .16s,rotate .16s;rotate:-1deg}
.idea-paper:nth-child(even){rotate:1deg}.idea-paper:focus-within,.idea-paper:hover{z-index:2;rotate:0deg}.idea-paper.dragging,.idea-paper[data-source]{rotate:0deg;z-index:3;box-shadow:0 0 0 2px var(--primary),0 6px 16px #121c3433}
.idea-grip,.idea-copy{color:inherit;background:transparent;border:0}.idea-grip{position:absolute;inset-block-start:2px;inset-inline-start:6px;width:34px;height:21px;cursor:grab;touch-action:none;user-select:none;font-size:16px}.idea-grip:active{cursor:grabbing}
.idea-copy{height:100%;width:100%;padding:0;white-space:pre-line;overflow:hidden;overflow-wrap:anywhere;text-align:start;line-height:1.5;font-size:14px;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical}
.idea-board.linking .idea-copy{cursor:crosshair}.idea-empty{position:absolute;top:42%;inset-inline-start:50%;translate:50% 0;padding:10px 14px;border:1px dashed var(--edge);border-radius:10px;background:var(--card);color:var(--primary)}
.idea-palette{display:flex;gap:8px}.idea-palette label{width:30px;height:30px;position:relative;display:grid;place-items:center;background:var(--paper);border-radius:50%;cursor:pointer}
.idea-palette input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}.idea-palette .icon{width:17px;color:#293241;opacity:0}.idea-palette input:checked+.icon{opacity:1}.idea-palette label:focus-within{outline:2px solid var(--primary);outline-offset:2px}
.idea-archived{justify-content:space-between;padding:8px;border-bottom:1px solid var(--edge)}.idea-archived span{overflow-wrap:anywhere}
.draft-materials{margin-block-start:16px}.draft-materials summary{width:fit-content;cursor:pointer;font-weight:700}.draft-materials summary small{color:var(--muted)}.draft-materials[open]>:not(summary){margin-block-start:10px}

.story-mode,.story-weekdays{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.story-mode{padding:3px;width:fit-content;border-radius:10px;background:var(--panel);border:1px solid var(--edge)}
.story-mode label,.story-weekdays label{position:relative;cursor:pointer}
.story-mode input,.story-weekdays input{position:absolute;opacity:0;inset:0;margin:0;width:100%;height:100%;cursor:pointer}
.story-mode span,.story-weekdays span{display:block;border-radius:7px;padding:5px 10px;font-size:12px}
.story-weekdays span{background:var(--panel);border:1px solid var(--edge)}
.story-mode input:checked+span,.story-weekdays input:checked+span{background:var(--soft);color:var(--primary);font-weight:700}
.story-mode input:focus-visible+span,.story-weekdays input:focus-visible+span{outline:2px solid var(--primary);outline-offset:1px}
.story-schedules{margin-block:3px;padding-block-end:6px;border-bottom:1px solid var(--edge);font-size:12px}
.story-schedules summary{cursor:pointer}.story-schedules button{display:flex;width:100%;justify-content:space-between;gap:8px;margin-block-start:4px}
.story-days-list{display:grid;gap:3px;max-height:23rem;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.story-days-list>small{color:var(--muted)}
.follow-all{padding:14px;background:var(--card);border:1px solid var(--edge);border-radius:14px}
.follow-filters{display:flex;gap:6px;margin-inline-end:auto}.follow-filters select,.follow-edit td>input[type=month],.follow-edit td>.select-wrap select{min-height:30px;font-size:12px;padding-block:3px}
.follow-filters .select-wrap>.icon,.follow-edit td>.select-wrap>.icon{top:50%;transform:translateY(-50%)}
.follow-all .follow-table th:first-child{width:30%}.follow-all .follow-table th:nth-child(2){width:19%}.follow-all .follow-table th:nth-child(3){width:21%}
.follow-project bdi,.follow-project small{display:block}.follow-project small{color:var(--muted);font-size:11px}
.stats-tabs{display:inline-flex;gap:3px;margin-block:4px 12px;padding:3px;border:1px solid var(--edge);border-radius:10px;background:var(--panel)}
.stats-tabs a{padding:5px 12px;border-radius:7px;color:var(--muted);font-size:12px}.stats-tabs a[aria-current=page]{background:var(--soft);color:var(--primary);font-weight:bold}
.stats-period{display:flex;margin-bottom:8px}.stats-period input{width:auto}
.task-repeat-control{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--muted)}
.task-repeat-control>label,.task-repeat-summary{display:flex;align-items:center;gap:6px}
.task-repeat-control select{min-height:32px;padding-block:3px;font-size:12px}
.task-repeat-control .select-wrap>.icon{top:50%;transform:translateY(-50%)}
.task-repeat-control .story-weekdays span{padding:3px 6px}
.task-repeat-summary{color:var(--muted);font-size:12px}

dialog.flow-date-picker[open]{width:min(430px,calc(100vw - 12px));border-radius:13px}
.flow-date-picker header{padding:7px;background:var(--card)}
.flow-date-picker header .picker-fields{display:flex;gap:5px;align-items:stretch}
.picker-fields button{display:flex;align-items:center;gap:7px;flex:1;text-align:start;border:1px solid transparent;background:var(--panel);border-radius:8px;padding:5px 8px}
.picker-fields button[aria-pressed=true]{border-color:var(--primary);background:var(--soft)}.picker-fields button span{display:grid;gap:1px}.picker-fields small{font-size:10px}.picker-fields b{font-size:12px}
.picker-columns{display:grid;grid-template-columns:minmax(118px,0.7fr) minmax(0,1.3fr)}
.picker-presets{display:flex;flex-direction:column;gap:2px;padding:8px 6px;border-inline-end:1px solid var(--edge)}
.picker-presets button,.schedule-toggle,.picker-modes button,.picker-weekdays button{border:0;background:transparent;color:var(--ink);border-radius:7px;min-height:29px;font-size:12px}
.picker-presets button,.schedule-toggle{display:flex;align-items:center;gap:6px;padding:4px 7px;text-align:start}.picker-presets small,.schedule-toggle small{margin-inline-start:auto;color:var(--muted);font-size:10px}
.picker-presets button:hover,.schedule-toggle:hover,.picker-modes button:hover,.picker-weekdays button:hover{background:var(--soft)}.picker-calendar{padding:8px}
.flow-date-picker .adjacent-day:not([aria-pressed=true]){color:var(--muted);opacity:.65}.flow-date-picker .date-days small{font-size:11px}
.picker-schedule{padding:4px 8px;border-block-start:1px solid var(--edge)}.schedule-toggle{width:100%}.schedule-toggle .icon{width:14px;height:14px}
.picker-modes,.picker-weekdays{display:flex;gap:3px;flex-wrap:wrap;margin-block:5px}.picker-modes button,.picker-weekdays button{padding:3px 8px;border:1px solid var(--edge)}
.picker-modes [aria-pressed=true],.picker-weekdays [aria-pressed=true]{background:var(--soft);color:var(--primary);border-color:var(--primary)}
.picker-extra,.flow-date-picker .inline-error:not(:empty){padding:6px 12px}.picker-extra:has(>label[hidden]:only-child){display:none}
.flow-date-picker .inline-error{margin:0}

/* Project events use their own preparation list and a small place beside the board. */
.home-side-rail,.ev-detail,.ev-group{display:grid;gap:12px;min-width:0}
.ev-rail,.ev-card,.ev-group,.ev-summary,.ev-timeline{border:1px solid var(--edge);border-radius:14px;background:var(--card);color:var(--ink)}
.ev-rail{padding:12px;background:color-mix(in srgb,var(--card) 93%,#50b99e)}
.ev-rail header,.ev-rail header a,.ev-tools,.ev-heading,.ev-group header,.ev-group header>div,.ev-card>small,.ev-card>span,.ev-summary>div,.ev-summary>div>span,.ev-next,.ev-back{display:flex;align-items:center;gap:8px}
.ev-rail header,.ev-tools,.ev-heading,.ev-group header{justify-content:space-between}
.ev-rail header a{font-weight:700}
.ev-rail-entry{display:grid;gap:4px;margin-top:9px;padding-top:9px;border-top:1px solid var(--edge);color:var(--ink);text-decoration:none}
.ev-rail small,.ev-summary small,.ev-card>small,.ev-card>span,.ev-empty,.ev-group small,.ev-timeline small,.ev-next,.ev-heading small{color:var(--muted);font-size:12px}
.ev-next .icon,.ev-card .icon,.ev-summary .icon,.ev-rail .icon{width:16px;height:16px;flex:none}
.ev-progress{display:flex;align-items:center;gap:9px;max-width:240px}
.ev-progress small{direction:ltr;white-space:nowrap}
.ev-progress progress{accent-color:var(--primary);flex:1;min-width:40px;height:5px;border:0;border-radius:8px;overflow:hidden;background:var(--edge)}
.ev-progress progress::-webkit-progress-bar{background:var(--edge)}
.ev-progress progress::-webkit-progress-value{background:var(--primary);border-radius:8px}
.ev-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}
.ev-card{display:grid;gap:8px;padding:17px;color:var(--ink);text-decoration:none;transition:border-color .16s ease,box-shadow .16s ease}
.ev-card:hover,.ev-rail-entry:hover strong{color:var(--primary)}
.ev-card:hover{border-color:var(--primary)}
.ev-card h3,.ev-group h3,.ev-heading h1,.ev-summary p{margin:0}
.ev-card h3{font-size:17px}.ev-card .ev-progress{margin-top:7px}
.ev-tools{margin-block:8px 12px;flex-wrap:wrap}
.ev-tools>.select-wrap{max-width:215px}
.ev-tools nav a{text-decoration:none}
.ev-detail .ev-tools{margin:0}
.ev-back{justify-self:start;text-decoration:none;font-size:12px;color:var(--muted)}
.ev-heading{gap:12px}
.ev-summary{display:grid;gap:12px;padding:15px 17px;background:color-mix(in srgb,var(--card) 95%,#60bdad)}
.ev-summary>div{gap:12px 20px;flex-wrap:wrap}
.ev-summary>div>span,.ev-summary p,.ev-next{font-size:13px}.ev-summary p{white-space:pre-line}
.ev-summary .ev-progress{width:min(100%,240px)}
.ev-group{overflow:hidden;gap:0}
.ev-group header{padding:10px 14px;background:var(--panel);border-bottom:1px solid var(--edge);flex-wrap:wrap}
.ev-group h3{font-size:15px}
.ev-group header .btn{min-height:29px;padding:2px 8px;font-size:12px}
.ev-group header .icon-btn{width:29px}
.ev-cost{font-size:12px;font-weight:650;color:var(--ink);margin-inline-end:5px}
.ev-table-wrap{overflow-x:auto}
.ev-group table{width:100%;border-collapse:collapse;text-align:start;font-size:13px}
.ev-group th,.ev-group td{padding:8px 12px;border-bottom:1px solid var(--edge);text-align:start}
.ev-group tr:last-child td{border:0}
.ev-group th{color:var(--muted);font-size:12px;white-space:nowrap;font-weight:550}
.ev-item-title{display:flex;align-items:center;gap:9px;min-width:125px}
.ev-check,.ev-edit{border:0;background:none;color:inherit;padding:0}
.ev-check{display:grid;place-items:center;flex:none;width:20px;height:20px;border:1px solid var(--edge);border-radius:6px}
.ev-check[aria-pressed=true]{color:white;background:#238362;border-color:#238362}
.ev-check .icon{width:14px;height:14px}
.ev-edit{font-weight:650;text-align:start;cursor:pointer}
.ev-edit:hover{color:var(--primary)}
.ev-notes{white-space:pre-line;min-width:90px}
.ev-group td select{font:inherit;font-size:12px;width:auto;min-height:29px;border-radius:7px}
.ev-group tr[data-state=done] .ev-edit{color:var(--muted)}
.ev-empty{padding:13px 16px;margin:0}
.ev-timeline{list-style:none;padding:12px 16px;margin:0}
.ev-timeline li{position:relative;display:grid;grid-template-columns:14px minmax(80px,150px) 1fr;gap:10px;align-items:start;padding:10px 0}
.ev-marker{position:relative;width:11px;height:11px;margin-top:4px;border:2px solid var(--edge);background:var(--card);border-radius:50%}
.ev-timeline li:not(:last-child)::before{content:"";position:absolute;inset-inline-start:5px;top:20px;bottom:-14px;width:1px;background:var(--edge)}
.ev-timeline li[data-state=active] .ev-marker{border-color:var(--primary)}
.ev-timeline li[data-state=done] .ev-marker{background:#238362;border-color:#238362}
.ev-timeline li>div{display:grid;gap:4px}
.ev-form .check-list{display:flex;flex-wrap:wrap;gap:6px 12px}
.ev-tools .segmented a[aria-pressed=true]{background:var(--soft);color:var(--primary);box-shadow:inset 0 0 0 1px var(--edge)}
.ev-tools .segmented a[aria-pressed=false]{color:var(--muted)}

.ev-sheet-identity{display:flex;align-items:center;gap:12px;margin:12px 0}
.ev-sheet-identity input{font-size:19px;font-weight:650;flex:1}
.ev-sheet-identity select{max-width:220px}
.ev-book{border:1px solid var(--edge);background:var(--card);border-radius:14px;overflow:hidden}
.ev-book>header,.ev-book>footer,.ev-sheet-tabs,.ev-book header>strong{display:flex;align-items:center;gap:9px}
.ev-book>header{justify-content:space-between;min-height:54px;padding:8px 14px;border-bottom:1px solid var(--edge)}
.ev-book header>strong{font-size:15px}
.ev-book header .btn,.ev-book footer .btn{min-height:30px;padding:3px 9px;font-size:12px}
.ev-book header [role=status],.ev-book footer small{font-size:12px;color:var(--muted)}
.ev-book>footer{border-top:1px solid var(--edge);background:var(--panel);padding:5px 9px;min-height:44px;flex-wrap:wrap}
.ev-sheet-tabs{flex-wrap:wrap}
.ev-sheet-tabs button,.ev-book .ev-tab-name{border:0;background:transparent;color:var(--muted);font-size:13px;border-radius:6px;padding:4px 10px;min-height:29px}
.ev-sheet-tabs button[aria-pressed=true]{background:var(--card);color:var(--primary);box-shadow:inset 0 -2px var(--primary)}
.ev-book .ev-tab-name{width:150px;background:var(--card);border:1px solid var(--edge)}
.ev-book footer small{margin-inline-start:auto}
.ev-book .tabulator{border:0;background:var(--card);color:var(--ink);font:inherit;min-height:120px}
.ev-book .tabulator .tabulator-header,.ev-book .tabulator .tabulator-col,.ev-book .tabulator .tabulator-frozen.tabulator-row-header{background:var(--panel);color:var(--muted);border-color:var(--edge)}
.ev-book .tabulator .tabulator-header{font-size:12px}
.ev-book .tabulator .tabulator-col-content{padding:8px}
.ev-book .tabulator-row,.ev-book .tabulator-row.tabulator-row-even,.ev-book .tabulator .tabulator-table{background:var(--card);color:var(--ink)}
.ev-book .tabulator-row .tabulator-cell{padding:8px;font-size:13px;border-color:var(--edge);border-bottom:1px solid var(--edge)}
.ev-book .tabulator-row .tabulator-cell.tabulator-editing{outline:2px solid var(--primary);outline-offset:-2px}
.ev-book .tabulator-cell input{min-height:0;background:var(--card);color:var(--ink);font:inherit}
.ev-book .tabulator-row:hover{background:color-mix(in srgb,var(--card) 95%,var(--primary))}
.event-sheet .tabulator-edit-list{background:var(--card);color:var(--ink);border:1px solid var(--edge)}
.ev-state-tag{display:inline-block;color:var(--muted);font-size:12px}
.ev-state-tag[data-value=active]{color:var(--primary)}.ev-state-tag[data-value=done]{color:var(--green)}
.ev-sheet-details{margin:0 0 12px;color:var(--muted);font-size:13px}
.ev-sheet-details summary{width:fit-content;cursor:pointer}
.ev-sheet-details .ev-form{margin-top:9px;padding:12px;max-width:680px;background:var(--panel);border-radius:10px}

.ev-book .ev-cell-prompt{color:var(--muted);font-size:12px}
.ev-book .tabulator.tabulator-rtl .tabulator-header .tabulator-col,.ev-book .tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-inline-end-color:var(--edge)}
.ev-book .tabulator .tabulator-header .tabulator-col,.ev-book .tabulator-row .tabulator-cell.tabulator-row-header{background:var(--panel);color:var(--muted)}

/* A tight gutter outside each card leaves the reading space inside it. */
@media(min-width:701px){
 .operations .board{gap:10px;padding:3px 3px 12px;scroll-behavior:auto}
 .operations .board-lane{flex:0 0 228px;min-width:0;max-width:228px}
 .operations .board-lane>.column:not(.is-collapsed){width:100%;max-width:none;padding:8px 5px;border-radius:13px}
 .operations .column:not(.is-collapsed) .column-head{gap:6px;min-height:56px;padding:3px 4px 9px;margin-block-end:5px;font-size:12px}
 .operations .column-head [data-add-status],.operations .column-head .lane-fold{width:25px;height:26px;min-height:26px}
 .operations .column:not(.is-collapsed) .desktop-status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .operations .column-list{gap:7px;padding:0;scroll-behavior:auto}
 .operations .column-list .mini-card{width:100%;margin:0;box-sizing:border-box}
 .operations .mini-card,.customer-board-held-card{padding:8px;gap:4px;border-radius:10px}
 .operations .mini-card .card-title,.customer-board-held-card .card-title{font-size:12.5px;line-height:1.4}
 .mini-card>.mini-meta{padding-block-start:5px;column-gap:4px}
 .operations .column-list .mini-top>span:first-child{max-inline-size:65%}
}
[data-stage-tone="slate"]{--stage-ink:#75869b}
[data-stage-tone="rose"]{--stage-ink:#bb477f}
[data-stage-tone="blue"]{--stage-ink:#287cb5}
[data-stage-tone="amber"]{--stage-ink:#ac711b}
[data-stage-tone="green"]{--stage-ink:#308663}
[data-stage-tone="violet"]{--stage-ink:#8e68c4}
[data-stage-tone="teal"]{--stage-ink:#21999b}
.column-head .dot[data-stage-tone]:not([data-stage-tone=""]),.stage-dot{background:var(--stage-ink)}
.stage-badge:not([data-stage-tone=""]){background:color-mix(in srgb,var(--stage-ink) 14%,var(--card))}
.toolbar-choice[data-stage-tone]:not([data-stage-tone=""]) [data-choice-symbol]{color:color-mix(in srgb,var(--stage-ink) 76%,var(--ink))}
.stage-settings{max-width:750px;padding:14px}
.stage-controls,.stage-tools,.stage-palette label{display:flex;align-items:center}
.stage-controls{justify-content:space-between;gap:8px;flex-wrap:wrap}
.stage-controls .segmented{display:inline-flex}
.stage-controls [aria-pressed="true"]{color:var(--primary);background:var(--soft)}
.stage-order{list-style:none;margin:12px 0 0;padding:0}
.stage-order li{display:flex;align-items:center;gap:10px;padding:7px 4px;border-block-start:1px solid var(--edge)}
.stage-order strong{overflow-wrap:anywhere;font-size:14px}
.stage-tools{margin-inline-start:auto;gap:4px}
.stage-tool{border:0;background:transparent;display:inline-grid;place-items:center;width:30px;height:30px;border-radius:6px;color:var(--muted)}
.stage-tool:hover:not(:disabled),.stage-tool:focus-visible{color:var(--ink);background:var(--soft)}
.stage-tool:disabled{opacity:.3}
.stage-tool .icon{width:15px;height:15px}
.stage-dot{display:inline-block;width:10px;height:10px;flex:none;border-radius:50%}
.stage-palette{display:flex;gap:5px;margin:0;padding:0;border:0}
.stage-palette legend{margin-bottom:5px}
.stage-palette label{justify-content:center;position:relative;border-radius:8px;padding:7px;cursor:pointer}
.stage-palette input{position:absolute;width:1px;height:1px;min-height:0;opacity:0}
.stage-palette .stage-dot{width:18px;height:18px}
.stage-palette label:has(:checked),.stage-palette label:focus-within{box-shadow:inset 0 0 0 2px var(--primary);background:var(--soft)}
.stage-archive{margin-block-start:12px}

.flow-choice-row[data-stage-tone]:not([data-stage-tone=""]){justify-content:flex-start;gap:8px}
.flow-choice-row[data-stage-tone]:not([data-stage-tone=""])::before{content:'';flex:none;width:8px;height:8px;border-radius:50%;background:var(--stage-ink)}
.flow-choice-row[data-stage-tone]:not([data-stage-tone=""])::after{margin-inline-start:auto}

.stage-filter-field{display:contents}

/* CRM-style content-height lanes above a transparent, full-height drop surface. */
.operations .board-lane{position:relative;isolation:isolate;min-height:max(290px,calc(100dvh - 158px));border-radius:12px}
.operations .board .board-lane>.column{
 height:auto;min-height:86px;max-height:max(290px,calc(100dvh - 158px));
 flex:none;border:0;background:color-mix(in srgb,var(--stage-ink,#75869b) 10%,var(--card));
 box-shadow:none;transition:background .18s ease;
}
html[data-theme=dark] .operations .board .board-lane>.column{
 background:color-mix(in srgb,var(--stage-ink,#75869b) 17%,var(--panel));
}
.operations .board-lane .column-head{flex-shrink:0;border:0;margin-block-end:4px}
.operations .board-lane .column-head small{background:transparent;padding-inline:3px}
.operations .board-lane .column-list{flex:0 1 auto;min-height:0;max-height:none;padding-block-end:3px}
.operations .board-lane .column-list:empty{padding:0}
.operations .board-lane.over .column-list:empty::before{content:'';display:block;height:24px;border-radius:8px;background:color-mix(in srgb,var(--stage-ink) 9%,transparent)}
.operations .board-lane::before{
 content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:14px;opacity:0;
 background:radial-gradient(ellipse at 50% 25%,color-mix(in srgb,var(--stage-ink,#75869b) 16%,transparent),transparent 78%);
 transition:opacity .18s ease;
}
.operations .board-lane.over::before{opacity:1}
.operations .board-lane.over>.column{background:color-mix(in srgb,var(--stage-ink,#75869b) 16%,var(--card))}
/* Open the same small, animated insertion space as the CRM customer board. */
.operations .board-lane .flow-card-shell{position:relative}
.operations .board-lane .flow-card-shell::before,
.operations .board-lane .flow-card-shell::after{
 content:'';display:block;height:0;margin:0;border-radius:8px;pointer-events:none;
 background:color-mix(in srgb,var(--stage-ink,#75869b) 9%,transparent);
 transition:height .22s cubic-bezier(.2,.8,.2,1),margin .22s ease;
}
.operations .board-lane .flow-card-shell.insert-before::before,
.operations .board-lane .flow-card-shell.insert-after::after{height:24px;margin-block:3px}
@media(min-width:701px){
 .operations .board-lane.is-collapsed{flex:0 0 38px;max-width:38px}
 .operations .board-lane.is-collapsed>.column{min-height:150px}
}
@media(max-width:700px){
 .operations .board-lane{display:none;min-height:0}
 .operations .board-lane:has(.mobile-current){display:block}
}
@media(prefers-reduced-motion:reduce){
 .operations .board-lane::before,.operations .board .board-lane>.column,
 .operations .board-lane .flow-card-shell::before,.operations .board-lane .flow-card-shell::after{transition:none}
}

/* Quiet scroll surfaces: wheel, trackpad and drag scrolling remain enabled. */
.operations .column-list,html:has(.operations){scrollbar-width:none}
.operations .column-list::-webkit-scrollbar,html:has(.operations)::-webkit-scrollbar{display:none}
.marsa-chrome .marsa-chrome-brand .rail-toggle{
 position:absolute;top:0;left:0;width:26px;height:26px;z-index:2;
 border:0;background:transparent;border-radius:7px;color:#d7e9ef;opacity:.65;
 transition:opacity .15s ease,background .15s ease;
}
.marsa-chrome .marsa-chrome-brand .rail-toggle:is(:hover,:focus-visible){opacity:1;background:#ffffff14}
.marsa-chrome .marsa-chrome-brand .rail-toggle svg{width:14px;height:14px}
.marsa-chrome.compact-sidebar .marsa-chrome-brand .flw-home{margin-top:24px}

.operations .column:not(.is-collapsed) .lane-status-badge{
 display:inline-flex;align-items:center;gap:4px;max-width:calc(100% - 52px);
 padding:2px 3px;border-radius:0;background:transparent;
 color:var(--stage-ink);font-size:11px;font-weight:600;line-height:1.5;
}
.lane-stage-icon{width:14px;height:14px;flex:none}
.lane-status-badge>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.operations .column-head small{color:var(--stage-ink)}
.operations .lane-add-task{
 display:flex;align-items:center;gap:4px;flex:none;width:100%;min-height:30px;
 padding:5px 7px;margin-top:3px;border:0;border-radius:7px;background:transparent;
 color:var(--stage-ink);font-size:11px;text-align:start;transition:background .15s ease;
}
.operations .lane-add-task .icon{width:14px;height:14px}
.operations .lane-add-task:is(:hover,:focus-visible){background:color-mix(in srgb,var(--stage-ink) 10%,transparent)}
.operations .column.is-collapsed .lane-stage-icon{margin-block-end:4px}

/* Shared date menu: calmer typography and consistent calendar spacing. */
dialog.flow-date-picker[open]{width:min(480px,calc(100vw - 16px));max-height:calc(100dvh - 16px);overscroll-behavior:contain;border-radius:18px;box-shadow:0 12px 36px #10263d29}
.flow-date-picker header{gap:10px;padding:12px;border-bottom-color:color-mix(in srgb,var(--edge) 65%,transparent)}
.flow-date-picker header .picker-fields{gap:8px}
.flow-date-picker .picker-fields button{min-height:48px;gap:9px;padding:8px 11px;border:1px solid var(--edge);border-radius:11px;background:var(--panel)}
.flow-date-picker .picker-fields button[aria-pressed=true]{border-color:color-mix(in srgb,var(--primary) 45%,var(--edge));background:var(--soft)}
.flow-date-picker .picker-fields button span{gap:3px;min-width:0}
.flow-date-picker .picker-fields small{font-size:10px;font-weight:400;line-height:1.4}
.flow-date-picker .picker-fields b{font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap}
.flow-date-picker header [data-close]{width:28px;height:28px;flex:none;border-radius:50%}
.flow-date-picker header [data-close]:hover{background:var(--soft)}
.flow-date-picker .picker-columns{grid-template-columns:minmax(150px,.52fr) minmax(0,1fr)}
.flow-date-picker .picker-calendar{padding:14px 12px 12px}
.flow-date-picker .date-month{gap:8px;margin-bottom:14px}
.flow-date-picker .date-month strong{font-size:14px;font-weight:600;white-space:nowrap}
.flow-date-picker .date-month .btn{height:28px;min-height:28px;width:28px;padding:5px;border:0;background:transparent;box-shadow:none}
.flow-date-picker .date-month .btn:hover{background:var(--soft)}
.flow-date-picker .date-days{gap:4px}
.flow-date-picker .date-days small{display:grid;place-items:center;height:24px;font-size:11px;font-weight:400;margin-bottom:4px}
.flow-date-picker .date-days button{min-height:34px;padding:3px;font-size:13px;font-weight:500;line-height:1;border-radius:9px}
.flow-date-picker .date-days button[aria-pressed=true]{box-shadow:0 3px 8px color-mix(in srgb,var(--primary) 20%,transparent)}
.flow-date-picker .picker-presets{gap:4px;padding:14px 8px;background:color-mix(in srgb,var(--panel) 55%,var(--card));border-inline-end-color:color-mix(in srgb,var(--edge) 65%,transparent)}
.flow-date-picker .picker-presets button{gap:8px;min-height:36px;padding:6px 8px;font-size:12px;line-height:1.5}
.flow-date-picker .picker-presets button>span{white-space:nowrap}
.flow-date-picker .picker-presets small{direction:ltr;white-space:nowrap;font-size:10px;font-variant-numeric:tabular-nums}
.flow-date-picker .picker-schedule{padding:7px 12px}
.flow-date-picker .schedule-toggle{min-height:34px;gap:8px;padding:5px 2px}
.flow-date-picker .schedule-toggle b{font-weight:500;font-size:12px}
.flow-date-picker footer{padding:10px 12px;gap:8px}
.flow-date-picker footer .btn{min-height:32px;min-width:64px;padding:5px 12px;font-size:12px;border-radius:9px}

/* Calendar details float above the grid, preserving every day's layout. */
.calendar-peek{position:fixed;z-index:70;width:300px;max-height:70dvh;overflow:auto;padding:14px;border:1px solid var(--edge);border-radius:13px;background:var(--media-fill,var(--card));color:var(--media-ink,var(--ink));box-shadow:0 14px 38px #10263d35;transform-origin:top left;cursor:grab;font-size:12px;line-height:1.65;overscroll-behavior:contain;scrollbar-width:thin}
.calendar-peek>strong{display:block;margin:10px 0;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.peek-labels,.peek-meta,.peek-people{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.peek-labels{justify-content:flex-end}.peek-labels>span,.peek-meta>span{padding:2px 6px;border-radius:6px;background:color-mix(in srgb,var(--card) 70%,transparent);font-size:10px}
.peek-meta>span{display:inline-flex;align-items:center;gap:4px}.calendar-peek .icon{width:14px;height:14px}
.peek-people{margin-top:9px;font-size:11px}.calendar-peek>p{margin-top:9px;white-space:pre-wrap;overflow-wrap:anywhere}
.peek-stages{display:grid;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid color-mix(in srgb,currentColor 15%,transparent)}
.peek-stages>div{display:grid;grid-template-columns:16px 1fr auto;align-items:start;gap:6px;font-size:11px}.peek-stages small{font-size:10px;color:inherit;opacity:.75}
.peek-check{width:14px;height:14px;margin-top:2px;border:1px solid currentColor;border-radius:50%;opacity:.5}.peek-check.done{border:0;opacity:1;color:var(--green)}
.calendar-card.preview-source,.calendar-card.drag-source-hidden{opacity:0!important}
.calendar-card.customer-board-held-card{margin:0;min-height:44px;pointer-events:none}
.calendar-drop-slot{height:44px;margin-bottom:5px;border-radius:8px;background:color-mix(in srgb,var(--primary) 9%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--primary) 12%,transparent);pointer-events:none}
.day.calendar-drop-over{background:color-mix(in srgb,var(--primary) 5%,var(--card))}

/* Completion is visible without hovering, with a much quieter material tint. */
.completion-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:50%;color:var(--green);background:color-mix(in srgb,var(--green) 10%,var(--card));vertical-align:middle;font-style:normal}
.completion-mark .icon{width:12px;height:12px}
.mini-top:has(.completion-mark){position:relative;padding-inline-start:24px;min-height:25px}
.mini-top>.completion-mark{position:absolute;inset-inline-start:0;top:2px}
.card-title>.completion-mark,.work-slot strong>.completion-mark{margin-inline-end:5px}
html[data-theme] :is(.calendar-card,.work-card,.work-slot).is-complete,html[data-theme] .operations .mini-card.is-complete{
 background:color-mix(in srgb,var(--media-accent,var(--muted)) 5%,var(--card));
 color:var(--muted);border-color:color-mix(in srgb,var(--edge) 60%,var(--card));
}
.is-complete .mini-progress{opacity:.45}
.calendar-peek.is-complete{background:var(--card);color:var(--muted)}

/* Keep the home workspace still; scroll the board and its lanes only. */
html:has(#page.operations[data-route=home]){overscroll-behavior:none;overflow:hidden}
.layout:has(#page.operations[data-route=home]){height:100dvh;min-height:0;overflow:hidden}
.main:has(>#page.operations[data-route=home]){display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden}
.main:has(>#page.operations[data-route=home])>.topbar{flex:none}
#page.operations[data-route=home]{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;overflow:hidden;padding-bottom:8px}
#page.operations[data-route=home]>.board-daybar{flex:none}
#page.operations[data-route=home]>.home-stories-layout{flex:1;min-height:0;align-items:stretch;overflow:hidden}
#page.operations[data-route=home] .board{flex:1;min-height:0;height:100%;overflow:auto;overscroll-behavior:none;scrollbar-width:none}
#page.operations[data-route=home] .board-lane{min-height:100%;height:100%}
#page.operations[data-route=home] .board-lane>.column{max-height:100%}
#page.operations[data-route=home] .column-list{overscroll-behavior-y:contain}
#page.operations[data-route=home] .home-side-rail{min-height:0;align-content:start;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
#page.operations[data-route=home]>.list,#page.operations[data-route=home] .home-stories-layout>.list{min-height:0;overflow:auto;overscroll-behavior:contain}
.board-daybar{flex-wrap:wrap}
.board-date-strip{display:flex;align-items:center;gap:3px;flex:1;min-width:260px;max-width:560px;overflow:hidden;height:var(--bar-height,44px);padding:3px;border:1px solid #dfe7e9;border-radius:14px;background:linear-gradient(100deg,#e5f39c 0%,#d9e9db 38%,#dce8f4 100%);direction:ltr}
.board-date-track{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;overscroll-behavior:none;flex:1;min-width:0;direction:ltr}
.board-date-track::-webkit-scrollbar{display:none}
.board-date-strip button{border:0;background:transparent;border-radius:10px;color:#233542;padding:2px 5px}
.board-date-strip>button{display:grid;place-items:center;width:14px;height:32px;flex:none;opacity:.6}
.board-date-strip>button .icon{width:12px;height:12px;transform:rotate(90deg)}
.board-date-strip>button:last-child .icon{transform:rotate(-90deg)}
.board-date-track>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 88px;height:36px;padding:0 8px;background:#6e8ea322;border:1px solid transparent;line-height:1;white-space:nowrap;transition:background .16s ease,box-shadow .16s ease}
.board-date-track small{font-size:10px;font-weight:400;opacity:.75}.board-date-track bdi{font-size:24px;font-weight:700;letter-spacing:-1px;line-height:1;font-variant-numeric:tabular-nums}
.board-date-strip button:hover{background:#ffffff70}
.board-date-track>[aria-pressed=true]{color:#7963b8;background:#fff;box-shadow:0 2px 7px #5d658b12}
.board-date-track>[data-today]:not([aria-pressed=true]){box-shadow:inset 0 -2px #768c55}
[data-theme=dark] .board-date-strip{background:linear-gradient(100deg,#364631,#263f44 42%,#273e56);border-color:var(--edge)}
[data-theme=dark] .board-date-strip button{color:#d9e6ee}
[data-theme=dark] .board-date-track>button{background:#b7d1e31a}
[data-theme=dark] .board-date-strip button:hover{background:#c7dbeb30}
[data-theme=dark] .board-date-track>[aria-pressed=true]{background:#eae7f5;color:#63508f}
@media(prefers-reduced-motion:reduce){.board-date-track>button{transition:none}}

#dialog .sheet-toolbar .toolbar-choice[data-choice=project_id]{flex:0 0 auto;min-width:112px;max-width:170px;justify-content:space-between;gap:9px;padding-inline:11px}
#dialog .toolbar-choice[data-choice=project_id] [data-choice-symbol]{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500}
.calendar-peek{cursor:pointer}
.peek-head{display:flex;align-items:center;gap:8px;min-height:26px}
.peek-head .peek-labels{margin-inline-start:auto}
.peek-complete{display:grid;place-items:center;width:26px;height:26px;flex:none;padding:0;border:1px solid var(--edge);border-radius:8px;background:var(--card);color:inherit;transition:background .15s,color .15s}
.peek-complete:hover{background:#23835e;color:white;border-color:transparent}
.peek-complete:disabled{opacity:.5;cursor:wait}

/* Compact card details share the same checklist rhythm as daily stories. */
.mini-card .mini-back{min-height:0;gap:8px;padding-block:5px 2px}
.mini-card .mini-description .mini-back{padding-block:0 4px;font-size:11px;line-height:1.65}
.mini-card .mini-parent-title{display:flex;align-items:center;gap:4px;min-width:0;color:inherit;opacity:.82;font-size:10px;line-height:1.5}
.mini-card .mini-parent-title .icon{width:11px;height:11px;flex:none}
.mini-card .mini-parent-title bdi{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan-add-actions>[hidden]{display:none}
.mini-card .mini-description p{margin:0}
.mini-card .mini-priority>span{display:none}
.mini-card .mini-publication{display:flex;align-items:center;gap:5px;font-size:10px;opacity:.8}
.mini-card .mini-publication .icon{width:12px;height:12px}
.mini-card .mini-dates{display:grid;gap:5px;font-size:10px}
.mini-card .mini-dates>a,.mini-card .mini-dates>div{display:flex;align-items:center;justify-content:space-between;gap:6px;color:inherit;text-decoration:none}
.mini-card .mini-dates span{display:inline-flex;align-items:center;gap:4px;opacity:.75}
.mini-card .mini-dates bdi{white-space:nowrap;font-weight:500}
.mini-card .mini-dates .icon{width:12px;height:12px}
.mini-card .mini-dates>a:hover{color:var(--primary);text-decoration:underline;text-underline-offset:3px}
.mini-card .mini-warning{color:var(--red,#b33f56);font-size:10px}
.card-checklist{margin:0;padding-block-start:9px;border-block-start:1px solid color-mix(in srgb,currentColor 13%,transparent)}
.card-checklist>header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:10px;font-weight:500;opacity:.8}
.card-checklist>header bdi{font-variant-numeric:tabular-nums}
.card-checklist-rows{display:grid;gap:5px}
.card-checklist .card-checklist-row,.mini-card .card-checklist-row.rail-stage{display:flex;align-items:center;gap:7px;width:100%;min-width:0;padding:7px 8px;border:1px solid color-mix(in srgb,currentColor 6%,transparent);border-radius:6px;background:color-mix(in srgb,var(--card) 50%,transparent);color:inherit;font-size:11px;line-height:1.5;text-align:start;box-shadow:none}
.card-checklist button.card-checklist-row:hover{background:color-mix(in srgb,var(--card) 78%,transparent)}
.checklist-circle{display:grid;place-items:center;width:15px;height:15px;flex:none;border:1px solid color-mix(in srgb,currentColor 32%,transparent);border-radius:50%;opacity:.75}
.checklist-circle .icon{width:10px;height:10px}
.card-checklist-row[data-state=done]{opacity:.6}
.card-checklist-row[data-state=done] .checklist-title{text-decoration:line-through;text-decoration-color:color-mix(in srgb,currentColor 40%,transparent)}
.card-checklist-row[data-state=done] .checklist-circle{background:color-mix(in srgb,currentColor 10%,transparent);border-color:transparent}
.card-checklist-row[data-state=active] .checklist-circle{opacity:1}
.checklist-title{min-width:0;overflow-wrap:anywhere;font-weight:500}
.calendar-peek .card-checklist{margin-top:12px}

.story-panel.story-checklist{gap:7px;padding:12px;background:color-mix(in srgb,var(--panel) 95%,#808080)}
.story-checklist .story-checklist-head{display:flex;align-items:center;gap:7px}
.story-checklist-head strong{flex:1}
.story-checklist-head>bdi{padding:2px 6px;background:var(--card);border-radius:5px;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.story-checklist .story-date{font-size:10px;color:var(--muted)}
.story-checklist .story-group{padding-block-start:9px;margin-top:2px}
.story-checklist .story-group>header{margin-bottom:7px;font-size:10px}
.story-checklist .story-group>header a{color:var(--muted);font-weight:500}
.story-checklist-rows{display:grid;gap:5px}
.story-checklist .story-row{padding:7px 8px;gap:8px;background:var(--card);border:1px solid color-mix(in srgb,var(--edge) 60%,transparent);border-radius:6px;transition:background .15s ease}
.story-checklist .story-row:hover{background:color-mix(in srgb,var(--primary) 4%,var(--card))}
.story-checklist .story-row>button{display:grid;justify-content:start;gap:2px;padding:0;font-size:11px;line-height:1.5}
.story-checklist .story-row>button small{font-size:9px;color:var(--muted)}
.story-check{position:relative;display:grid;place-items:center;flex:0 0 17px;width:17px;height:17px;cursor:pointer}
.story-checklist .story-check input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.story-check>span{display:grid;place-items:center;width:17px;height:17px;border:1px solid var(--edge);border-radius:50%;color:transparent;pointer-events:none}
.story-check .icon{width:11px;height:11px}
.story-check input:checked+span{color:var(--green);background:color-mix(in srgb,var(--green) 9%,var(--card));border-color:color-mix(in srgb,var(--green) 35%,var(--edge))}
.story-check input:focus-visible+span{box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)}
.story-row:has(input:checked)>button{opacity:.5}
.story-row:has(input:checked)>button>span{text-decoration:line-through}
.story-checklist .story-empty{font-size:11px;padding-block:5px}
.story-checklist .story-jump{font-size:10px;text-align:end;margin-top:2px}

/* Publication is distinct from production completion. */
.calendar-card .progress-mark{color:inherit;background:color-mix(in srgb,currentColor 8%,transparent)}
html[data-theme] .calendar-card[data-calendar-state=published]{background:color-mix(in srgb,var(--media-accent,var(--muted)) 2%,var(--card));border-color:color-mix(in srgb,var(--edge) 45%,var(--card));color:color-mix(in srgb,var(--muted) 62%,var(--card));cursor:pointer}
.calendar-card[data-calendar-state=published] .completion-mark{opacity:.45}
html[data-theme] .calendar-card[data-calendar-state=overdue]{border-color:#d8667980;box-shadow:0 0 0 2px #d9576e19,0 0 9px #d9576e24}
html[data-theme] .calendar-card[data-calendar-state=overdue]:hover{box-shadow:0 0 0 2px #d9576e30,0 0 12px #d9576e38}
.calendar-peek[data-calendar-state=overdue]{border-color:#d8667999;box-shadow:0 0 0 2px #d9576e24,0 12px 35px #10263d30}

/* A direct settings destination, with one persistent section index. */
.flow-settings-page{display:grid;grid-template-columns:210px minmax(0,1fr);gap:18px;align-items:start}
.settings-index{position:sticky;top:90px;background:var(--card);border:1px solid var(--edge);border-radius:14px;padding:14px 10px}
.settings-index h2{font-size:14px;padding:5px 10px 14px;border-bottom:1px solid var(--edge);margin-bottom:8px}
.settings-index nav{display:grid;gap:4px}
.settings-index a{display:flex;align-items:center;gap:9px;min-height:40px;padding:9px 10px;border-radius:8px;color:var(--muted);font-size:12px;text-decoration:none;transition:background .15s,color .15s}
.settings-index a .icon{width:16px;height:16px}
.settings-index a:hover,.settings-index a[aria-current=page]{background:var(--soft);color:var(--primary)}
.settings-index a[aria-current=page]{font-weight:700}
.settings-content{min-width:0}
@media(max-width:760px){
 .flow-settings-page{grid-template-columns:minmax(0,1fr);gap:12px}
 .settings-index{position:static;min-width:0;padding:10px}
 .settings-index h2{padding:2px 6px 8px}
 .settings-index nav{display:flex;overflow-x:auto;gap:4px;overscroll-behavior-x:contain}
 .settings-index a{flex:0 0 auto;min-height:44px;white-space:nowrap}
 .settings-content .page-head{flex-wrap:wrap;gap:10px}
 .settings-content .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .settings-content .table-wrap table{min-width:600px}
}
.settings-content .page-head{min-height:50px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--edge)}
.settings-content .page-head h1{font-size:18px}
.settings-content .stage-settings{max-width:none;padding:0;overflow:hidden}
.settings-content .stage-controls{padding:14px;border-bottom:1px solid var(--edge)}
.settings-table,.directory-company table{width:100%;border-collapse:collapse;text-align:start;font-size:12px}
.settings-table th,.settings-table td,.directory-company th,.directory-company td{padding:12px 14px;border-bottom:1px solid var(--edge);text-align:start}
.settings-table thead,.directory-company thead{background:var(--panel);color:var(--muted);font-size:11px}
.settings-table tbody tr:last-child td,.directory-company tbody tr:last-child td{border-bottom:0}
.settings-table tbody tr:hover,.directory-company tbody tr:hover{background:var(--panel)}
.settings-table strong{font-size:13px}
.settings-table .stage-tools{margin:0}
.stage-sort{display:flex;gap:2px}
.stage-sort button:disabled{cursor:default}
.stage-archive{padding:12px 14px}
.workspace-directory{display:grid;gap:14px}
.directory-company{border:1px solid var(--edge);border-radius:14px;background:var(--card);overflow:hidden}
.directory-company>header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--edge)}
.directory-company h2{font-size:14px;display:flex;align-items:center;gap:8px}
.directory-company h2 .icon{width:17px;height:17px;color:var(--muted)}
.directory-company h2 small{font-size:11px;background:var(--soft);padding:2px 6px;border-radius:6px}
.directory-company .btn,.settings-content .page-head .btn{min-height:34px;padding:6px 11px;font-size:12px}
.directory-company .icon-btn{width:32px;min-height:32px;padding:6px}
.directory-empty{padding:20px 14px;color:var(--muted);font-size:12px}
.workspace-editor{display:grid;gap:20px}
.workspace-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.workspace-fields [hidden]{display:none}
.workspace-plan{padding-top:16px;border-top:1px solid var(--edge)}
.workspace-plan>header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}
.workspace-plan h3{display:flex;align-items:center;gap:8px;font-size:14px}
.workspace-plan>header input{width:174px}
.workspace-quotas{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.workspace-editor .field{font-size:12px;gap:6px}
.workspace-editor input,.workspace-editor select{font-size:13px;min-height:38px;padding:8px 10px}

/* Shared feedback lives in the browser top layer, including over modal backdrops. */
#toast[popover]{position:fixed;inset:auto auto 20px 20px;margin:0;width:max-content;max-width:min(420px,calc(100vw - 40px));padding:12px 18px;border:1px solid #ffffff30;border-radius:14px;background:#224e40;color:#fff;box-shadow:0 12px 32px #10223726;opacity:0;transform:translateY(8px);pointer-events:none;direction:rtl;text-align:start;font-size:13px;line-height:1.6;transition:opacity .2s ease,transform .2s var(--ease)}
#toast[popover].show{opacity:1;transform:translateY(0);animation:flow-toast-in .24s var(--ease) both}
#toast[popover].error{background:#8e3456}
#toast::backdrop{background:transparent;backdrop-filter:none;pointer-events:none}
@keyframes flow-toast-in{from{opacity:0;transform:translate(-6px,10px)}to{opacity:1;transform:translate(0,0)}}
.content-sheet tbody[data-sheet-day]>tr.sheet-complete>td:not([rowspan]),
.content-sheet tbody[data-sheet-day]>tr.sheet-complete>td[rowspan="1"]{background:color-mix(in srgb,var(--green) 13%,var(--card))}
.sheet-published-check{display:inline-flex;vertical-align:middle;margin-inline-start:7px;color:var(--green)}
.sheet-published-check svg{width:15px;height:15px}
.content-sheet tbody[data-sheet-day]>tr.sheet-empty-day>td{padding-block:0;vertical-align:middle}
.sheet-empty-content{height:26px;display:flex;align-items:center;overflow:hidden;color:color-mix(in srgb,var(--muted) 55%,var(--card));transition:height .2s var(--ease),color .18s ease}
.sheet-empty-day .sheet-add{min-height:24px;height:24px;width:28px;opacity:0;transition:opacity .18s ease}
.sheet-empty-day:is(:hover,:focus-within) .sheet-empty-content{color:var(--muted)}
.sheet-empty-day:is(:hover,:focus-within) .sheet-add{opacity:1}
.sheet-empty-day:hover .sheet-empty-content{height:52px;transition-delay:.5s}
.sheet-empty-day:focus-within .sheet-empty-content{height:52px;transition-delay:0s}
@media(prefers-reduced-motion:reduce){#toast[popover],#toast[popover].show{animation:none;transition:none}.sheet-empty-content{transition-duration:0s}}

/* Friday is a quiet day marker; material status colours take precedence. */
.content-sheet tbody[data-sheet-day].is-friday{--day-fill:color-mix(in srgb,var(--red) 6%,var(--card))}
.calendar-grid>.day.is-friday{background:color-mix(in srgb,var(--red) 6%,var(--card))}
.calendar-grid>.day.is-friday.today{background:color-mix(in srgb,var(--red) 9%,var(--soft))}
.weekdays>.is-friday{color:var(--red);background:color-mix(in srgb,var(--red) 6%,var(--card))}
.content-sheet tbody[data-sheet-day]>tr.sheet-ready>td:not([rowspan]),
.content-sheet tbody[data-sheet-day]>tr.sheet-ready>td[rowspan="1"]{background:color-mix(in srgb,#e5a12e 15%,var(--card))}

/* Follow-up relationships share one compact control in work details and sheet rows. */
.record-follow-links{display:grid;gap:8px;padding:12px;border:1px solid var(--edge);border-radius:12px;background:var(--card)}
.follow-links-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}
.follow-links-head>span{display:inline-flex;align-items:center;gap:6px}
.follow-links-head .btn{min-height:30px;padding:4px 9px;font-size:12px;gap:5px}
.follow-links-head .icon,.follow-chip .icon{width:14px;height:14px}
[data-follow-chips]{display:flex;gap:6px;flex-wrap:wrap}
[data-follow-chips]:empty{display:none}
.follow-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:7px;background:var(--soft);font-size:12px}
.follow-chip.is-done{color:var(--green)}
.follow-chip button{display:inline-grid;place-items:center;border:0;background:transparent;padding:3px;color:var(--muted)}
.follow-link-popup[popover]{position:fixed;inset:auto;margin:0;padding:12px;border:1px solid var(--edge);border-radius:15px;background:var(--card);color:var(--ink);box-shadow:0 16px 42px #10223730;direction:rtl}
.follow-link-popup input:not([type=checkbox]){min-height:34px;font-size:12px;padding:6px 9px}
[data-follow-options]{max-height:220px;overflow:auto;margin-block:8px;overscroll-behavior:contain}
.follow-link-popup label,.follow-work-options label{display:flex;align-items:center;gap:9px;padding:8px;border-radius:8px;font-size:12px;cursor:pointer}
.follow-link-popup label:hover,.follow-work-options label:hover{background:var(--soft)}
.follow-link-popup label>span,.follow-work-options label>span{display:grid;gap:2px}
.follow-link-popup small,.follow-work-options small{font-size:10px;color:var(--muted)}
.follow-new-item{display:flex;gap:6px;border-top:1px solid var(--edge);padding-top:10px}
.follow-new-item .btn{min-height:34px;width:34px;padding:7px;flex-shrink:0}
.follow-no-items{display:block;padding:10px}
[data-follow-error]:empty{display:none}
[data-follow-error]{color:var(--red)}
.follow-work-picker{position:relative}
.follow-work-picker>summary{display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;font-size:12px;padding:7px 9px;border-radius:8px}
.follow-work-picker>summary::-webkit-details-marker{display:none}
.follow-work-picker>summary>.icon{width:14px;height:14px}
.follow-work-picker>summary>.icon:last-child{margin-inline-start:auto}
.follow-work-options{max-height:230px;overflow:auto;min-width:220px;border:1px solid var(--edge);border-radius:10px;padding:4px;background:var(--card)}
.sheet-editor{border:1px solid var(--edge);border-radius:12px;gap:12px;box-shadow:0 4px 14px #10223708}
.sheet-editor-head{font-size:12px;gap:8px}
.sheet-editor-head strong{font-weight:600}
.sheet-editor-head span{font-size:11px}
.sheet-editor .sheet-change-date{display:flex;align-items:center;gap:8px;max-width:none;justify-self:start;font-size:11px}
.sheet-editor .sheet-change-date input{width:160px;min-height:32px;font-size:12px;padding:5px 8px}
.sheet-editor details>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;padding:9px 14px;border:1px solid var(--edge);border-radius:9px;font-size:12px}
.sheet-editor details>summary::-webkit-details-marker{display:none}
.sheet-editor details>summary::after{content:'⌄';font-size:15px;line-height:1;padding-inline:4px;color:var(--muted)}
.sheet-editor details[open]>summary::after{transform:rotate(180deg)}
.sheet-editor details>.planner{padding-top:10px}
.sheet-editor .sheet-actions{border-top:1px solid var(--edge);padding-top:10px;gap:6px}
.sheet-editor .sheet-actions .btn{min-height:30px;padding:5px 11px;font-size:12px;border-radius:8px}
.select-wrap>select{padding-inline-end:34px}
.select-wrap>svg.icon{inset-inline-end:12px;pointer-events:none}
select:not(.select-wrap select){appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2372859e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:left 12px center;padding-inline-end:34px}

/* Compact settings administration: shared rows and restrained actions. */
.settings-content .accounts-grid{gap:16px}
.settings-content .account-group{padding:16px;border:1px solid var(--edge);box-shadow:none}
.settings-content .account-group h2{display:flex;align-items:center;gap:8px;margin:0;padding-block-end:12px;font-size:14px}
.settings-content .account-group h2 small{padding:2px 7px;border-radius:8px;background:var(--surface);font-size:12px}
.settings-content .account-line{padding:13px 0;gap:12px}
.settings-content .account-line strong{font-size:13px}
.settings-content .account-line small{font-size:11px;line-height:1.7}
.settings-content .account-line .btn,.settings-content .account-tools .btn{min-height:32px;padding:6px 10px;font-size:12px;border-radius:10px}
.settings-content .account-tools{padding-block:12px;margin-block-start:16px;border-block-start:1px solid var(--edge);gap:8px}


.official-vault {
  max-width: 68rem;
  margin-inline: auto;
  color: var(--ink);
}
.official-vault header, .vault-tools, .vault-edit footer, .vault-list button, .vault-edit h3 {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.official-vault header {
  justify-content: space-between;
  border-block-end: 1px solid var(--edge);
  padding-block: .5rem 1rem;
  margin-block-end: 1.25rem;
}
.official-vault header h1 {font-size: 1.45rem}
.official-vault [role=alert]:not(:empty) {padding: .75rem; color: var(--red)}
.vault-gate, .vault-edit, .vault-list, .official-vault details {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.vault-gate {
  display: grid;
  gap: 1rem;
  width: min(100%, 25rem);
  margin: clamp(2rem, 8vh, 6rem) auto;
  padding: 1.75rem;
  background: linear-gradient(150deg, var(--soft), transparent 42%), var(--card);
}
.vault-emblem {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px; background: var(--soft); color: var(--primary);
}
.vault-emblem svg {width: 24px; height: 24px}
.official-vault label {display: grid; gap: .4rem; align-content: start; color: var(--muted); font-size: .82rem}
.official-vault input, .official-vault select {color: var(--ink); min-width: 0}
.vault-gate small {line-height: 1.7}
.vault-tools {flex-wrap: wrap; margin-block-end: .8rem}
.vault-tools select {width: min(100%, 13rem)}
.vault-tools input {flex: 1 1 14rem}
.vault-list {overflow: hidden}
.vault-list button {
  width: 100%; justify-content: space-between; padding: .85rem 1rem;
  border: 0; border-radius: 0; text-align: start; background: transparent;
}
.vault-list button + button {border-block-start: 1px solid var(--edge)}
.vault-list button:is(:hover,:focus-visible) {background: var(--soft)}
.vault-list span {padding: .2rem .65rem; border-radius: 20px; background: var(--panel); color: var(--muted)}
.vault-list p {padding: 2rem; text-align: center; color: var(--muted)}
.vault-edit {padding: 1.25rem; display: grid; gap: 1rem}
.vault-edit h2 {font-size: 1.1rem}
.vault-edit section {padding: 1rem; border-radius: 12px; background: var(--panel)}
.vault-edit h3 {font-size: .9rem; margin-block-end: .85rem}
.vault-edit h3 svg {color: var(--primary); width: 16px}
.vault-fields {display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .85rem 1rem}
.vault-input {position: relative}
.vault-input:has([data-reveal]) input {padding-inline-end: 4rem}
.vault-input [data-reveal] {
  position: absolute; inset-inline-end: .4rem; top: 50%; transform: translateY(-50%);
  border: 0; background: var(--soft); color: var(--primary); border-radius: 7px; padding: .25rem .5rem;
}
.vault-edit footer {border-block-start: 1px solid var(--edge); padding-block-start: 1rem}
.official-vault details {padding: 1rem; margin-block-start: 1rem}
.official-vault summary {cursor: pointer}
.official-vault details p {padding-block: .65rem; border-block-end: 1px solid var(--edge)}
.official-vault time {color: var(--muted)}
.prep-page {max-width:76rem;margin:auto}
.prep-groups,.prep-picks,.prep-home {display:grid;gap:.65rem}
.prep-group,.prep-form fieldset {background:var(--card);border:1px solid var(--edge);border-radius:12px;padding:.85rem}
.prep-group summary,.prep-stage,.prep-form footer {display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.prep-group summary {cursor:pointer}.prep-group summary small,.prep-form footer button{margin-inline-start:auto}
.prep-group section {margin:1rem .4rem .3rem;padding-inline-start:.8rem;border-inline-start:2px solid var(--edge)}
.prep-stage {margin-block:.4rem}.prep-stage select{width:auto;margin-inline-start:auto}.prep-group h3{font-size:.92rem}
.prep-fields{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}.prep-picks{margin-block:1rem;max-height:40vh;overflow:auto}
.prep-picks label{display:flex;align-items:center;gap:.4rem;padding:.3rem}.prep-picks legend{font-weight:bold}

.prep-summary-card{display:grid;gap:.35rem;text-decoration:none;color:inherit;padding:.7rem;border:1px solid var(--line);border-radius:.7rem;background:var(--panel);transition:box-shadow .18s,transform .18s}
.prep-summary-card strong{display:flex;align-items:center;gap:.4rem}
.prep-summary-card small,.prep-summary-card span{font-size:.78rem}
.prep-summary-card progress{width:100%;height:4px;accent-color:var(--accent)}
.prep-peek{display:grid;grid-template-rows:0fr;transition:grid-template-rows .2s}
.prep-peek>div{min-height:0;overflow:hidden;display:grid;gap:.25rem}
.prep-summary-card:is(:hover,:focus-visible){transform:translateY(-1px);box-shadow:0 4px 12px #15294215}
.prep-summary-card:is(:hover,:focus-visible) .prep-peek{grid-template-rows:1fr}
@media(prefers-reduced-motion:reduce){.prep-summary-card,.prep-peek{transition:none}}
