/* 1.2 / CONTACT SHEET
   The frame stays put. Long records scroll inside their own, labelled area.
   No zoom tricks, hidden data, tiny type, or fixed-height clipped forms. */
:root{--sidebar:78px;--page-pad:24px;}
body{background:var(--paper);font-size:14px;}
[hidden]{display:none!important;}
button,input,select,textarea{font:inherit;}
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--ink);outline-offset:3px;}
button,input,select,textarea{accent-color:var(--ink);}
button{touch-action:manipulation;}
::selection{background:var(--acid);color:var(--ink);}
.shell{height:100dvh;min-height:0;}
.sidebar{width:var(--sidebar);padding:20px 10px 12px;gap:14px;height:100dvh;overflow:visible;background:var(--surface);color:var(--ink);}
.sidebar .brand{padding:0 0 10px;justify-content:center;}
.sidebar .brand img{width:32px;height:32px;}
.sidebar .brand-text{display:none;}
.nav{gap:4px;min-height:0;overflow-y:auto;overflow-x:visible;scrollbar-width:thin;}
.nav-link{height:55px;padding:8px 3px;gap:5px;font-size:11px;letter-spacing:0;border-radius:2px;justify-content:center;}
.nav-link svg{width:19px;height:19px;}
.nav-link.active{background:var(--ink);color:var(--acid);}
.rail-more{position:static;}
.rail-more-menu{left:70px;bottom:98px;z-index:40;min-width:120px;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);}
.sidebar-bottom{margin-top:auto;padding-top:8px;}
.profile-mini{padding:10px 0 0;justify-content:center;gap:4px;flex-wrap:wrap;}
.profile-mini .profile-text{display:none;}

