/* Adapter to happyhome-app-starter 87c89c1, Design System v1.0.1.
 * Dark Slate surfaces and the extra home button are explicit owner requests. */
.rates-panel{grid-column:1/-1;border:1px solid var(--line);border-radius:var(--hh-radius-card);margin-top:18px;overflow:hidden;min-width:0}.rates-panel .panelhead{margin:0;background:var(--soft);font-family:var(--hh-font);font-weight:600;line-height:1.5;letter-spacing:0}.rates-content{padding:16px}.rates-content .fields{margin-top:16px}.rates-panel .panelhead>span{display:flex;align-items:flex-start;gap:8px}.rates-panel .step{flex-shrink:0;margin:0;margin-top:1px}.results .rates-panel .fields{grid-template-columns:1fr}
@media(min-width:768px) and (max-width:1199px){.results .rates-panel .fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
:root{font-family:var(--hh-font);font-size:16px;--panel:var(--hh-surface);--muted:var(--hh-muted);--line:var(--hh-border);--blue:var(--hh-primary);--soft:var(--hh-soft);--bg:var(--hh-bg);background:var(--hh-bg);color:var(--hh-text)}
:root[data-theme=dark]{--hh-bg:#0b1329;--hh-surface:#0f172a;--hh-navy:#0b1329}
body,body.dark{font-family:var(--hh-font);font-size:14px;line-height:1.6;color:var(--hh-text);background:var(--hh-bg);--panel:var(--hh-surface);--muted:var(--hh-muted);--line:var(--hh-border);--blue:var(--hh-primary);--soft:var(--hh-soft);--bg:var(--hh-bg)}
button{min-height:44px;border-radius:var(--hh-radius-button);font-size:14px;line-height:1.4;font-weight:600}input,select{font-variant-numeric:tabular-nums}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--hh-focus);outline-offset:3px}
header.hh-header{height:auto;display:block;padding:0 28px}.hh-header-inner{max-width:1680px;margin:auto;min-height:82px}.brand-cluster{display:flex;align-items:center;gap:24px;min-width:0}.hh-brand{min-height:44px}.hh-brand-mark{font-size:14px;letter-spacing:0}.hh-brand-text strong{font-size:17.6px;margin:0}.hh-brand-text small{font-size:12px}.hh-header-actions{flex-wrap:nowrap}.hh-header .hh-lang{border-radius:24px;gap:5px;white-space:nowrap}.home-link{font-size:13px;white-space:nowrap}.hh-theme-toggle{border:1px solid var(--line);border-radius:10px;padding:2px}.hh-icon-button{padding:7px;min-width:38px;min-height:38px}.menu>button{background:var(--hh-bg);font-size:13px}.menu-list a{font-size:14px;min-height:44px}.menu-list{top:48px}.crumb{font-size:12px;line-height:1.7;padding:18px 28px}.crumb a{display:inline-block;min-height:24px}.page{padding:0 28px}.intro{margin:8px 0 28px;gap:24px}.intro p{font-size:15px}.eyebrow{font-size:11px;color:var(--hh-primary)}h1{font-size:30px;font-weight:700;letter-spacing:-.6px;line-height:1.25}.saved{font-size:12px}.layout{grid-template-columns:320px minmax(360px,1fr) 320px;gap:18px}.layout>*{min-width:0}.panel{box-shadow:var(--hh-shadow);border-radius:var(--hh-radius-card)}.panelhead{font-size:15px;padding:18px}.step{font-style:normal;font-size:11px}.body{padding:18px}.unit-badge{font-size:11px;color:var(--hh-muted)}.units-field{margin-bottom:19px}.section-label{font-size:11px}.preset{font-size:12px;min-height:79px}.field{font-size:13px;color:var(--hh-text);font-weight:600}.field input,.field select,.project{min-height:46px;background:var(--hh-bg);font-size:15px;padding:9px 10px;color:var(--hh-text);font-weight:400}.fields{gap:14px 12px}.hint{font-size:12px;line-height:1.6}details summary{font-size:13px;min-height:44px;display:flex;align-items:center}.tabs button{font-size:13px;min-height:40px}.blueprint{min-height:400px}.blueprint svg{color:#315c9c;background:transparent}.dark .blueprint svg{color:#bfd3f4}.legend{font-size:12px;flex-wrap:wrap;gap:10px 18px}.note{font-size:13px;border-color:var(--line)}.kpi{padding:18px}.kpi small{font-size:13px}.kpi strong{font-size:30px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.kpi em{font-size:13px;white-space:nowrap}.kpi p{font-size:12px}.kpi.primary{border-color:var(--hh-border)}.primary-btn{color:var(--hh-button-foreground)!important;font-size:14px}.secondary-btn{font-size:13px;min-height:44px}.total{gap:12px;flex-wrap:wrap}.total strong{font-size:21px}.group-title{font-size:14px}.group{font-size:12px;gap:8px;flex-wrap:wrap}.group button{font-size:12px;min-height:44px}.group button[data-remove]{min-width:44px}.quick{font-size:14px;flex-wrap:wrap;gap:12px 24px}.quick a{min-height:44px;display:flex;align-items:center}.quick b{font-size:11px;display:flex;align-items:center}footer strong{font-size:16px}footer p,.links{font-size:12px}.links a{min-height:36px;display:flex;align-items:center}.error{font-size:13px}.report-brand{display:flex;gap:12px;align-items:center;margin-bottom:22px}.report-brand .hh-brand-mark{background:#152b42;color:#fff}.report-brand strong{font-size:14px}.report-body{--hh-primary:#185ac3;--hh-text:#152b42;--hh-muted:#56687a;--hh-bg:#f6f8fc;--hh-surface:#fff;--hh-border:#dce4ee;--hh-soft:#edf3fb;color:#152b42;background:white}.report-body p{color:#56687a}.report-toolbar{color:#152b42;flex-wrap:wrap;gap:10px}.report-toolbar .row{flex-wrap:wrap;gap:8px}.report-toolbar button{color:#152b42;background:#fff;border-color:#dce4ee}.report-section{overflow-wrap:anywhere}.report-section table{table-layout:fixed;font-size:12px}.report-section td,.report-section th{overflow-wrap:anywhere}.report-section td:not(:first-child){font-variant-numeric:tabular-nums}.report-section .kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.report-section .kpi strong{font-size:24px}.report-section .kpi em{font-size:12px}.report-section h2{font-size:20px}.report-section .warn{font-size:12px}.report-foot{font-size:11px}.report-foot a{margin-right:9px}
@media(min-width:1600px){.layout{grid-template-columns:350px minmax(420px,1fr) 340px}.blueprint{min-height:450px}}
@media(min-width:768px) and (max-width:1199px){.layout{grid-template-columns:minmax(280px,.85fr) minmax(340px,1.15fr)}.results{grid-column:1/-1}.results .body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.results .body>details,.results .body>.actions{grid-column:1/-1}.hh-header-inner{flex-wrap:wrap;padding:14px 0;gap:12px}.brand-cluster{gap:16px}.hh-header-actions{margin-left:auto}.home-link{font-size:12px}.blueprint{min-height:390px}}
@media(max-width:767px){body,body.dark{font-size:16px;line-height:1.6}header.hh-header{padding:0 16px}.hh-header-inner{padding:14px 0;gap:12px;flex-direction:column;align-items:stretch}.brand-cluster{justify-content:space-between;gap:10px}.hh-brand-text strong{font-size:17px}.hh-brand-text small{font-size:13px;letter-spacing:0}.hh-brand-mark{width:40px;height:40px;font-size:14px}.menu>button{font-size:13px;max-width:145px;min-height:44px}.hh-header-actions{justify-content:space-between;gap:6px;flex-wrap:wrap}.hh-icon-button{min-height:44px;min-width:44px}.home-link{font-size:13px;padding:8px 10px}.hh-header .hh-lang{font-size:14px;padding:8px 10px}.crumb{padding:14px 16px;font-size:12px}.crumb span{margin:0 5px}.page{padding:0 16px}.intro{display:block;margin:10px 0 22px}.intro .saved{max-width:none;margin-top:12px;font-size:13px}.eyebrow{font-size:12px}h1{font-size:clamp(28px,6vw,32px)}.intro p{font-size:16px}.layout{grid-template-columns:minmax(0,1fr)}.results{grid-column:auto}.results .body{display:block}.results .body .kpi{margin-bottom:12px}.panelhead{font-size:19px}.panelhead .step{font-size:12px}.unit-badge{font-size:12px}.section-label{font-size:13px}.field{font-size:15px;line-height:1.5}.field input,.field select,.project{font-size:17px;min-height:46px}.fields{gap:14px 12px}.presets{gap:7px}.preset{font-size:15px;min-height:88px;padding:12px 5px}.hint,.note,.error{font-size:14px}.note{padding:16px}.tabs button,button,.secondary-btn,.primary-btn,details summary{font-size:15px;min-height:44px}.toolbar{flex-wrap:wrap;padding:12px}.tabs{flex:1}.tabs button{flex:1;padding:8px}.legend{font-size:13px}.blueprint{min-height:320px;padding-top:38px}.canvas-label{font-size:10px}.scale-label{font-size:10px}.kpi small{font-size:15px}.kpi strong{font-size:32px}.kpi p{font-size:14px}.kpi em{font-size:14px}.group-title{font-size:18px}.group{font-size:14px;padding:12px}.group button{font-size:14px}.total{font-size:15px}.total strong{font-size:24px}.quick{font-size:15px}.quick b{font-size:13px}.links,footer p{font-size:14px}.links a{min-height:44px}footer{flex-direction:column;padding:22px 16px;gap:18px}.menu-list{right:0;left:auto;width:min(260px,calc(100vw - 32px))}.menu-list a{font-size:15px}.report-toolbar{position:static}.report-body{padding:16px}.report-section .kpis{grid-template-columns:1fr}.report-section table{font-size:11px}.report-section .kpi p{font-size:12px}.report-section svg{min-width:0}.report-toolbar button{font-size:13px}.report-toolbar .row{gap:6px}.report-section h2{font-size:20px}}
@media(max-width:360px){.brand-cluster{flex-wrap:wrap}.brand-cluster .menu{width:100%}.menu>button{max-width:none;width:100%}.menu-list{left:0;right:auto}.hh-header-actions{justify-content:flex-start}.home-link{width:100%;justify-content:flex-start}.fields{grid-template-columns:1fr}.panelhead{font-size:18px}.toolbar>button{width:100%}.legend{flex-direction:column}.preset{font-size:14px}.total strong{font-size:22px}}
@media print{@page{size:A4;margin:12mm 12mm 15mm}html,body{font-family:Inter,'Segoe UI',Arial,sans-serif;color:#152b42!important;background:#fff!important}body,body.dark{font-size:10pt}.report-section table{font-size:9pt;line-height:1.5}.report-section p,.report-section .warn{font-size:9pt}.report-section h2{font-size:13pt}.report-section h3{font-size:11pt}.report-section h1{font-size:18pt}.report-section .kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.report-section .kpi{padding:10px}.report-section .kpi strong{font-size:20pt}.report-section .kpi small{font-size:9pt}.report-section svg{max-height:90mm}.report-body{padding:0}.report-foot{font-size:9pt}body.supplier-only .supplier{display:block}dialog{color-scheme:light}}
/* Right column: results and pricing remain separate, vertically stacked cards. */
.results-column{display:flex;flex-direction:column;gap:18px;min-width:0}.results-column>.rates-panel{margin:0}.results-column .results .body{display:block}.results-column .results .kpi{margin-bottom:12px}.results-column .rates-panel .fields{grid-template-columns:1fr}.rates-panel .panelhead{background:var(--panel)}
@media(min-width:1024px) and (max-width:1199px){.layout{grid-template-columns:280px minmax(280px,1fr) 280px}.results-column{grid-column:auto}.page{padding:0 24px}}
@media(min-width:768px) and (max-width:1023px){.results-column{grid-column:1/-1}.results-column .rates-panel .fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
.grade-field{margin-top:6px}.grade-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.grade-cards button{min-height:44px;padding:9px 5px}.grade-cards #add-grade{grid-column:1/-1;border-style:dashed}.grade-field .hint{margin-top:10px}#grade-dialog{width:min(440px,94vw);background:var(--panel);color:var(--hh-text)}.grade-form{padding:24px}.grade-form h2{font-size:21px}.grade-form>.field{margin-top:16px}.grade-form .row{margin-top:18px}.grade-form .primary-btn{width:auto;flex:1}
.selected-grade-rate{padding:12px;border:1px solid var(--blue);border-radius:8px;background:var(--soft);color:var(--hh-text)}.rate-context{font-size:13px;color:var(--blue);margin:0 0 10px}
/* Compact pricing keeps the right column balanced with the inputs. */
@media(min-width:361px){.results-column .rates-panel .fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;align-items:end}.selected-grade-rate{grid-column:1/-1}.rates-panel .field{min-width:0}.rates-panel .field input{padding-inline:8px}}
@media(min-width:768px){.results-column .results .kpi{padding:12px 14px;margin-bottom:9px}.results-column .results .kpi small{margin-bottom:5px}.results-column .results .kpi strong{font-size:27px;line-height:1.25}.results-column .results .kpi p{margin-top:5px}.results-column .actions>.divider{margin:14px 0}.results-column .total{margin:12px 0}.results-column .project{margin-bottom:4px}.results-column .rates-content{padding:14px}.results-column .rates-content>.hint{font-size:12px;line-height:1.5}}

/* Mobile section shortcuts, with space for phone safe areas. */
.mobile-section-nav{display:none}
@media(max-width:767px){
 body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .mobile-section-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:40;background:var(--hh-surface);border-top:1px solid var(--hh-border);padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));box-shadow:0 -4px 18px #102d4310}
 .mobile-section-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;color:var(--hh-text);text-decoration:none;font-size:13px;font-weight:600;border-radius:8px}
 .mobile-section-nav small{font-size:11px;color:var(--hh-primary)}
 .mobile-section-nav a:hover,.mobile-section-nav a:focus-visible{background:var(--hh-soft);outline:2px solid var(--hh-primary);outline-offset:-2px}
 [id^="section-"]{scroll-margin-top:12px}
}
@media print{.mobile-section-nav{display:none!important}body{padding-bottom:0}}
.pwa-notice{position:fixed;bottom:90px;left:16px;right:16px;max-width:540px;margin:auto;padding:16px 48px 16px 16px;background:var(--hh-surface);color:var(--hh-text);border:1px solid var(--hh-primary);border-radius:12px;box-shadow:var(--hh-shadow);z-index:45;font-size:14px}.pwa-notice button{position:absolute;right:4px;top:4px;min-width:40px;min-height:40px}@media print{.pwa-notice{display:none}}
