:root{color-scheme:light;--ink:#132b35;--accent:#bd6a42;--muted:#607078;--line:#dce3e5;--paper:#f4f6f5}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 system-ui,-apple-system,sans-serif}header,main,footer{max-width:1120px;margin:auto;padding:24px}header{display:flex;align-items:center;justify-content:space-between;gap:16px}.brand{color:var(--ink);text-decoration:none;font-size:22px;font-weight:800;letter-spacing:.08em}.brand span{font-size:14px;font-weight:500;letter-spacing:0}#connection{font-size:13px;color:var(--muted)}h1{font-size:clamp(28px,5vw,42px);line-height:1.2;margin:12px 0 24px;letter-spacing:-.035em}h2{font-size:22px;line-height:1.3;margin:0 0 12px}p{color:var(--muted)}.eyebrow{text-transform:uppercase;font-size:12px;letter-spacing:.13em;font-weight:700;color:var(--accent)}.panel,.card{background:white;border:1px solid var(--line);border-radius:18px;padding:28px}.panel{margin-bottom:20px}#login-panel{max-width:540px;margin:40px auto}form{display:grid;gap:10px}label{font-weight:600;font-size:14px}input,button{font:inherit;min-height:48px;border-radius:10px}input{padding:10px 14px;border:1px solid #98a7ae;width:100%}button{border:0;background:var(--ink);color:white;padding:10px 20px;cursor:pointer;font-weight:600}button:disabled{opacity:.6;cursor:wait}button.secondary{background:white;color:var(--ink);border:1px solid var(--line)}:focus-visible{outline:3px solid var(--accent);outline-offset:3px}.toolbar,.summary{display:flex;gap:20px;justify-content:space-between;align-items:center}.summary p{margin-bottom:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.card p{margin:8px 0}.card ul{padding-left:20px;font-size:14px}.integrations{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.badge{border:1px solid var(--line);border-radius:999px;padding:6px 12px;background:white;font-size:13px}#message{max-width:700px;margin:20px auto}footer{font-size:13px;color:var(--muted)}[hidden]{display:none!important}@media(max-width:600px){header,main,footer{padding:18px}.toolbar,.summary{align-items:flex-start;flex-direction:column}.panel,.card{padding:22px}#login-panel{margin:20px auto}.brand{font-size:18px}}


.record-form{margin-top:16px}.record-form fieldset{border:1px solid var(--line);border-radius:10px;padding:12px}.record-form fieldset label{display:flex;align-items:center;gap:8px;font-weight:400}.record-form input[type=checkbox]{width:20px;min-height:20px;margin:0}.record-form select{display:block;width:100%;min-height:48px;font:inherit;background:white;border:1px solid var(--line);border-radius:10px;padding:8px}.record-results dl{border-top:1px solid var(--line);padding-top:12px;display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,2fr);gap:4px 12px;font-size:14px}.record-results dt{font-weight:600}.record-results dd{margin:0;overflow-wrap:anywhere}.pagination{display:flex;gap:8px;flex-wrap:wrap}.pagination button{font-size:14px;padding:8px 12px}

.project-config{grid-column:1/-1}.project-config form{margin-top:18px}.project-config fieldset{border:1px solid var(--line);border-radius:12px;padding:16px}.project-config input[type=checkbox],.record-form input[type=checkbox]{width:18px;min-height:18px;vertical-align:middle;margin-right:8px}.project-config legend{font-weight:700}.record-results dd{overflow-wrap:anywhere;white-space:pre-wrap}