.workspace{height:100dvh;min-height:0;min-width:0;display:grid;grid-template-rows:54px minmax(0,1fr);overflow:hidden;margin-left:var(--sidebar);}
.topbar{height:54px;min-height:54px;padding:0 var(--page-pad);background:var(--paper);gap:16px;border-bottom:1px solid var(--line);position:relative;z-index:20;}
.topbar .btn{min-height:32px;}
.topbar-date{font-size:11px;color:var(--muted);}
.breadcrumb{font-size:12px;}
.search-trigger{height:30px;padding:0 8px;border:0;}
.content{height:100%;width:100%;max-width:none;min-height:0;padding:20px var(--page-pad);overflow:hidden;display:flex;flex-direction:column;animation:none;}
.content>.page-section,.content>.journal,.content>.agent-workspace{flex:1;min-height:0;min-width:0;height:100%;display:flex;flex-direction:column;}
.page-heading{flex-shrink:0;min-height:48px;align-items:center;gap:16px;margin:0 0 16px;}
.page-heading h1{font-family:var(--sans);font-size:34px;font-weight:820;letter-spacing:-.055em;line-height:1.1;margin:3px 0 0;}
.page-heading .eyebrow{font-size:9px;letter-spacing:.12em;}
.page-heading p{font-size:12px;line-height:1.5;margin:6px 0 0;color:var(--muted);}
.eyebrow{font-size:10px;letter-spacing:.08em;font-weight:600;}
.btn{font-size:12px;min-height:34px;padding:7px 12px;border-radius:3px;gap:7px;line-height:1.3;}
.btn.primary{background:var(--acid);border-color:var(--acid);color:var(--ink);}
.btn.primary:hover{background:var(--accent-hover);color:var(--ink);border-color:var(--accent-hover);}
.btn.small{font-size:11px;min-height:28px;padding:5px 9px;}
.btn.text{min-height:28px;padding:4px 5px;}
.icon-btn{height:32px;width:32px;}
.toolbar{flex-shrink:0;min-height:38px;margin:0 0 12px;gap:12px;}
.toolbar .search-field{height:36px;max-width:320px;}
.search-field input{min-height:32px;font-size:12px;}
.filter-select,.compact-select,.period-select select{min-height:34px;padding:5px 26px 5px 10px;font-size:12px;}
.segmented{padding:3px;border-radius:3px;background:#f5f5f5;}
.segmented button{min-height:27px;padding:4px 10px;font-size:11px;border-radius:2px;}
.segmented .active{background:var(--ink);color:var(--acid);}
.section-heading{margin:0 0 12px;gap:10px;align-items:center;}
.section-heading h2,.section-heading h3{font-size:14px;font-weight:720;margin:0;}
.quiet-footer,.basis-note{font-size:11px;margin:8px 0 0;flex-shrink:0;line-height:1.5;}
.empty-state{padding:25px 16px;min-height:0;}
.empty-state h3{font-size:17px;margin:12px 0 6px;font-weight:650;}
.empty-state p{font-size:12px;margin:0 0 12px;}
.empty-viewfinder{width:48px;height:40px;margin:0;}
.table-wrap{min-height:0;max-height:100%;overflow:auto;scrollbar-width:thin;}
.data-table th{font-size:10px;letter-spacing:.03em;padding:10px 12px;position:sticky;top:0;z-index:2;background:var(--paper);}
.data-table td{padding:12px;line-height:1.5;font-size:12px;}


.data-table .cell-amount{font-size:13px;}
.data-table .avatar{width:25px;height:25px;font-size:10px;}
.data-table .progress-track{width:65px;margin-top:6px;}
.pagination{padding:9px 0 0;margin:0;font-size:11px;min-height:32px;}
.projects-page [data-projects]{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;}
.projects-page [data-projects]>.table-wrap{flex:1;}
.projects-page [data-pagination]{flex-shrink:0;}
.project-board{height:100%;min-height:0;overflow:auto;gap:14px;padding-bottom:4px;}
.board-column{min-height:0;overflow-y:auto;scrollbar-width:thin;}
.board-column-head{position:sticky;top:0;background:var(--paper);z-index:2;padding:10px 0;}
.project-card{padding:13px;margin-bottom:10px;}
.project-card h3{font-size:15px;margin:7px 0;}
.project-card p{font-size:11px;}
.content [data-roster],.content [data-list],.availability-list{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;}
.roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.person-card{min-height:0;padding:20px;display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;position:relative;}
.person-portrait{height:64px;width:64px;font-size:35px;margin:0;}
.person-description h2{font-size:22px;margin:4px 0;}
.person-description .eyebrow{font-size:9px;}
.person-index{position:absolute;right:12px;top:12px;font-size:10px;}
.person-numbers{grid-column:1/-1;gap:10px;margin-top:8px;padding-top:12px;display:grid;grid-template-columns:repeat(3,1fr);}
.person-numbers strong{font-size:16px;}
.person-numbers span,.person-numbers small{font-size:10px;}
.person-arrow{display:none;}
.resource-row{padding:18px 8px;gap:18px;min-height:92px;}




.availability-row{padding:16px;min-height:80px;}
/* The desk: one typographic lead, not another grid of equal cards. */
.journal-header{display:flex;justify-content:space-between;align-items:center;margin:0 0 20px;padding:0;border:0;flex-shrink:0;min-height:50px;}
.journal-header h1{font:820 42px/1 var(--sans);letter-spacing:-.07em;margin:2px 0 0;}
.journal-header .eyebrow{font-size:9px;}




.next-take{margin:0;padding:26px 23px 18px;min-height:0;display:flex;flex-direction:column;justify-content:space-between;background:var(--acid);color:var(--ink);border:0;border-radius:0;overflow:auto;position:relative;gap:18px;}
.next-take:before{content:"";position:absolute;left:11px;top:11px;width:9px;height:9px;border-left:1px solid currentColor;border-top:1px solid currentColor;opacity:.6;}
.next-take:after{content:"";position:absolute;right:11px;bottom:11px;width:9px;height:9px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;opacity:.6;}






.next-take h2{font:820 clamp(25px,2.25vw,39px)/1.22 var(--sans);letter-spacing:-.055em;margin:0 0 17px;max-width:none;overflow-wrap:anywhere;color:var(--ink);}
.next-take p{font-size:12px;margin:0;color:var(--ink);display:flex;align-items:flex-start;gap:6px;line-height:1.7;opacity:.75;}
.next-take p svg{flex-shrink:0;margin-top:3px;}



















.agenda-row{grid-template-columns:52px minmax(0,1fr) auto;gap:13px;padding:20px 0;min-height:97px;}
.agenda-time strong{font:500 18px/1 var(--mono);letter-spacing:-.055em;}
.agenda-time small{font-size:10px;margin-top:6px;}
.agenda-kicker{font-size:9px;gap:5px;}
.agenda-title{font-size:16px;line-height:1.45;letter-spacing:-.01em;font-weight:720;margin:3px 0 6px;}
.agenda-meta{font-size:10px;gap:4px;}
.agenda-side{gap:7px;}
.agenda-side .avatar{width:24px;height:24px;font-size:9px;}
.agenda-side .tag,.agenda-side .badge{font-size:9px;padding:3px 5px;}








.delivery-notes{flex:1;min-height:0;display:flex;flex-direction:column;}
.delivery-notes .section-heading{justify-content:space-between;flex-shrink:0;gap:7px;}
.delivery-notes .section-heading h2{font-size:12px;}











/* Calendar: six rows in the available frame. A +N button retains every job. */
.calendar-page{min-height:0;}
.calendar-page .page-heading{margin-bottom:10px;}
.calendar-page .calendar-summary{flex-shrink:0;min-height:25px;margin:0 0 7px;font-size:11px;}
.calendar-page [data-controls]{flex-shrink:0;}
.calendar-controls{padding:0;margin-bottom:10px;gap:12px;min-height:38px;}
.calendar-heading{gap:10px;}
.calendar-heading h2,.calendar-heading h1{font-size:22px;line-height:1.1;margin:0;}
.calendar-page [data-calendar]{flex:1;min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden;}
.calendar-board{display:flex;flex-direction:column;flex:1;min-height:0;background:var(--surface);overflow:hidden;border:1px solid var(--line);border-radius:0;}
.calendar-weekdays{flex-shrink:0;min-width:0;height:25px;background:var(--paper);}
.calendar-weekdays span{font-size:10px;padding:6px 10px;text-align:left;}
.calendar-grid{flex:1;min-height:0;min-width:0;grid-template-rows:repeat(6,minmax(0,1fr));height:100%;}
.calendar-cell{min-height:0;height:auto;overflow:hidden;padding:4px 5px;border-bottom:1px solid var(--line);}
.calendar-day-head{height:21px;margin-bottom:2px;justify-content:space-between;padding:0 1px;}
.calendar-date{font:500 11px/1 var(--mono);width:20px;height:19px;border-radius:0;}
.calendar-cell.today .calendar-date{background:var(--ink);color:var(--acid);}
.calendar-cell.today:after{display:none;}
.calendar-cell.selected{background:var(--surface);box-shadow:inset 0 0 0 2px var(--ink);}
.calendar-event{height:20px;min-height:20px;max-height:20px;margin:0 0 2px;padding:2px 4px;gap:4px;font-size:10px;border-radius:1px;line-height:1;}
.calendar-event .event-time{font-size:9px;}
.calendar-more{display:block;font:10px/16px var(--sans);height:17px;padding:0 3px;color:var(--ink);font-weight:650;}
.calendar-block-dot{font-size:9px;}
.calendar-agenda{max-width:none;min-height:0;overflow:auto;flex:1;padding-right:10px;scrollbar-width:thin;}
.calendar-agenda .agenda-day-label{padding:12px 0;font-size:11px;position:sticky;top:0;background:var(--paper);z-index:2;border-bottom:1px solid var(--line);}
.calendar-agenda .agenda-row{padding:17px 0;min-height:90px;}
.schedule-scroll{height:100%;min-height:0;max-height:none;overflow:auto;flex:1;overscroll-behavior:contain;}
.schedule-header{position:sticky;top:0;background:var(--paper);z-index:5;}
.day-col-head{font-size:10px;padding:5px;}
.day-col-head strong{font-size:18px;margin-top:3px;}
/* Finance: selected month left, yearly exposure right. Detail remains one click away. */
.finance-content{flex:1;min-height:0;display:flex;flex-direction:column;overflow:auto;scrollbar-width:thin;}
.finance-overview{display:grid;grid-template-columns:minmax(275px,.78fr) minmax(0,1.3fr);grid-template-rows:minmax(0,1fr) auto minmax(0,.85fr) 24px;gap:18px 30px;min-height:0;height:100%;}
.revenue-hero{grid-column:1;grid-row:1;padding:0;display:flex;flex-direction:column;align-items:stretch;gap:15px;border:0;background:transparent;min-width:0;min-height:0;overflow:auto;}
.revenue-hero h2{font-size:12px;margin:7px 0;}
.revenue-number{font:500 clamp(31px,3.7vw,58px)/1.05 var(--mono);letter-spacing:-.09em;margin:10px 0;color:var(--ink);overflow-wrap:anywhere;}

.revenue-aside{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-width:0;border:0;padding:0;margin:auto 0 0;}
.revenue-aside>div{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;}
.revenue-aside span{font-size:9px;line-height:1.4;}
.revenue-aside strong{font:500 13px/1.3 var(--mono);overflow-wrap:anywhere;}
.finance-statline{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:0;padding:16px 0;border-top:1px solid var(--ink);border-bottom:1px solid var(--line);}
.finance-statline>div{padding:0;border:0;min-width:0;}
.finance-statline span{font-size:10px;}
.finance-statline strong{font:500 23px/1.1 var(--mono);letter-spacing:-.07em;margin-top:7px;overflow-wrap:anywhere;}
.finance-statline strong small{font-size:11px;}
.finance-chart-section{grid-column:2;grid-row:1;min-height:0;margin:0;padding:0 0 0 27px;border:0;border-left:1px solid var(--line);display:flex;flex-direction:column;}
.finance-chart-section .section-heading{margin:0 0 7px;flex-shrink:0;}
.finance-chart-section .section-heading h3{font-size:12px;}
.finance-chart-section .section-heading small{font-size:9px;}




.income-bar{background:#f5f5f5;width:100%;border-radius:0;display:block;min-height:0;}



.finance-chart-section .form-hint{font-size:9px;margin:6px 0 0;}
.finance-bottom-grid{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.3fr);gap:30px;margin:0;padding:0;min-height:0;}
.finance-bottom-grid>section{padding:0;min-height:0;overflow:auto;border:0;scrollbar-width:thin;}
.finance-bottom-grid>section+section{padding-left:27px;border-left:1px solid var(--line);}
.finance-bottom-grid .section-heading{margin:0 0 5px;}
.finance-bottom-grid h3{font-size:12px;}

.finance-bottom-grid p{font-size:10px;margin:5px 0 8px;}
.finance-bottom-grid .simple-row{padding:8px 0;min-height:42px;font-size:11px;}
.finance-bottom-grid .simple-row strong{font-size:11px;}
.finance-bottom-grid .simple-row small{font-size:9px;}

.accounting-basis{grid-column:1/-1;grid-row:4;text-align:left;justify-self:start;margin:0;padding:0;font-size:10px;border:0;}



.finance-content>.table-wrap{flex:1;}
.finance-page .tabs{gap:12px;}
.tab{padding:7px 3px;font-size:12px;}
/* Settings are a horizontal control strip. Each area owns its scroll. */
.settings-page>.page-heading{margin-bottom:13px;min-height:43px;}
.settings-page>.page-heading h1{font-size:31px;}
.settings-layout{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;}
.settings-aside{display:flex;flex-direction:row;align-items:center;gap:6px;flex-shrink:0;border:0;border-bottom:1px solid var(--line);padding:0 0 10px;margin:0;overflow-x:auto;scrollbar-width:thin;}
.settings-link{font-size:12px;line-height:1.2;padding:8px 13px;min-height:32px;width:auto;white-space:nowrap;margin:0;border-radius:2px;flex-shrink:0;}
.settings-main{min-height:0;flex:1;max-width:none;overflow:auto;scrollbar-width:thin;padding:0 3px 0 0;}
.settings-main>h2,.settings-main>.stack>h2,.settings-form h2{font-size:19px;margin-bottom:8px;line-height:1.3;}
.settings-form{max-width:700px;gap:13px;}
.settings-form .field{gap:5px;}
.field{font-size:12px;gap:6px;line-height:1.4;}
.field input,.field select{min-height:36px;height:36px;font-size:13px;padding:7px 10px;border-radius:3px;background:var(--surface);}
.field textarea{font-size:13px;padding:8px 10px;border-radius:3px;min-height:64px;}
.field input:read-only{background:#f5f5f5;color:var(--muted);}
.field small,.form-hint{font-size:10px;line-height:1.7;}
.field-row{gap:14px;}
.stack{gap:14px;}
.form-actions{padding-top:5px;}
.check-line{font-size:12px;gap:8px;}
.check-line input{width:15px;height:15px;min-height:0;}
.settings-notes{margin-top:20px;padding-top:12px;font-size:11px;border-top:1px solid var(--line);}
.settings-notes summary{cursor:pointer;font-size:11px;color:var(--muted);}
.member-row{padding:15px 0;gap:15px;font-size:12px;}
.member-row strong{font-size:14px;}
.member-row small{font-size:11px;}
.audit-row{padding:13px 0;gap:12px;}
.audit-row small{font-size:10px;}
.account-identity{padding:12px 0;font-size:13px;}
.settings-main>.stack>form{max-width:620px;}
/* Model connection: source -> model -> effort. Save never falls below the fold. */
.pi-settings{height:100%;min-height:0;display:flex;flex-direction:column;gap:12px;}
.connection-heading{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 0 12px;border-bottom:1px solid var(--line);min-height:54px;}
.connection-monogram{font:600 44px/.85 var(--serif);letter-spacing:-.07em;width:45px;align-self:center;}
.connection-heading .row{gap:12px;}
.connection-heading .eyebrow{font-size:8px;letter-spacing:.1em;}
.connection-heading h2{font-size:22px;line-height:1.2;font-weight:750;letter-spacing:-.04em;margin:3px 0 0;}
.connection-badge{font-size:10px;padding:6px 9px;background:#f5f5f5;border:1px solid var(--line);white-space:nowrap;}
.connection-badge.verified{background:var(--acid);border-color:var(--ink);color:var(--ink);}
.connection-scroll{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;padding-right:4px;}
.connection-scroll>[data-error]:not(:empty){margin-bottom:12px;}
.connection-grid{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:24px;min-width:0;}
.connection-source,.connection-model{display:flex;flex-direction:column;gap:12px;min-width:0;}
.connection-source{border-right:1px solid var(--line);padding-right:30px;}
.connection-step{display:flex;gap:9px;align-items:center;min-height:22px;margin:0 0 2px;}
.connection-step>span{font:10px/20px var(--mono);height:20px;width:22px;background:var(--ink);color:var(--acid);text-align:center;flex-shrink:0;}
.connection-step h3{font-size:13px;margin:0;font-weight:700;}
.connection-step small{font-size:10px;color:var(--muted);margin-left:auto;line-height:1.4;}
.connection-source .field{gap:5px;position:relative;}
.inline-note{position:absolute;right:0;top:0;font-size:10px;font-weight:400;color:var(--muted);}
.password-wrap input{padding-right:50px!important;width:100%;}
.password-wrap button{font-size:10px;right:10px;min-height:25px;}
.connection-fetch{display:flex;align-items:center;gap:12px;}
.connection-fetch>span{font-size:10px;color:var(--muted);line-height:1.5;flex:1;}
.connection-fetch .btn{white-space:nowrap;}
.connection-privacy{display:flex;gap:7px;align-items:flex-start;color:var(--muted);font-size:10px;margin-top:1px;}
.connection-privacy svg{flex-shrink:0;margin-top:1px;}
.connection-privacy p{line-height:1.6;margin:0;}
.connection-help{font-size:10px;color:var(--muted);}
.connection-help summary{cursor:pointer;}
.connection-help p{line-height:1.7;margin:7px 0;}
.model-preset-scroll{display:flex;flex-direction:column;gap:8px;max-height:176px;min-width:0;padding:10px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain;border-bottom:1px solid var(--line);}
.model-preset-group{display:flex;flex-direction:column;gap:5px;min-width:0;}
.model-family-tag{font:600 10px/1.3 var(--mono);letter-spacing:.04em;color:var(--muted);}
.model-preset-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:6px;min-width:0;}
.model-preset{display:flex;gap:6px;align-items:center;justify-content:space-between;min-width:0;max-width:100%;border:1px solid var(--line);padding:7px 10px;min-height:34px;font-size:12px;background:var(--surface);border-radius:2px;text-align:left;}
.model-preset-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.model-preset-check{display:none;flex-shrink:0;color:var(--ink);}
.model-preset small{font-size:9px;color:var(--muted);}
.model-preset.active{border-color:var(--ink);background:var(--acid);font-weight:600;}
.model-preset.active .model-preset-check{display:inline-flex;}
.model-preset-empty{margin:0;padding:6px 2px;font-size:11px;line-height:1.6;color:var(--muted);}
.model-catalog{border:1px solid var(--line);display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;background:var(--surface);}
.model-catalog.has-remote-models .model-preset-scroll{max-height:118px;}
.model-catalog-head{display:flex;justify-content:space-between;align-items:center;gap:8px;border-bottom:1px solid var(--line);min-height:31px;padding:0 9px;font-size:9px;color:var(--muted);}
.model-filter{display:flex;gap:5px;align-items:center;width:136px;min-width:0;}
.model-filter input{height:28px;min-height:0;font-size:11px;width:100%;min-width:0;padding:2px 0;background:transparent;border:0;outline-offset:0;}
.model-results{max-height:152px;min-height:0;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain;}
.model-list-empty{font-size:11px;line-height:1.9;padding:18px 12px;color:var(--muted);margin:0;}
.model-list-empty.is-idle{padding:9px 12px;line-height:1.55;}
.model-choice{display:flex;justify-content:space-between;gap:10px;align-items:center;width:100%;font:11px/1.4 var(--mono);min-height:32px;text-align:left;padding:7px 10px;border-bottom:1px solid #e5e5e566;}
.model-choice>span{overflow-wrap:anywhere;}
.model-choice small{font:9px/1.4 var(--sans);color:var(--muted);flex-shrink:0;display:flex;gap:5px;align-items:center;}
.model-choice.selected{background:var(--soft);font-weight:650;box-shadow:inset 3px 0 0 var(--acid);}
.model-choice:hover{background:var(--soft);}
.model-capabilities{display:flex;justify-content:space-between;gap:9px;font-size:10px;line-height:1.5;color:var(--muted);flex-wrap:wrap;min-height:18px;}
.model-capabilities>span{display:flex;align-items:center;gap:5px;color:var(--ink);}
.model-capabilities small{font-size:10px;}
.reasoning-section{margin-top:19px;padding-top:13px;border-top:1px solid var(--line);}
.reasoning-dial{display:flex;gap:4px;margin-top:10px;}
.reasoning-dial button{flex:1;min-width:0;padding:8px 5px 7px;border:1px solid var(--line);display:flex;flex-direction:column;align-items:center;gap:4px;background:var(--surface);border-radius:2px;}
.reasoning-dial button>span{font-size:12px;font-weight:550;}
.reasoning-dial button>small{font:9px/1 var(--mono);color:var(--muted);}
.reasoning-dial button.active{background:var(--ink);border-color:var(--ink);color:var(--acid);}
.reasoning-dial button.active small{color:var(--acid);opacity:.7;}
.fast-tier-option{margin-top:11px;padding-top:10px;border-top:1px dashed var(--line);min-width:0;}
.fast-tier-option[hidden]{display:none!important;}
.fast-tier-toggle{margin:0;min-width:0;}
.fast-tier-toggle>span{min-width:0;overflow-wrap:anywhere;}
.fast-tier-option>.form-hint{margin:4px 0 0;min-width:0;overflow-wrap:anywhere;}
.connection-advanced{margin-top:13px;padding:9px 0 4px;border-top:1px solid var(--line);}
.connection-advanced summary{font-size:11px;cursor:pointer;color:var(--ink);}
.connection-advanced summary span{font-size:10px;color:var(--muted);margin-left:10px;}
.advanced-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr .8fr;gap:14px;margin:16px 0 8px;}
.advanced-grid .field{font-size:10px;}
.connection-actions{flex-shrink:0;display:flex;align-items:center;gap:12px;padding:12px 0 0;border-top:1px solid var(--ink);min-height:46px;}
.connection-switch{font-size:11px;display:flex;gap:6px;align-items:center;white-space:nowrap;}
.connection-switch input{width:15px;height:15px;min-height:0;accent-color:var(--ink);}
.connection-test-note{font-size:10px;line-height:1.5;color:var(--muted);flex:1;}
.connection-actions .btn{white-space:nowrap;}
/* Company editor keeps the paper header separate from defaults and the stamp. */
.company-settings{height:100%;display:flex;flex-direction:column;min-height:0;}
.setting-intro{flex-shrink:0;margin-bottom:14px;}
.setting-intro h2{font-size:21px;margin:3px 0;}
.setting-intro p{font-size:11px;margin:6px 0 0;}
.company-layout{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) 240px;gap:28px;}
.company-form{min-height:0;overflow:auto;padding-right:5px;gap:12px;}
.company-form h3{font-size:13px;}
.company-form>.btn[type=submit]{position:sticky;bottom:0;box-shadow:0 -8px 15px var(--paper);flex-shrink:0;z-index:2;}
.brand-assets{overflow:auto;min-height:0;padding-left:22px;gap:16px;scrollbar-width:thin;}
.brand-assets .section-heading{margin-bottom:9px;}
.brand-assets h3{font-size:12px;}
.asset-preview{min-height:65px;height:90px;margin-bottom:8px;}
.asset-preview img{max-height:80px;max-width:100%;}
.asset-preview.logo{height:62px;min-height:62px;}
.asset-preview.logo img{max-height:52px;}
.asset-preview>span{font-size:11px;}
.brand-assets .form-hint{font-size:9px;margin-top:6px;}
.stamp-note{font-size:9px;padding:10px;line-height:1.6;}
.fold-section{padding:10px 0;}
.fold-section summary{font-size:11px;}
/* Pi stays on one screen: history / conversation / composer. */
.agent-workspace>.page-heading{margin-bottom:16px;}
.agent-layout{flex:1;min-height:0;height:100%;grid-template-columns:188px minmax(0,1fr);gap:26px;overflow:hidden;}


.agent-main{min-height:0;max-width:none;height:100%;overflow:hidden;display:flex;flex-direction:column;}
.agent-status{flex-shrink:0;display:flex;align-items:center;gap:7px;margin:0 0 8px;padding:0 0 7px;border-bottom:1px solid var(--line);font-size:11px;min-height:31px;}
.agent-model-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;}
.agent-effort-tag{font-size:9px;padding:3px 6px;background:#f5f5f5;color:var(--muted);white-space:nowrap;}
.agent-status .btn{font-size:10px;padding:3px;min-height:24px;white-space:nowrap;}
.chat-scroll{flex:1;min-height:0;max-height:none;height:auto;overflow:auto;padding:16px 14px 16px 0;scrollbar-width:thin;overscroll-behavior:contain;}
.agent-welcome{min-height:0;height:100%;max-width:none;padding:10px 0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;text-align:left;}

.agent-welcome>.eyebrow{display:none;}
.agent-welcome h2{font:760 clamp(23px,2.5vw,36px)/1.2 var(--sans);letter-spacing:-.045em;margin:0 0 10px;}
.agent-welcome p{font-size:12px;line-height:1.7;margin:0 0 16px;}
.agent-examples{display:flex;flex-direction:row;gap:8px;max-width:none;width:100%;margin:0;}
.agent-examples button{flex:1;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;font-size:11px;padding:11px 10px;min-height:45px;background:transparent;border:1px solid var(--line);}
.agent-examples button:hover{background:var(--acid);border-color:var(--ink);}
.agent-composer{flex-shrink:0;border:1px solid var(--ink);padding:11px 13px;background:var(--surface);border-radius:0;margin:0;}
.agent-composer textarea{min-height:48px;height:48px;max-height:140px;padding:0;font-size:13px;line-height:1.7;background:transparent;border:0;}
.composer-footer{padding-top:7px;}
.composer-footer>span{font-size:9px;}
.composer-caution{font-size:9px;line-height:1.7;margin:7px 0 0;flex-shrink:0;}


.proposal-card{padding:13px;margin:0 0 9px;}
.proposal-card h3{font-size:14px;margin:6px 0;}
.proposal-card p{font-size:11px;}
.proposal-card header small{font-size:9px;}
.chat-message{gap:10px;margin-bottom:20px;}

.message-body{font-size:13px;line-height:1.8;min-width:0;}
.tool-receipt{font-size:10px;padding:7px 9px;}
/* Drawers keep their action bar reachable; content, not the page, scrolls. */

.panel-header{padding:17px 22px;min-height:0;}
.panel-header h2{font-size:23px;}
.panel-body{padding:20px 22px;min-height:0;overflow:auto;}
.notice{font-size:12px;padding:12px;line-height:1.65;}
@media(min-width:1500px){:root{--page-pad:34px;}.next-take{padding:32px 28px 23px;}.agenda-row{padding:23px 0;min-height:108px;}.agenda-title{font-size:18px;}.model-results{max-height:180px;}.connection-grid{gap:40px;}.connection-source{padding-right:40px;}}
@media(min-width:901px) and (max-height:800px){.content{padding-top:15px;padding-bottom:15px;}.journal-header{margin-bottom:15px;}.next-take{padding:22px 20px 16px;}.agenda-row{padding:16px 0;min-height:88px;}.finance-overview{gap:14px 26px;grid-template-rows:minmax(0,1fr) auto minmax(0,.85fr) 20px;}.finance-statline{padding:12px 0;}.finance-statline strong{font-size:21px;}.page-heading p{margin-top:4px;}.connection-heading{padding-bottom:8px;min-height:47px;}.pi-settings{gap:10px;}.connection-grid{gap:25px;}.connection-source{gap:10px;padding-right:25px;}.connection-model{gap:9px;}.connection-step{min-height:20px;margin:0;}.model-preset-scroll{max-height:124px;}.model-results{max-height:104px;}.model-list-empty{padding:11px 10px;font-size:10px;}.reasoning-section{margin-top:11px;padding-top:10px;}.reasoning-dial{margin-top:8px;}.reasoning-dial button{padding:6px 4px;}.fast-tier-option{margin-top:8px;padding-top:7px;}.fast-tier-option>.form-hint{margin-top:2px;}.connection-advanced{margin-top:10px;padding-top:7px;}.connection-actions{padding-top:9px;min-height:42px;}}
@media(min-width:901px) and (max-width:1150px){:root{--page-pad:19px;}.delivery-notes .section-heading{margin-bottom:2px;}.next-take h2{font-size:27px;}.connection-grid{gap:20px;}.connection-source{padding-right:20px;}.model-preset{font-size:11px;padding:8px;}.model-preset small{display:none;}.connection-test-note{max-width:200px;}.model-capabilities{font-size:9px;}.model-capabilities small{font-size:9px;}.finance-overview{grid-template-columns:.85fr 1fr;}.finance-chart-section .section-heading small{display:none;}.finance-statline{gap:12px;}.finance-statline strong{font-size:19px;}.finance-statline span{font-size:9px;}.agent-layout{grid-template-columns:155px 1fr;gap:18px;}}
@media(max-width:900px){:root{--sidebar:0px;--page-pad:18px;}.sidebar{width:230px;height:100dvh;padding:25px 18px;overflow:auto;background:var(--surface);color:var(--ink);}.sidebar .brand-text{display:block;}.sidebar .brand{justify-content:flex-start;}.nav-link{height:47px;padding:10px 14px;flex-direction:row;justify-content:flex-start;font-size:13px;gap:14px;}.sidebar .nav{overflow:visible;}.sidebar-bottom .nav-link{justify-content:flex-start;}.profile-mini .profile-text{display:block;}.profile-mini{justify-content:flex-start;flex-wrap:nowrap;}.rail-more-menu{position:static;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);}.workspace{height:100dvh;grid-template-rows:52px minmax(0,1fr);margin-left:0;padding-bottom:calc(65px + env(safe-area-inset-bottom));}.topbar{height:52px;min-height:52px;gap:9px;}.content{padding:18px var(--page-pad) 12px;height:100%;overflow:hidden;}.page-heading{margin-bottom:13px;min-height:44px;}.page-heading h1{font-size:29px;}.page-heading p{font-size:11px;}.page-heading .eyebrow{font-size:8px;}.mobile-dock{height:calc(65px + env(safe-area-inset-bottom));padding-top:7px;padding-bottom:calc(6px + env(safe-area-inset-bottom));background:var(--surface);color:var(--muted);border-top:1px solid var(--line);backdrop-filter:none;box-shadow:none;}.mobile-dock a,.mobile-dock button{height:48px;min-height:0;font-size:10px;}.mobile-dock a.active{color:var(--ink);}.mobile-dock a.active:before{background:var(--acid);}.studio-top-name{max-width:150px;font-size:12px;}.topbar-date{display:none;}.content>.page-section,.content>.journal,.content>.agent-workspace{height:100%;min-height:0;}.journal{overflow:auto;scrollbar-width:thin;}.journal-header{margin-bottom:16px;min-height:43px;}.journal-header h1{font-size:34px;}.next-take{padding:22px 20px;min-height:0;overflow:auto;}.next-take h2{font-size:28px;}.roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}.person-card{padding:15px;grid-template-columns:50px 1fr;gap:10px;}.person-portrait{height:50px;width:50px;font-size:27px;}.person-description h2{font-size:20px;}.person-description small{font-size:9px;}.person-numbers{gap:6px;}.person-numbers strong{font-size:13px;}.calendar-controls{gap:8px;flex-wrap:wrap;min-height:36px;margin-bottom:10px;}.calendar-heading{gap:7px;flex:1;}.calendar-heading h2{font-size:21px;}.calendar-page .page-heading{margin-bottom:8px;}.calendar-page .calendar-summary{font-size:10px;min-height:23px;margin-bottom:7px;}.calendar-controls .filter-select{font-size:11px;min-height:30px;max-width:150px;}.calendar-controls .segmented button{font-size:10px;padding:4px 8px;}.calendar-weekdays{height:23px;}.calendar-weekdays span{font-size:9px;padding:5px 7px;}.calendar-grid{min-width:0;}.calendar-cell{padding:3px 4px;min-height:0;}.calendar-agenda{padding-right:4px;}.calendar-agenda .agenda-row{grid-template-columns:52px minmax(0,1fr) auto;gap:10px;min-height:86px;}.schedule-scroll{min-width:0;}.schedule-header,.schedule-grid{min-width:650px;}.calendar-page[data-calendar-view=day] .schedule-header,.calendar-page[data-calendar-view=day] .schedule-grid{min-width:0;}.settings-layout{gap:14px;}.settings-aside{display:flex;padding:0 0 9px;margin:0;overflow:auto;gap:4px;}.settings-link{font-size:11px;min-height:31px;padding:7px 10px;}.settings-main{padding-right:0;min-height:0;}.settings-page>.page-heading h1{font-size:28px;}.connection-grid{gap:20px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);}.connection-source{padding-right:20px;gap:10px;}.connection-model{gap:10px;}.connection-heading h2{font-size:20px;}.connection-heading .eyebrow{font-size:8px;}.connection-monogram{font-size:40px;width:34px;}.connection-badge{font-size:9px;padding:5px 7px;}.model-preset{padding:8px;font-size:11px;white-space:normal;}.model-preset small{display:none;}.model-capabilities{font-size:9px;}.model-capabilities small{font-size:9px;}.model-results{max-height:140px;}.connection-actions{flex-wrap:wrap;gap:8px;padding-top:10px;}.connection-test-note{font-size:9px;}.advanced-grid{grid-template-columns:1fr 1fr;}.company-layout{grid-template-columns:minmax(0,1fr) 190px;gap:18px;}.brand-assets{padding-left:16px;}.finance-overview{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:16px 20px;}.finance-chart-section{padding-left:18px;}.finance-chart-section .section-heading small{display:none;}.finance-statline{gap:12px;}.finance-statline strong{font-size:20px;}.finance-statline span{font-size:9px;}.finance-bottom-grid{gap:20px;grid-template-columns:.9fr 1.1fr;}.finance-bottom-grid>section+section{padding-left:18px;}.finance-page .tabs{gap:12px;}.finance-page .tab{font-size:11px;}.agent-layout{display:flex;min-height:0;overflow:hidden;}.agent-welcome{padding:12px 0;}.agent-welcome h2{font-size:26px;}.agent-examples{gap:8px;}.agent-examples button{font-size:11px;}.agent-main{flex:1;min-height:0;}.agent-composer textarea{font-size:14px;}.composer-caution{font-size:9px;}.content>.page-section>.toolbar{flex-wrap:wrap;gap:8px;}.content .data-table{min-width:680px;}.finance-page .data-table{min-width:680px;}.table-wrap{overscroll-behavior:contain;}.panel-body{padding:18px;}.resource-row{padding:15px 0;gap:12px;}.resource-row>svg{width:15px;}}
@media(max-width:600px){:root{--page-pad:16px;}.topbar{padding:0 13px;gap:6px;}.breadcrumb{gap:6px;}.breadcrumb .slash,.breadcrumb [data-current]{display:none;}.topbar .btn{font-size:11px;padding:6px 9px;min-height:30px;}.topbar [data-new] svg{width:14px;}.content{padding-top:15px;}.journal-header{margin-bottom:15px;}.next-take{min-height:0;overflow:visible;display:block;padding:20px 18px;}.next-take h2{font-size:24px;line-height:1.3;margin:0 0 12px;grid-column:1;}.next-take p{font-size:10px;grid-column:1/-1;line-height:1.6;}.agenda-row{grid-template-columns:48px minmax(0,1fr) auto;gap:10px;padding:16px 0;min-height:87px;}.agenda-title{font-size:15px;}.agenda-side{max-width:65px;}.agenda-time strong{font-size:17px;}.delivery-notes{flex:none;}.page-heading h1{font-size:27px;}.page-heading>.row,.page-heading .heading-aside{gap:5px;}.page-heading .btn{font-size:10px;min-height:30px;padding:6px 8px;}.page-heading .btn svg{width:13px;}.page-heading p{max-width:210px;font-size:10px;}.toolbar .search-field{max-width:none;flex:1;min-width:145px;height:32px;}.toolbar .filter-select{max-width:128px;font-size:11px;}.toolbar .muted{font-size:10px;}.roster{grid-template-columns:1fr;}.person-card{grid-template-columns:56px 1fr;padding:17px;gap:12px;}.person-portrait{height:56px;width:56px;font-size:29px;}.person-description h2{font-size:23px;}.person-description small{font-size:10px;}.person-numbers strong{font-size:15px;}.resource-row{gap:10px;min-height:92px;}.calendar-controls{gap:7px;}.calendar-controls .calendar-heading{flex-basis:100%;justify-content:space-between;margin-bottom:3px;}.calendar-controls .filter-select{max-width:155px;}.calendar-controls .segmented{margin-left:auto;}.calendar-summary{font-size:10px;}.calendar-page .page-heading h1{font-size:26px;}.calendar-page .page-heading p{display:none;}.calendar-page .page-heading{min-height:40px;}.calendar-agenda .agenda-row{padding:15px 0;min-height:86px;}.calendar-agenda .agenda-side{min-width:50px;max-width:91px;}.calendar-agenda .crew-reply{gap:5px;flex-wrap:wrap;justify-content:flex-end;}.calendar-agenda .crew-reply .btn{min-height:28px;font-size:10px;padding:5px 7px;}.calendar-weekdays span{font-size:9px;padding:5px;}.calendar-cell{padding:3px 2px;}.calendar-event{font-size:8px;gap:2px;padding:2px 1px;border-left-width:1px;}.calendar-event .event-time{font-size:8px;}.calendar-more{font-size:8px;padding:0 1px;}.calendar-date{font-size:10px;width:18px;}.calendar-event .event-name{font-size:8px;}.settings-page>.page-heading{min-height:39px;margin-bottom:11px;}.settings-aside{gap:3px;padding-bottom:8px;}.settings-link{padding:7px 9px;font-size:10px;min-height:30px;}.settings-layout{gap:12px;}.settings-form{gap:12px;}.field input,.field select,.field textarea{font-size:16px;background:var(--surface);border-color:var(--line);}.field{font-size:11px;}.field-row{gap:10px;}.connection-heading{min-height:43px;padding-bottom:10px;gap:8px;}.connection-heading h2{font-size:18px;}.connection-heading .row{gap:8px;}.connection-monogram{font-size:36px;width:29px;}.connection-badge{font-size:8px;padding:5px 6px;white-space:normal;max-width:102px;line-height:1.4;}.connection-scroll{padding-right:2px;}.connection-grid{grid-template-columns:minmax(0,1fr);gap:16px;}.connection-source{border-right:0;border-bottom:1px solid var(--line);padding:0 0 17px;gap:11px;}.connection-step h3{font-size:12px;}.connection-help{font-size:10px;}.connection-fetch>span{font-size:10px;}.connection-privacy{font-size:10px;}.connection-model{gap:11px;}.model-preset{font-size:12px;}.model-preset small{display:block;font-size:8px;}.model-filter input{font-size:16px;height:31px;}.model-catalog-head{min-height:34px;}.model-results{max-height:160px;}.model-choice{font-size:11px;min-height:36px;}.model-choice small{font-size:9px;}.model-capabilities{font-size:10px;}.model-capabilities small{font-size:9px;}.reasoning-section{margin-top:17px;padding-top:13px;}.connection-step small{font-size:9px;max-width:156px;}.reasoning-dial{gap:3px;flex-wrap:wrap;}.reasoning-dial button{min-width:42px;min-height:46px;padding:7px 4px;}.reasoning-dial button>span{font-size:11px;}.reasoning-dial button>small{font-size:8px;}.connection-actions{display:grid;grid-template-columns:1fr auto;gap:7px 10px;padding-top:10px;min-height:0;}.connection-switch{grid-column:1;grid-row:1;font-size:10px;}.connection-actions>.row{grid-column:2;grid-row:1;gap:7px;}.connection-actions>.row .btn{font-size:11px;min-height:34px;padding:7px 10px;}.connection-test-note{grid-column:1/-1;grid-row:2;font-size:9px;line-height:1.5;}.connection-advanced{margin-top:15px;}.advanced-grid{grid-template-columns:1fr 1fr;gap:12px;}.advanced-grid label:first-child{grid-column:1/-1;}.company-settings{height:auto;min-height:100%;display:block;}.company-layout{display:flex;flex-direction:column;gap:24px;min-height:0;}.company-form{overflow:visible;min-height:0;}.company-form>.btn[type=submit]{position:static;box-shadow:none;}.brand-assets{padding:20px 0 0;border:0;border-top:1px solid var(--line);overflow:visible;display:grid;grid-template-columns:1fr 1fr;gap:18px;}.stamp-note{grid-column:1/-1;}.brand-assets [data-asset-error]{grid-column:1/-1;}.brand-assets .section-heading h3{font-size:11px;}.brand-assets .eyebrow{font-size:8px;}.brand-assets .upload-control{font-size:11px;}.company-settings .setting-intro{margin-bottom:15px;}.member-row{flex-wrap:wrap;gap:10px;}.member-row .row{gap:6px;}.audit-row{gap:9px;}.audit-row strong{font-size:11px;overflow-wrap:anywhere;}.audit-row small{font-size:9px;}.account-identity strong{font-size:16px;}.finance-page .page-heading{align-items:flex-start;}.finance-page .page-heading>.row{max-width:130px;justify-content:flex-end;}.finance-page .page-heading .btn{font-size:9px;padding:5px 6px;min-height:28px;}.finance-page .toolbar{display:flex;flex-direction:column;align-items:stretch;gap:9px;min-height:0;}.period-select{display:flex;gap:8px;}.period-select select{font-size:11px;min-height:30px;}.finance-page .tabs{display:flex;justify-content:space-between;gap:5px;}.finance-page .tab{font-size:11px;padding:5px 2px;min-height:28px;}.finance-content{overflow:auto;display:block;}.finance-overview{display:flex;flex-direction:column;height:auto;min-height:100%;gap:19px;padding-bottom:10px;}.revenue-hero{display:flex;gap:14px;min-height:170px;overflow:visible;}.revenue-number{font-size:42px;margin:10px 0 7px;}.revenue-hero h2{font-size:11px;margin:6px 0;}.revenue-aside{gap:12px;}.revenue-aside span{font-size:9px;}.revenue-aside strong{font-size:13px;}.finance-statline{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;padding:15px 0;order:1;}.finance-statline strong{font-size:22px;}.finance-statline span{font-size:9px;}.finance-chart-section{border-left:0;padding:0;min-height:175px;order:2;}.finance-chart-section .section-heading h3{font-size:12px;}.finance-bottom-grid{display:flex;flex-direction:column;gap:22px;order:3;}.finance-bottom-grid>section+section{padding:15px 0 0;border-left:0;border-top:1px solid var(--line);}.finance-bottom-grid p{font-size:10px;}.accounting-basis{order:4;font-size:11px;align-self:flex-start;}.finance-content>.table-wrap{max-height:none;overflow:auto;}.agent-workspace>.page-heading{min-height:39px;margin-bottom:12px;}.agent-main{min-height:0;}.agent-status{font-size:10px;min-height:28px;gap:5px;flex-wrap:wrap;}.agent-effort-tag{font-size:8px;}.agent-status .btn{font-size:9px;}.chat-scroll{padding:12px 0;}.agent-welcome h2{font-size:25px;line-height:1.2;max-width:260px;}.agent-welcome p{font-size:11px;margin-bottom:17px;}.agent-examples{display:flex;flex-direction:column;gap:7px;}.agent-examples button{min-height:37px;padding:8px 10px;font-size:11px;}.agent-composer{padding:10px;}.agent-composer textarea{height:65px;min-height:65px;font-size:16px;line-height:1.6;}.composer-footer>span{font-size:8px;}.composer-footer .btn{font-size:11px;min-height:31px;padding:6px 9px;}.composer-caution{font-size:8px;line-height:1.65;margin:6px 0 0;}.proposal-card h3{font-size:13px;}.message-body{font-size:13px;}.panel-body{padding:16px;}.notice{font-size:12px;}}
/* Short windows / zoomed desktop: preserve access, prefer scrolling to clipping. */
@media(max-height:560px){.workspace{height:auto;min-height:100dvh;overflow:visible;grid-template-rows:52px auto;}.shell{height:auto;min-height:100dvh;}.content{height:auto;overflow:visible;min-height:420px;}.content>.page-section,.content>.journal,.content>.agent-workspace{height:auto;min-height:420px;}.settings-layout{min-height:470px;}.settings-main{min-height:360px;overflow:visible;}.pi-settings{height:auto;min-height:500px;}.connection-scroll{overflow:visible;}.calendar-page [data-calendar]{min-height:420px;}.calendar-grid{min-height:395px;}.finance-overview{height:auto;min-height:500px;}.projects-page [data-projects]{min-height:300px;}.agent-layout{height:480px;min-height:480px;}.sidebar{overflow:auto;background:var(--surface);color:var(--ink);}.nav{flex-shrink:0;overflow:visible;}.sidebar-bottom{flex-shrink:0;}.connection-actions{position:sticky;bottom:0;background:var(--paper);z-index:3;padding-bottom:10px;}.schedule-scroll{max-height:430px;}.company-layout{min-height:400px;}.content .availability-list,.content [data-list],.content [data-roster]{overflow:visible;}}

