/* Screen presentation for Bleend's existing mineral / petrol design system. */
:root{--workspace-width:1440px;--workspace-gutter:clamp(16px,3vw,40px);--header-height:72px}
body{ -webkit-font-smoothing:antialiased}
button,a,input,select,textarea{touch-action:manipulation}
h1,h2,h3{text-wrap:balance}
.eyebrow{font-size:11px;letter-spacing:.1em}
.button{border-radius:4px;min-height:44px;font-size:13px;transition:background .16s ease,border-color .16s ease}
.button:hover:not(:disabled){transform:none}
.button.quiet{background:var(--surface);border-color:var(--line)}
.button.quiet:hover:not(:disabled){border-color:var(--line-strong)}
.topbar{height:var(--header-height);background:var(--surface)}
.topbar-inner{gap:24px}
.top-brand img{width:36px;height:36px}
.top-brand b{font-size:15px;letter-spacing:.03em}
.top-brand small{font-size:9px;letter-spacing:.09em;margin-top:4px}
.top-actions{gap:18px;margin-left:auto}
.studio-nav{display:flex;align-items:center;gap:24px;margin-left:32px;align-self:stretch}
.studio-nav a{display:flex;align-items:center;position:relative;color:var(--muted);font-size:12px;font-weight:600;text-decoration:none;white-space:nowrap;min-height:44px}
.studio-nav a:hover{color:var(--ink)}
.studio-nav a[aria-current=page]{color:var(--ink)}
.studio-nav a[aria-current=page]::after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--clay)}
.header-link{font-size:12px}
.workspace-header-menu>div{border-radius:4px;box-shadow:none}
.studio-skip{position:fixed;left:16px;top:8px;z-index:100;padding:10px 16px;background:var(--ink);color:var(--btn-ink,white);transform:translateY(-150%)}
.studio-skip:focus{transform:none}
#workspace .layout{grid-template-columns:224px minmax(0,1fr);min-height:calc(100dvh - var(--header-height))}
#workspace .sidebar{background:var(--ground)}
#workspace .sidebar-head{padding:28px 20px 24px}
#workspace .sidebar-head h2{font-size:24px;margin:8px 0}
#workspace .sidebar-head p{font-size:12px;line-height:1.7}
#workspace .project-picker{margin:20px 0 12px}
#workspace .project-picker select{min-height:44px;border-radius:4px;border-color:var(--line);font-size:12px}
#workspace .new-button{font-size:12px;gap:8px}
#workspace .all-money-link{font-size:12px;margin-top:16px}
#workspace .project-list{padding:12px 0;counter-reset:none}
#workspace .project-item{padding:16px 12px 16px 20px;gap:6px}
#workspace .project-item::before{display:none}
#workspace .project-item b{font-size:13px;line-height:1.5}
#workspace .project-item span{font-size:10px}
#workspace .project-row.active{background:var(--surface)}
#workspace .project-delete{opacity:0;width:28px;transition:opacity .16s}
#workspace .project-row:hover .project-delete,#workspace .project-row:focus-within .project-delete{opacity:1}
#workspace .sidebar-foot{padding:20px}
#workspace .sidebar-foot p{font-size:12px;margin:8px 0 16px}
#workspace .backup-actions{gap:12px}
#workspace .backup-actions button{font-size:11px;min-height:32px}
#workspace .main{padding:32px var(--workspace-gutter) 64px}
#workspace .page-heading.studio-hero{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:24px;align-items:center;border:0;margin-bottom:28px;padding:0}
.studio-hero h1{font-size:clamp(32px,3.7vw,52px);letter-spacing:-.065em;line-height:1.08;max-width:none;margin:12px 0 14px}
.studio-hero .workspace-ai-intro{max-width:none}
.studio-hero .workspace-ai-intro p{font-size:13px;line-height:1.7;max-width:55ch;margin-bottom:18px}
.studio-hero .workspace-ai-intro .button{border-radius:4px;font-size:12px}
.hero-plan{margin:0;background:var(--panel-2);border-radius:4px;padding:16px 20px;color:var(--ink);align-self:stretch;display:flex;flex-direction:column;justify-content:center}
.hero-plan img{display:block;width:100%;height:auto}
.hero-plan figcaption{display:flex;justify-content:space-between;font:10px/1.5 var(--mono);color:var(--muted);margin-top:12px}
#workspace .editor-layout{grid-template-columns:minmax(0,1fr) 300px;gap:24px}
#workspace .editor,#workspace .summary{border:1px solid var(--line);border-radius:4px;overflow:clip}
#workspace .editor-head{padding:24px;gap:16px;border-bottom:0}
#workspace .editor-head h2{font-size:clamp(24px,2.4vw,32px);line-height:1.15;margin:8px 0 0;letter-spacing:-.045em}
#projectHeading::after{content:none}
#workspace .editor-head .eyebrow{color:var(--muted);font-size:11px}
#workspace .quick-tools{gap:16px;margin-top:16px}
#workspace .quick-tools a{font-size:12px;border-bottom:0}
#workspace .quick-delete{font-size:11px;color:var(--muted)}
#workspace .save-status{font:11px/1.5 var(--display);white-space:normal;max-width:110px;flex-shrink:0}
#workspace .steps{border-top:1px solid var(--line);background:var(--panel)}
#workspace .steps button{padding:14px 8px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;border-right:0}
#workspace .steps button span{font:10px/1 var(--mono);margin:0;display:inline;color:var(--muted)}
#workspace .steps button[aria-current=step]{background:var(--surface)}
#workspace .steps button[aria-current=step] span{color:var(--accent-text)}
#workspace .steps button[aria-current=step]::after{height:2px}
#workspace .step-content{padding:28px 24px 32px;min-height:440px}
#workspace .section-title{margin-bottom:24px}
#workspace .section-title .eyebrow{color:var(--muted);font-size:10px}
#workspace .section-title h3{font-size:24px;margin:8px 0;letter-spacing:-.04em}
#workspace .section-title p{font-size:13px;line-height:1.7}
#workspace .form-grid{gap:20px 16px}
#workspace .field label{font-size:12px;font-weight:600;margin-bottom:8px}
#workspace .field input,#workspace .field textarea,#workspace .field select{border-radius:4px;font-size:13px;min-height:46px;border-color:var(--line);background:var(--ground)}
#workspace .field input[readonly]{background:transparent;border-style:dashed;cursor:default}
#workspace .field small{font-size:11px;line-height:1.6}
#workspace .prefix-field,#workspace .suffix-field{border-radius:4px;overflow:clip}
#workspace .editor-foot{padding:16px 24px}
#workspace .summary{top:calc(var(--header-height) + 24px)}
.summary-plan{height:110px;padding:0 20px;display:flex;align-items:center}
.summary-plan svg{height:110px;max-width:200px;margin-left:auto}
.summary-plan>span{max-width:8ch;bottom:24px;line-height:1.7;font-size:10px}
#workspace .summary-body{padding:24px 20px}
#workspace .summary-body h2{font-size:24px;line-height:1.2;margin:10px 0 20px}
.package-details summary{font:12px/1.5 var(--display);text-transform:none;letter-spacing:0;padding:12px 0}
.package-list b{font-size:12px}.package-list small{font-size:11px;line-height:1.5}.package-list i{font-size:10px}
.readiness{font-size:12px;line-height:1.6;min-height:44px;margin-bottom:12px}
.download-status{font-size:12px}
.project-tools a{font-size:12px;min-height:44px;align-items:center}
.form-link a,.form-link button,.briefs-head button{font-size:12px;min-height:32px}
.brief-list,.file-help{font-size:12px;line-height:1.6}
.empty-state.studio-onboarding{background:var(--surface);border:1px solid var(--line);border-radius:4px;max-width:none;margin:0;padding:40px;min-height:360px;align-items:stretch}
.studio-onboarding h2{max-width:25ch;font-size:32px;line-height:1.2;margin:12px 0 16px}
.studio-onboarding>p{max-width:60ch;font-size:14px}
.empty-ai-actions .button{border-radius:4px}
.studio-workflow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:32px 0 0;padding-top:24px;border-top:1px solid var(--line)}
.studio-workflow h3{font-size:13px;margin:0 0 8px}.studio-workflow p{font-size:12px;color:var(--muted);line-height:1.7;margin:0;max-width:25ch}
.no-project{padding:32px;background:var(--surface);border:1px solid var(--line);border-radius:4px;max-width:none;margin:0}
.login-art{background:#173331;align-content:center}
.login-art::before{display:none}
.login-art svg{width:70%;max-width:560px}
.login-art-copy{position:absolute;top:8%;left:9%;right:9%;max-width:440px}
.login-art-copy p{font-size:12px;letter-spacing:.04em;color:#bdd1c7;margin:0 0 16px}
.login-art-copy h2{font-size:clamp(32px,3.6vw,52px);line-height:1.15;letter-spacing:-.05em;color:#fbfbf8;margin:0;font-weight:500}
.login-art>span{left:9%;bottom:7%;font:12px var(--display);text-transform:none;letter-spacing:0}
.login-card{width:min(410px,calc(100% - 64px));padding:48px 0}
.login-card .wordmark{margin-bottom:56px;width:160px}
.login-card>h1{font-size:42px;line-height:1.1;margin:12px 0 16px}
.login-card>p{font-size:14px;line-height:1.7;margin-bottom:28px}
.native-login input{border-radius:4px;border-color:var(--line)}
.login-card .button{margin-bottom:8px}
.login-recovery{margin:8px 0}
.login-legal{margin-top:24px}
.boq-shell,.ledger-shell,.document-shell,.settings-shell{padding-top:32px}
.boq-heading,.ledger-heading,.document-heading,.settings-heading{gap:24px;padding-bottom:24px;border-bottom:1px solid var(--line);margin-bottom:24px}
.boq-heading h1,.ledger-heading h1,.document-heading h1,.settings-heading h1{font-size:clamp(30px,3.2vw,44px);line-height:1.15;letter-spacing:-.055em;margin:10px 0}
.document-heading h1{font-size:32px}
.boq-heading p,.ledger-heading p,.settings-heading p{font-size:14px;line-height:1.7}
.heading-actions .button,.document-actions .button{font-size:12px;min-height:44px}
.boq-stats,.ledger-stats{gap:0;border:1px solid var(--line);border-radius:4px;overflow:hidden;margin:24px 0}
.boq-stats>div,.ledger-stats>div{border:0;border-right:1px solid var(--line);padding:24px;background:var(--surface);color:var(--ink);min-height:136px}
.boq-stats>div:last-child,.ledger-stats>div:last-child{border-right:0}
.boq-stats .grand,.ledger-stats>div:first-child{background:var(--ink);color:var(--surface)}
.boq-stats .grand .eyebrow,.ledger-stats>div:first-child .eyebrow,.ledger-stats>div:first-child small{color:#bdd1c7}
.ledger-stats .eyebrow,.ledger-stats small{color:var(--muted)}
.ledger-stats .review-stat{background:#e4ebe5}
.boq-stats strong,.ledger-stats strong{font-size:clamp(22px,2.2vw,30px);font-weight:600;margin:16px 0 8px;font-variant-numeric:tabular-nums}
.boq-stats small,.ledger-stats small{font-size:11px}
.boq-tabs{top:var(--header-height);background:var(--paper);border-bottom-color:var(--line)}
.boq-tabs [role=tab]{font-size:13px;padding:12px 20px;border-bottom-width:2px}
.tab-num{border:0;border-radius:4px;background:var(--mist)}
.status-chip,.entry-chip{border-radius:3px;letter-spacing:.03em}
.section-rail{background:#e8ede7;border:1px solid var(--line);border-radius:4px;padding:20px}
.section-rail li a,.section-rail label,.rail-help{font-size:12px}
.boq-section,.empty-sections,.summary-preview,.studio-notes,.ledger-card,.category-panel,.history-panel,.settings-card{border-radius:4px}
.boq-section{overflow:clip}
.section-head{padding:20px}
.section-head h2{font-size:22px}
.empty-sections{border-style:solid;padding:40px;min-height:240px}
.empty-sections p{font-size:14px;max-width:60ch;line-height:1.7}
.save-line,.ledger-context{font:12px/1.7 var(--display)}
.ledger-context{max-width:85ch}
.ledger-card{padding:28px;margin-bottom:24px}
.card-heading{padding-bottom:20px;margin-bottom:20px;align-items:center}
.card-heading h2{font-size:24px}.card-heading p{font-size:12px;line-height:1.7;max-width:50ch}
.entry-form label,.filters label{font-size:12px;gap:8px;font-weight:600}
.entry-form input,.entry-form select,.entry-form textarea,.filters input,.filters select{border-radius:4px;border-color:var(--line);min-height:44px;font-size:13px}
.filters{gap:16px;padding-bottom:20px}
.entry-main strong{font-size:14px}.entry-main p,.entry-note{font-size:12px;line-height:1.7}.entry-amount{font-size:15px}
.entry-meta{gap:8px}.entry-chip{font-size:10px}.entry-actions button,.receipt-list button{font-size:12px;min-height:32px}
.month-heading{font-size:11px;padding:12px}
.entry-empty{font-size:14px;padding:32px 0;max-width:60ch;line-height:1.8}
.agreement-workspace{border-radius:4px;min-height:400px}
.agreement-sidebar{background:#e8ede7}
.template-info{border-bottom:1px solid var(--line);padding-bottom:20px}
.contract-drafter h2{font-size:20px;line-height:1.25;letter-spacing:-.04em}
.contract-drafter p{font-size:12px;line-height:1.7}
.contract-drafter label{font-size:12px}
.contract-drafter textarea,.contract-drafter select{border-radius:4px;border-color:var(--line);font-size:13px}
.voice-button{border-radius:4px}
.page-scroll{background:#e1e6df}
.settings-shell .settings-heading{max-width:960px}
.settings-card{max-width:960px;padding:32px}
.settings-card>p{font-size:14px;line-height:1.8}
.settings-card h2{font-size:28px}
.connection-details{display:grid;grid-template-columns:1fr 1.5fr 1fr;background:var(--paper);border:1px solid var(--line);border-radius:4px}
.connection-details div{display:block;padding:20px;border-bottom:0;border-right:1px solid var(--line)}
.connection-details div:last-child{border-right:0}
.connection-details dt{font-size:12px;margin-bottom:12px}
.connection-details dd{font-size:15px;font-weight:600}
.usage-status h3{font-size:16px}.usage-status p{font-size:12px;line-height:1.8}
@media(max-width:1200px){.studio-nav{margin-left:8px;gap:20px}#workspace .editor-layout{grid-template-columns:minmax(0,1fr) 270px;gap:16px}#workspace .layout{grid-template-columns:200px minmax(0,1fr)}.page-heading.studio-hero{grid-template-columns:minmax(0,1fr) 190px}.hero-plan{padding:12px}.boq-stats>div,.ledger-stats>div{padding:20px}}
@media(max-width:1050px){.studio-nav{gap:16px}.topbar-inner{gap:16px}.top-actions{gap:12px}#workspace .editor-layout{grid-template-columns:minmax(0,1fr)}#workspace .summary{position:static}.summary-plan{height:120px}.summary-body{display:block}.hero-plan{display:none}.page-heading.studio-hero{grid-template-columns:minmax(0,1fr)}.boq-stats strong,.ledger-stats strong{font-size:24px}}
@media(max-width:800px){:root{--header-height:112px}.topbar-inner{min-height:112px;flex-wrap:wrap;align-content:center;gap:0 16px;padding-block:8px}.top-brand small{font-size:8px}.top-actions{flex-wrap:nowrap;gap:14px}.studio-nav{order:3;flex-basis:100%;margin:8px 0 -8px;gap:28px;min-height:40px;overflow:auto}.studio-nav a{min-height:40px;font-size:12px}.top-actions .header-link{font-size:11px}.topbar .assistant-entry{font-size:12px;padding:8px 12px}.workspace-header-menu{font-size:11px}#workspace .layout{display:flex;flex-direction:column}#workspace .sidebar-head{padding:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}#workspace .sidebar-head h2,#workspace .sidebar-head>p,#workspace .sidebar-head>.eyebrow{display:none}#workspace .project-picker{margin:0;grid-column:1;grid-row:1}#workspace .project-picker .eyebrow{display:none}#workspace .new-button{grid-row:1;grid-column:2;width:auto;min-height:44px;padding:10px 14px}#workspace .project-list{padding:0 8px 8px}#workspace .project-item{padding:10px 12px;min-height:54px}#workspace .project-item b{font-size:12px}#workspace .project-item span{font-size:10px}#workspace .project-delete{display:none}#workspace .sidebar-foot{display:none}#workspace .main{padding:24px 16px 48px}#workspace .steps{top:var(--header-height)}.studio-hero h1{font-size:36px}.page-heading.studio-hero{margin-bottom:24px}#workspace .editor-head{padding:20px}#workspace .editor-head h2{font-size:28px}#workspace .step-content{padding:24px 20px}#workspace .editor-foot{padding:16px 20px}#workspace .steps button{font-size:12px;padding:14px 6px;gap:5px}.empty-state.studio-onboarding{padding:28px 24px;min-height:0}.studio-onboarding h2{font-size:28px}.studio-workflow{gap:16px}.login-art-copy h2{font-size:36px}.boq-stats>div,.ledger-stats>div{padding:20px;min-height:120px}.boq-stats>div:nth-child(2),.ledger-stats>div:nth-child(2){border-right:0}.boq-stats>div:nth-child(-n+2),.ledger-stats>div:nth-child(-n+2){border-bottom:1px solid var(--line)}.boq-tabs [role=tab]{padding:12px 16px}.document-heading,.ledger-heading,.boq-heading{align-items:start}.document-heading h1{font-size:28px}.ledger-card{padding:24px 20px}.settings-card{padding:24px}.connection-details{grid-template-columns:1fr}.connection-details div{border-right:0;border-bottom:1px solid var(--line);padding:16px}.connection-details div:last-child{border-bottom:0}.agreement-workspace{min-height:0}.agreement-sidebar{padding:20px}.document-actions .button{font-size:12px;flex:none}.document-actions{gap:8px}.document-actions .quick-voice{flex-basis:100%}}
@media(max-width:540px){.top-actions{gap:12px}#lockButton{font-size:10px}.studio-nav{gap:24px}.top-brand img{width:30px;height:30px}.top-brand b{font-size:13px}.topbar .assistant-entry{font-size:11px;padding:8px 10px}.studio-workflow{grid-template-columns:1fr;gap:20px}.studio-workflow p{max-width:38ch}#workspace .save-status{font-size:10px;max-width:80px}#workspace .quick-tools{gap:12px}#workspace .quick-tools a{font-size:11px}.boq-stats strong,.ledger-stats strong{font-size:22px}.boq-stats .eyebrow,.ledger-stats .eyebrow{font-size:10px;letter-spacing:.03em}.boq-stats>div,.ledger-stats>div{padding:16px}.empty-sections{padding:24px}.login-card{width:calc(100% - 48px);padding:40px 0}.login-card .wordmark{margin-bottom:40px}.login-card>h1{font-size:36px}.document-actions .button{padding:8px 12px;font-size:11px}.settings-card h2{font-size:24px}}
@media(pointer:coarse){#workspace .project-delete{opacity:1}}
@media(max-width:1050px){#workspace .page-heading.studio-hero{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){.top-actions>[data-install-app]{display:none}.login-art{min-height:220px;max-height:220px;display:block}.login-art svg{position:absolute;right:-36px;bottom:-60px;width:230px;opacity:.45}.login-art-copy{top:24px;left:24px;max-width:250px}.login-art-copy p{font-size:11px;margin-bottom:12px}.login-art-copy h2{font-size:28px}.login-art>span{display:none}}
@media(max-width:540px){#ledgerLink{display:none}}
@media(max-width:800px){#workspace .editor-foot{position:static}.assistant-toggle{width:44px;height:44px;padding:6px;justify-content:center}.assistant-toggle>span{display:none}.assistant-toggle svg{width:28px;height:28px}}
.notes-layout>*,.summary-layout>*{min-width:0}
.notes-list textarea{min-width:0}
@media(max-width:1100px){.notes-layout,.summary-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:540px){.notes-list li{flex-wrap:wrap}.notes-list textarea{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
.project-tools button{display:flex;justify-content:space-between;align-items:center;gap:.5rem;min-height:44px;padding:.55rem 0;border:0;border-bottom:1px solid var(--line);background:none;color:inherit;font:700 12px/1.3 inherit;font-family:inherit;text-align:left;cursor:pointer}
.project-tools button:hover{color:var(--clay)}
.access-list{display:grid;gap:.2rem;max-height:46vh;overflow-y:auto;margin:1rem 0}
.access-list label{display:flex;align-items:center;gap:.7rem;min-height:44px;font-size:.92rem}
.access-list input{width:18px;height:18px;flex:none}
.access-list small{color:var(--muted)}

/* Nine menu links no longer fit beside the brand and the actions on a tablet, so the menu takes its own
   scrolling row from 1100px down, as it already did from 800px. The signed-in header also holds the inbox bell. */
@media (min-width: 801px) and (max-width: 1100px) {
  :root { --header-height: 112px; }
  .topbar-inner { min-height: 112px; flex-wrap: wrap; align-content: center; gap: 0 16px; padding-block: 8px; }
  .studio-nav { order: 3; flex-basis: 100%; margin: 8px 0 -8px; gap: 28px; min-height: 40px; overflow: auto; }
}