/* Operations workspace: one module at a time, with the same controls on phone and desktop. */
main,header,footer{max-width:1440px}.operations-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;align-items:start}.module-nav{display:grid;gap:6px;position:sticky;top:16px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px}.nav-button{text-align:left;background:transparent;color:var(--ink);font-size:14px;padding:12px;overflow-wrap:anywhere}.nav-button[aria-current=page]{background:var(--ink);color:#fff}.module-content{min-width:0}.dashboard>h2{font-size:28px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.stat{display:grid;gap:8px;padding:20px;margin:0}.stat strong{font-size:32px;line-height:1}.stat span{font-size:13px;color:var(--muted)}.module-card{display:grid;gap:12px;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:24px;text-align:left;align-content:start}.module-card strong{font-size:21px}.module-card>span:last-child{font-size:13px;color:var(--muted)}.module-card:hover{border-color:var(--accent)}.query-controls{display:flex;gap:16px;align-items:end}.query-controls label{min-width:200px}.query-controls select{margin-top:6px}.record-form{margin-bottom:20px}.record-form details{border-bottom:1px solid var(--line);padding-bottom:12px}.record-form summary,.project-config summary{cursor:pointer;font-weight:600}.record-form fieldset{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px}.page-tools{display:flex;align-items:end;gap:16px;justify-content:space-between}.page-tools label{flex:1}.page-tools input{margin-top:6px}.record-list{display:grid;gap:10px;margin-bottom:18px}.record-row{background:white;color:var(--ink);border:1px solid var(--line);padding:18px;display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,2fr) auto;gap:16px;align-items:center;text-align:left}.record-row:hover{border-color:var(--accent);background:#fafbfb}.record-row strong{overflow-wrap:anywhere}.record-preview{display:grid;gap:4px;font-size:13px;color:var(--muted);min-width:0}.record-preview>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.record-action{font-size:13px;white-space:nowrap;color:var(--accent)}dialog{color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:28px;width:min(760px,calc(100vw - 32px));max-height:85dvh;overflow:auto}dialog::backdrop{background:#132b3599}.detail-fields{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2fr);gap:16px;padding-top:16px}.detail-fields dt{font-weight:600;overflow-wrap:anywhere}.detail-fields dd{margin:0;min-width:0}.detail-fields pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.6 system-ui,sans-serif}.project-config fieldset{max-height:460px;overflow:auto}.module-browser{margin:0}.module-browser .toolbar{margin-bottom:12px}button:disabled{cursor:default}#message{padding:12px 16px;border-left:3px solid var(--accent);background:#fff;font-size:14px}#message:empty{display:none}@media(max-width:900px){.operations-layout{grid-template-columns:1fr}.module-nav{position:static;display:flex;overflow-x:auto;border-radius:12px;gap:6px}.nav-button{flex-shrink:0;white-space:nowrap}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}.record-row{grid-template-columns:1fr}.record-preview{grid-template-columns:repeat(2,minmax(0,1fr))}.record-action{justify-self:end}}@media(max-width:600px){.stats{grid-template-columns:1fr}.stat{display:flex;align-items:center;gap:18px}.query-controls,.page-tools{flex-direction:column;align-items:stretch}.query-controls label{min-width:0}.record-preview{grid-template-columns:1fr}.detail-fields{grid-template-columns:1fr;gap:6px}.detail-fields dd{margin-bottom:12px}dialog{padding:20px}.module-browser .toolbar{flex-direction:row;align-items:center}.module-browser h2{font-size:20px}.module-browser .badge{font-size:11px;white-space:nowrap}}

.diagnostics{margin:12px 0 20px;font-size:13px}.diagnostics summary{cursor:pointer;color:var(--muted)}@media(max-width:600px){header{padding-bottom:8px}#workspace>.toolbar{flex-direction:row;align-items:center;gap:12px;margin-bottom:16px}#workspace>.toolbar h1{font-size:24px;margin:6px 0}#workspace>.toolbar .eyebrow{margin:0}#logout{font-size:12px;padding:8px 10px;flex-shrink:0}#workspace>.summary{flex-direction:row;align-items:center;gap:12px;padding:16px;margin-bottom:8px}#workspace>.summary h2{font-size:18px;margin:0}#workspace>.summary p{display:none}#refresh{font-size:13px;padding:8px 12px}.diagnostics{margin:8px 0 16px}}

.global-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.schema-panel{border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:18px}.schema-panel summary{cursor:pointer;font-weight:600}.schema-panel>button{margin-top:12px}.inspection-view{font-size:14px;overflow-wrap:anywhere}.inspection-view li{margin-bottom:8px}.action-schema{border-top:1px solid var(--line);padding:12px 0}.inspection-view ul{padding-left:20px}@media(max-width:600px){.global-filter{grid-template-columns:1fr}.schema-panel{padding:12px}}

.editor-form{display:grid;gap:1rem}.edit-field input:not([type=checkbox]),.edit-field select,.edit-field textarea{width:100%;max-width:100%;box-sizing:border-box}.edit-field textarea{font:inherit}.edit-field fieldset{margin:1rem 0;min-width:0}.edit-review pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:16rem;overflow:auto}.edit-review article,.audit-entry{border-bottom:1px solid #ccd5d8;padding:1rem 0}.edit-field p{font-size:.85rem}

.module-browser .toolbar{flex-wrap:wrap}.module-browser .toolbar h2{min-width:0;overflow-wrap:anywhere}.edit-field input[type=checkbox]{width:18px;min-height:18px;margin-right:8px}@media(max-width:600px){.module-browser .toolbar>button{flex-basis:100%}}

.related-panel{border-top:1px solid var(--line);padding-top:16px}.related-panel details,.media-picker{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:10px}.related-panel button,.media-picker button{margin:8px 0;max-width:100%;overflow-wrap:anywhere}.related-panel details>div:not(.pagination),.media-picker>div:not(.pagination){display:grid;gap:8px}.related-panel summary,.media-picker summary{cursor:pointer;font-weight:600;overflow-wrap:anywhere}
/* Superadmin work view: list state remains mounted while a record is open. */
[hidden]{display:none!important}main{max-width:1480px}.list-tools{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.list-tools button{font-size:13px;padding:9px 12px}.browser-listing>.record-form{margin-bottom:8px}.browser-listing .query-controls{gap:10px}.browser-listing .page-tools{margin:12px 0}.tool-sheet{position:fixed;inset:0 0 0 auto;margin:0;width:min(520px,100vw);height:100dvh;max-height:100dvh;border-radius:16px 0 0 16px;padding:24px;overflow:auto}.tool-sheet details{border:0;padding:0;margin:18px 0}.tool-sheet summary{display:none}.tool-sheet fieldset{max-height:none}.record-heading{display:flex;flex-wrap:wrap;gap:12px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:16px}.record-heading .record-identity{flex:1;min-width:160px}.record-heading h2{margin:4px 0;overflow-wrap:anywhere}.record-heading .eyebrow{margin:0}.record-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:24px;margin-top:20px}.record-information,.record-connections{min-width:0}.record-connections{border-left:1px solid var(--line);padding-left:20px}.record-connections .related-panel{border-top:0;padding-top:0}.connection-panel details{border:1px solid var(--line);padding:12px;border-radius:10px;margin-bottom:12px}.connection-panel button{max-width:100%;overflow-wrap:anywhere;margin:8px 0}.connection-panel details>div:not(.pagination){display:grid;gap:8px}.record-tabs{display:none}.operations-layout.reading-record:not(.nav-expanded){grid-template-columns:64px minmax(0,1fr)}.reading-record:not(.nav-expanded) .nav-button{font-size:0;padding:12px 6px;min-width:0}.reading-record:not(.nav-expanded) .nav-button::before{content:attr(data-short);font-size:12px;font-weight:700}.nav-collapse{display:none;width:100%;padding:10px 4px;margin-bottom:8px}.reading-record .nav-collapse{display:block}.connection-wizard{display:grid;gap:14px;max-width:720px;margin-top:24px}.connection-wizard>button{width:fit-content}.connection-wizard input[type=checkbox]{width:18px;min-height:18px;margin-right:8px}.connection-config select,.connection-wizard input:not([type=checkbox]){width:100%}.connection-wizard pre{white-space:pre-wrap;overflow-wrap:anywhere}.audit-entry>button{margin:6px 8px 6px 0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:1000px){.record-columns{grid-template-columns:minmax(0,1fr)}.record-connections{border-left:0;border-top:1px solid var(--line);padding:16px 0 0}.operations-layout.reading-record:not(.nav-expanded){grid-template-columns:1fr}.reading-record:not(.nav-expanded) .module-nav .nav-button{display:none}.reading-record .module-nav{padding:8px;display:block}.reading-record .nav-collapse{width:auto;margin:0}.reading-record.nav-expanded .module-nav{display:flex}.record-tabs{display:flex;gap:8px;margin-top:16px}.record-tabs button[aria-pressed=true]{background:var(--ink);color:white}.record-columns .mobile-inactive{display:none}.record-heading{align-items:flex-start}.record-heading>button{font-size:13px}.tool-sheet{border-radius:0}.record-columns{gap:0}.module-browser{padding:18px}.record-workspace .detail-fields{padding-top:8px}}

.active-filters{font-size:13px;color:var(--muted);padding:8px 12px;background:#f2f5f6;border-radius:8px;overflow-wrap:anywhere}

.related-record-card {padding:1rem;border:1px solid var(--border,#d9e2e6);border-radius:12px;margin:.65rem 0;overflow-wrap:anywhere} .related-record-card p {margin:.4rem 0} .routine-config label,.portfolio label,.connection-wizard label {display:block;margin:.75rem 0} .routine-config label input,.portfolio label input,.portfolio label select {display:block;width:100%;margin-top:.35rem} .routine-config input[type=checkbox] {display:inline;width:auto} .portfolio button,.connection-wizard>button {margin:.4rem .4rem .4rem 0}

#workspace>.toolbar{flex-wrap:wrap}#workspace>.toolbar>div{min-width:0}#workspace>.toolbar label{min-width:0}#project-picker{max-width:100%;font:inherit;padding:8px;border:1px solid var(--line);border-radius:8px}@media(max-width:600px){#workspace>.toolbar{flex-direction:column;align-items:stretch}#workspace>.toolbar>button{width:100%}#project-picker{display:block;width:100%}}

/* Guided routines: context stays visible while configuring the plan. */
.routine-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:12px;margin:20px 0}.routine-template{border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}.routine-template h4{margin-top:0}.routine-template button{max-width:100%;overflow-wrap:anywhere}.routine-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,320px);gap:24px;align-items:start;margin-top:24px}.routine-layout .connection-wizard{max-width:none;margin-top:0}.routine-builder,.routine-help{min-width:0;overflow-wrap:anywhere}.routine-help{position:sticky;top:16px;background:#f2f5f6;border:1px solid var(--line);border-radius:12px;padding:16px}.routine-help h3{margin-top:0}.routine-help h4{margin-bottom:8px}.routine-help ul{padding-left:20px}.routine-progress{display:flex;flex-wrap:wrap;list-style:none;padding:0;gap:8px;font-size:13px}.routine-progress li{padding:6px;border-radius:6px;background:#f2f5f6}.routine-progress li[aria-current=step]{background:var(--ink);color:white}.routine-builder fieldset{min-width:0;border:1px solid var(--line);border-radius:12px;margin:16px 0;padding:12px}.routine-builder legend{font-weight:600}.routine-builder input:not([type=checkbox]),.routine-builder select{width:100%;max-width:100%;box-sizing:border-box}.routine-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.routine-actions button,.routine-preview button{max-width:100%;overflow-wrap:anywhere}.routine-preview{border-top:1px solid var(--line);margin-top:20px}.routine-record-details dd{margin:0 0 12px;overflow-wrap:anywhere}.routine-confirm{padding:12px;background:#f2f5f6}.routine-confirm button{margin:6px}.routine-preview pre{white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:1100px){.routine-layout{grid-template-columns:1fr}.routine-help{position:static}.routine-catalog{grid-template-columns:1fr}}

.related-record-card>strong,.related-record-card>small{display:block}.related-record-card>small{margin-top:4px;color:var(--muted)}

.role-config label{display:block;margin:10px 0}.role-config input:not([type=checkbox]),.role-config select{display:block;width:100%;margin-top:6px}.role-config input[type=checkbox]{width:18px;min-height:18px;vertical-align:middle}.role-config fieldset{min-width:0;border:1px solid var(--line);border-radius:12px;margin:16px 0;padding:16px}.role-field-row{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px;border-top:1px solid var(--line);overflow-wrap:anywhere}.role-config form>button{margin:8px 8px 8px 0}.role-config legend{font-weight:600}

.portfolio-tabs{display:flex;gap:8px;flex-wrap:wrap}.portfolio-tabs button[aria-pressed=true]{background:var(--ink);color:white}.portfolio-sheet label{display:block;margin:16px 0}.portfolio-sheet input,.portfolio-sheet select{display:block;width:100%;margin-top:6px}.portfolio-sheet dd{margin:4px 0 14px;overflow-wrap:anywhere}.portfolio-sheet dt{font-weight:600}.portfolio-sheet button{margin:6px 8px 6px 0;max-width:100%;overflow-wrap:anywhere}.portfolio-sheet li{margin-bottom:12px}.portfolio-sheet form{min-width:0}

.routine-json{border-bottom:1px solid var(--line);padding-bottom:24px}.routine-json-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%;padding:10px;border:1px solid var(--line);border-radius:8px}.routine-json-source{display:block;width:100%;max-width:100%;box-sizing:border-box;margin-top:8px;padding:12px;font:13px/1.5 monospace;resize:vertical;min-height:240px}.routine-json pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f5f6;padding:12px;border-radius:8px}.routine-json table{table-layout:fixed;width:100%;font-size:13px}.routine-json td,.routine-json th{vertical-align:top;overflow-wrap:anywhere;padding:8px}.routine-json .routine-builder>button{margin:8px 8px 8px 0}

.team-workspace label{display:block;margin:14px 0}.team-workspace input,.team-workspace select,.team-workspace textarea{display:block;width:100%;max-width:100%;margin-top:6px}.team-workspace textarea{min-height:100px;font:13px/1.5 monospace}.team-workspace button{margin:8px 8px 8px 0}.team-workspace .audit-entry{overflow-wrap:anywhere}

/* Shared experience: visible context, global navigation and project workspace. */
.global-nav{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:0 0 16px;margin-bottom:24px}
.global-nav a{display:block;padding:10px 18px;border-radius:10px;text-decoration:none;color:var(--ink);font-weight:600;background:white;border:1px solid var(--line)}
.global-nav a[aria-current=page]{background:var(--ink);color:white;border-color:var(--ink)}
.workspace-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.workspace-header h1{font-size:30px;margin:8px 0}.workspace-header .eyebrow{margin:0}.header-actions{display:flex;gap:8px;flex-wrap:wrap}.header-actions button{font-size:14px}
#breadcrumbs{font-size:13px;color:var(--muted);margin-top:8px}#breadcrumbs a{color:var(--muted);text-underline-offset:3px}
.project-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:8px 0}.project-bar p{font-size:13px;margin:0}.project-bar button{font-size:13px;min-height:38px;padding:7px 12px}
.module-nav{max-height:calc(100dvh - 32px);overflow:auto}.nav-group{font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin:16px 8px 4px;font-weight:700}.reading-record:not(.nav-expanded) .nav-group{display:none}
#project-dialog{width:min(740px,calc(100vw - 32px))}#project-dialog label{display:block;margin:20px 0}#project-options button{min-height:80px}
.editor-page{margin-top:20px;max-width:820px;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}.editor-page h3{font-size:24px}.editor-page form>button{justify-self:start}.portfolio>section:not(.editor-page){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px}.portfolio>section>h3,.portfolio>section>button,.portfolio>section>p{grid-column:1/-1;justify-self:start}.portfolio .audit-entry{border:1px solid var(--line);border-radius:14px;padding:20px;min-width:0}.portfolio-sheet{width:100%;height:auto;position:static}.portfolio-sheet input,.portfolio-sheet select,.team-workspace select{font:inherit;padding:10px;border:1px solid var(--line);border-radius:10px}
.config-module{border:1px solid var(--line);border-radius:12px;margin:12px 0;padding:14px}.config-module>summary{cursor:pointer}.config-module fieldset{border:0;max-height:none;margin:12px 0 0}.project-config>summary{font-size:24px}.project-config form>button{position:sticky;bottom:12px;justify-self:start;box-shadow:0 4px 18px #132b3522}
#workspace button:hover:not(:disabled){filter:brightness(.96)}
@media(max-width:900px){.module-nav{max-height:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));position:static;overflow:visible}.nav-group{grid-column:1/-1}.nav-button{white-space:normal}.operations-layout{gap:16px}.workspace-header{align-items:flex-start}}
@media(max-width:600px){.workspace-header{flex-direction:column}.workspace-header h1{font-size:25px}.header-actions{width:100%}.header-actions button{flex:1}.global-nav{flex-wrap:nowrap;overflow-x:auto}.global-nav a{white-space:nowrap;padding:8px 12px;font-size:14px}.project-bar{align-items:flex-start}.project-bar p{font-size:11px}.project-bar button{flex-shrink:0}.editor-page{padding:16px}.portfolio{padding:18px}.module-nav .nav-button{font-size:13px}.module-nav{padding:8px}.reading-record.nav-expanded .module-nav{display:grid}}