.calendar-person-strip{flex-shrink:0;min-height:26px;padding:0 0 8px;margin:0 0 9px;font-size:10px;border-bottom:1px solid var(--line);}
.calendar-person-strip strong{font-size:15px;}
.calendar-legend{flex-shrink:0;min-height:22px;padding-top:8px;margin:0;font-size:9px;gap:13px;}
/* Settings gets one header, not a title + a second navigation floor. */
@media(min-width:1000px) and (min-height:561px){
 .settings-page{position:relative;}
 .settings-page>.page-heading{height:54px;min-height:54px;margin-bottom:6px;justify-content:flex-start;}
 .settings-page .settings-aside{position:absolute;top:3px;right:0;left:170px;height:44px;min-height:44px;padding:0;margin:0;border:0;justify-content:flex-end;align-items:center;}
 .settings-page .settings-layout{border-top:1px solid var(--line);padding-top:12px;}
}
/* Reset inherited v1.0 ledger geometry, not just its colours. Grid children
   stretch to their tracks; long lists scroll inside those tracks. */
@media(min-width:601px) and (min-height:561px){
 .finance-page>.page-heading{margin-bottom:12px;min-height:54px;}
 .finance-page>.toolbar{padding:0;margin-bottom:18px;min-height:34px;align-items:center;}
 .finance-overview{padding:0;margin:0;border:0;align-items:stretch;flex:1;overflow:hidden;grid-template-rows:minmax(0,1fr) auto minmax(0,.95fr) 28px;}
 .finance-overview>.revenue-hero{padding:0;margin:0;border:0;align-items:stretch;justify-content:space-between;height:100%;color:var(--ink);background:transparent;min-height:0;}
 .finance-overview>.finance-chart-section{height:100%;align-self:stretch;}
 .finance-overview>.finance-bottom-grid{height:100%;grid-template-rows:minmax(0,1fr);border:0;align-self:stretch;}
 .finance-bottom-grid>section{min-height:0;max-height:100%;}
 .finance-overview>.accounting-basis{min-height:24px;height:24px;padding:0;align-self:end;}
}
.finance-page .revenue-hero .eyebrow,.finance-page .revenue-aside span{color:var(--muted);}
.finance-page .revenue-aside strong,.finance-page .revenue-hero h2{color:var(--ink);}



