:root{color-scheme:light;--ink:#17212b;--muted:#68747d;--line:#dce3e8;--surface:#fff;--soft:#f4f7f8;--black:#050505;--red:#ef1b24;--red-dark:#c9141c;--green:#23764b;--amber:#a55b00;--radius:18px;--shadow:0 16px 45px rgba(15,39,53,.09);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
*{box-sizing:border-box}
html{max-width:100%;overflow-x:clip;scroll-behavior:smooth}
body{max-width:100%;margin:0;overflow-x:clip;color:var(--ink);background:#f8fafb}
button,input,select{font:inherit}
.section-wrap{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.site-header{color:#fff;background:radial-gradient(circle at 80% 22%,rgba(239,27,36,.2),transparent 24%),linear-gradient(135deg,#000,#171717 72%,#050505)}
.topbar{width:min(1180px,calc(100% - 40px));min-height:82px;margin:auto;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.14)}
.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}
.brand img{border-radius:10px}
.brand strong,.brand small{display:block}
.brand strong{font-size:.95rem}
.brand small{margin-top:2px;color:#aeb8be;font-size:.72rem}
.top-actions{display:flex;gap:9px}
.home-link{gap:7px}
.home-link svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.hero{min-height:370px;display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:70px;padding:66px 0 78px}
.eyebrow,.step-label,.entity-label{margin:0 0 10px;color:var(--red);font-size:.71rem;font-weight:850;letter-spacing:.15em;text-transform:uppercase}
.hero .eyebrow{color:#ff747a}
h1,h2,h3,h4,p{margin-top:0}
h1{margin-bottom:20px;font-size:clamp(2.8rem,5.5vw,5rem);line-height:.97;letter-spacing:-.055em}
h1 span{color:var(--red)}
.hero>div>p:last-child{max-width:670px;margin:0;color:#c4ccd1;font-size:1.04rem;line-height:1.67}
.hero-facts{padding:20px 24px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.16);border-radius:16px}
.hero-facts p{display:grid;grid-template-columns:90px 1fr;align-items:center;gap:16px;margin:0;padding:16px 0;border-top:1px solid rgba(255,255,255,.13)}
.hero-facts p:first-child{border-top:0}
.hero-facts strong{color:var(--red);font-size:1.6rem}
.hero-facts span{color:#d5dade;font-size:.84rem}
.button{min-height:42px;padding:0 16px;border:1px solid transparent;border-radius:10px;font-weight:780;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.button-ghost{color:#fff;background:rgba(239,27,36,.14);border-color:rgba(239,27,36,.72)}
.button-light,.button-primary,.button-small{color:#fff;background:var(--red);border-color:var(--red)}
.button-secondary,.button-tertiary{color:#b70f17;background:#fff0f1;border-color:#e99da2}
.button-small{min-height:36px;font-size:.76rem}
.button:hover:not(:disabled){filter:brightness(.94)}
.button:disabled{cursor:not-allowed;color:#999;background:#e2e5e7;border-color:#d4d8da;opacity:.8}
.step-nav{display:grid;grid-template-columns:repeat(4,1fr);margin-top:-25px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);position:relative;z-index:2}
.step-nav a{display:flex;align-items:center;gap:11px;padding:18px 20px;color:#65717a;border-right:1px solid var(--line);text-decoration:none;font-size:.78rem;font-weight:760}
.step-nav a:last-child{border-right:0}
.step-nav b{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#edf0f2}
.step-nav .is-active{color:var(--red-dark)}
.step-nav .is-active b{color:#fff;background:var(--red)}
.project-section,.results,.boq{padding:76px 0}
.design-section{padding:76px 0;background:#f1f4f5;border-block:1px solid #e1e6e9}
.section-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:25px}
.section-heading h2{margin-bottom:8px;font-size:clamp(1.7rem,3vw,2.35rem);line-height:1.1;letter-spacing:-.04em}
.section-heading p:not(.step-label){margin-bottom:0;color:var(--muted);line-height:1.55}
.section-heading .naming-tip{margin-top:8px;color:#59666e;font-size:.72rem;font-weight:700}
.project-card,.building-card,.floor-card,.hub-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 26px rgba(15,39,53,.05)}
.project-card{padding:26px}
.field-grid{display:grid;gap:16px}
.field-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.field-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.field-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.field{display:grid;gap:8px;min-width:0}
.field>span,.field legend{color:#45535e;font-size:.76rem;font-weight:770}
.field input,.field select,.entity-name{width:100%;height:44px;padding:0 12px;color:var(--ink);background:#fff;border:1px solid #cbd5db;border-radius:9px}
.field input::placeholder{color:#98a2a9;opacity:1}
.field input:disabled{cursor:not-allowed;color:#7b858c;background:#f0f3f4;border-color:#d8dee2;opacity:1}
.field input:disabled::placeholder{color:#7b858c;font-size:.67rem;font-weight:700;text-align:left}
.controller-rule{color:#9e1017;font-size:.66rem;font-weight:700;line-height:1.4}
input[type="number"]{text-align:right;font-variant-numeric:tabular-nums;padding-right:14px}
.label-with-help{display:flex!important;align-items:center;flex-wrap:wrap;gap:6px;position:relative;width:100%;max-width:100%;overflow-wrap:anywhere}
.info-wrap{position:relative;display:inline-flex;flex:0 0 auto;vertical-align:middle}
.info-button{display:grid;place-items:center;width:18px;height:18px;padding:0;color:#fff;background:var(--red);border:1px solid var(--red);border-radius:50%;font-size:.68rem;font-weight:900;font-style:normal;line-height:1;cursor:pointer}
.info-button:hover,.info-button:focus-visible{background:var(--red-dark);border-color:var(--red-dark)}
.info-popover{position:absolute;left:50%;bottom:calc(100% + 10px);z-index:30;width:min(290px,calc(100vw - 32px));padding:11px 13px;color:#fff;background:#171717;border:1px solid #383838;border-radius:9px;box-shadow:0 12px 30px rgba(0,0,0,.24);font-size:.7rem;font-weight:600;letter-spacing:0;line-height:1.48;text-align:left;text-transform:none;transform:translate(-50%,5px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease,transform .14s ease,visibility .14s ease}
.info-popover::after{content:"";position:absolute;top:100%;left:50%;border:6px solid transparent;border-top-color:#171717;transform:translateX(-50%)}
.field-grid-2>.field:nth-child(2n) .info-popover,.field-grid-3>.field:nth-child(3n) .info-popover,.field-grid-4>.field:nth-child(4n) .info-popover{left:auto;right:0;transform:translateY(5px)}
.field-grid-2>.field:nth-child(2n) .info-popover::after,.field-grid-3>.field:nth-child(3n) .info-popover::after,.field-grid-4>.field:nth-child(4n) .info-popover::after{left:auto;right:5px;transform:none}
.info-wrap:hover .info-popover,.info-wrap:focus-within .info-popover,.info-wrap.is-open .info-popover{opacity:1;visibility:visible;transform:translate(-50%,0)}
.field-grid-2>.field:nth-child(2n) .info-wrap:hover .info-popover,.field-grid-2>.field:nth-child(2n) .info-wrap:focus-within .info-popover,.field-grid-2>.field:nth-child(2n) .info-wrap.is-open .info-popover,.field-grid-3>.field:nth-child(3n) .info-wrap:hover .info-popover,.field-grid-3>.field:nth-child(3n) .info-wrap:focus-within .info-popover,.field-grid-3>.field:nth-child(3n) .info-wrap.is-open .info-popover,.field-grid-4>.field:nth-child(4n) .info-wrap:hover .info-popover,.field-grid-4>.field:nth-child(4n) .info-wrap:focus-within .info-popover,.field-grid-4>.field:nth-child(4n) .info-wrap.is-open .info-popover{transform:translateY(0)}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.segmented label{position:relative;cursor:pointer}
.segmented input{position:absolute;inset:0;width:100%;height:100%;opacity:0;pointer-events:none}
.segmented span{min-height:44px;padding:6px 9px;display:flex;align-items:center;justify-content:center;gap:6px;color:#556169;border:1px solid #cbd5db;border-radius:9px;font-size:.78rem;font-weight:760;text-align:center}
.segmented small{color:#859097;font-size:.65rem}
.segmented input:checked+span{color:#b70f17;background:#fff0f1;border-color:#eaa5a9}
.button:focus-visible,.icon-button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid rgba(239,27,36,.23);outline-offset:2px}
.profiles{margin-top:24px;padding-top:20px;border-top:1px solid #e7ebed}
.profiles summary,.expansion summary{cursor:pointer;color:#37444d;font-weight:800}
.profiles>p{margin:10px 0 18px;color:var(--muted);font-size:.78rem}
.profile-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.profile-input{display:grid;gap:6px}
.profile-input span{font-size:.7rem;color:#59656d;font-weight:730}
.profile-input div{display:flex;align-items:center}
.profile-input input{height:40px;border-radius:8px 0 0 8px}
.profile-input i{height:40px;display:flex;align-items:center;padding:0 10px;color:#68747d;background:#eef1f3;border:1px solid #cbd5db;border-left:0;border-radius:0 8px 8px 0;font-size:.72rem;font-style:normal}
.building-list,.floor-list,.hub-list,.result-list{display:grid;gap:18px}
.building-card>header,.floor-card>header,.hub-card>header{display:flex;align-items:end;justify-content:space-between;gap:18px;padding:20px 22px;border-bottom:1px solid var(--line)}
.building-card>header>div:last-child{display:flex;gap:8px}
.entity-label{margin-bottom:4px}
.entity-name{height:38px;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:1.05rem;font-weight:820}
.building-card>header>div:first-child,.floor-card>header>div:first-child,.hub-card>header>div:first-child{flex:1;min-width:0}
.entity-name-control{display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:5px;width:min(100%,520px)}
.name-edit-button{display:grid;place-items:center;width:24px;height:24px;padding:0;color:#fff;background:var(--red);border:1px solid var(--red);border-radius:6px;font-size:.72rem;font-weight:850;line-height:1;cursor:pointer}
.name-edit-button:hover{background:var(--red-dark);border-color:var(--red-dark)}
.name-edit-button:focus-visible{outline:3px solid rgba(239,27,36,.23);outline-offset:2px}
.icon-button{width:38px;height:38px;color:#b70f17;background:#fff0f1;border:1px solid #e99da2;border-radius:9px;font-size:1.35rem;cursor:pointer}
.icon-button:hover:not(:disabled){color:#fff;background:#a70f16;border-color:#a70f16}
.icon-button:disabled{cursor:not-allowed;color:#999;background:#eceff1;border-color:#d4d8da;opacity:.65}
.floor-list{padding:18px}
.floor-card{box-shadow:none;background:#fbfcfc}
.floor-settings{display:grid;grid-template-columns:1.2fr .7fr auto;align-items:end;gap:16px;padding:18px 20px}
.floor-card>.flap-note{padding:0 20px}
.hub-list{padding:0 18px 18px}
.hub-card{box-shadow:none}
.entity-add-row{display:flex;justify-content:center;padding:0 18px 18px}
.entity-add-row .button{width:min(100%,420px)}
.collection-add-row{display:flex;justify-content:center;padding-top:22px}
.collection-add-row .button{width:min(100%,460px)}
.hub-layout{display:grid;grid-template-columns:1fr;gap:0}
.hub-group{padding:20px;border-right:0;border-bottom:1px solid #e5e9eb}
.hub-group h4{margin-bottom:15px;font-size:.86rem}
.compact{gap:11px}
.check{display:flex;align-items:center;gap:9px;color:#4c5961;font-size:.75rem;font-weight:720}
.check input{width:18px;height:18px;accent-color:var(--red)}
.flap-note{margin:11px 0 0;color:#7a858c;font-size:.7rem;line-height:1.45}
.expansion summary{font-size:.86rem}
.expansion .field-grid{margin-top:16px}
.hub-preview{padding:16px 20px;color:#53616a;background:#f3f6f7;border-radius:0 0 17px 17px;font-size:.76rem}
.hub-preview strong{color:var(--ink)}
.summary-band{padding:68px 0;color:#fff;background:#111}
.summary-heading p:not(.step-label){color:#aeb7bc}
.step-label.light{color:#ff747a}
.calculation-status{display:flex;align-items:center;gap:8px;color:#c4cbd0;font-size:.76rem;font-weight:750}
.calculation-status i{width:9px;height:9px;background:#8c959a;border-radius:50%}
.calculation-status.is-ready i{background:#50c77e}
.metric-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.metric{padding:20px;background:#1d1d1d;border:1px solid #343434;border-radius:13px}
.metric strong,.metric span{display:block}
.metric strong{margin-bottom:6px;color:#fff;font-size:1.65rem}
.metric span{color:#aeb6bb;font-size:.7rem;text-transform:uppercase;letter-spacing:.08em}
.notice{margin-bottom:12px;padding:14px 16px;border:1px solid;border-radius:10px;font-size:.78rem;line-height:1.5}
.notice-warning{color:#815000;background:#fff7e6;border-color:#e8c477}
.notice-error{color:#9e1017;background:#fff0f1;border-color:#efb1b5}
.floor-result{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.floor-result>header{display:flex;justify-content:space-between;gap:18px;padding:20px 22px;background:#f4f6f7}
.floor-result h3{margin:0;font-size:1.12rem}
.floor-result header span{color:#68747d;font-size:.75rem}
.hub-result{padding:22px;border-top:1px solid var(--line)}
.hub-result:first-of-type{border-top:0}
.hub-result-title{display:flex;justify-content:space-between;gap:14px;margin-bottom:14px}
.hub-result-title h4{margin:0}
.hub-result-title span{color:#68747d;font-size:.74rem}
.panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.panel{padding:16px;border:1px solid var(--line);border-radius:11px}
.panel-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:12px}
.panel-head strong{font-size:.84rem}
.badge{padding:4px 7px;border-radius:999px;background:#eaf6ee;color:var(--green);font-size:.64rem;font-weight:850;text-transform:uppercase}
.badge.tolerance{color:#865200;background:#fff3d7}
.badge.overload{color:#a21017;background:#ffe5e7}
.panel dl{display:grid;grid-template-columns:1fr auto;gap:7px 14px;margin:0;font-size:.73rem}
.panel dt{color:#66737b}
.panel dd{margin:0;font-weight:760;text-align:right}
.panel-modules{margin:12px 0 0;color:#68747d;font-size:.69rem;line-height:1.5}
.table-shell{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:14px}
table{width:100%;border-collapse:collapse}
th,td{padding:14px 16px;border-bottom:1px solid #e5e9eb;text-align:left;font-size:.78rem}
th{color:#526069;background:#f2f5f6;font-size:.68rem;letter-spacing:.07em;text-transform:uppercase}
th:last-child,td:last-child{text-align:right}
tbody tr:last-child td{border-bottom:0}
.boq-actions{display:flex;gap:8px}
.advisories{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.advisories p{margin:0;padding:15px;color:#66737b;background:#f2f5f6;border-radius:10px;font-size:.72rem;line-height:1.5}
.advisories strong{color:#37444d}
footer{padding:36px 0;color:#aab2b7;background:#050505}
footer strong{color:#fff;font-size:.82rem}
footer p{max-width:930px;margin:8px 0 0;font-size:.72rem;line-height:1.55}
@media(max-width:900px){.hero{grid-template-columns:1fr;gap:34px}.field-grid-3,.field-grid-4,.profile-grid,.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.hub-layout{grid-template-columns:1fr}
.hub-group{border-right:0}
.floor-settings{grid-template-columns:1fr 1fr}
.floor-settings .add-hub{grid-column:1/-1}
.metric-grid .metric:last-child{grid-column:1/-1}
.topbar{align-items:flex-start;flex-wrap:wrap;gap:12px;padding:18px 0}
.top-actions{flex-wrap:wrap;justify-content:flex-end}
}
@media(max-width:640px){.section-wrap,.topbar{width:min(100% - 28px,1180px)}
.hero,.field-grid-2,.field-grid-3,.field-grid-4,.profile-grid,.metric-grid,.panel-grid,.advisories{grid-template-columns:1fr}
.hero{gap:35px;padding:54px 0 68px}
.hero-facts{display:none}
.topbar{display:grid;gap:14px}
.top-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
.top-actions .button{min-width:0;padding:0 7px;font-size:.68rem}
.step-nav{grid-template-columns:repeat(4,1fr)}
.step-nav a{justify-content:center;padding:12px 5px}
.step-nav span{display:none}
.floor-settings{grid-template-columns:1fr}
.floor-settings .add-hub{grid-column:auto}
.building-card>header,.floor-card>header,.hub-card>header{align-items:center}
.summary-band{padding:52px 0}
.metric-grid .metric:last-child{grid-column:auto}
}
@media print{.site-header{background:#fff;color:#111}
.topbar,.step-nav,.project-section,.design-section,.top-actions,.boq-actions,.advisories,footer{display:none!important}
.hero{min-height:0;padding:20px 0}
.hero h1{font-size:2rem}
.hero h1 span{color:#111}
.hero>div>p,.hero-facts{display:none}
.summary-band{padding:20px 0;color:#111;background:#fff}
.metric-grid{grid-template-columns:repeat(5,1fr)}
.metric{padding:10px;background:#fff;border-color:#ccc}
.metric strong,.metric span{color:#111}
.results,.boq{padding:20px 0}
.floor-result,.table-shell{break-inside:avoid}
}