.record-columns.single-column{grid-template-columns:minmax(0,1fr)}

/* Application navigation: primary dock and contextual project menu. */
.ui-icon{width:20px;height:20px;flex-shrink:0;display:inline-block;vertical-align:middle}.global-nav a,.nav-button,.header-actions button,.sheet-heading button,#refresh,#project-close{display:flex;align-items:center;gap:10px}.control-label{min-width:0;overflow-wrap:anywhere}
.global-nav{width:fit-content;max-width:100%;background:#fff;border:1px solid var(--line);border-radius:18px;padding:6px;gap:4px;margin-bottom:20px;box-shadow:0 4px 16px #132b3507}.global-nav a{border:0;background:transparent;border-radius:12px;padding:10px 16px;font-size:14px}.global-nav a[aria-current=page]{background:#e8efef;color:var(--ink)}.global-nav .dock-menu{display:none}
.workspace-header{margin-bottom:14px}.workspace-header h1{font-size:28px;margin:6px 0}.workspace-header .header-actions{gap:6px}.workspace-header .eyebrow{letter-spacing:.04em;font-size:11px}#breadcrumbs{font-size:12px}.header-actions button{font-size:13px;padding:8px 12px;min-height:44px}.project-bar{justify-content:flex-end;gap:12px}.project-bar #updated{margin-right:auto}.diagnostics{font-size:12px;margin:4px 0 12px}
.module-nav{padding:12px;gap:6px;background:#fff;max-height:calc(100dvh - 32px);overflow:auto}.module-nav>input{min-height:40px;font-size:13px;padding:8px 10px;max-width:100%;margin:4px 0 8px}.module-nav>button{width:100%}.nav-section{border-top:1px solid var(--line);padding-top:10px;margin-top:6px;min-width:0}.nav-section>summary{cursor:pointer;font-size:12px;font-weight:700;color:var(--muted);padding:8px 6px;list-style:none;display:flex;align-items:center;justify-content:space-between}.nav-section>summary::after{content:'›';font-size:18px;transition:transform .15s}.nav-section[open]>summary::after{transform:rotate(90deg)}.nav-section>.nav-button{width:100%;margin:3px 0;font-weight:500;font-size:13px;min-height:44px}.nav-button[aria-current=page]{background:#e8efef;color:var(--ink);font-weight:700}.nav-button[aria-current=page] .ui-icon{color:var(--accent)}.nav-button{line-height:1.4}.module-nav .nav-collapse{margin:0 0 8px}
.reading-record:not(.nav-expanded) .module-nav>input,.reading-record:not(.nav-expanded) .module-nav>.secondary:not(.nav-collapse),.reading-record:not(.nav-expanded) .nav-section>summary{display:none}.reading-record:not(.nav-expanded) .nav-button::before{content:none}.reading-record:not(.nav-expanded) .nav-button{justify-content:center;padding:10px 4px}.reading-record:not(.nav-expanded) .nav-button .control-label,.reading-record:not(.nav-expanded) .nav-collapse .control-label{display:none}.reading-record:not(.nav-expanded) .nav-section{border:0;padding:0}.reading-record .nav-collapse{display:flex;align-items:center;justify-content:center;gap:8px}
.app-sheet{width:min(500px,calc(100vw - 24px));padding:24px}.sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.sheet-heading h2{margin:0}.sheet-heading button{min-height:44px;padding:8px}.sheet-heading button .control-label{display:none}.navigation-sheet{position:fixed;inset:0 auto 0 0;margin:0;height:100dvh;max-height:100dvh;width:min(360px,100vw);border-radius:0 20px 20px 0;overflow:auto}.navigation-sheet .module-nav{position:static;display:grid;grid-template-columns:1fr;max-height:none;border:0;padding:0;overflow:visible}.navigation-sheet .nav-collapse{display:none}.navigation-sheet .nav-section>summary{display:flex}.navigation-sheet .nav-button{display:flex;justify-content:flex-start;font-size:14px}.navigation-sheet .control-label{display:inline}.menu-empty{font-size:13px;margin:8px}
#message{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:min(600px,calc(100vw - 32px));z-index:20;margin:0;border-radius:12px;box-shadow:0 8px 32px #132b3520}
@media(max-width:900px){.operations-layout,.operations-layout.reading-record:not(.nav-expanded){grid-template-columns:minmax(0,1fr)}.operations-layout>.module-nav{display:none}.workspace-header{flex-direction:row}.header-actions button .control-label{display:none}.header-actions button{padding:10px;min-width:44px;justify-content:center}.workspace-header .header-actions{width:auto;flex-wrap:nowrap}.navigation-sheet .module-nav{display:grid}.record-heading>button{display:flex;gap:6px}}
@media(max-width:600px){body{padding-bottom:calc(98px + env(safe-area-inset-bottom))}header{padding:12px 16px;position:sticky;top:0;background:#f4f6f5ed;backdrop-filter:blur(16px);z-index:10}main{padding:12px 16px}header .brand{font-size:17px}#connection{font-size:11px}.workspace-header{align-items:center;gap:8px;margin:4px 0 14px}.workspace-header h1{font-size:24px}.workspace-header .eyebrow{font-size:10px}#breadcrumbs{font-size:11px;line-height:1.4}.header-actions button{padding:8px;min-width:42px;min-height:44px}.global-nav{position:fixed;bottom:calc(10px + env(safe-area-inset-bottom));left:12px;right:12px;z-index:30;width:auto;max-width:none;margin:0;display:flex;justify-content:space-around;overflow:visible;padding:6px;background:#ffffffed;backdrop-filter:blur(18px);border-radius:22px;box-shadow:0 10px 40px #132b3520;gap:0}.global-nav a,.global-nav .dock-menu{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 3px;min-width:0;min-height:58px;border:0;border-radius:16px;background:transparent;color:var(--muted);font-size:10px;line-height:1.2;font-weight:600}.global-nav .ui-icon{width:22px;height:22px}.global-nav a[aria-current=page]{color:var(--ink);background:#e8efef}.global-nav.in-project .dock-menu{color:var(--ink);background:#e8efef}.global-nav .control-label{white-space:nowrap}.project-bar #updated{font-size:10px}.project-bar #refresh .control-label{display:none}.project-bar #refresh{padding:8px;min-width:40px;justify-content:center}.navigation-sheet{inset:auto 0 0;margin:0;width:100%;height:88dvh;max-height:88dvh;border-radius:24px 24px 0 0;padding:22px 20px calc(24px + env(safe-area-inset-bottom))}.app-sheet:not(.navigation-sheet){border-radius:20px;padding:20px}#message{bottom:calc(100px + env(safe-area-inset-bottom));font-size:13px}.nav-section>.nav-button{min-height:46px}.navigation-sheet .nav-button{white-space:normal}.navigation-sheet .sheet-heading{position:sticky;top:-22px;background:#fff;padding:10px 0;z-index:1}}
@media(prefers-reduced-motion:reduce){.nav-section>summary::after{transition:none}}

/* Shared task views. A new action replaces the body; it never appends a second task. */
.screen-flow { min-width:0; }
.screen-header { display:flex; flex-wrap:wrap; align-items:center; gap:.8rem; margin-bottom:1.5rem; }
.screen-header h2 { flex:1; margin:0; min-width:180px; }
.screen-header p { flex-basis:100%; margin:0; color:var(--muted,#627582); }
.screen-back { display:inline-flex; align-items:center; gap:.6rem; flex:none; }
.screen-body { min-width:0; }
.screen-menu { display:grid; gap:.65rem; }
.screen-menu-item { display:flex; align-items:center; justify-content:space-between; gap:1rem; text-align:left; width:100%; padding:1rem 1.2rem; background:#fff; color:#16303c; border:1px solid #dfe7eb; border-radius:12px; }
.screen-menu-item:hover { background:#f3f7f8; border-color:#a9bec8; }
.screen-menu-item > span:first-child { display:grid; gap:.35rem; }
.screen-menu-item small { color:#627582; font-weight:400; line-height:1.5; }
.screen-menu-item > span:last-child { font-size:1.5rem; }
.screen-disclosure { border:1px solid #dfe7eb; border-radius:10px; padding:.85rem 1rem; margin:1rem 0; }
.screen-disclosure summary { cursor:pointer; font-weight:600; }
.screen-body form { display:grid; gap:1rem; }
.screen-body label { display:grid; gap:.45rem; }
.screen-body select { width:100%; min-height:44px; padding:.6rem; border:1px solid #b8c9d3; border-radius:8px; background:#fff; color:#16303c; }
.screen-body .routine-layout { align-items:start; }
.screen-body .routine-help { position:static; }
@media(max-width:700px) { .screen-header { align-items:flex-start; } .screen-back { width:auto; } .screen-header h2 { flex-basis:100%; } }
.screen-body label:has(> input[type="checkbox"]),
.screen-body label:has(> input[type="radio"]) { display:flex; align-items:center; }
.screen-body label > input[type="checkbox"],
.screen-body label > input[type="radio"] { flex:none; width:auto; }