.income-bar{position:absolute;left:0;right:0;bottom:0;max-width:none;width:100%;}

@media(min-width:901px) and (min-height:561px){.model-results{max-height:156px;}}
@media(max-width:600px){.finance-page .revenue-hero{padding:0;display:flex;align-items:stretch;justify-content:space-between;color:var(--ink);border:0;}}
.finance-page .revenue-hero{gap:12px;}




@media(min-width:601px) and (min-height:561px){
 .finance-overview>.finance-chart-section{display:grid;grid-template-rows:24px minmax(0,1fr) 18px;gap:6px;}
 .finance-chart-section .section-heading{margin:0;min-height:0;align-items:center;}
 .finance-chart-section .form-hint{margin:0;min-height:0;line-height:18px;}
}
/* v1.3: explicit controls, compact editing, configurable studio vocabulary. */
[hidden]{display:none!important;}
.settings-section-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin:0 0 16px;}.settings-section-head h2{font-size:23px;margin:0 0 6px;}.settings-section-head p{font-size:12px;margin:0;}
.settings-main:has(.workflow-editor),.settings-main:has(.template-settings){overflow:hidden;}
.workflow-editor,.template-settings{height:100%;min-height:0;display:flex;flex-direction:column;max-width:none;}.workflow-editor .settings-section-head{flex-shrink:0;}.workflow-tabs{flex-shrink:0;margin-bottom:12px;}.workflow-content{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;padding:0 8px 14px 0;}.settings-savebar{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-shrink:0;border-top:1px solid var(--ink);padding:12px 0 0;margin-top:12px;background:var(--paper);}.settings-savebar .form-hint{max-width:70%;font-size:11px;margin:0;}
.dictionary-head,.dictionary-row{display:grid;grid-template-columns:minmax(0,1fr) 90px 100px;gap:16px;align-items:center;}.dictionary-head{font-size:11px;color:var(--muted);padding:0 0 6px;}.dictionary-row{padding:7px 0;border-top:1px solid var(--line);}.dictionary-row>input{padding:7px 10px;}.dictionary-list{margin-bottom:14px;}.switch-label{display:flex;align-items:center;gap:7px;font-size:11px;}.dictionary-row .row{justify-content:flex-end;}.day-part-row{display:grid;grid-template-columns:80px 1fr 1fr 130px;gap:18px;align-items:center;border-top:1px solid var(--line);padding:16px 0;}.day-part-row .field{font-size:11px;}.day-part-row strong{font-size:21px;}.owner-rule{border-left:4px solid var(--ink);padding:10px 22px;margin:20px 0;}.owner-rule h3{font-size:24px;}.owner-rule p{font-size:13px;line-height:1.8;max-width:580px;}
.time-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}.time-preset{border:1px solid var(--line);background:var(--paper);color:var(--ink);padding:9px 5px;font-size:13px;line-height:1.2;font-weight:650;text-align:center;border-radius:2px;min-width:0;}.time-preset small{display:block;font:10px/1.4 var(--mono);opacity:.7;margin-top:5px;}.time-preset:hover{border-color:var(--ink);}.time-preset.active{background:var(--ink);color:var(--acid);border-color:var(--ink);}
.role-editor{border:0;padding:0;margin:8px 0;}.role-editor legend{font-weight:700;font-size:14px;margin:0 0 10px;}.role-chips{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 12px;}.role-chip input{position:absolute;opacity:0;width:1px;height:1px;}.role-chip span{display:block;padding:7px 12px;border:1px solid var(--line);font-size:12px;cursor:pointer;border-radius:2px;}.role-chip input:checked+span{background:var(--ink);color:var(--acid);border-color:var(--ink);}.role-chip input:focus-visible+span{outline:2px solid var(--ink);outline-offset:3px;}.role-add{display:flex;gap:8px;margin:0 0 12px;}.role-add input{flex:1;min-width:0;}.crew-fee-field{min-width:0;}.crew-fee-field input{width:100%;}.crew-fee-field>span{display:none;}.crew-fee-field.automatic>span{display:block;font-size:10px;line-height:1.6;color:var(--muted);}.crew-editor-row{grid-template-columns:minmax(100px,1fr) minmax(85px,1fr) minmax(90px,.8fr) 30px;gap:8px;}
.owner-estimate{display:flex;gap:30px;border-top:1px solid var(--line);padding:15px 0 0;}.owner-estimate>div{display:flex;flex-direction:column;gap:8px;}.owner-estimate span{font-size:11px;}.owner-estimate strong{font:500 26px/1.2 var(--mono);letter-spacing:-.04em;}.owner-summary{display:grid;grid-template-columns:1fr 1fr;gap:24px;border-bottom:1px solid var(--line);padding:15px 0 24px;}.owner-amount h2{font-size:14px;margin:8px 0;}.owner-amount>strong{font:500 clamp(30px,4vw,56px)/1.1 var(--mono);letter-spacing:-.07em;}.owner-amount p{font-size:12px;color:var(--muted);}
.job-edit-dialog{width:min(880px,calc(100vw - 48px));height:min(780px,calc(100dvh - 40px));}.job-edit-dialog .panel-body{min-height:0;flex:1;display:flex;flex-direction:column;overflow:hidden;padding-top:5px;}.job-form{display:flex;flex-direction:column;flex:1;min-height:0;height:100%;}.job-editor-tabs{flex-shrink:0;gap:22px;margin-bottom:14px;}.job-editor-tabs .tab{display:flex;gap:9px;align-items:center;}.job-editor-tabs .mono{font-size:10px;opacity:.5;}.job-editor-body{flex:1;min-height:0;overflow:auto;padding-right:8px;scrollbar-width:thin;}.job-editor-body .form-section{padding:0;margin:0;border:0;}.job-editor-body .form-section-title{display:none;}.job-editor-body .stack{gap:14px;}.job-form>.form-actions{position:static;flex-shrink:0;margin:12px 0 0;padding:12px 0 0;border-top:1px solid var(--ink);background:var(--paper);gap:10px;}.job-form>.form-actions>.form-hint{font-size:10px;margin-right:auto;}.shoot-editor{padding:16px;margin-bottom:14px;}.shoot-editor-head{margin-bottom:13px;}.shoot-editor-head .shoot-index{font-size:10px;}.shoot-editor .field{font-size:12px;}.shoot-editor details>summary{font-size:11px;}.person-editor-dialog{width:min(680px,calc(100vw - 36px));}.person-editor-form{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;}.person-editor-form>.notice,.person-editor-form>[data-error],.person-editor-form>[data-roles-editor],.person-editor-form>.form-actions,.person-editor-form>.field:has(textarea){grid-column:1/-1;}.person-editor-form>.notice{font-size:12px;}.person-editor-form textarea{min-height:60px;}.person-editor-form .form-actions{position:sticky;bottom:-24px;background:var(--paper);margin:0;padding:12px 0;border-top:1px solid var(--line);}
.copy-date-options{display:flex;gap:8px;flex-wrap:wrap;}.copy-date-options button{font-size:11px;border:1px solid var(--line);padding:6px 10px;}.copy-preview{border-left:3px solid var(--ink);padding:10px 15px;background:var(--surface);}.copy-preview>strong{font-size:12px;display:block;margin-bottom:8px;}.copy-preview>div{display:flex;flex-direction:column;gap:4px;margin-top:10px;font-size:12px;}.copy-preview small{font:11px/1.6 var(--mono);}.copy-options{display:grid;grid-template-columns:1fr;gap:12px;padding:12px 0;}
.template-list{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;}.template-card{display:flex;gap:20px;align-items:center;width:100%;text-align:left;padding:22px 8px;border-bottom:1px solid var(--line);}.template-card:hover{background:var(--surface);}.template-card>span:nth-child(2){flex:1;min-width:0;}.template-card-index{font:600 38px/1 var(--mono);letter-spacing:-.1em;}.template-card strong{font-size:17px;display:block;margin-bottom:7px;}.template-card small{font-size:11px;color:var(--muted);display:block;}.template-card.inactive{opacity:.55;}.template-settings>.form-hint{padding-top:14px;flex-shrink:0;}
.template-edit-dialog{width:min(1040px,calc(100vw - 40px));height:min(820px,calc(100dvh - 36px));}.template-edit-dialog .panel-body{overflow:hidden;display:flex;flex:1;min-height:0;padding-top:0;}.template-editor{min-width:0;display:flex;flex-direction:column;flex:1;min-height:0;}.template-meta{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:24px;padding-bottom:12px;}.template-meta .field{font-size:11px;}.template-editor-body{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;padding:14px 8px 4px 0;}.template-layout-grid{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:25px;}.layout-options{display:grid;grid-template-columns:1fr 1fr;gap:16px 22px;align-content:start;}.layout-options fieldset{padding:10px 0 0;margin:0;border:0;border-top:1px solid var(--line);min-width:0;}.layout-options legend{font-size:12px;font-weight:700;padding:0 8px 0 0;}.layout-checks{display:grid;grid-template-columns:1fr;gap:8px;}.layout-checks .check-line{font-size:12px;gap:8px;}.layout-map{padding:22px 17px;border:1px solid var(--ink);box-shadow:5px 5px 0 var(--line);align-self:start;position:sticky;top:0;display:flex;flex-direction:column;gap:10px;min-width:0;}.layout-map>strong{font-size:18px;line-height:1.5;}.layout-map>small{font-size:10px;color:var(--muted);}.layout-map [data-map]{display:flex;flex-wrap:wrap;gap:5px;border-top:1px solid var(--line);padding-top:10px;}.layout-map [data-map] span{font-size:9px;background:var(--surface);padding:3px 4px;}.layout-map>b{font-size:20px;border-top:1px solid var(--ink);padding-top:8px;}.template-terms{display:grid;grid-template-columns:1fr;gap:12px;}.template-terms .check-line{font-size:11px;font-weight:400;}.template-fixed-line{padding:14px;border:1px solid var(--line);display:flex;flex-direction:column;gap:10px;}.template-fixed-line>.row>input{flex:1;min-width:0;}.template-fixed-line .field-row{grid-template-columns:repeat(3,minmax(0,1fr));}
.quote-template-bar{display:flex;align-items:center;gap:15px;border-bottom:1px solid var(--line);padding:10px 0 14px;margin-bottom:15px;flex-wrap:wrap;}.quote-template-bar .field{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:11px;}.quote-template-bar select{min-width:190px;max-width:320px;font-size:12px;}.quote-draft-summary{display:grid;grid-template-columns:1fr 1fr;gap:22px;padding:30px 10px;}.quote-draft-summary h2{font-size:26px;margin:10px 0 20px;}.quote-draft-summary p{font-size:12px;}.quote-draft-summary>div:nth-child(2){text-align:right;padding:30px 0;display:flex;flex-direction:column;gap:12px;}.quote-draft-summary>div:nth-child(2)>strong{font:500 40px/1.2 var(--mono);letter-spacing:-.06em;}.quote-draft-summary>div:nth-child(2)>span,.quote-draft-summary small{font-size:11px;color:var(--muted);}.quote-draft-summary>.form-hint{grid-column:1/-1;}.quote-disclaimer{font-size:10px;text-align:center;border-top:1px solid var(--line);padding-top:15px;}.quote-actions>div>small{display:block;margin-top:5px;}
@media(max-width:760px){.settings-section-head{gap:10px;}.dictionary-row,.dictionary-head{grid-template-columns:minmax(0,1fr) 60px 68px;gap:6px;}.dictionary-row .icon-btn{width:29px;min-width:29px;}.day-part-row{grid-template-columns:48px 1fr 1fr;gap:10px;}.day-part-row>.check-line{grid-column:2/4;}.day-part-row strong{font-size:16px;}.owner-rule{padding-left:15px;}.owner-rule h3{font-size:20px;}.owner-summary{grid-template-columns:1fr;}.job-edit-dialog,.template-edit-dialog{width:calc(100vw - 12px);height:calc(100dvh - 20px);max-height:calc(100dvh - 20px);margin:10px auto;}.job-edit-dialog .panel-body,.template-edit-dialog .panel-body{padding:0 14px 14px;}.job-editor-tabs{gap:14px;}.job-editor-tabs .tab{font-size:12px;gap:5px;}.job-form>.form-actions{flex-wrap:wrap;}.job-form>.form-actions>.form-hint{width:100%;margin:0;font-size:10px;}.job-editor-body{padding-right:0;}.shoot-editor{padding:10px;}.time-presets{gap:5px;}.time-preset{padding:8px 2px;font-size:12px;}.time-preset small{font-size:8px;}.crew-editor-row{grid-template-columns:minmax(80px,1fr) minmax(76px,1fr) 29px;}.crew-editor-row .crew-fee-field{grid-column:1/3;grid-row:2;}.crew-editor-row [data-remove-crew]{grid-column:3;grid-row:1;}.crew-editor-row{padding:10px 0;border-top:1px solid var(--line);}.crew-fee-field.automatic>span{font-size:11px;padding:7px 0;}.template-meta{grid-template-columns:1fr 1fr;gap:12px;}.template-meta>.field{grid-column:1/-1;}.template-layout-grid{grid-template-columns:1fr;}.layout-map{display:none;}.layout-options{gap:16px;}.layout-checks .check-line{font-size:11px;}.settings-savebar{gap:12px;}.settings-savebar>.form-hint{font-size:10px;line-height:1.5;}.template-card{gap:12px;padding:18px 4px;}.template-card-index{font-size:28px;}.template-card strong{font-size:15px;}.template-card small{font-size:10px;}.quote-template-bar{gap:9px;}.quote-template-bar .field{width:100%;justify-content:space-between;}.quote-template-bar select{min-width:0;max-width:73%;}.quote-draft-summary{grid-template-columns:1fr;padding:15px 0;gap:12px;}.quote-draft-summary>div:nth-child(2){text-align:left;padding:10px 0;}.quote-draft-summary>div:nth-child(2)>strong{font-size:32px;}.person-editor-form{grid-template-columns:1fr;}.person-editor-form>*{grid-column:1!important;}.person-editor-dialog{width:calc(100vw - 20px);}.owner-estimate{gap:18px;}.owner-estimate strong{font-size:21px;}.template-fixed-line .field-row{grid-template-columns:repeat(3,minmax(0,1fr));}}

