/* Product layout: readable records, restrained surfaces, one accent. */
:root{--ink:#222820;--muted:#686e64;--brand:#2f613f;--line:#dce0d5;--paper:#fff;--wash:#f5f6f1;--soft:#edf3e7;--danger:#a8322b;font-family:Arial,"Segoe UI",sans-serif;line-height:1.5}
body,body:not(.workspace){background:#fff}
[hidden]{display:none!important}
button,.button,input:not([type=checkbox]),select,textarea{border-radius:6px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,.point:focus-visible{outline:3px solid #759c47;outline-offset:3px}
.header{padding:18px 20px;max-width:1440px}
.header nav{gap:4px}.header nav a{font-size:12px}
.wordmark{font-weight:750;letter-spacing:-1.5px}.wordmark span{font-weight:400}
main{max-width:1440px;padding:28px 20px}
h1{font-size:36px;font-weight:600;letter-spacing:-1.5px}h2{font-weight:600}
.eyebrow{font-size:11px;letter-spacing:1.5px}
.page-heading{margin:0 0 12px;gap:12px}.page-heading .actions{width:100%;align-items:stretch;gap:8px}
.page-heading .actions .button{font-size:14px;padding:10px 12px}
.workspace .page-heading .eyebrow{display:none}
.page-heading .actions .button{width:auto;flex:1}
.archive-tools{margin:0 0 8px;font-size:13px}.archive-tools summary{display:inline-flex;padding-top:0}
.archive-tools .fine{margin:8px 0}
.view-bar{margin-bottom:12px;gap:12px}
.segmented{border:1px solid var(--line);padding:3px;border-radius:7px;background:var(--wash)}
.segmented button[aria-pressed=true]{box-shadow:0 1px 2px #22282015}
.history-summary{font-size:12px;color:var(--muted);margin:0 0 16px}
.mobile-metric-picker{margin:0 0 18px;font-size:13px}
#metric-list{display:none}
.history-layout{display:block}
.metric-heading{align-items:flex-start;gap:16px}.metric-heading h2{font-size:25px;overflow-wrap:anywhere}
.latest{white-space:normal;flex-shrink:0;max-width:40%;font-variant-numeric:tabular-nums}
.latest span{font-size:32px;overflow-wrap:anywhere}.latest small{display:block}
.history-chart{min-height:190px}.history-chart .point{cursor:pointer}.history-chart .point:hover,.history-chart .point:focus{fill:var(--brand);r:7}
.point-detail{padding:18px 0}.point-detail>p:first-child{font-size:19px;font-variant-numeric:tabular-nums}
.point-buttons button{border:0;border-bottom:2px solid transparent;border-radius:0;background:none}
.point-buttons button[aria-pressed=true]{border-bottom-color:var(--brand);background:var(--soft)}
.notice,.message{border-radius:6px}.empty-state{border-radius:6px}
.upload-panel{padding:22px;background:var(--wash);border-radius:6px}
.upload-panel h2{font-size:26px}.file-zone{padding:24px 16px;min-height:148px;display:flex;flex-direction:column;justify-content:center;border-color:#9aa68f}
.file-zone input{line-height:1.8;max-width:100%}
.document-row{gap:12px}.document-title h3{font-size:17px}.document-row .actions{gap:18px}
.narrow{max-width:620px}.manual-form{gap:12px}.manual-extra{border-block:1px solid var(--line);padding:8px 0}
.review-row{padding:24px 0}.review-date{border:1px solid var(--line);background:var(--wash);border-radius:6px}
.review-intro{max-width:650px;color:var(--muted)}.review-processing{border-block:1px solid var(--line);padding:8px 0;margin:20px 0;font-size:14px}.review-processing summary{font-weight:600}
.review-date input{border-color:#9aa68f}.review-row .remove-row{border:0;padding-left:0}
.landing-intro{padding:28px 0 34px;max-width:1020px}
.landing-intro h1{font-size:clamp(40px,6.7vw,88px);line-height:1.02;letter-spacing:-2px;max-width:1050px}
.landing-intro .lead{font-size:19px;line-height:1.55;max-width:680px}
.landing-intro .actions{flex-direction:row;align-items:center;gap:20px}
.demo-shell,body:not(.workspace) .demo-shell{box-shadow:none;border-radius:8px;border:1px solid var(--line);background:var(--wash);padding:24px 16px}
.demo-shell .metric-detail{background:#fff;padding:18px;border-radius:6px}.demo-shell .metric-heading h2{font-size:22px}
.demo-actions{max-width:460px}.demo-label{background:#e2ecd7;border-radius:4px}
.how-it-works article{border:0;border-top:2px solid var(--ink);border-radius:0;box-shadow:none;padding:24px 0;background:none}
.step-number{font-size:13px;color:var(--muted)}.how-it-works h2{font-size:24px}
.landing-faq{max-width:860px}.landing-guides{padding-top:32px;border-top:1px solid var(--line)}
.article-grid article{border-radius:4px;box-shadow:none}
footer{max-width:1440px;padding-inline:20px}
@media(min-width:768px){
 main{padding:40px 32px}.header{padding:22px 32px}
 h1{font-size:44px}.page-heading .actions{width:auto}.page-heading .actions .button{flex:none}
 .mobile-metric-picker{display:none}
 .history-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:32px;align-items:start}
 #metric-list{display:block;max-height:680px;overflow-y:auto;border:0;padding:0 12px 0 0;scrollbar-width:thin}
 .metric-button{width:100%;padding:14px 12px;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:baseline}
 .metric-button[aria-pressed=true]{background:var(--soft);box-shadow:inset 3px 0 var(--brand)}
 .metric-button .metric-mini{margin:0;display:flex;flex-direction:column;align-items:flex-end;gap:0}
 .metric-mini b{font-size:19px}.metric-mini small{font-size:11px}
 .metric-family{border:0;border-block:1px solid var(--line);border-radius:0;padding:12px 0}
 .metric-family .metric-button{margin:0}.metric-family h3,.metric-family>.fine{padding-inline:12px}
 .metric-detail{min-width:0}.latest span{font-size:40px}
 .landing-intro{padding:46px 0}.demo-shell,body:not(.workspace) .demo-shell{padding:32px}
 .demo-shell .metric-detail{padding:24px}.view-bar{display:flex;flex-direction:row;justify-content:space-between}
 .search-label{width:320px}.segmented{min-width:250px}
}
@media(min-width:1100px){
 body.workspace{padding-left:0;background:#fff}
 .workspace>.header{position:static;inset:auto;width:auto;max-width:1440px;height:auto;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:32px;padding:22px 32px;border-right:0;border-bottom:1px solid var(--line)}
 .workspace .wordmark{padding:0;font-size:29px}.workspace .desktop-upload{display:none}
 .workspace .header nav{order:0;flex:1;flex-direction:row;justify-content:flex-start;gap:26px}
 .workspace .header nav a{padding:10px 0;border-radius:0;font-size:14px}
 .workspace .header nav a[aria-current]{background:none;color:var(--ink);box-shadow:inset 0 -2px var(--brand)}
 .workspace .header form{margin:0;padding:0}.workspace main{max-width:1440px;padding:40px 32px}
 .workspace h1{font-size:44px}.workspace .page-heading{border:0;padding:0;margin:0 0 16px}
 .workspace .view-bar{border:0;border-radius:0;padding:0;margin-bottom:12px;box-shadow:none}
 .workspace .history-layout{grid-template-columns:300px minmax(0,1fr);gap:48px}
 .workspace #metric-list{padding:0 16px 0 0;border-radius:0;background:none;box-shadow:none;max-height:calc(100dvh - 70px);position:sticky;top:24px}
 .workspace .metric-button{padding:16px 12px;margin:0;border:0;border-bottom:1px solid var(--line)}
 .workspace .metric-button[aria-pressed=true]{border-color:var(--line);background:var(--soft)}
 .workspace .metric-detail{padding:24px 0 0;border:0;border-top:2px solid var(--ink);border-radius:0;box-shadow:none;position:static}
 .workspace .metric-heading{border:0;padding:0;margin:0 0 20px}
 .workspace .latest{padding:0;background:none;border-radius:0;color:var(--ink)}.workspace .latest span{font-size:48px}
 .workspace .chart-focus{position:static;padding:0;border:0}.workspace .chart-focus .history-chart{max-height:none}
 .workspace .point-detail{background:var(--wash);border-radius:4px;padding:20px}
 .workspace #table-view,.workspace .document-list{border:0;border-radius:0;padding:0;box-shadow:none}
 .workspace .upload-panel{border:0;background:var(--wash);border-radius:6px;padding:32px;gap:48px}
 .workspace .events-layout>section{border:0;border-top:1px solid var(--line);border-radius:0;padding:24px 0}
 .workspace .review-save-bar{left:0}.review-workspace #review-form,.review-workspace .original-preview{border-radius:6px;box-shadow:none}
 .workspace footer{max-width:1440px;padding-inline:32px}.how-it-works article{border:0;border-top:2px solid var(--ink);border-radius:0;padding:24px 0}
}

/* UX pass: keep the result, not the controls, in the first screen. */
.workspace main{padding-top:22px}
.workspace h1{font-size:30px;line-height:1.14}
.pending-link{font-size:13px;margin:12px 0 18px}
.archive-tools{margin-top:30px;border-top:1px solid var(--line);padding-top:12px}
.history-summary{display:none}
.mobile-metric-picker{margin:12px 0 18px}
#metric-picker-open{width:100%;justify-content:space-between;text-align:left;font-weight:600;line-height:1.4;background:var(--wash)}
#metric-picker-dialog{width:min(580px,calc(100% - 24px));max-height:85dvh;border:1px solid var(--line);border-radius:10px;padding:20px;overflow:auto}
#metric-picker-dialog::backdrop{background:#16251b66}
#metric-picker-dialog .search-label{width:100%;margin:12px 0}
#metric-picker-dialog #metric-list{display:block;position:static;max-height:55dvh;padding:0;overflow-y:auto}
#metric-picker-dialog .metric-button{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;gap:16px;margin:0;padding:14px 12px}
#metric-picker-dialog .metric-mini{margin:0;flex-shrink:0}
#metric-picker-dialog .metric-family{margin:0;border-radius:0}
.metric-heading .latest::before{content:'Выбранная дата';display:block;font-size:10px;color:var(--muted);font-weight:400;margin-bottom:4px}
.editor-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:20px 0 8px}
.editor-toolbar .actions{gap:6px}.editor-toolbar button{font-size:12px;padding:8px;min-height:36px;border:0;background:var(--wash)}
.result-item{border-bottom:1px solid var(--line);padding:0;background:#fff}
.result-item>summary{padding:16px 0;color:var(--ink);display:flex;align-items:center;gap:10px;list-style:none}
.result-item>summary::before{content:'+';width:16px;flex:none;color:var(--muted)}
.result-item[open]>summary::before{content:'−'}
.result-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;width:100%;min-width:0}
.result-name{font-weight:600;overflow-wrap:anywhere}.result-value{font-weight:500;text-align:right;max-width:140px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.result-state{grid-column:1/-1;color:var(--muted);font-size:11px}
.result-item .review-row{border:0;padding:8px 0 20px;gap:12px}
.result-item .notice,.result-item .fine{grid-column:1/-1;margin:0}
.review-save-inner{display:flex;align-items:center;justify-content:space-between;gap:12px}
#review-save-status{font-size:12px;margin:0!important;max-width:45%}
.review-save-inner button{width:auto!important;flex:1;font-size:14px}
.upload-disclosure{margin:12px 0 24px}.upload-disclosure>summary{display:inline-flex;background:var(--brand);color:white;padding:10px 16px;border-radius:6px;font-weight:600;min-height:44px;margin-bottom:12px;list-style:none}
.upload-disclosure[open]>summary{background:var(--wash);color:var(--brand)}
.upload-disclosure .upload-panel{margin:0}
.document-tools{display:flex;flex-wrap:wrap;gap:8px 24px;align-items:center;padding-bottom:16px}
.document-tools>label{margin:0;flex:1;min-width:220px}.document-tools .check{font-size:13px}
.report-metrics{max-height:330px;overflow-y:auto;border-block:1px solid var(--line);padding:8px 0;overscroll-behavior:contain}
.report-metrics .check{margin:0;padding:10px 0}.report-search{margin:12px 0}
@media(min-width:768px){
 .workspace h1{font-size:36px}.history-summary{display:block}
 .review-save-inner button{flex:none;min-width:200px}
 .report-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
}
@media(min-width:1100px){
 .workspace main{padding-top:28px}
 .review-workspace .form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
 .review-workspace #review-form{padding:18px 24px}
 .review-date{padding:8px 12px}.review-date strong{font-size:13px}.review-date input{margin-top:0}
 .review-workspace{gap:28px}.review-workspace .original-preview{padding:16px}
}

@media(max-width:767px){.login-page .intro{display:none}.login-page .login-layout{padding-top:12px}.login-page .header-login{display:none}.editor-toolbar button{min-height:44px}}

.review-metadata{margin:0 0 14px}.review-metadata>summary{padding:14px 0;border-block:1px solid var(--line);font-weight:600}.review-metadata[open]>.form-grid{margin-top:12px}@media(max-width:767px){.review-date{padding:0;background:none;border:0}.review-date .fine{display:none}.review-intro{font-size:14px;margin-bottom:16px}.review-workspace .original-preview{margin-bottom:12px}.review-save-inner button{min-height:44px}}

/* Direct manipulation: results first, no picker modal. */
#history-summary{display:none}.manual-link{align-self:center;white-space:nowrap;padding:10px 4px;font-size:14px}
.page-heading .actions{justify-content:flex-end}.page-heading .actions .button{flex:none}
#metric-list{display:flex;gap:8px;overflow-x:auto;padding:0 0 12px;margin-bottom:16px;max-height:none}
#metric-list .metric-button{flex:0 0 auto;display:flex;gap:14px;align-items:center;width:auto;max-width:280px;padding:9px 12px;border:1px solid var(--line);border-radius:4px;background:white;font-size:13px;text-align:left}
#metric-list .metric-button[aria-pressed=true]{border-color:var(--brand);background:var(--soft)}
#metric-list .metric-mini{display:flex;gap:4px;white-space:nowrap}#metric-list .metric-mini small{display:inline}
#metric-list .metric-family{display:flex;gap:8px;flex:none;align-items:center}#metric-list .metric-family h3{display:none}
.latest::before{display:none!important}.point-detail{background:none;border-top:1px solid var(--line);padding:12px 0}.point-detail p{margin:4px 0}
.review-page .page-heading{margin-bottom:16px}.review-page .page-heading h1{font-size:28px}
.review-metadata .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0!important}
.review-metadata .review-date{padding:0;border:0;background:none}.review-metadata label{font-size:12px}.review-metadata input{font-size:14px;min-width:0}
.review-metadata{margin-bottom:12px}.review-page .editor-toolbar{margin:8px 0;font-size:13px}
.direct-result{padding:12px 0!important;border-bottom:1px solid var(--line)}
.direct-result .direct-fields{display:grid;grid-template-columns:minmax(0,1fr) 100px 85px;gap:10px;padding:0!important}
.direct-fields label{font-size:11px;color:var(--muted);margin:0}.direct-fields input{padding:8px;min-height:44px;margin-top:2px;font-size:15px;color:var(--ink)}
.result-extra{margin-top:4px}.result-extra>summary{font-size:12px;color:var(--muted);padding:8px 0;min-height:36px}
.result-extra-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:8px 0}.result-extra-fields label{font-size:12px}.result-extra-fields>p{grid-column:1/-1}
#review-save-status:empty{display:none}.review-save-inner{justify-content:flex-end}.review-save-inner button{flex:none;min-width:130px}
.upload-inline{border-block:1px solid var(--line);padding:16px 0;margin:16px 0}.upload-inline h2{font-size:20px}.upload-inline progress{width:100%}.upload-result{margin:10px 0;padding:12px 0;border-bottom:1px solid var(--line)}
.upload-inline .actions{display:flex;gap:12px}.upload-inline .fine{margin:6px 0}
@media(max-width:767px){
 .header{padding:10px 20px}.header nav{margin-top:8px;padding-top:0}.workspace main{padding-top:16px}
 .view-bar{display:flex;flex-wrap:nowrap;gap:10px;align-items:center}.view-bar .segmented{flex:none;padding:0;background:none;border:0}.view-bar .segmented button{padding:8px;font-size:12px;min-height:44px}.view-bar .search-label{flex:1;min-width:0;margin:0}.view-bar .search-label input{width:100%;font-size:13px;padding:8px}
 .workspace h1{font-size:30px}.workspace .page-heading .actions{gap:20px}.pending-link{margin:4px 0 12px}
 .metric-heading h2{font-size:22px}.metric-heading{margin-bottom:0}.metric-heading .muted{font-size:12px}.history-chart{min-height:0}
 .direct-result .direct-fields{grid-template-columns:minmax(0,1fr) 84px}.direct-fields .field-name{grid-column:1/-1}.direct-fields .field-unit{grid-column:2}.direct-fields .field-value{grid-column:1}.direct-fields .field-name input{font-weight:600}
 .review-page .original-preview{margin-bottom:12px;padding:0}.review-page .original-preview>summary{padding:10px 0}
 .review-page .review-save-bar{padding:8px 16px}.review-page #review-form{padding-bottom:70px}
}
@media(min-width:768px){#metric-list{display:block;max-height:680px;overflow-y:auto;padding-right:12px}#metric-list .metric-button{width:100%;max-width:none;margin-bottom:6px;justify-content:space-between}#metric-list .metric-family{display:block}#metric-list .metric-family h3{display:block;font-size:13px}}

.review-workspace .direct-fields label:first-child{grid-column:auto}.direct-fields label{font-size:0}.direct-fields input{font-size:15px}.direct-fields .field-name input{border-color:transparent;background:transparent;padding-left:0}.direct-fields .field-name input:focus{border-color:var(--line);background:#fff}.direct-result{padding:8px 0!important}.result-extra>summary{padding:4px 0;min-height:32px}
@media(max-width:767px){.view-bar{flex-direction:row}.history-page .page-heading{flex-direction:row;align-items:center;gap:8px}.history-page .page-heading h1{font-size:28px}.history-page .page-heading .actions{width:auto;gap:8px}.history-page .page-heading .button{padding:10px;font-size:13px}.history-page .manual-link{font-size:12px;padding:8px 0}.review-workspace .direct-fields label:first-child{grid-column:1/-1}}

.demo-example{padding:20px 0;border-top:1px solid var(--line);margin-top:20px;scroll-margin-top:20px}.demo-example h3{margin-bottom:12px}#demo-feedback:empty{display:none}.demo-heading{margin-bottom:16px}.landing-intro{padding-top:16px;padding-bottom:24px}.landing-intro h1{font-size:clamp(36px,5.5vw,72px)}.landing-intro .lead{font-size:18px;margin:16px 0}.landing-intro .actions{margin-top:20px}

.login-page .login-layout{display:block;max-width:420px;margin:32px auto}.login-page .login-form{padding:0;background:none;border:0}.login-page .header-login{display:none}.login-page h1{font-size:32px;margin-bottom:12px}

/* Keep mobile fields within the content gutter, including native date controls. */
main form,.form-grid>*,.review-workspace>*,.events-layout>*,.upload-panel>*{min-width:0;max-width:100%}
input:not([type=checkbox]),select,textarea{max-width:100%}
.review-metadata .form-grid,.result-extra-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.document-title p,.review-intro,.check span{overflow-wrap:anywhere}
.document-delete{flex-shrink:0}.document-row .actions .document-delete button{padding:10px 0}
@media(max-width:767px){
 main,.workspace main{padding-inline:max(24px,env(safe-area-inset-left)) max(24px,env(safe-area-inset-right))}
 .header,footer{padding-inline:24px}
 .document-tools>label{min-width:0;flex-basis:100%}
 .upload-panel{padding:16px}.file-zone{padding:16px 12px}
 .review-metadata input,.direct-fields input,.view-bar .search-label input{font-size:16px}
 .review-page .review-save-bar{padding:8px 24px calc(8px + env(safe-area-inset-bottom))}
 .table-scroll,#metric-list,.point-buttons{min-width:0;max-width:100%}
}
@media(max-width:479px){
 .review-metadata .form-grid,.result-extra-fields{grid-template-columns:minmax(0,1fr)}
 .history-page .page-heading h1{font-size:26px}.history-page .page-heading .actions{gap:6px}
}

/* Forms retain an inner gutter and size columns from usable form width. */
.events-layout .form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))}
input[type=date]{appearance:none;-webkit-appearance:none;display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px}
input[type=date]::-webkit-date-and-time-value{min-height:1.5em;text-align:left}
input[type=date]::-webkit-datetime-edit{padding:0;min-width:0}
textarea{resize:vertical}
@media(max-width:1099px){.events-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:767px){
 .events-layout>section:first-child,.manual-form,.review-page #review-form,.login-page .login-form{padding-inline:8px}
 main input:not([type=checkbox]),main select,main textarea{font-size:16px;line-height:1.5}
 .events-layout .form-grid{gap:12px}
 .events-layout form>button[type=submit]{max-width:100%}
}

/* Personal dashboard: compact controls, with editing outside the chart. */
.dashboard-bar{display:flex;align-items:center;gap:12px;margin-bottom:10px}.dashboard-bar label{margin:0;flex:1;max-width:300px}.dashboard-bar select{margin:0}.dashboard-bar>button{margin-left:auto}
#dashboard-save-status:empty{display:none}#dashboard-save-status{margin:4px 0;font-size:12px}
#metric-manager{padding:0 8px 20px;border-block:1px solid var(--line);margin:16px 0 24px;scroll-margin-top:16px}#metric-manager .section-line{border:0;margin-top:0;padding-top:16px}#metric-manager h2{font-size:22px}
.manager-row{padding:16px 0;border-bottom:1px solid var(--line)}.manager-title{display:flex;flex-direction:column;margin-bottom:8px;overflow-wrap:anywhere}.manager-row .actions{gap:6px}.manager-row button{padding:8px;font-size:13px}.manager-row .check{margin:8px 0 0}
.metric-actions{margin:0 0 8px}.metric-actions>summary{font-size:25px;line-height:1;list-style:none;width:44px;text-align:center;margin-left:auto}.metric-actions .actions{padding-bottom:8px}.metric-actions button{font-size:13px;padding:8px 12px}
.pin-mark{font-size:12px;color:var(--brand)}#metric-list .metric-mini{flex-wrap:wrap}#metric-list .metric-delta{display:block;flex-basis:100%;font-size:11px;color:var(--muted);font-weight:400;white-space:normal}#metric-list .metric-mini{max-width:150px}
.comparison-row{padding:18px 0;border-bottom:1px solid var(--line)}.comparison-row h3{margin-bottom:2px}.comparison-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:12px 0}.comparison-values>div{min-width:0}.comparison-values small,.comparison-values a{display:block}.comparison-values a{margin-top:8px;overflow-wrap:anywhere}.comparison-row .fine{margin-bottom:0}

@media(max-width:767px){.history-page .view-bar{flex-wrap:wrap}.history-page .view-bar .segmented{flex-basis:100%;justify-content:space-between}.history-page .view-bar .segmented button{flex:1;font-size:14px}.history-page .view-bar .search-label{flex-basis:100%;max-width:none}.history-page .view-bar .search-label input{font-size:16px}.comparison-values{gap:12px}.dashboard-bar{gap:8px}.dashboard-bar select{font-size:14px}#metric-list .metric-button{max-width:300px}}

.manager-row button{min-width:44px}.dashboard-bar select{font-size:16px}

/* Account actions live in the profile, outside the analysis workspace. */
.profile-nav{margin-left:auto;min-height:44px;display:inline-flex;align-items:center;font-size:14px;color:var(--muted);text-decoration:none}.profile-nav[aria-current]{color:var(--brand);font-weight:600}.profile-layout{max-width:620px;margin:0 auto}.profile-email{overflow-wrap:anywhere;margin:8px 0 0}.profile-section{padding:24px 0;border-top:1px solid var(--line)}.profile-section h2{font-size:20px;margin:0 0 12px}.profile-link{display:flex;justify-content:space-between;gap:16px;padding:14px 0;min-height:48px;text-decoration:none}.profile-link span:first-child{min-width:0;overflow-wrap:anywhere}.profile-settings>summary{min-height:48px;padding:12px 0;cursor:pointer}.profile-page #metric-manager{margin:0;border:0;padding:8px 0 0}.profile-signout{margin-top:24px}.profile-undo{margin-top:16px}.profile-page .page-heading{margin-bottom:24px}

.analysis-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 0 24px;margin:0 0 24px;border-bottom:1px solid var(--line)}.analysis-heading h1{margin:0;letter-spacing:-1.5px}.analysis-actions{display:flex;align-items:center;gap:10px}.analysis-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:12px 18px;font-size:14px;font-weight:600;border-radius:10px;white-space:nowrap}.analysis-actions svg{width:18px;height:18px;flex:none}.analysis-actions .analysis-manual{background:var(--wash);border-color:transparent;color:var(--ink)}.analysis-actions .analysis-manual:hover{background:var(--soft);border-color:var(--line)}.analysis-actions .button:focus-visible{outline:2px solid var(--brand);outline-offset:3px}.profile-processing>summary{min-height:48px;padding:14px 0;cursor:pointer;color:var(--brand)}.profile-processing p{font-size:14px;overflow-wrap:anywhere}
@media(max-width:599px){.analysis-heading{display:block;padding-bottom:20px;margin-bottom:20px}.workspace .analysis-heading h1{font-size:34px;line-height:1.15;margin:0 0 20px}.analysis-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.analysis-actions .button{width:100%;padding:12px 10px;min-height:50px}}
.audit-layout{max-width:760px;margin:0 auto}.audit-back{display:inline-block;margin-bottom:24px;font-size:14px}.audit-heading h1{font-size:clamp(28px,4vw,40px);line-height:1.15;letter-spacing:-1px;margin:0 0 12px}.audit-heading p{margin:0}.audit-start{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:24px 0;border-bottom:1px solid var(--line);margin-bottom:24px}.audit-start form{margin:0;text-align:right}.audit-start [data-ai-status]:empty{display:none}.audit-start [data-ai-status]{max-width:320px;font-size:13px}.audit-status{padding:12px 16px;background:var(--wash);border-radius:8px}.audit-section-title{font-size:20px;margin:28px 0 16px}.audit-section-title>span{font-size:13px;font-weight:400;color:var(--muted);margin-left:8px}.audit-card{padding:24px;margin-bottom:16px;border:1px solid var(--line);border-radius:12px;background:#fff}.audit-card h2{font-size:24px;margin:0 0 8px;overflow-wrap:anywhere}.audit-tag{font-size:12px;color:var(--brand);margin:0 0 12px}.audit-change{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:var(--wash);padding:16px;border-radius:8px;margin:20px 0;font-size:19px}.audit-change small{font-size:13px;color:var(--muted)}.audit-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.audit-card-actions>a{font-size:14px}.audit-card button{min-height:48px}.audit-preview{margin:16px 0}.audit-preview summary{padding:8px 0}.audit-preview-row{padding:16px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.audit-preview-row>span{display:block}.audit-preview-row p{margin:6px 0}.audit-review{margin:32px 0}.audit-review-row{padding:20px 0;border-top:1px solid var(--line)}.audit-review-row h3{font-size:18px;margin:0 0 8px}.audit-source-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px;font-size:14px}.audit-empty{padding:28px 0}.audit-empty h2{font-size:22px}.audit-history{border-top:1px solid var(--line);padding-top:16px;margin-top:32px}.audit-history form{margin:12px 0}.audit-footnote{margin-top:24px;color:var(--muted)}.unit-hint{margin:0;color:var(--brand)}
@media(max-width:599px){.audit-card{padding:20px 16px}.audit-card h2{font-size:22px}.audit-card-actions{align-items:stretch;flex-direction:column;gap:12px}.audit-card button{max-width:100%;white-space:normal}.audit-change{font-size:17px;padding:12px}.audit-start{gap:12px}.audit-start button{font-size:13px;padding:12px}.audit-start>span{white-space:nowrap}.audit-heading h1{font-size:30px!important}}

/* Compact account and settings screen. */
.profile-refined{max-width:600px}
.profile-account{margin:0 0 28px}
.profile-account h1{margin:0;font-size:32px}
.profile-account .profile-email{margin:8px 0 0;color:var(--muted);font-size:15px}
.profile-panel{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden}
.profile-panel> *+*{border-top:1px solid var(--line)}
.profile-refined .profile-link,.profile-refined details>summary,.profile-empty{padding:18px 20px;min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:16px;color:var(--ink);font-size:15px;font-weight:500;line-height:1.5;text-decoration:none;margin:0}
.profile-refined details>summary{list-style:none;cursor:pointer}
.profile-refined details>summary::-webkit-details-marker{display:none}
.profile-refined summary>span:first-child{min-width:0;overflow-wrap:anywhere}
.profile-refined small{display:block;margin-top:3px;font-size:13px;font-weight:400;line-height:1.5;color:var(--muted)}
.profile-refined .profile-link:hover,.profile-refined details>summary:hover{background:var(--wash)}
.profile-refined .profile-link:focus-visible,.profile-refined summary:focus-visible{outline:2px solid var(--brand);outline-offset:-3px}
.profile-chevron{flex:none;color:var(--muted);transition:transform .15s}
.profile-refined details[open]>summary .profile-chevron{transform:rotate(180deg)}
.profile-help{margin-top:28px}
.profile-help h2{font-size:13px;font-weight:500;color:var(--muted);margin:0 0 10px 2px}
.profile-refined #dashboard-controls{padding:0 20px 16px}
.profile-refined #dashboard-save-status:empty{display:none}
.profile-refined .profile-explanation{padding:0 20px 18px;color:var(--muted)}
.profile-refined .profile-explanation p{margin:0 0 12px;font-size:14px;line-height:1.65}
.profile-refined .profile-explanation p:last-child{margin-bottom:0}
.profile-refined .profile-signout{margin-top:24px}
.profile-refined .profile-signout button{border:0;background:transparent;color:var(--muted);padding:10px 0;min-height:44px;font-weight:400;box-shadow:none}
.profile-refined .profile-signout button:hover{color:var(--ink);text-decoration:underline}
.profile-empty{display:block;color:var(--muted)}
@media(max-width:600px){.profile-account{margin-bottom:22px}.profile-account h1{font-size:28px}.profile-refined .profile-link,.profile-refined details>summary,.profile-empty{padding:16px}.profile-refined #dashboard-controls{padding:0 16px 16px}.profile-refined .profile-explanation{padding:0 16px 16px}.profile-help{margin-top:24px}}