/* Match dialog variants: base .panel-wide/.panel-compact otherwise wins width. */
@media(min-width:761px){.panel.job-edit-dialog{width:min(880px,100vw);}.panel.template-edit-dialog{width:min(920px,100vw);}.panel.person-editor-dialog{width:min(680px,100vw);}}

@media(min-width:761px){.template-editor-body .layout-checks{gap:5px;}.template-editor-body .layout-checks .check-line{line-height:1.5;min-height:21px;}.template-editor-body .layout-options{gap:18px 22px;}.template-editor-body .layout-map{padding:17px 14px;}.template-editor-body .layout-map [data-map] span{font-size:9px;}.template-edit-dialog .panel-header{padding-top:18px;padding-bottom:15px;}}

@media(min-width:761px){.template-editor-body .layout-checks{gap:4px;}.template-editor-body .layout-checks .check-line{min-height:19px;line-height:1.4;}}
@media(max-width:640px){[data-time-editor] .field-row:has(input[type="datetime-local"]){grid-template-columns:1fr;}[data-time-editor] .field-row:has(input[type="datetime-local"]) input{width:100%;min-width:0;}.job-edit-dialog .field-row:has(input[type="datetime-local"]){gap:10px;}}

/* Keep all display switches visible in the standard laptop template editor. */
.template-editor>.tabs{margin-bottom:4px;flex-shrink:0;}
.calendar-legend-types{display:flex;gap:13px;min-width:0;overflow:hidden;white-space:nowrap;}.calendar-legend-types>span{display:inline-flex;gap:5px;align-items:center;flex-shrink:0;}
