:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#162840;background:#f3f6fa;font-synthesis:none;-webkit-text-size-adjust:100%;--navy:#0e1f36;--muted:#52657c;--line:#dce5ef;--blue:#961738;--white:#fff;--accent:#961738;--text:#162840;--radius:16px}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}a{color:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.8rem,3vw,2.6rem);line-height:1.15;letter-spacing:-.045em;margin-bottom:12px;font-weight:750}h2{font-size:1.2rem;letter-spacing:-.025em}p{line-height:1.6}.icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.skip-link{position:fixed;top:-100px;left:16px;z-index:50;padding:12px;background:white;border-radius:8px}.skip-link:focus{top:10px}
.shell{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100dvh}.surface{min-width:0}.rail{position:sticky;top:0;height:100dvh;padding:30px 18px 20px;display:flex;flex-direction:column;background:var(--navy);color:#b9cbe0;min-width:0}.brand{display:grid;gap:14px;text-decoration:none;color:white;font-size:16px;font-weight:650;padding:0 10px}.brand-logo{display:block;width:160px;height:auto;padding:12px;background:#fff;border-radius:10px}.brand>span{padding-left:2px;color:#c9d6e7;letter-spacing:.01em}.rail nav{display:grid;gap:8px;margin-top:42px}.rail nav a,.rail-bottom>a{display:flex;align-items:center;gap:12px;text-decoration:none;padding:14px;border-radius:10px;font-size:14px;font-weight:600;min-height:48px}.rail nav a:hover,.rail-bottom>a:hover{background:#203751;color:#fff}.rail nav a[aria-current=page]{background:#263d57;color:white;box-shadow:inset 3px 0 #cf6b86}.rail-bottom{margin-top:auto}.rail-bottom>a{padding:12px 8px;font-size:13px}.profile{display:flex;align-items:center;gap:10px;border-top:1px solid #2b405b;padding-top:20px;margin-top:18px;min-width:0}.profile>div{min-width:0}.profile strong{display:block;overflow:hidden;text-overflow:ellipsis;font-size:12px}.avatar{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;border-radius:50%;background:#28425e;color:#e1efff;font-size:12px;font-weight:bold}.signout{display:flex;align-items:center;gap:7px;border:0;color:#dbe7f5;background:transparent;font-size:13px;padding:8px 0;min-height:40px}.signout .icon{width:16px;height:16px}.top{height:74px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border-bottom:1px solid var(--line);padding:0 clamp(20px,3.5vw,48px);font-size:14px;color:var(--muted)}.top strong{color:var(--text)}.slash{margin:0 10px;color:#9aa8b8}main{width:min(100%,1560px);margin:0 auto;padding:clamp(24px,3.5vw,48px);outline:none}.hero{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:32px}.hero>div{min-width:0}.hero h1{overflow-wrap:anywhere}.hero p{margin-bottom:0;color:var(--muted);font-size:16px}.hero>.btn{flex-shrink:0}
.btn{border-radius:10px;border:1px solid #d5dfeb;background:#fff;color:#243e5b;min-height:44px;padding:10px 15px;display:inline-flex;justify-content:center;align-items:center;gap:8px;text-decoration:none;font-weight:600;font-size:14px;line-height:1.35;text-align:center;transition:background .15s,border-color .15s,box-shadow .15s}.btn:hover{background:#f1f5fa;border-color:#aabed4}.btn.primary{background:var(--accent);border-color:var(--accent);color:white}.btn.primary:hover{background:#78112c;border-color:#78112c}.btn.danger{color:#ad2542}.btn.danger:hover{background:#fff1f4;border-color:#edb4c2}.btn.quiet{background:transparent}.btn.small{min-height:38px;padding:8px 10px;font-size:13px;gap:6px}.btn.small .icon{width:17px;height:17px}.actions{display:flex;gap:8px;flex-wrap:wrap}.panel{border:1px solid var(--line);background:white;border-radius:var(--radius);overflow:hidden;box-shadow:0 2px 5px #11284103}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px}.panel-heading h2{margin:0;display:flex;gap:10px;align-items:center}.result-count{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:25px;padding:0 7px;border-radius:7px;background:#f0f4f8;color:#566a81;font-size:12px;font-weight:600}.result-count:empty{display:none}.filters{display:flex;gap:10px;flex-wrap:wrap}.search-box{position:relative;display:block;width:260px;max-width:100%}.search-box>.icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#76879b;width:18px;height:18px;pointer-events:none}.search-box input{padding-left:40px;background:#f8fafc}.mobile-sort{display:none}.scroll{overflow-x:auto;overscroll-behavior-x:contain}table{width:100%;border-collapse:collapse;text-align:left;min-width:700px}th{padding:15px 20px;background:#f3f6fa;color:#53667e;font-size:13px;font-weight:650;white-space:nowrap;border-block:1px solid #e5ebf2}td{border-top:1px solid #e8edf4;padding:19px 20px;font-size:14px;line-height:1.5;vertical-align:middle;max-width:420px;overflow-wrap:anywhere}td strong{font-weight:650}td a:not(.btn){text-decoration:none}td a:not(.btn):hover{text-decoration:underline}tbody tr:hover{background:#fafbfd}td .actions{justify-content:flex-end;min-width:170px}.cell-label{display:none}.badge{border-radius:6px;background:#eaf2fc;color:#205688;padding:5px 8px;display:inline-block;line-height:1.35;font-size:12px;font-weight:600;white-space:nowrap}.badge.own{background:#eaf4ef;color:#276247}.empty{text-align:center;padding:60px 24px;color:var(--muted)}.empty h3{color:#1e3854;margin-bottom:7px}.empty p{margin-bottom:0}.sort-heading{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:left;padding:4px 0;display:inline-flex;align-items:center;gap:8px;cursor:pointer;min-height:28px}.sort-heading:hover{color:var(--accent)}.sort-heading span{font-size:11px;color:#667b93}
input,textarea,select{width:100%;min-width:0;border:1px solid #cbd7e5;border-radius:9px;padding:12px 13px;min-height:46px;color:#182b42;background:white;line-height:1.4;font-size:16px;font-weight:400;box-shadow:0 1px 2px #10283c03}textarea{resize:vertical;min-height:94px}input::placeholder,textarea::placeholder{color:#75869a;opacity:1}select{appearance:none;-webkit-appearance:none;padding-right:40px;background-image:linear-gradient(45deg,transparent 50%,#50657c 50%),linear-gradient(135deg,#50657c 50%,transparent 50%);background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%;background-size:5px 5px;background-repeat:no-repeat;}input:focus,select:focus,textarea:focus{outline:3px solid #96173818;outline-offset:1px;border-color:#a84b63}button:focus-visible,a:focus-visible{outline:3px solid #3477b9;outline-offset:3px}input[readonly],textarea[readonly]{background:#f4f7fa;color:#53667e}input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;accent-color:var(--accent);box-shadow:none;padding:0;flex:none}.stack{display:grid;gap:18px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.field{display:grid;gap:8px;align-content:start;font-size:14px;font-weight:600;min-width:0}.wide{grid-column:1/-1}.section-title{margin:16px 0 0;font-size:16px;color:#233e5b;border-top:1px solid var(--line);padding-top:24px}.loading{color:var(--muted)}.loading:before{content:'';display:inline-block;width:16px;height:16px;border:2px solid #dce5ef;border-top-color:var(--accent);border-radius:50%;margin-right:10px;vertical-align:middle;animation:spin 1s linear infinite}
dialog{padding:0;border:1px solid var(--line);border-radius:20px;width:min(940px,calc(100vw - 48px));max-height:calc(100dvh - 64px);color:var(--text);background:#fff;box-shadow:0 24px 80px #06182b40;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}dialog::backdrop{background:#10243994;backdrop-filter:blur(3px)}body:has(dialog[open]){overflow:hidden}dialog header{position:sticky;top:0;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;padding:24px 28px;border-bottom:1px solid var(--line);gap:18px;background:white}dialog h2{margin:0;font-size:23px;line-height:1.3;letter-spacing:-.025em}dialog header p{margin:7px 0 0;color:var(--muted);font-size:14px;overflow-wrap:anywhere}dialog header>.btn{flex:none}.dialog-body{padding:24px 28px}.dialog-footer{position:sticky;bottom:-24px;z-index:2;display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:24px -28px -24px;padding:16px 28px;border-top:1px solid var(--line);background:#fff}.tabs{display:flex;gap:5px;overflow-x:auto;border-bottom:1px solid var(--line);margin:18px 0 24px;padding-bottom:12px;scrollbar-width:thin;overscroll-behavior-x:contain}.tabs .btn{flex:none;background:transparent;border-color:transparent;white-space:nowrap}.tabs button[aria-selected=true]{border-color:#ead2d9;background:#fbf0f4;color:#8c1836}.hidden,[data-krs][hidden]{display:none!important}.error{color:#a32835;font-size:14px;margin:12px 0 0;min-height:0;line-height:1.5}.error:empty{display:none}#notice{position:fixed;right:24px;bottom:24px;background:#142e4b;color:#fff;border-radius:12px;z-index:8;padding:16px 20px;font-size:14px;max-width:min(90vw,480px);box-shadow:0 8px 30px #0002;line-height:1.5}#notice:empty{display:none}.access-list{display:grid;gap:10px;margin:16px 0}.access-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;background:#f4f7fb;border:1px solid var(--line);border-radius:10px;font-size:14px;overflow-wrap:anywhere}.signed-out .rail-bottom,.signed-out .top .btn{display:none}
.registry-panel{padding:20px;background:#f5f8fc;border:1px solid #dce5ef;border-radius:12px;margin-bottom:24px}.registry-panel h3{margin-bottom:16px;font-size:16px}.registry-panel .actions{margin-top:16px;margin-bottom:12px}.registry-result{font-size:14px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0}.registry-result:empty{display:none}.static-party,.form-hint{color:var(--muted);font-size:14px;line-height:1.6;margin:0 0 12px}.date-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,200px);gap:16px}.repeat{margin-bottom:16px}.repeat .section-title{margin-bottom:16px}.list-item{padding:20px;background:#fafbfd;border:1px solid #dce5ef;border-radius:12px;margin-bottom:12px}.list-label{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;font-size:14px}.panel+p{margin-top:16px}.project-nav{margin-bottom:26px;gap:8px}.project-nav .current{border-color:#a8b9cc;background:#e9eff6;color:#142f4c}.project-choice{display:grid;grid-template-columns:52px 1fr;column-gap:18px;row-gap:8px;padding:28px;text-decoration:none;transition:border-color .15s,background .15s}.project-choice:hover{border-color:#b27c8b;background:#fdfafb}.project-choice .choice-icon{grid-row:1/4;display:grid;place-items:center;width:52px;height:52px;border:1px solid #edd8de;background:#fbf1f4;color:var(--accent);border-radius:13px}.choice-icon .icon{width:25px;height:25px}.project-choice strong{font-size:20px}.project-choice>span:not(.choice-icon){color:var(--muted);font-size:14px}.project-choice .choice-description{margin-top:8px}.record-panel{padding:28px}.record-panel h2{margin-top:24px;margin-bottom:9px;font-size:24px}.record-panel>p{color:var(--muted);font-size:15px;overflow-wrap:anywhere}.document-actions{display:grid;gap:0}.document-actions>section{padding:24px 0;border-top:1px solid var(--line)}.document-actions>section:last-child{padding-bottom:0}.document-actions h3{font-size:16px;margin-bottom:14px}.declaration-note{margin-top:16px}.btn.company-name{border:0;background:transparent;padding:0;min-height:0;display:inline;text-align:left;white-space:normal;overflow-wrap:anywhere;color:inherit;font-weight:650;font-size:inherit}.btn.company-name:hover{text-decoration:underline}.company-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px;margin:0}.company-details>div{border-bottom:1px solid var(--line);padding:16px 0;overflow-wrap:anywhere}.company-details>div:first-child,.company-details>div:last-child{grid-column:1/-1}.company-details dt{font-size:13px;color:var(--muted);margin-bottom:7px}.company-details dd{margin:0;font-size:16px;line-height:1.6}.company-representation>div{grid-column:1/-1}.company-representation dd{white-space:pre-wrap}.contract-signer{display:flex;align-items:center;gap:10px;margin:10px 0;line-height:1.5;min-height:36px}.contract-signer input{width:20px;min-height:20px}.registry-panel .field{min-width:0}.download-dialog{width:min(560px,calc(100% - 32px));padding:28px}.download-dialog .dialog-footer{bottom:-28px;margin-bottom:-28px}.download-dialog h2{margin-bottom:20px}.download-default{font-size:14px;overflow-wrap:anywhere;color:var(--muted);line-height:1.5}.refreshing .icon{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1400px){.document-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.document-actions>section{padding:24px 0 0}.document-actions .actions{align-items:flex-start}}
@media(max-width:1100px){.shell{grid-template-columns:200px minmax(0,1fr)}.rail{padding-inline:12px}.brand-logo{width:150px}.panel-heading{flex-wrap:wrap}.hero{align-items:flex-start}.hero>.btn{white-space:normal;max-width:230px}.grid{gap:16px}}
@media(max-width:760px){
.shell{display:block}.rail{height:auto;position:relative;padding:14px 18px;padding-top:max(14px,env(safe-area-inset-top));flex-direction:row;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;gap:12px;padding:0}.brand-logo{width:112px;padding:8px;border-radius:7px}.brand>span{font-size:13px;max-width:70px;line-height:1.3;color:#fff}.rail-bottom{margin:0}.rail-bottom>a,.avatar,.profile strong{display:none}.profile{margin:0;padding:0;border:0}.signout{min-height:44px;padding:8px;font-size:12px;gap:6px}.signout .icon{width:17px;height:17px}.rail nav{position:fixed;left:0;right:0;bottom:0;z-index:6;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 18px calc(8px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fffffff5;backdrop-filter:blur(16px)}.rail nav:empty{display:none}.rail nav a{display:flex;flex-direction:column;gap:4px;padding:8px;min-height:56px;font-size:12px;color:#607188;border-radius:10px}.rail nav a .icon{display:block;width:22px;height:22px}.rail nav a[aria-current=page]{background:#fbf0f4;color:var(--accent);box-shadow:none}.rail nav a:hover{background:#f4f6fa;color:var(--accent)}.top{height:58px;padding:0 18px;font-size:13px}.top .btn{font-size:13px;min-height:40px;padding:8px 10px}.top .slash{margin:0 5px}.top>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}main{padding:26px 16px calc(110px + env(safe-area-inset-bottom))}.hero{flex-direction:column;align-items:stretch;gap:20px;margin-bottom:24px}.hero>.btn{max-width:none;align-self:flex-start;min-height:46px}.hero p{font-size:15px}.hero h1{font-size:30px;line-height:1.15}.panel-heading{padding:18px 16px;gap:16px;align-items:stretch}.panel-heading h2{font-size:18px;width:100%}.filters,.search-box{width:100%}.mobile-sort{display:grid;gap:6px;width:100%;font-size:13px;color:var(--muted);font-weight:500}.mobile-sort select{font-size:16px;background-color:white}.scroll{overflow:visible}.scroll table{min-width:0;display:block}.scroll thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.scroll tbody{display:block;padding:0 14px 14px}.scroll tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;border:1px solid var(--line);border-radius:12px;padding:18px;margin-top:12px;background:white}.scroll tbody tr:first-child{margin-top:0}.scroll tbody tr:hover{background:white}.scroll td{display:block;padding:0;border:0;max-width:none;font-size:15px;min-width:0}.scroll td:first-child{grid-column:1/-1;font-size:17px;line-height:1.45}.scroll td:nth-child(2){grid-column:1/-1}.scroll td:last-child{grid-column:1/-1;border-top:1px solid #e8edf4;padding-top:14px}.cell-label{display:block;color:var(--muted);font-size:12px;font-weight:500;margin-bottom:5px}.scroll td:first-child>.cell-label,.scroll td:last-child>.cell-label{display:none}.scroll td .actions{justify-content:flex-start;gap:8px;min-width:0}.scroll td .btn.small{min-height:44px;font-size:13px;padding:10px}.btn.small{min-height:44px}.grid{grid-template-columns:1fr;gap:18px}.field{font-size:14px}input,textarea,select{font-size:16px;min-height:48px}.date-entry{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.date-entry input{padding-inline:10px;max-width:100%}input[type=date],input[type=month]{-webkit-appearance:none;display:block;min-width:0}input::-webkit-date-and-time-value{text-align:left}.project-nav{margin-bottom:22px;gap:6px}.project-nav .btn{padding:9px 10px;min-height:44px;font-size:13px}.project-nav .icon{width:17px;height:17px}.project-choice{padding:22px;column-gap:16px}.record-panel{padding:20px}.record-panel h2{font-size:22px}.document-actions>section{padding:22px 0}.document-actions .actions>.btn{min-height:44px}.company-details{grid-template-columns:1fr}.company-details dt{font-size:13px}.company-details dd{font-size:15px}.list-item{padding:16px}.registry-panel{padding:16px}.registry-panel .actions .btn{flex:1 1 140px;white-space:normal}.registry-panel .grid{grid-template-columns:1fr}.access-row{flex-wrap:wrap}.tabs{margin-top:14px;padding-bottom:10px;gap:4px}.tabs .btn{padding:11px 12px;font-size:13px}.tabs .icon{display:none}
dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}dialog header{padding:18px 16px;padding-top:max(18px,env(safe-area-inset-top));gap:12px}dialog h2{font-size:21px}dialog header p{font-size:13px;line-height:1.5}dialog header>.btn.small{width:44px;height:44px;padding:0;font-size:0;gap:0}dialog header>.btn .icon{width:22px;height:22px}.dialog-body{padding:20px 16px;padding-bottom:calc(20px + env(safe-area-inset-bottom))}.dialog-footer{bottom:calc(-20px - env(safe-area-inset-bottom));margin:24px -16px calc(-20px - env(safe-area-inset-bottom));padding:14px 16px calc(14px + env(safe-area-inset-bottom));gap:8px}.dialog-footer>.btn{flex:1 1 calc(50% - 8px);min-width:0;min-height:46px;font-size:13px;padding:10px;white-space:normal}.dialog-footer>.primary{flex-basis:100%;order:2}.form-hint{font-size:13px}.download-dialog{width:calc(100% - 24px);height:auto;max-height:calc(100dvh - 32px);margin:auto;border-radius:18px;padding:24px}.download-dialog .dialog-footer{bottom:-24px;margin:20px -24px -24px;padding:16px 24px}.download-dialog h2{font-size:22px}.signed-out main{padding-bottom:30px}.signed-out .brand>span{max-width:none}.signed-out .rail nav{display:none}#notice{right:16px;left:16px;bottom:calc(94px + env(safe-area-inset-bottom));max-width:none;font-size:14px}.empty{padding:40px 20px}
}
@media(max-width:360px){.brand>span{display:none}.project-nav .icon{display:none}.date-entry{grid-template-columns:1fr}.hero h1{font-size:27px}.top{padding-inline:12px}.top>span{font-size:12px}.dialog-footer>.btn{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Keep form actions above the viewport edge, including the iOS home indicator. */
.dialog-footer,.download-dialog .dialog-footer{bottom:0}

/* YPERO workspace — portfolio, project spaces and document workflow. */
:root{background:#f5f6f8;--navy:#101e32;--muted:#647185;--line:#e3e7ed;--radius:14px}
.shell{grid-template-columns:216px minmax(0,1fr)}.rail{padding:32px 16px 22px;background:#101e32}.brand{padding:0 9px;gap:18px}.brand-logo{width:154px;border-radius:5px;padding:10px 12px}.brand>span{font-size:10px;letter-spacing:.18em;color:#8d9cb0;line-height:1.7}.brand-subtitle{display:block;font-size:17px;letter-spacing:-.02em;color:#fff;font-weight:600}.rail-label{font-size:10px;letter-spacing:.14em;font-weight:650;color:#71849d;margin:44px 14px 14px}.rail nav{margin-top:0;gap:7px}.rail nav a{border-radius:8px;padding:13px 14px;color:#aebdd0;font-weight:500}.rail nav a[aria-current=page]{background:#961738;color:#fff;box-shadow:0 5px 15px #0001}.rail-bottom>a{font-size:12px;color:#8ea3bd}.top{height:66px;background:#fff;padding-inline:36px;font-size:13px}.top>.btn{border:0;font-size:12px}.workspace-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#961738;margin-right:8px}.top .slash{margin-inline:12px}.surface{background:#f5f6f8}main{max-width:1600px;padding:36px}.eyebrow{display:block;font-size:11px;letter-spacing:.14em;font-weight:700;line-height:1.6;color:#7b5362;margin-bottom:12px}.portfolio-intro{display:flex;justify-content:space-between;align-items:center;gap:30px;margin:6px 0 30px}.portfolio-intro h1{font-size:clamp(34px,3.4vw,50px);font-weight:700;letter-spacing:-.055em;line-height:1.12;margin-bottom:16px}.portfolio-intro h1>span{color:#778396}.portfolio-intro p{color:var(--muted);font-size:14px;max-width:440px;margin:0}.portfolio-intro>.btn{flex:none;min-height:48px;padding-inline:20px;box-shadow:0 5px 12px #96173816}.portfolio-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:38px;padding:21px 6px}.portfolio-metrics>div{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:12px;padding:0 22px;border-right:1px solid var(--line)}.portfolio-metrics>div:last-child{border:0}.portfolio-metrics .icon{width:22px;height:22px;color:#9a2341}.portfolio-metrics span{font-size:13px;color:var(--muted)}.portfolio-metrics strong{font-size:28px;letter-spacing:-.05em;line-height:1;font-weight:650}.portfolio-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:26px;align-items:start}.collection-header{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:20px}.collection-header .eyebrow{font-size:10px;margin-bottom:4px;color:#7c8796}.collection-header h2{margin:0;display:flex;gap:8px;align-items:center;font-size:22px;letter-spacing:-.035em}.collection-header .search-box{width:200px}.search-box input{background:#fff;border-color:#dfe4eb;border-radius:8px;min-height:42px;font-size:14px}.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.project-card{min-width:0;overflow:visible;background:white;border:1px solid #e0e5ec;border-radius:14px;transition:box-shadow .2s,transform .2s}.project-card:hover{box-shadow:0 12px 28px #101e3210;transform:translateY(-2px)}.project-card-cover{height:146px;position:relative;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;padding:19px 20px;background:#172b44;border-radius:13px 13px 0 0;color:#e1e8f0;text-decoration:none}.project-card:nth-child(even) .project-card-cover{background:#24354b}.cover-label{display:flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.16em;font-weight:600;color:#aebfd3;position:relative;z-index:1}.cover-label .icon{width:15px;height:15px}.building-art{position:absolute;right:-6px;top:0;width:216px;height:140px;color:#829bb6;opacity:.6}.cover-location{display:flex;align-items:center;gap:6px;font-size:12px;position:relative;z-index:1;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-top:12px;background:linear-gradient(transparent,#172b44)}.cover-location .icon{width:14px;height:14px}.project-card-body{padding:21px 20px 18px}.project-card h3{font-size:20px;line-height:1.3;letter-spacing:-.03em;margin:0 0 8px;overflow-wrap:anywhere}.project-card h3 a{text-decoration:none}.project-card h3 a:hover{color:#961738}.project-card-body>p{font-size:12px;color:var(--muted);margin-bottom:23px;line-height:1.5;min-height:18px;overflow-wrap:anywhere}.project-card-numbers{display:grid;grid-template-columns:1fr 1fr 2fr;gap:8px;margin-bottom:22px}.project-card-numbers>div{display:grid;gap:7px;min-width:0}.project-card-numbers span{font-size:11px;color:#728094;line-height:1.3}.project-card-numbers strong{font-size:17px;font-weight:600;letter-spacing:-.025em;overflow-wrap:anywhere}.project-card-numbers>div:last-child{text-align:right}.project-card-footer{display:flex;gap:10px;align-items:center;border-top:1px solid #edf0f4;padding-top:16px;justify-content:space-between}.project-card-footer>.btn{background:transparent;color:#961738;border:0;padding:6px 0;min-height:36px;justify-content:flex-start}.project-card-footer>.btn .icon{display:none}.project-card-footer>.btn:hover{color:#671027}.new-project-tile{min-height:190px;border:1px dashed #c7d0dc;border-radius:14px;background:transparent;color:#6c7b8e;padding:30px 18px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px}.new-project-tile>span{width:44px;height:44px;border:1px solid #d7dee8;background:#fff;display:grid;place-items:center;border-radius:50%;margin-bottom:4px;color:#961738}.new-project-tile strong{font-size:15px;font-weight:600;color:#425369}.new-project-tile small{font-size:12px}.new-project-tile:hover{border-color:#961738;background:#fff}.workspace-aside{padding-top:72px;display:grid;gap:22px}.aside-note{position:relative;padding:22px;background:#f1e9ed;border:1px solid #e8dbe1;border-radius:12px}.aside-icon{color:#9b2d4b;display:block;margin-bottom:16px}.aside-note h3{font-size:16px;letter-spacing:-.02em;margin-bottom:8px}.aside-note>p{font-size:13px;color:#7a6370;margin-bottom:16px;line-height:1.6}.aside-number{font-size:36px;letter-spacing:-.06em;font-weight:500;color:#91213f}.task-link{display:grid;gap:3px;font-size:13px;padding:12px 0;border-top:1px solid #dfced6;text-decoration:none;margin-top:12px}.task-link>span{font-weight:600;overflow-wrap:anywhere}.task-link>small{font-size:11px;color:#7a6370}.task-link:hover{color:#961738}.aside-guide{padding:8px 4px}.aside-guide h3{font-size:16px;margin-bottom:18px}.aside-guide .eyebrow{font-size:10px;color:#7d8795;margin-bottom:7px}.aside-guide ol{list-style:none;padding:0;margin:0 0 18px;counter-reset:steps}.aside-guide li{counter-increment:steps;position:relative;padding:0 0 22px 31px;font-size:12px;line-height:1.6;color:#69798c}.aside-guide li:before{content:counter(steps);position:absolute;left:0;top:0;display:grid;place-items:center;width:20px;height:20px;background:#e6eaf0;border-radius:50%;font-size:10px;font-weight:650;color:#718095}.aside-guide li:not(:last-child):after{content:'';position:absolute;left:10px;top:24px;bottom:4px;width:1px;background:#d9e0e9}.aside-guide>.btn{font-size:12px;padding:9px;min-height:38px;background:#fff}.more-actions{position:relative;flex:none}.more-actions summary{list-style:none;display:grid;place-items:center;cursor:pointer;width:38px;height:38px;border:1px solid #e0e6ee;border-radius:8px;color:#68798e;background:#fff}.more-actions summary::-webkit-details-marker{display:none}.more-actions summary:hover,.more-actions[open] summary{color:#961738;background:#fbf1f5;border-color:#ddb6c2}.more-actions summary:focus-visible{outline:3px solid #3477b9;outline-offset:2px}.more-menu{display:flex;gap:5px;flex-wrap:wrap;position:relative;padding:8px;margin-top:8px;min-width:140px;background:#f7f9fc;border:1px solid #e0e6ee;border-radius:8px}.more-menu .btn{justify-content:flex-start;border:0;background:transparent;font-size:12px;min-height:38px;width:100%}.project-card-footer:has(.more-actions[open]){align-items:flex-start}.project-card-footer .more-actions[open]{max-width:165px}.directory-hero h1{font-size:42px}.directory-summary{display:flex;align-items:center;gap:12px;margin:-6px 0 30px;font-size:13px;color:var(--muted)}.directory-summary>.icon{width:18px;color:#8b5263}.directory-summary strong{font-size:22px;color:#263951}.summary-separator{height:20px;width:1px;background:#d7dee7;margin:0 8px}.company-cell{display:flex;align-items:center;gap:14px}.company-monogram{width:40px;height:40px;display:grid;place-items:center;flex:none;background:#f1e9ed;color:#92314d;border-radius:10px;font-weight:600;font-size:13px}.company-cell>div{min-width:0}.company-cell small{display:block;font-size:12px;color:#7e8b9c;margin-top:4px;font-weight:400}.panel{box-shadow:none}.panel-heading{padding:20px 24px}.panel-heading h2{font-size:17px}.btn{border-radius:8px;font-size:13px;font-weight:600}.btn.primary{box-shadow:0 3px 7px #9617380c}.btn.small{font-size:12px}.btn .icon{width:18px;height:18px}td{padding-block:18px;font-size:13px}th{background:#f8f9fb;font-size:11px;text-transform:uppercase;letter-spacing:.035em;color:#788597}td .actions{min-width:120px;align-items:center;flex-wrap:nowrap}.project-hero{margin-bottom:26px;align-items:center}.project-hero h1{font-size:36px;letter-spacing:-.045em;margin-bottom:12px}.project-hero p{font-size:14px}.project-nav{margin:0 0 28px;gap:4px}.project-nav .btn{border:0;color:#68798e;background:transparent;border-radius:7px;font-size:12px;min-height:36px;padding:7px 11px}.project-nav .current{background:#fff;color:#961738;box-shadow:0 1px 5px #0e1f3610}.project-hero .eyebrow{font-size:10px;margin-bottom:8px}.project-overview{display:grid;grid-template-columns:1fr 1fr;background:#172b44;color:white;border-radius:14px;padding:30px;margin:0 0 26px;gap:30px}.project-overview>div{display:grid;gap:10px;align-content:start}.project-overview>div+div{border-left:1px solid #ffffff20;padding-left:30px}.project-overview span{font-size:12px;color:#afbed0}.project-overview strong{font-size:26px;font-weight:500;letter-spacing:-.035em;overflow-wrap:anywhere}.project-overview>div+div strong{font-size:18px;line-height:1.4}.project-overview small{font-size:12px;color:#8fa5bf}.project-overview .btn{justify-self:start;color:white;border-color:#ffffff30}.project-overview .btn:hover{background:#ffffff10}.project-choice{min-height:190px;padding:30px;background:white;border-radius:14px;grid-template-columns:48px 1fr;column-gap:20px}.project-choice .choice-icon{width:48px;height:48px;border:0}.project-choice strong{font-size:24px;font-weight:600}.project-choice .choice-description{line-height:1.6}.contract-workspace{display:grid;grid-template-columns:290px minmax(0,1fr);gap:28px;align-items:start}.contract-summary h2{font-size:24px;line-height:1.35;font-weight:550;letter-spacing:-.03em;margin-bottom:26px}.contract-party strong{font-size:14px;line-height:1.5;font-weight:500;display:block}.contract-value{padding:24px 0 20px}.contract-value strong{font-size:27px;font-weight:500;letter-spacing:-.035em;line-height:1.3}.contract-date strong{font-size:14px;font-weight:500}.workflow{background:white;border:1px solid var(--line);border-radius:14px;padding:28px}.workflow-title{margin-bottom:24px}.workflow-title .eyebrow{font-size:10px;color:#8994a3;margin-bottom:7px}.workflow-title h2{font-size:24px;letter-spacing:-.035em;font-weight:600;margin:0}.workflow-stage{display:flex;gap:18px;position:relative;padding:22px 0;border-top:1px solid #edf0f4}.workflow-stage:last-child{padding-bottom:0}.stage-symbol{width:38px;height:38px;display:grid;place-items:center;flex:none;background:#f1f4f8;border:1px solid #e3e9f1;border-radius:10px;color:#7e8da1}.complete .stage-symbol{background:#edf4f0;border-color:#deebe3;color:#39735a}.current .stage-symbol{background:#961738;border-color:#961738;color:white}.stage-body{min-width:0;flex:1}.stage-heading{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:9px}.stage-heading h3{font-size:16px;letter-spacing:-.02em;margin:0;font-weight:650}.stage-status{font-size:10px;border:1px solid #dae7df;background:#f2f7f4;color:#4d7a61;padding:4px 7px;border-radius:5px;white-space:nowrap}.current .stage-status{border-color:#ecd5dd;background:#fbf0f4;color:#961738}.stage-body>p{font-size:13px;line-height:1.6;color:#7b8899;margin-bottom:15px}.stage-body .btn{font-size:12px;min-height:38px;padding:8px 12px}.stage-body .quiet{border:0;background:#f5f7fa}.stage-locked{font-size:12px;color:#8c98a7;font-style:italic}.workflow-stage.complete:first-of-type .actions{margin-top:3px}dialog{border-radius:16px}dialog header{background:#172b44;color:white;border:0;padding:24px 28px}dialog header p{color:#b1c1d4}dialog header>.btn{background:#ffffff0a;color:#dce6f2;border-color:#ffffff30}dialog header>.btn:hover{background:#ffffff20}.dialog-body{background:#fff}.tabs{background:#f3f5f8;border:1px solid #e6eaf0;border-radius:9px;padding:5px;gap:3px;margin:18px 0 26px}.tabs .btn{border:0;font-size:12px;min-height:36px;padding:8px 12px;border-radius:6px}.tabs button[aria-selected=true]{background:white;color:#961738;box-shadow:0 2px 6px #10243910}.field{font-size:13px}.section-title{color:#263b56;font-size:15px}.list-item{border-radius:10px;background:#f8fafc}.signed-out .rail-label{display:none}
@media(min-width:1600px){.portfolio-layout{grid-template-columns:minmax(0,1fr) 260px}.project-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1200px){main{padding:28px}.portfolio-layout{grid-template-columns:minmax(0,1fr)}.workspace-aside{padding-top:0;grid-template-columns:1fr 1fr}.aside-guide{padding:22px}.portfolio-metrics>div{padding-inline:16px;gap:8px}.portfolio-metrics strong{font-size:25px}.portfolio-metrics span{font-size:12px}.contract-workspace{grid-template-columns:240px minmax(0,1fr);gap:20px}.contract-summary{padding:22px}.contract-value strong{font-size:23px}.workflow{padding:24px}.stage-heading{align-items:flex-start;flex-direction:column;gap:6px}}
@media(max-width:960px) and (min-width:761px){.shell{grid-template-columns:180px minmax(0,1fr)}.brand-logo{width:130px}.brand-subtitle{font-size:15px}.rail nav a{font-size:13px;padding-inline:10px}.portfolio-intro h1{font-size:36px}.portfolio-intro{gap:16px}.portfolio-intro>.btn{padding-inline:12px;font-size:12px}.portfolio-metrics>div{grid-template-columns:1fr auto}.portfolio-metrics .icon{display:none}.project-card-body{padding:18px 16px}.project-card-numbers{grid-template-columns:1fr 1fr}.project-card-numbers>div:last-child{grid-column:1/-1;text-align:left}.contract-workspace{grid-template-columns:1fr}.contract-summary{position:static;display:grid;grid-template-columns:1fr 1fr;column-gap:24px}.contract-summary>.eyebrow,.contract-summary>h2{grid-column:1/-1}.contract-party{grid-row:3/5;border:0;padding:0}.contract-value{padding-top:0}.contract-summary>.btn{grid-column:1/-1}.stage-heading{flex-direction:row}}
@media(max-width:760px){
.shell{display:block}.rail{padding:14px 18px;padding-top:max(14px,env(safe-area-inset-top));background:#101e32}.rail-label{display:none}.brand{display:flex;gap:12px;padding:0}.brand-logo{width:100px;padding:7px;border-radius:5px}.brand>span{font-size:8px;max-width:none;letter-spacing:.1em;line-height:1.5}.brand-subtitle{font-size:12px;letter-spacing:0}.rail nav{padding:8px 18px calc(8px + env(safe-area-inset-bottom));gap:8px}.rail nav a{font-size:11px;min-height:56px;padding:8px}.rail nav a[aria-current=page]{background:#fbf0f4;color:#961738;box-shadow:none}.top{padding:0 18px;height:52px;font-size:11px}.top .slash{margin-inline:7px}.top>.btn{font-size:0;padding:8px;width:40px;height:40px;gap:0}.top>.btn .icon{width:19px;height:19px}.workspace-dot{width:6px;height:6px;margin-right:5px}main{padding:28px 18px calc(108px + env(safe-area-inset-bottom))}.portfolio-intro{display:block;margin:2px 0 24px}.portfolio-intro .eyebrow{font-size:10px;margin-bottom:12px}.portfolio-intro h1{font-size:36px;line-height:1.12;margin-bottom:16px}.portfolio-intro p{font-size:13px;line-height:1.6;max-width:300px}.portfolio-intro>.btn{margin-top:22px;min-height:44px;padding-inline:18px;font-size:13px}.portfolio-metrics{padding:15px 0;margin-bottom:30px;gap:0}.portfolio-metrics>div{display:flex;flex-direction:column;align-items:flex-start;padding:0 14px;gap:7px}.portfolio-metrics .icon{width:17px;height:17px}.portfolio-metrics span{font-size:10px;line-height:1.3;min-height:26px}.portfolio-metrics strong{font-size:27px}.portfolio-layout{gap:26px}.collection-header{flex-wrap:wrap;gap:14px;margin-bottom:18px}.collection-header h2{font-size:22px}.collection-header .search-box{width:100%}.search-box input{font-size:16px;min-height:46px}.project-grid{grid-template-columns:1fr;gap:18px}.project-card-cover{height:132px;padding:18px 20px}.building-art{width:210px;height:128px;right:0}.project-card-body{padding:20px}.project-card h3{font-size:22px}.project-card-body>p{font-size:13px}.project-card-numbers{grid-template-columns:1fr 1fr 2fr;gap:8px;margin-bottom:20px}.project-card-numbers span{font-size:11px}.project-card-numbers strong{font-size:18px}.project-card-footer>.btn{font-size:14px;min-height:44px}.more-actions summary{width:44px;height:44px}.more-menu .btn{min-height:44px;font-size:13px}.new-project-tile{min-height:170px}.workspace-aside{display:grid;grid-template-columns:1fr;gap:16px}.aside-note{padding:22px}.aside-note>p{max-width:220px}.aside-number{position:absolute;top:25px;right:24px}.aside-guide{padding:20px 5px}.aside-guide ol{margin-bottom:6px}.aside-guide li{font-size:13px}.aside-guide>.btn{min-height:44px;font-size:13px}.directory-hero h1{font-size:34px}.directory-summary{flex-wrap:wrap;gap:8px;margin-bottom:24px;font-size:12px}.directory-summary .summary-separator,.directory-summary .summary-separator~*{display:none}.company-cell{gap:12px}.company-monogram{width:38px;height:38px}.company-cell .company-name{font-size:15px;line-height:1.5}.company-cell small{font-size:12px}.scroll td{font-size:14px}.scroll td .actions{justify-content:space-between;align-items:flex-start}.scroll td .btn.small{font-size:13px}.scroll tbody tr{padding:18px}.scroll td:has(.company-cell){grid-column:1/-1}.panel-heading{padding:18px 16px}.project-hero{gap:18px;margin-bottom:24px}.project-hero h1{font-size:30px}.project-hero p{font-size:13px}.project-nav{margin-bottom:24px;gap:4px}.project-nav .btn{font-size:12px;min-height:44px;padding-inline:10px}.project-overview{grid-template-columns:1fr;padding:24px;gap:24px}.project-overview strong{font-size:28px}.project-overview>div+div{padding-left:0;padding-top:20px;border-left:0;border-top:1px solid #ffffff20}.project-choice{min-height:170px;padding:24px;grid-template-columns:44px 1fr;column-gap:16px}.project-choice .choice-icon{width:44px;height:44px}.project-choice strong{font-size:22px}.project-choice>span:not(.choice-icon){font-size:13px}.contract-workspace{grid-template-columns:1fr;gap:22px}.contract-summary{position:static;padding:24px}.contract-summary h2{font-size:25px;margin-bottom:20px}.contract-party{padding:20px 0}.contract-value{padding:22px 0 18px}.contract-value strong{font-size:30px}.contract-summary>.btn{margin-top:22px;min-height:44px;font-size:13px}.workflow{padding:24px 18px}.workflow-title h2{font-size:23px}.workflow-stage{gap:12px;padding:23px 0}.stage-symbol{width:32px;height:32px;border-radius:8px}.stage-symbol .icon{width:17px;height:17px}.stage-heading{gap:8px}.stage-heading h3{font-size:16px}.stage-status{font-size:11px}.stage-body>p{font-size:13px}.stage-body .btn{font-size:13px;min-height:44px;padding:10px 12px}.stage-body .actions{gap:8px;align-items:stretch}.stage-body .actions>.btn:first-child{flex-basis:100%}.stage-body .actions>.btn{flex:1 1 auto}.stage-locked{font-size:13px}dialog{border-radius:0}dialog header{padding:20px 18px;padding-top:max(20px,env(safe-area-inset-top))}dialog header h2{font-size:20px}dialog header p{font-size:12px}.tabs .btn{min-height:42px;font-size:12px}.tabs{border-radius:8px;gap:2px;margin:18px 0 24px}.field{font-size:13px}.dialog-footer>.btn{font-size:13px;min-height:46px}.download-dialog{border-radius:16px}.signed-out .top{display:none}.signed-out .rail{justify-content:center}.signed-out .brand>span{display:none}.signed-out main{padding-bottom:30px}
}
@media(max-width:360px){.portfolio-intro h1{font-size:32px}.portfolio-metrics>div{padding-inline:11px}.project-card-numbers strong{font-size:16px}.brand-subtitle{font-size:11px}.signout{font-size:11px}.contract-summary{padding:22px}.workflow{padding:20px 14px}.stage-heading h3{font-size:15px}}
/* Readable data and controls; small type is limited to secondary metadata. */
.hero p,.portfolio-intro p,.stage-body>p,.company-cell .company-name,td{font-size:14px}
.field,.stage-body .btn,.btn.small,.more-menu .btn{font-size:14px}
.project-card-body>p,.project-card-numbers span,.contract-party span,.contract-value span,.contract-date span,.contract-party small,.cover-location,.aside-guide li{font-size:12px}
.eyebrow,.collection-header .eyebrow,.workflow-title .eyebrow,.project-hero .eyebrow,.contract-summary .eyebrow,.aside-guide .eyebrow,.stage-status,.cover-label,.rail-label{font-size:12px}
.stage-body>p{color:#647185}.contract-party strong{font-size:15px}.portfolio-metrics span{font-size:14px}.project-card-numbers>div:last-child strong{font-size:16px}
@media(max-width:760px){.portfolio-metrics span{font-size:12px;min-height:30px}.eyebrow,.cover-label{letter-spacing:.1em}.hero p,.portfolio-intro p{font-size:14px}.stage-status{font-size:12px}.project-card-numbers>div:last-child strong{font-size:16px}.top .btn.quiet{font-size:0}.brand>span{font-size:8px}.rail nav a{font-size:12px}}

/* Technical workspace: precise edges, compact controls and command navigation. */
:root{--radius:0;--line:#d7dde5;--muted:#586b80;--navy:#0e1f36}
.btn,.btn.small,.panel,.rail nav a,.brand-logo,.search-box input,input,select,textarea,dialog,.download-dialog,.tabs,.tabs .btn,.list-item,.registry-panel,.project-card,.project-card-cover,.project-card-footer,.project-choice,.project-overview,.project-choice .choice-icon,.contract-summary,.workflow,.stage-symbol,.stage-status,.portfolio-metrics,.aside-note,.result-count,.badge,.company-monogram,.more-actions summary,.more-menu,.new-project-tile,.new-project-tile>span,.access-row,#notice{border-radius:0;box-shadow:none}
.icon{stroke-width:1.6;stroke-linecap:square;stroke-linejoin:miter}
.rail{background:#0e1f36}.rail nav a[aria-current=page]{background:#961738;box-shadow:none;border-left:3px solid #e9a1b4;padding-left:11px}.brand-logo{padding:10px}.top{border-bottom:1px solid #d7dde5}.top-actions{display:flex;gap:8px;align-items:center}.top-actions>.btn{min-height:38px;font-size:12px;padding:8px 10px}.global-search{min-width:245px;justify-content:flex-start;background:#f6f8fa;color:#54677d!important}.global-search kbd{font:11px ui-monospace,SFMono-Regular,monospace;margin-left:auto;padding:3px 5px;color:#798698;border:1px solid #dce2e9;background:white}.density-toggle[aria-pressed=true]{background:#172b44;color:white;border-color:#172b44}.signed-out .top-actions{display:none}
.portfolio-intro{margin:0 0 24px;align-items:flex-end}.portfolio-intro h1{font-size:36px;line-height:1.1;margin-bottom:10px;letter-spacing:-.04em}.portfolio-intro .eyebrow{font-size:11px;letter-spacing:.13em}.portfolio-intro p{font-size:14px;max-width:none}.portfolio-intro>.btn{box-shadow:none}.portfolio-metrics{padding:19px 0;margin-bottom:28px;border-top:2px solid #172b44}.portfolio-metrics strong{font-variant-numeric:tabular-nums;font-size:28px}.portfolio-layout{gap:24px}.collection-header{padding-bottom:15px;border-bottom:1px solid #ccd4df;margin-bottom:18px}.collection-header h2{font-size:20px}.collection-header .eyebrow{display:none}.workspace-aside{padding-top:62px}.project-grid{gap:16px}.project-card:hover{transform:none;box-shadow:none;border-color:#8292a5}.project-card-cover{height:90px;background:#172b44;padding:15px 18px}.building-art{height:100px;top:-16px;right:8px;width:150px;opacity:.35}.cover-label{font-size:11px}.cover-location{font-size:12px;background:none}.project-card-body{padding:18px}.project-card h3{font-size:21px}.project-card-body>p{margin-bottom:20px;font-size:13px}.project-card-numbers{padding-top:15px;border-top:1px solid #e3e7ed;margin-bottom:18px}.project-card-numbers strong{font-variant-numeric:tabular-nums}.project-card-footer{padding-top:12px}.project-card-footer>.btn{box-shadow:none}.new-project-tile{min-height:130px;border-style:solid;background:#edf1f5;padding:20px}.new-project-tile>span{width:34px;height:34px}.new-project-tile:hover{background:white}.aside-note{border:0;border-left:3px solid #961738;background:#efe7eb;padding:20px}.aside-guide{border-top:1px solid #d4dce6;padding-top:20px}.aside-guide li:before{border-radius:0}.panel-heading{border-bottom:1px solid var(--line)}th{background:#edf1f5;padding:13px 18px;font-size:12px}td{padding:16px 18px;font-size:14px}tbody tr:hover{background:#f2f5f8}.btn.primary:hover{background:#78112c}.filters{align-items:flex-end}.status-filter{display:grid;gap:5px;font-size:12px;color:#586b80;font-weight:600;min-width:180px}.status-filter select{font-size:14px;min-height:42px;padding:10px 34px 10px 12px}.panel-heading .search-box{align-self:flex-end}.project-overview{border-left:4px solid #961738;padding:26px}.project-choice{min-height:145px;padding:24px}.project-choice .choice-icon{background:#f0e5e9;border-left:2px solid #961738}.contract-summary{border-top:3px solid #961738}.workflow{padding:24px}.workflow-title{margin-bottom:20px}.workflow-stage{padding:20px 0}.current .stage-symbol{background:#961738}.stage-heading h3{font-size:17px}.stage-status{font-weight:600}.stage-body .actions>.btn{min-height:40px}.contract-value strong{font-variant-numeric:tabular-nums}.dialog-footer{border-top:2px solid #e0e5ec}.tabs{background:#eef2f6;border:0;border-bottom:1px solid #d8e0ea;padding:0}.tabs .btn{border-bottom:3px solid transparent;min-height:44px}.tabs button[aria-selected=true]{background:white;box-shadow:none;border-bottom-color:#961738}.list-item{background:#fafbfd;border-left:3px solid #c7d2e0}.field{font-size:14px}.section-title{font-size:16px}.registry-panel{border-left:3px solid #961738}
.command-dialog{padding:0;width:min(760px,calc(100vw - 32px));height:auto;max-height:calc(100dvh - 60px);margin:8vh auto auto;background:white;border:1px solid #cbd4df;box-shadow:0 25px 80px #06182b40;overflow:auto}.command-input{display:flex;align-items:center;gap:14px;padding:18px 20px;border-bottom:2px solid #961738;position:sticky;top:0;background:#fff;z-index:1}.command-input>.icon{width:23px;height:23px;color:#961738}.command-input input{border:0;box-shadow:none;padding:8px 0;outline:none;min-height:40px;font-size:17px}.command-close{display:grid;place-items:center;width:40px;height:40px;flex:none;border:1px solid #dde3eb;background:#fff;color:#53657a}.command-label{padding:16px 20px 8px;margin:0;color:#758497;font-size:12px;letter-spacing:.08em}.command-item{display:flex;align-items:center;gap:14px;text-align:left;text-decoration:none;border:0;border-bottom:1px solid #edf0f4;padding:16px 20px;width:100%;background:#fff;color:#162840;font:inherit}.command-item:hover,.command-item:focus-visible{background:#f0f4f8;outline:0;box-shadow:inset 3px 0 #961738}.command-item>.icon{color:#7b8ca1;width:21px;height:21px}.command-item>span:not(.command-type){display:grid;gap:6px;min-width:0;flex:1}.command-item strong{font-weight:600;font-size:15px;overflow-wrap:anywhere}.command-item small{font-size:12px;color:#6f8095;line-height:1.5;overflow-wrap:anywhere}.command-type{font-size:11px;color:#728398;flex:none;border:1px solid #e1e7ee;padding:4px 6px}.command-foot{display:flex;justify-content:space-between;padding:13px 20px;background:#f5f7fa;font-size:12px;color:#728196;position:sticky;bottom:0;border-top:1px solid #dce3ec}
body[data-density=compact] td{padding-block:9px}body[data-density=compact] .project-card-cover{height:66px}body[data-density=compact] .project-card-body{padding:14px}body[data-density=compact] .project-card-body>p{margin-bottom:12px}body[data-density=compact] .project-card-numbers{margin-bottom:12px;padding-top:10px}body[data-density=compact] .workflow-stage{padding:14px 0}body[data-density=compact] .portfolio-intro{margin-bottom:18px}body[data-density=compact] .building-art{display:none}
@media(max-width:1100px) and (min-width:761px){.global-search{min-width:180px}.global-search kbd{display:none}.top{padding-inline:24px}.top>span{font-size:12px}.top-actions .density-toggle{font-size:0;gap:0;width:38px}}
@media(max-width:760px){.top{height:56px;gap:6px}.top-actions{gap:6px}.top-actions>.btn{font-size:0!important;gap:0;width:40px;min-width:40px;height:40px;padding:9px}.global-search kbd{display:none}.top-actions .density-toggle{display:none}.top>span{font-size:12px}.portfolio-intro h1{font-size:32px}.portfolio-intro>.btn{margin-top:18px}.portfolio-metrics{margin-bottom:24px;padding:15px 0}.portfolio-metrics>div{padding-inline:12px}.portfolio-metrics span{font-size:12px}.collection-header{gap:12px}.collection-header h2{font-size:21px}.workspace-aside{padding-top:0}.project-card-cover{height:84px}.project-card-body{padding:18px}.project-card h3{font-size:21px}.project-card-numbers>div:last-child strong{font-size:16px}.project-grid{gap:16px}.rail nav a[aria-current=page]{border-left:0;border-top:2px solid #961738;padding-left:8px;box-shadow:none}.rail nav a{border-top:2px solid transparent;border-radius:0}.new-project-tile{min-height:130px}.status-filter{width:100%}.status-filter select{min-height:46px;font-size:16px}.filters{gap:12px}.mobile-sort select{border-radius:0}.scroll tbody tr{border-radius:0;background:white;border-left:3px solid #c5d0dd}.scroll td .btn.small{min-height:44px}.project-nav .btn,.project-nav .current{border-radius:0;box-shadow:none}.project-nav .current{border-bottom:2px solid #961738}.contract-summary,.workflow,.project-overview{border-radius:0}.stage-body .actions>.btn{min-height:44px}.command-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.command-input{padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top))}.command-input input{font-size:16px;min-width:0}.command-input>.icon{width:19px;height:19px}.command-item{padding:17px 16px;gap:12px}.command-type{display:none}.command-item strong{font-size:15px}.command-foot{padding-bottom:calc(16px + env(safe-area-inset-bottom));font-size:11px}.command-dialog #command-results{min-height:calc(100dvh - 145px)}body[data-density=compact] td{padding-block:0}body[data-density=compact] td:last-child{padding-top:14px}}
@media(max-width:760px){.rail nav a{color:#53667e}.rail nav a[aria-current=page]{background:#961738;color:#fff;border-top-color:#d9879c}.rail nav a:hover{color:#961738;background:#f7e9ed}.rail nav a[aria-current=page]:hover{color:white;background:#78112c}}
/* Administrative forms and financial summaries. */
#analysis-content .portfolio-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
#analysis-content .portfolio-metrics strong {font-size:1.3rem}
form[data-program],form[data-project-access] {align-items:end;margin-bottom:24px}

#analysis-content .portfolio-metrics{grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));padding:16px}
#analysis-content .portfolio-metrics>div{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;padding:14px;min-width:0;height:auto}
#analysis-content .portfolio-metrics>div>*{position:static;display:block;grid-area:auto;min-height:0;margin:0}
#analysis-content .portfolio-metrics strong{line-height:1.3;overflow-wrap:anywhere}
[data-finance-form] .grid{align-items:start;gap:16px}
[data-finance-form] .repeat{margin-top:24px}
[data-finance-form] textarea{width:100%;line-height:1.45}
@media(max-width:720px){[data-finance-form] .grid{grid-template-columns:minmax(0,1fr)}}

/* Shared workspace surfaces. Use one hierarchy for the portfolio, documents and dialogs. */
:root {
  --navy: #142940;
  --text: #192d41;
  --muted: #536578;
  --accent: #9d1d40;
  --line: #dce2e8;
  --radius: 12px;
  --canvas: #f4f6f8;
  --card-padding: clamp(18px, 2vw, 28px);
  color: var(--text);
  background: var(--canvas);
}
body { line-height: 1.5; }
.surface { background: var(--canvas); }
main { width: 100%; max-width: 1440px; }
.hero, .portfolio-intro { align-items: center; margin: 0 0 25px; }
h1, .hero h1, .portfolio-intro h1, .project-hero h1 {
  font-size: clamp(1.75rem, 2.3vw, 2.3rem);
  line-height: 1.17;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
}
.hero p, .portfolio-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.55;
  font-size: .96rem;
}
.hero .eyebrow, .portfolio-intro .eyebrow { display: none; }
.panel, .project-card, .project-choice, .project-overview, .contract-summary,
.workflow, .aside-note, .portfolio-metrics {
  border-radius: var(--radius);
}
.panel, .project-card, .contract-summary, .workflow, .aside-note {
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(23,42,63,.035);
}
main>.panel:has(>h1), main>.panel:has(>h2):not(.empty) { padding: var(--card-padding); }
.panel-heading { padding: 18px var(--card-padding); background: white; }
.panel-heading h2, .collection-header h2, .workflow-title h2 {
  line-height: 1.25; letter-spacing: -.025em; font-size: 1.2rem;
}
:is(.btn,.btn.small,.more-actions summary,.registry-panel,input,select,textarea,.search-box input,.command-close) { border-radius: 7px; }
.btn, .btn.small { line-height: 1.35; font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #801631; border-color: #801631; }
.btn:disabled { opacity: .6; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid #ae4663; outline-offset: 3px;
}
.icon { stroke-linecap: round; stroke-linejoin: round; }
.result-count, .stage-status, .badge { border-radius: 999px; }
.brand .brand-logo { background: white; border-radius: 7px; }
.rail { background: var(--navy); }
.rail .brand-subtitle {
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -.02em;
  color: #fff;
}
.rail .profile .avatar { border-radius: 50%; }
.top { background: #fff; border-color: var(--line); }
.top-actions { gap: 7px; }
.top-actions .btn { border-radius: 7px; }
.global-search { background: #f6f8fa; }
.global-search kbd { border-radius: 4px; }
#nav a { transition: color .15s, background .15s; }
#nav a[aria-current=page] { border: none; box-shadow: none; }
.rail-bottom #template-link { border-radius: 7px; }
.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 0;
  margin: 0 0 24px;
}
.portfolio-metrics>div {
  background: white;
  border: 0;
  padding: 16px var(--card-padding);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 12px;
  row-gap: 8px;
}
.portfolio-metrics>div>span { grid-column: 1; grid-row: 1; min-height: 0; line-height: 1.35; font-size: .875rem; }
.portfolio-metrics>div>strong { grid-column: 1; grid-row: 2; line-height: 1.1; font-size: 1.65rem; }
.portfolio-metrics>div>.icon { grid-column: 2; grid-row: 1/3; color: #698198; }
.portfolio-layout { align-items: start; }
.collection-header { border: 0; padding-bottom: 0; gap: 14px; }
.project-card { position:relative; }
.project-card-body { padding: 22px; }
.project-card h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 8px; }
.project-card h3 a { color: var(--text); }
.project-card-numbers { gap: 10px; }
.project-card-numbers strong { overflow-wrap: anywhere; }
.project-card-footer { border-color: var(--line); }
.project-card-footer .btn { min-height: 38px; }
.more-menu { border-radius: 9px; box-shadow: 0 8px 20px #13264016; }
.aside-note { padding: 20px; }
.directory-summary {
  background: white; padding: 12px 16px; border: 1px solid var(--line);
  border-radius: 9px; margin: 0 0 18px; overflow-wrap:anywhere;
}
.company-monogram, .choice-icon, .stage-symbol { border-radius: 9px; }
th { background: #f4f6f8; color: #54677a; letter-spacing:.04em; }
td { color: var(--text); }
tbody tr:hover { background: #f8fafb; }
.company-name { text-align: left; }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.table-scroll table { width: 100%; border-collapse: collapse; }
.company-details dd, .contract-party strong, .project-overview strong, .workflow-stage h3,
.contract-summary h2, .project-card h3 { overflow-wrap: anywhere; }
.project-nav { margin: 0 0 20px; }
.project-nav .btn { color: var(--muted); border: 1px solid var(--line); border-radius: 7px; background: white; }
.project-nav .current { border-color: #e7becb; background: #faeef2; color: var(--accent); }
.project-choice { padding: var(--card-padding); }
.project-choice .choice-icon { border: 0; background: #f8eaf0; }
.contract-summary { border-top: 3px solid var(--accent); }
.contract-summary,.workflow { padding: var(--card-padding); min-width: 0; }
.workflow-stage { border-color: var(--line); padding-block: 18px; }
.stage-symbol { width: 38px; height: 38px; }
.stage-body>p { line-height: 1.5; }
.field { gap: 6px; line-height: 1.4; font-weight: 600; min-width: 0; }
input, select, textarea { border-color: #bfcbd6; color: var(--text); font-weight: 400; }
input[readonly], textarea[readonly] { background: #f5f7f9; color: #44576c; }
textarea { resize: vertical; line-height: 1.5; }
dialog { border-radius: 14px; box-shadow: 0 18px 70px #12253e38; }
dialog::backdrop { background: rgba(17,33,51,.48); }
dialog header {
  padding: 20px var(--card-padding);
  background: white; color: var(--text); border-bottom: 1px solid var(--line);
}
dialog header p { margin-top: 4px; color: var(--muted); }
dialog header>.btn { background: #f5f7f9; border-color: var(--line); color: var(--text); }
dialog header>.btn:hover { background: #eaf0f5; }
.dialog-body { padding: var(--card-padding); }
.dialog-footer {
  background: white;
  border-top: 1px solid var(--line);
  padding-inline: var(--card-padding);
  margin-inline: calc(-1 * var(--card-padding));
}
.tabs { gap: 4px; background: transparent; border-bottom-color: var(--line); }
.tabs .btn { border-radius: 6px 6px 0 0; }
.tabs .btn:is([aria-pressed=true],[aria-selected=true],[aria-current=page]) {
  background: #faedf2; border-bottom: 3px solid var(--accent); color: var(--accent);
}
.list-item,.registry-panel { border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
[data-finance-form] .repeat { border-top: 1px solid var(--line); padding-top: 16px; }
[data-finance-form] table { min-width: 600px; }
[data-finance-form] .table-scroll th, [data-finance-form] .table-scroll td { padding: 10px; }
[data-finance-form] [data-finance-total] { background:#f4f7fa; padding:14px; border-radius:8px; }
#notice { border-radius: 9px; }
.signed-out .rail, .signed-out .top { display: none; }
.signed-out .shell { display: block; min-height: 100dvh; }
.signed-out main {
  display: grid;
  min-height: 100dvh;
  align-content: center;
  justify-items: center;
  padding: 24px 16px;
}
.account-card {
  --account-inset: clamp(20px, 5vw, 34px);
  width: min(100%, 480px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 40px #182b4910;
}
.account-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 19px var(--account-inset);
  border-bottom: 1px solid #e8edf3;
}
.account-brand img { display: block; width: 124px; height: auto; }
.account-brand span {
  border-inline-start: 1px solid #dce4ed;
  padding-inline-start: 16px;
  color: #40556c;
  font-size: 14px;
  font-weight: 700;
}
.account-body { padding: 25px var(--account-inset) 26px; }
.account-body h1 {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(25px, 5vw, 32px);
  line-height: 1.2;
}
.account-fields { display: grid; gap: 15px; }
.account-fields .field { gap: 6px; }
.account-fields input { min-height: 48px; border-radius: 8px; font-size: 16px; background: #fbfcfe; }
.account-fields input[readonly] { background: #f0f4f8; color: #40556c; }
.account-body :is(.form-hint, small) { margin: 0; color: var(--muted); line-height: 1.5; }
.account-status { margin: 0 0 18px; padding: 10px 12px; border-radius: 8px; background: #eaf4ef; color: #245339; }
.account-body .error { margin: 10px 0 0; }
.account-body .error:empty { margin: 0; }
.account-submit.btn { width: 100%; min-height: 48px; margin-top: 20px; border-radius: 8px; }
.account-recovery { display: flex; justify-content: end; margin: 5px 0 -6px; }
.account-options {
  padding: 9px var(--account-inset) 12px;
  border-top: 1px solid #e4ebf3;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.account-link {
  min-height: 44px;
  padding: 0 4px;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.account-link:hover { color: #78112c; text-decoration-thickness: 2px; }
.account-card :is(button, a, input):focus-visible {
  outline: 2px solid #255984;
  outline-offset: 2px;
}

@media (min-width: 761px) {
  .shell { grid-template-columns: clamp(206px,16vw,240px) minmax(0,1fr); }
  .rail { padding: 24px 16px 18px; }
  .brand { padding: 0 8px 22px; gap: 12px; border-bottom: 1px solid #34485b; }
  .brand .brand-logo { width: 124px; padding: 8px; }
  #nav { margin-top: 24px; gap: 5px; }
  #nav a { min-height: 44px; border-radius: 7px; color: #c7d3df; padding:11px 13px; }
  #nav a:hover { background: #223c53; color:white; }
  #nav a[aria-current=page] { color: white; background: #8b1e3e; }
  main { padding: 30px clamp(24px,3vw,46px) 56px; }
  .rail-bottom .profile { margin-top: 12px; padding-top: 14px; }
  .rail-bottom #template-link { padding:10px 7px; }
  .top { height: 62px; padding-inline: clamp(24px,3vw,46px); }
}
@media (min-width: 761px) and (max-width: 975px) {
  .shell { grid-template-columns: 184px minmax(0,1fr); }
  .rail { padding-inline: 10px; }
  #nav a { font-size: .875rem; }
}
@media (max-width: 760px) {
  .rail { padding: 8px 14px; }
  .brand { gap: 10px; }
  .brand .brand-logo { width: 75px; padding: 4px 6px; }
  .brand .brand-subtitle { font-size: .94rem; letter-spacing: -.02em; }
  #nav { grid-template-columns: none; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column;
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); gap: 2px; }
  #nav a { min-height: 54px; min-width: 0; text-align: center; justify-content: center;
    padding: 4px 1px; gap: 4px; line-height: 1.1; font-size: .72rem; border: 0; border-radius:6px; }
  #nav a[aria-current=page] { color: var(--accent); background: #faeaf0; }
  #nav a .icon { width:19px; height:19px; }
  .top { height: 51px; padding-inline:14px; }
  main { padding: 22px 14px calc(90px + env(safe-area-inset-bottom)); }
  .hero, .portfolio-intro { align-items: flex-start; margin-bottom: 20px; }
  .hero .btn,.portfolio-intro>.btn { margin-top: 0; }
  .portfolio-intro>.btn { margin-top: 12px; }
  .portfolio-metrics>div { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; padding:12px 9px; gap:6px; }
  .portfolio-metrics>div>.icon { display:none; }
  .portfolio-metrics>div>span { font-size:.79rem; line-height:1.25; }
  .portfolio-metrics>div>strong { font-size:1.38rem; }
  .scroll tbody tr { border: 1px solid var(--line); border-radius:8px; }
  .project-card-body { padding:16px; }
  dialog:not(.command-dialog):not(.download-dialog) { border-radius:0; }
  dialog header { padding: 14px 16px; }
  .dialog-body { --card-padding:16px; padding:var(--card-padding); }
  .table-scroll table { display:table; min-width:max(540px,100%); }
  .table-scroll th,.table-scroll td { font-size:.85rem; text-align:left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; transition-duration: 0s!important; animation-duration: .01ms!important; }
}

/* Shared layouts for access control and financial reporting. */
.kg-page, #analysis-content { display:grid; gap:20px; min-width:0; }
.kg-head p,.kg-muted,.kg-meta,.kg-empty-note,.kg-empty p { color:var(--muted); margin:0; }
.kg-head p { max-width:76ch; }
.kg-card { min-width:0; background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 2px 6px #172a3f09; }
.kg-card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:17px 22px; border-bottom:1px solid var(--line); }
.kg-card h2,.kg-card h3,.kg-progress h3 { margin:0; line-height:1.3; letter-spacing:-.025em; }
.kg-card h2 { font-size:1.13rem; }
.kg-card h3,.kg-progress h3 { font-size:1rem; }
.kg-meta,.kg-muted { font-size:.9rem; }
.kg-count,.kg-chip { display:inline-flex; align-items:center; line-height:1.4; font-size:.83rem; font-weight:650; padding:4px 10px; border-radius:99px; }
.kg-count,.kg-neutral { color:#405466; background:#edf1f4; }
.kg-good { background:#e4f3ec; color:#1e6541; }
.kg-warn { background:#fff0d7; color:#804800; }
.kg-members { display:grid; grid-template-columns:minmax(235px,.88fr) minmax(0,2fr); align-items:start; gap:18px; }
.kg-search { padding:14px 14px 0; }
.kg-list [data-users] { display:grid; gap:4px; padding:10px; max-height:34rem; overflow:auto; }
.kg-member { display:flex; gap:11px; align-items:center; text-align:left; padding:12px; background:white; width:100%; border:1px solid transparent; border-radius:8px; color:var(--text); font:inherit; cursor:pointer; }
.kg-member:hover { background:#f4f6f8; }
.kg-member[aria-pressed=true] { background:#fcf2f5; border-color:#ebc8d2; }
.kg-member strong,.kg-member small,.kg-empty-inline span,.kg-table th small { display:block; }
.kg-member strong { font-size:.92rem; overflow-wrap:anywhere; }
.kg-member small,.kg-profile small { font-size:.84rem; color:var(--muted); }
.kg-avatar { display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:50%; font-size:.8rem; font-weight:700; background:#f0e3e8; color:#84233f; }
.kg-avatar-lg { width:46px; height:46px; border-radius:12px; }
.kg-profile { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:22px; border-bottom:1px solid var(--line); }
.kg-profile>div { flex:1 1 150px; min-width:0; }
.kg-profile h2 { overflow-wrap:anywhere; margin-top:3px; }
.kg-access-summary,.kg-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr)); gap:18px; margin:0; padding:20px 22px; }
.kg-access-summary dt,.kg-summary dt,.kg-metric span { margin:0 0 6px; color:var(--muted); font-size:.9rem; }
.kg-access-summary dd,.kg-summary dd { margin:0; font-weight:650; overflow-wrap:anywhere; }
.kg-profile-note,.kg-notice { color:var(--muted); font-size:.88rem; background:#f3f6f9; border-radius:8px; padding:12px 14px; }
.kg-profile-note { display:flex; align-items:flex-start; gap:9px; margin:0 22px 20px; }
.kg-profile-note .icon,.kg-empty-inline .icon { flex:none; }
.kg-edit { padding:20px 22px; }
.kg-edit + .kg-edit,.kg-summary { border-top:1px solid var(--line); }
.kg-edit>p { margin:6px 0 14px; }
.kg-form-grid,.kg-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.kg-edit form { margin-top:14px; }
.kg-buttons { display:flex; flex-wrap:wrap; gap:9px; margin-top:14px; }
.kg-buttons .kg-revoke { color:var(--accent); }
.kg-form-error { margin:9px 0 0; color:#a21832; }
.kg-form-error:empty { display:none; }
.kg-empty { text-align:center; padding:32px 20px; }
.kg-empty>.icon { color:var(--muted); margin-bottom:8px; }
.kg-empty p { margin-top:6px; }
.kg-empty-note { padding:14px; }
.kg-empty-inline { display:flex; align-items:center; gap:14px; padding:22px; }
.kg-empty-inline>.icon { color:#557088; width:22px; height:22px; }
.kg-empty-inline p { margin:0; }
.kg-empty-inline span { font-size:.9rem; color:var(--muted); margin-top:3px; }
.kg-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.kg-page [hidden] { display:none !important; }
.kg-filters { padding:16px 20px; grid-template-columns:repeat(2,minmax(0,1fr)) auto; align-items:end; }
.kg-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.kg-metric { padding:16px 18px; }
.kg-metric span,.kg-metric strong { display:block; }
.kg-metric strong { color:var(--text); font-size:clamp(1.2rem,1.7vw,1.6rem); line-height:1.25; letter-spacing:-.025em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.kg-progress-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; padding:20px 22px; }
.kg-progress>div { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.kg-progress strong { color:var(--accent); }
.kg-progress p { color:var(--muted); margin:7px 0 0; font-size:.88rem; }
.kg-progress progress { display:block; appearance:none; border:0; border-radius:99px; width:100%; height:7px; overflow:hidden; margin:10px 0; background:#e9edf1; color:var(--accent); }
.kg-progress progress::-webkit-progress-bar { background:#e9edf1; }
.kg-progress progress::-webkit-progress-value { background:var(--accent); border-radius:99px; }
.kg-progress progress::-moz-progress-bar { background:var(--accent); border-radius:99px; }
.kg-scroll { width:100%; overflow:auto; overscroll-behavior-x:contain; border-radius:0 0 var(--radius) var(--radius); }
.kg-scroll .kg-table { display:table; border-collapse:collapse; width:100%; min-width:32rem; margin:0; table-layout:auto; }
.kg-table th,.kg-table td { padding:12px 15px; text-align:left; vertical-align:top; border:0; border-bottom:1px solid var(--line); color:var(--text); font-size:.9rem; }
.kg-table thead th { font-size:.8rem; text-transform:none; letter-spacing:0; background:#f5f7f9; color:var(--muted); text-align:left; white-space:normal; }
.kg-table tbody th { font-weight:600; background:transparent; letter-spacing:0; text-transform:none; }
.kg-table tbody tr:last-child>* { border-bottom:0; }
.kg-table a { color:var(--accent); text-underline-offset:3px; }
.kg-table small { color:var(--muted); font-size:.8rem; font-weight:400; margin-top:4px; }
.kg-scroll .kg-analysis-table { min-width:64rem; }
.kg-analysis-table tbody th { min-width:10rem; }
.kg-analysis-table th:nth-child(2) { min-width:8rem; }
.kg-table .kg-number { text-align:right; font-variant-numeric:tabular-nums; }
.kg-table td.kg-number { white-space:nowrap; }
.kg-number .kg-variance { display:block; white-space:normal; color:#865222; }
.document-section { border:1px solid var(--line); border-radius:9px; background:white; }
.document-section>summary { padding:14px 16px; cursor:pointer; color:var(--text); font-weight:650; }
.document-section[open]>summary { border-bottom:1px solid var(--line); }
.document-section>.grid { padding:16px; }
.project-location { display:flex; align-items:center; gap:6px; margin-bottom:8px; color:var(--muted); font-size:.85rem; }
.project-location .icon { width:15px; height:15px; }
#crumb a { color:inherit; text-underline-offset:3px; }
[data-finance-form]>h3 { margin:24px 0 12px; }
[data-finance-form]>h3:first-of-type { margin-top:12px; }
[data-finance-form] .table-scroll { margin-block:14px; }
[data-finance-form] .tabs { flex-wrap:wrap; }
@media (min-width:761px) and (max-width:1100px) {
  .kg-members { grid-template-columns:minmax(190px,.8fr) minmax(0,1.8fr); }
  .kg-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .kg-page,#analysis-content { gap:14px; }
  .kg-members,.kg-filters,.kg-progress-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  .kg-card-head,.kg-profile,.kg-edit,.kg-empty-inline,.kg-progress-grid,.kg-summary,.kg-access-summary { padding:15px; }
  .kg-list [data-users] { max-height:180px; }
  .kg-metrics,.kg-summary,.kg-access-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .kg-metric { padding:12px; }
  .kg-profile-note { margin:0 15px 14px; }
  .kg-table tbody,.kg-table thead { display:table-row-group; }
  .kg-table thead { display:table-header-group; }
  .kg-table tr { display:table-row; }
  .kg-table td,.kg-table th { display:table-cell; }
  .kg-form-grid { grid-template-columns:1fr; }
  .top>span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}
select:not([multiple]):not([size]) {
  appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#586c80 50%),linear-gradient(135deg,#586c80 50%,transparent 50%);
  background-position:right 15px center,right 10px center;
  background-size:5px 5px;
  background-repeat:no-repeat;
  padding-right:33px;
}
.rail-bottom #template-link { white-space:normal; }
.rail-bottom #template-link .icon { flex:none; }

/* Contract details use a light surface in the desktop and mobile workspaces. */
.project-hero .project-nav {
  margin: 16px 0 0;
}
.contract-summary {
  position: static;
  display: block;
  color: var(--text);
}
.contract-summary .eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .75rem;
  text-transform: uppercase;
}
.contract-summary h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.3;
}
.contract-details {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 13px 0;
  border-block: 1px solid var(--line);
}
.contract-details > div {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
}
.contract-details dt, .contract-details small {
  display: block;
  color: var(--muted);
  font-size: .875rem;
}
.contract-details dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.contract-details small {
  margin-top: 3px;
  font-weight: 400;
}
.contract-value dd {
  font-variant-numeric: tabular-nums;
}
.contract-summary > .btn {
  justify-content: flex-start;
  min-height: 44px;
  width: auto;
  margin: 0;
  color: var(--accent);
  background: #fbf0f4;
  border-color: #edd4df;
}
.contract-summary > .btn:hover {
  background: #f7e5ed;
}
@media (max-width: 960px) {
  .contract-details {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .contract-party {
    grid-column: 1/-1;
    grid-row: auto;
  }
}
@media (max-width: 760px) {
  .rail {
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  #nav {
    position: static;
    order: 1;
    z-index: auto;
    flex: 0 0 calc(100% + 28px);
    margin-inline: -14px;
    padding: 5px 8px;
    background: white;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    backdrop-filter: none;
  }
  .top {
    height: 48px;
  }
  main {
    padding-bottom: 28px;
  }
  #notice {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .project-hero {
    gap: 14px;
    margin-bottom: 16px;
  }
  .project-hero .project-nav {
    margin-top: 12px;
  }
  .contract-workspace {
    gap: 14px;
  }
  .contract-summary, .workflow {
    padding: 16px;
  }
  .workflow-title {
    margin-bottom: 12px;
  }
}

.contract-modes { margin-top:0; }
#contract-fields[hidden], #contract-preview[hidden], #contract-preview [hidden], .contract-downloads [hidden] { display:none; }
.contract-draft-status { margin:18px 0 8px; }
.contract-downloads [data-save-draft] { margin-right:auto; }
[data-add-attachment] + .btn { margin:6px; }
.contract-preview-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:0 0 14px; }
.contract-preview-toolbar h3 { margin:0; font-size:1.15rem; }
.contract-manuscript { padding:clamp(18px,4vw,46px); border:1px solid var(--line); border-radius:9px; background:white; }
.contract-paragraph { min-width:0; }
.contract-paragraph + .contract-paragraph { margin-top:.65rem; }
.contract-paragraph-text, .contract-conflict blockquote { white-space:pre-wrap; overflow-wrap:anywhere; }
.contract-paragraph-text { margin:0; color:var(--text); font:1rem/1.6 Georgia,"Times New Roman",serif; }
.contract-title .contract-paragraph-text { text-align:center; font-size:1.2rem; font-weight:700; }
.contract-heading .contract-paragraph-text { margin-top:1.15rem; font-weight:700; }
.contract-prefix { font-variant-numeric:tabular-nums; }
.contract-manuscript:has(.contract-row-actions) .contract-paragraph { padding:.7rem; border:1px solid var(--line); border-radius:7px; }
.contract-paragraph textarea { width:100%; min-height:6rem; }
.contract-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
.contract-edited { color:var(--accent); font-size:.8rem; }
.contract-conflicts { padding:16px; margin-bottom:16px; border:1px solid #dfb77a; border-radius:8px; background:#fff9ee; color:#654318; }
.contract-conflicts h3, .contract-conflict p { margin:0 0 6px; }
.contract-conflict { padding:12px 0; border-top:1px solid #e7ccaa; }
.contract-conflict blockquote { margin:0 0 12px; padding-left:12px; border-left:2px solid #d5b589; }
.contract-preview-error { color:#9e263c; }
@media (max-width:760px) {
  .contract-modes { display:grid; grid-template-columns:1fr 1fr; }
  .contract-modes .btn { white-space:normal; }
  .contract-downloads { position:static; }
  .contract-downloads .btn { flex:1 1 7rem; }
  .contract-downloads [data-save-draft] { margin:0; }
  .contract-manuscript { padding:15px; }
}

.commercial-actions { margin-bottom: 16px; }
.commercial-table { overflow-x: auto; }
.commercial-table table { min-width: 580px; }
.commercial-item { border: 1px solid var(--border, #d5dbe3); margin: 0 0 14px; padding: 12px 14px; }
.commercial-item .actions { justify-content: space-between; margin-top: 10px; }
.commercial-total { text-align: right; margin-block: 12px 20px; }
.commercial-total strong { margin-left: 10px; }
.clause-options { display: grid; padding: 12px; gap: 8px; }
.clause-options label { display:flex; gap:8px; align-items:baseline; }
.clause-options input { width:auto; min-height:0; }

#modal:has(.offer-editor) { width:min(1450px,calc(100vw - 32px)); max-width:calc(100vw - 32px); }
.offer-meta { display:grid; grid-template-columns:minmax(220px,1fr) 175px 150px; gap:14px; margin-bottom:22px; }
.offer-toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:8px; }
.offer-toolbar h3 { margin:0; }
.offer-grid-scroll { max-height:min(58vh,580px); overflow:auto; border:1px solid #c7d3df; }
.offer-grid { min-width:1160px; width:100%; border:0; border-collapse:separate; border-spacing:0; table-layout:fixed; font-variant-numeric:tabular-nums; }
.offer-grid thead { position:sticky; top:0; z-index:1; }
.offer-grid th,.offer-grid td { padding:0!important; border:0; border-right:1px solid #dce4eb; border-bottom:1px solid #dce4eb; vertical-align:middle; }
.offer-grid th { padding:8px 6px!important; text-align:center; font-size:11px; }
.offer-grid thead th { color:white; background:#223b53; text-transform:none; letter-spacing:0; white-space:nowrap; }
.offer-grid th:nth-child(1){width:46px}
.offer-grid th:nth-child(2){width:100px}
.offer-grid th:nth-child(4){width:52px}
.offer-grid th:nth-child(5){width:69px}
.offer-grid th:nth-child(6){width:86px}
.offer-grid th:nth-child(7){width:112px;white-space:normal}
.offer-grid th:nth-child(8){width:70px}
.offer-grid th:nth-child(9){width:88px}
.offer-grid th:nth-child(10){width:104px}
.offer-grid th:nth-child(11){width:15%}
.offer-grid th:nth-child(12){width:76px}
.offer-grid tbody th { background:#f2f6fa; color:#2f4760; }
.offer-grid td { background:white; }
.offer-grid tr[data-type=group] :is(th,td) { background:#dce7f1; color:#18354e; font-weight:700; }
.offer-grid tr[data-type=group] :is(input,textarea,select) { font-weight:700; }
.offer-grid tr[data-type=group] input:disabled { visibility:hidden; }
.offer-grid .offer-child .offer-cell-description textarea { padding-left:16px; }
.offer-grid :is(input,textarea,select) { width:100%; min-height:38px; padding:7px; margin:0; border:0; border-radius:0; background:transparent; color:inherit; font-size:13px; box-shadow:none; }
.offer-grid select { padding-right:3px; }
.offer-grid textarea { display:block; resize:vertical; field-sizing:content; min-height:38px; }
.offer-grid :is(input,textarea,select):focus { outline:2px solid #557ca3; outline-offset:-2px; background:#fff; }
.offer-grid input[inputmode=decimal],.offer-number { text-align:right; }
.offer-number output,.offer-grid [data-row-type] { display:block; padding:5px 7px; }
.purchase-editor .purchase-section { display:grid; gap:12px; margin-block:18px; }
.purchase-editor :is(h3,h4,.commercial-total) { margin:0; }
.purchase-editor .purchase-parties { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.purchase-parties > div { padding:12px; border:1px solid #dce4eb; border-radius:8px; }
.purchase-parties h4 { font-size:14px; }
.purchase-parties p { margin:5px 0 0; white-space:pre-line; overflow-wrap:anywhere; }
.purchase-parties .grid { margin-top:12px; }
.purchase-party-picker { display:flex; align-items:end; flex-wrap:wrap; gap:10px; }
.purchase-party-picker .field { flex:1 1 260px; min-width:0; }
.purchase-editor .purchase-grid { min-width:690px; }
.purchase-grid th:nth-child(1) { width:40px; }
.purchase-grid th:nth-child(2) { width:auto; }
.purchase-grid th:nth-child(3) { width:105px; }
.purchase-grid th:nth-child(4) { width:64px; }
.purchase-grid th:nth-child(5) { width:105px; }
.purchase-grid th:nth-child(6) { width:22%; }
.purchase-grid th:nth-child(7) { width:75px; }
.purchase-grid td:last-child > .btn { display:block; margin:4px auto; }
.purchase-line-total { text-align:right; white-space:nowrap; }
.purchase-line-total output { padding:6px; display:block; }
.purchase-total-row { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:8px; }
.purchase-total-row .commercial-total { margin-left:auto; }
@media (max-width:640px) {
  .purchase-editor .purchase-parties { grid-template-columns:1fr; }
  .purchase-editor .offer-grid-scroll { max-height:none; border:0; }
  .purchase-editor .purchase-grid { display:block; min-width:0; }
  .purchase-grid thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .purchase-grid tbody { display:grid; gap:8px; }
  .purchase-grid tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:10px; gap:8px; border:1px solid #dce4eb; border-radius:8px; }
  .purchase-grid :is(th,td) { width:auto!important; min-width:0; border:0; }
  .purchase-grid tbody th,.purchase-grid td[data-label="Opis"],.purchase-grid td[data-label="Uwagi"] { grid-column:1/-1; }
  .purchase-grid tbody th { text-align:left; }
  .purchase-grid tbody th::before { content:"Pozycja "; }
  .purchase-grid td[data-label]::before { content:attr(data-label); display:block; font-size:12px; color:#3b526c; }
  .purchase-grid td :is(input,textarea) { border:1px solid #c7d3df; border-radius:6px; }
  .purchase-grid .purchase-line-total { text-align:left; }
  .purchase-grid td:last-child > .btn { margin:0 0 0 auto; }
}
.offer-number output { overflow-wrap:anywhere; }
.offer-row-actions { display:flex; justify-content:center; gap:3px; }
.offer-row-actions button { border:1px solid #b9c9d9; border-radius:4px; min-width:30px; min-height:30px; background:#fff; color:#223b53; font-size:17px; cursor:pointer; }
.offer-row-actions button:disabled { opacity:.38; cursor:default; }
.offer-total { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:24px; background:#eef3f7; padding:10px 14px; border:1px solid #c7d3df; border-top:0; }
.offer-total>span:first-child { margin-right:auto; }
.offer-import,.offer-notes { margin-top:16px; }
.offer-import>div { padding:8px 12px 12px; }
.offer-import .actions { margin-top:8px; }
@media(max-width:700px){
  #modal:has(.offer-editor) { width:100vw; max-width:100vw; }
  .offer-meta { grid-template-columns:1fr 1fr; }
  .offer-meta>.field:first-child { grid-column:1/-1; }
  .offer-grid :is(input,textarea,select) { font-size:16px; }
  .offer-row-actions button { min-height:42px; }
}

#modal:has([data-finance-form]) { width:min(1250px,calc(100vw - 32px)); max-width:calc(100vw - 32px); }
.finance-scroll { overflow:auto; max-height:min(58vh,560px); border:1px solid #c7d3df; }
.finance-grid { width:100%; min-width:690px; border-collapse:separate; border-spacing:0; table-layout:fixed; font-variant-numeric:tabular-nums; }
.finance-grid thead { position:sticky; top:0; z-index:1; }
.finance-grid th,.finance-grid td { border:0; border-right:1px solid #dce4eb; border-bottom:1px solid #dce4eb; vertical-align:middle; padding:8px!important; }
.finance-grid thead th { color:#fff; background:#223b53; font-size:11px; letter-spacing:0; text-transform:none; text-align:left; }
.finance-grid :is(input,textarea) { width:100%; min-height:37px; padding:7px; margin:0; border:0; background:transparent; box-shadow:none; font-size:13px; }
.finance-grid textarea { display:block; resize:vertical; field-sizing:content; }
.finance-grid :is(input,textarea):focus { outline:2px solid #557ca3; outline-offset:-2px; background:#fff; }
.finance-grid input[inputmode=decimal],.finance-grid .finance-number { text-align:right; }
.finance-grid .finance-group :is(th,td),.finance-grid tfoot :is(th,td) { background:#dce7f1; font-weight:700; }
.finance-grid .finance-group textarea { font-weight:700; }
.finance-grid .finance-actions { white-space:nowrap; text-align:center; }
.finance-grid .finance-actions button { min-width:30px; min-height:30px; padding:2px; margin-inline:2px; font-size:16px; }
.finance-scope-grid td:has(input),.finance-scope-grid td:has(textarea) { padding:0!important; }
.finance-scope-grid thead th:nth-child(1){width:48px}
.finance-scope-grid thead th:nth-child(3){width:70px}
.finance-scope-grid thead th:nth-child(4){width:80px}
.finance-scope-grid thead th:nth-child(5),.finance-scope-grid thead th:nth-child(6){width:126px}
.finance-scope-grid thead th:nth-child(7){width:86px}
.finance-grid:not(.finance-scope-grid) thead th:first-child{width:30%}
.finance-project-details { margin-top:16px; }
.finance-project-details>.grid { padding:12px; }
@media(max-width:700px){
  #modal:has([data-finance-form]){ width:100vw; max-width:100vw; }
  .finance-grid :is(input,textarea){font-size:16px}
}

.project-card-footer > .btn.primary {
  background:var(--accent); color:#fff; border:1px solid var(--accent);
  padding:8px 13px; justify-content:center; white-space:nowrap;
}
.project-card-footer > .btn.primary:hover { background:#801631; border-color:#801631; color:#fff; }
.project-card-footer > .btn:focus-visible,.offer-history-options .btn:focus-visible {
  outline:2px solid #365a81; outline-offset:3px;
}
.commercial-table table { table-layout:auto; min-width:780px; }
.commercial-table thead th { white-space:nowrap; }
.commercial-table td:first-child { overflow-wrap:anywhere; min-width:155px; }
.commercial-table td:nth-child(2),.commercial-table td:nth-child(3),.commercial-table td:nth-child(4) { white-space:nowrap; }
.commercial-table .offer-history-options { width:1%; }
.offer-history-options .actions { display:flex; flex-wrap:nowrap; gap:6px; }
.offer-history-options .btn { flex:0 0 auto; min-height:38px; padding:6px 10px; white-space:nowrap; }

#nav .rail-entry {
  display:flex; align-items:center; justify-content:flex-start; width:100%;
  min-width:0; gap:10px; padding:10px 11px; min-height:43px;
  font:inherit; font-size:.88rem; font-weight:600; line-height:1.3;
  text-decoration:none; text-align:left; color:#304962;
  background:transparent; border:1px solid transparent; border-radius:8px;
  cursor:pointer; transition:background .15s,color .15s;
}
#nav .rail-entry .icon { width:18px; height:18px; flex:none; }
#nav .rail-entry:hover { background:#e8eef5; color:#162d45; }
#nav .rail-entry[aria-current=page] {
  background:#f4e5eb; color:#801631; box-shadow:inset 3px 0 #9d1d40;
}
#nav .rail-entry:focus-visible { outline:2px solid #557ba0; outline-offset:1px; }
#nav .rail-back { border-color:#d8e1eb; background:#fff; }
.rail-project-name {
  margin:10px 0 2px; padding:4px 11px;
  color:#142c44; font-weight:750; line-height:1.25; overflow-wrap:anywhere;
}
@media(min-width:761px){
  .rail { background:#f5f8fb; border-right:1px solid #d8e1eb; overflow:auto; }
  .rail .brand { border-color:#d8e1eb; }
  .rail .brand-subtitle { color:#162d45; }
  .rail .brand-logo { box-shadow:0 0 0 1px #e1e8ef; }
  #nav { margin-top:17px; }
  .rail-bottom .profile { border-top:1px solid #d8e1eb; }
  .rail-bottom .profile strong,.rail-bottom .signout { color:#304962; }
  .rail-bottom .signout:hover { color:#801631; }
}
@media(max-width:760px){
  #nav .rail-entry { justify-content:center; flex-direction:column; gap:4px; font-size:.73rem; text-align:center; padding:6px 4px; }
  #nav .rail-entry[aria-current=page] { box-shadow:inset 0 -2px #9d1d40; }
  #nav.project-menu { grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-flow:row; }
  #nav.project-menu .rail-project-name { display:none; }
}

.offer-sort {
  display:inline-flex; align-items:center; gap:5px; min-height:30px; padding:0;
  border:0; background:transparent; color:inherit; font:inherit;
  text-transform:inherit; letter-spacing:inherit; cursor:pointer;
}
.offer-sort span { color:#526d86; font-size:1rem; }
.offer-sort:hover { color:#801631; }
.offer-sort:focus-visible { outline:2px solid #557ba0; outline-offset:3px; }
.commercial-table .offer-renumber { min-height:30px; margin-top:3px; padding:2px 0; }

/* Workspace palette and layout. Keep dense editing grids separate from list views. */
:root {
  --navy: #14253b;
  --text: #182a40;
  --muted: #52647b;
  --accent: #95183d;
  --line: #dde4ee;
  --canvas: #f1f4f8;
  --radius: 15px;
  --card-padding: clamp(18px, 2.2vw, 28px);
  --surface-shadow: 0 2px 4px #15253d08, 0 8px 24px #15253d05;
}
:is(.panel,.kg-card,.project-card,.aside-note,.contract-summary,.workflow) {
  box-shadow: var(--surface-shadow);
}
h1,.hero h1,.portfolio-intro h1,.project-hero h1 {
  font-size: clamp(1.75rem, 3.1vw, 2.75rem);
  font-weight: 740;
  letter-spacing: -.045em;
}
.top { background: #fff; padding-block: 8px; }
#crumb a { color: #465d79; text-decoration-color: #bccbdb; text-underline-offset: 3px; }
.btn,.btn.small {
  color: var(--text);
  border-color: #cbd6e3;
  border-radius: 9px;
}
.btn:hover,.btn.small:hover { background: #edf2f8; color: var(--text); }
.btn.primary,.btn.primary:hover,.btn.small.primary,.btn.small.primary:hover { color: #fff; }
.btn:not(.primary):is(.quiet,.danger) { color: var(--accent); }
.btn.quiet { border-color: transparent; }
.btn[aria-pressed=true]:not(.primary) { background: #f7e8ed; color: #841438; }
:where(.btn,input,textarea,select,summary,button,a):focus-visible {
  outline: 2px solid #3a6494;
  outline-offset: 3px;
}
.top .global-search { background: #f3f6fa; border-color: var(--line); }
.panel-heading,.kg-card-head { border-radius: var(--radius) var(--radius) 0 0; }
.panel-heading { gap: 14px; flex-wrap: wrap; }
.collection-header { flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.collection-header h2 { flex: 1 0 100%; margin: 0; }
.collection-header .search-box { flex: 1 1 180px; }
.filter-select { display: grid; gap: 3px; min-width: 0; color: var(--muted); }
.filter-select>span { font-size: .76rem; font-weight: 650; }
.filter-select select { width: 100%; padding-inline: 10px; }
.project-card { overflow: hidden; border-top: 3px solid #a22d4e; }
.project-card:hover { border-color: #c4d0df; border-top-color: var(--accent); }
.project-card h3>a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.project-card-numbers { background: #f4f7fa; border: 0; border-radius: 10px; padding: 12px; }
.project-card-numbers strong,.kg-metric strong,.offer-list-net { font-variant-numeric: tabular-nums; }
.project-card-footer { gap: 8px; flex-wrap: wrap; }
.project-card-footer>.btn { max-width: 100%; }
.project-hero {
  background: linear-gradient(120deg,#17283f,#253c56);
  color: white;
  border: 1px solid #293e57;
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 34px);
  box-shadow: var(--surface-shadow);
}
.project-hero h1 { color: #fff; }
.project-hero p { color: #dce7f6; }
.project-hero .btn.primary { background: #fff; border-color: #fff; color: #861339; }
.project-hero .btn.primary:hover { background: #f7e8ee; border-color: #f7e8ee; color: #781030; }
.project-hero .btn:focus-visible { outline-color: #fff; }
.project-modules {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr));
}
.project-modules .project-choice { align-content: start; min-height: 0; }
.project-modules .project-choice:hover { border-color: #bfcedf; background: #fbfcff; }
.kg-metric { border-top: 3px solid #b3c3d6; }
.kg-card-head { background: #fbfcfe; }
.kg-card .kg-filters { align-items: end; }
table:not(.offer-grid,.finance-grid) thead th { background: #edf2f8; color: #3b526c; }
table:not(.offer-grid,.finance-grid) td { border-bottom-color: #e5ebf3; }
dialog:not(.download-dialog) { border: 1px solid #d6e1ec; }
dialog header { background: #f8fafd; }
dialog header h2 { line-height: 1.2; overflow-wrap: anywhere; }
.dialog-footer { background: #fbfcfd; }
.offer-grid-scroll,.finance-scroll { border-radius: 9px 9px 0 0; }
.offer-total { border-radius: 0 0 9px 9px; }
.offer-filters .filters { align-items: end; }
.offer-sort-mobile,.offer-cell-label { display: none; }
.offer-message { padding: 20px var(--card-padding); margin: 0; color: var(--muted); }
.offer-list-table { border-radius: 0 0 var(--radius) var(--radius); }
.offer-list-table table { min-width: 620px; }
.offer-list-table th:first-child { width: 35%; }
.offer-list-table th,.offer-list-table td { padding: 12px 14px; }
.offer-list-table td:first-child { min-width: 150px; }
.offer-list-title strong,.offer-list-title small { display: block; line-height: 1.35; }
.offer-list-title small { margin-top: 4px; color: var(--muted); }
.offer-revision {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  background: #eaf0f6;
  color: #324c66;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.offer-list-table .offer-history-options { width: auto; }
.offer-list-table .actions { flex-wrap: wrap; }
.offer-list-table .offer-renumber { margin-block: 4px 0; }

@media (min-width: 761px) {
  .shell { grid-template-columns: clamp(194px, 18vw, 256px) minmax(0,1fr); }
  .rail { background: #14253b; border-right-color: #2a4059; }
  .rail .brand,.rail-bottom .profile { border-color: #354b64; }
  .rail .brand-subtitle { color: white; }
  .rail .rail-project-name { padding: 8px 11px 4px; color: #fff; font-size: .96rem; }
  .rail-bottom .profile strong,.rail-bottom .signout { color: #d1ddec; }
  .rail-bottom .signout:hover { color: #fff; }
  #nav .rail-entry { color: #d4e0ed; border: 1px solid transparent; padding-block: 10px; }
  #nav .rail-entry.rail-back { background: #1c324a; border-color: #344d68; }
  #nav .rail-entry:hover { background: #253d58; color: #fff; }
  #nav .rail-entry[aria-current=page] {
    background: #f7e9ef;
    color: #801532;
    box-shadow: inset 3px 0 #b72b56;
  }
  #nav .rail-entry:focus-visible { outline-color: #aecafa; }
}
@media (max-width: 1040px) {
  .offer-list-table { padding: 12px; overflow: visible; }
  .offer-list-table table,.offer-list-table tbody { display: block; width: 100%; min-width: 0; }
  .offer-list-table thead { display: none; }
  .offer-sort-mobile { display: grid; }
  .offer-list-table tr {
    display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 0 12px;
    padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  }
  .offer-list-table tr+tr { margin-top: 10px; }
  .offer-list-table td { padding: 6px 0; border: 0; background: transparent; text-align: left; min-width: 0; }
  .offer-list-table td.offer-list-title,.offer-list-table .offer-history-options { grid-column: 1/-1; }
  .offer-list-table td.offer-list-title { min-width: 0; }
  .offer-cell-label {
    display: block; margin-bottom: 3px; color: var(--muted); font-size: .75rem; font-weight: 600;
  }
  .offer-list-table td:nth-child(2),.offer-list-table td:nth-child(3),.offer-list-table td:nth-child(4) {
    white-space: normal; overflow-wrap: anywhere;
  }
  .offer-list-table .offer-history-options { padding: 9px 0 0; margin-top: 6px; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  #nav .rail-entry { min-height: 44px; }
  main { padding-inline: 14px; }
  .project-hero { flex-wrap: wrap; }
  .project-hero p { overflow-wrap: anywhere; }
  .collection-header .search-box { flex-basis: 100%; }
  .collection-header .filter-select { width: 100%; }
  .offer-filters h2 { width: 100%; }
  .offer-filters .filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 10px; }
  .offer-filters .search-box { grid-column: 1/-1; width: 100%; }
  .offer-list-table .btn { min-height: 42px; }
}

.annex-toolbar { margin: 0 0 14px; }
.annex-list { list-style: none; padding: 0; margin: 0; }
.annex-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.annex-list li small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.annex-change { margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.annex-change legend { font-weight: 650; padding-inline: 5px; }
#contract-clauses { padding: 16px 0; }
#contract-clauses h3 { margin: 0; }
#contract-clauses [hidden], .annex-editor [hidden] { display: none !important; }
.clause-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.clause-toolbar .field { flex: 0 1 290px; }
#contract-clauses .clause-options { display: block; list-style: none; padding: 0; margin-block: 16px; border: 1px solid var(--line); border-radius: 10px; }
#contract-clauses .clause-options li+li { border-top: 1px solid var(--line); }
#contract-clauses .clause-options label {
  display: grid; grid-template-columns: auto minmax(54px,100px) minmax(0,1fr) auto; align-items: center;
  gap: 14px; min-height: 54px; padding: 8px 14px; background: white; color: var(--text); cursor: pointer;
}
#contract-clauses .clause-options li:first-child label { border-radius: 9px 9px 0 0; }
#contract-clauses .clause-options li:last-child label { border-radius: 0 0 9px 9px; }
#contract-clauses label:hover { background: #f3f6fa; }
#contract-clauses label.excluded-clause { background: #f7f8fb; color: var(--muted); }
#contract-clauses label.clause-conflict { background: #fff8eb; }
.clause-index { font-variant-numeric: tabular-nums; }
.clause-index small { display: block; color: var(--muted); font-size: .74rem; }
.clause-status { border-radius: 99px; padding: 4px 9px; background: #e7f1ec; color: #23533b; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.excluded-clause .clause-status { background: #e9edf2; color: #435773; }
.clause-options label:has(input:disabled) { cursor: default; }
.clause-options label:has(input:disabled) .clause-status { background: #eef2fb; color: #3b4f74; }
#contract-clauses input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.annex-fragment-picker { min-width: 0; padding: 14px; background: #f3f6fa; border: 1px solid var(--line); border-radius: 9px; }
.annex-fragment-picker .field { margin-block: 0 10px; }
.annex-fragment-picker select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.annex-fragment-picker blockquote { margin: 10px 0; max-height: 250px; overflow: auto; padding: 12px; background: white; border-inline-start: 3px solid var(--accent); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 580px) {
  #contract-clauses .clause-options label { grid-template-columns: auto 48px minmax(0,1fr); gap: 5px 8px; padding-inline: 10px; }
  .clause-status { grid-column: 3; justify-self: start; }
  .clause-toolbar .field { flex: 1 0 100%; }
}
.contract-clause-warning { color: #654318; border: 1px solid #dfb77a; background: #fff8eb; padding: 12px; border-radius: 8px; }
@media (max-width: 760px) {
  .contract-modes:has([data-mode=clauses]) { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .contract-modes:has([data-mode=clauses]) button { min-width: 0; overflow-wrap: anywhere; padding-inline: 4px; }
}

#contract-fields [hidden] { display: none !important; }

.annex-source-fields { margin-top: .75rem; }
.annex-source-fields dt { font-weight: 600; margin-bottom: .25rem; }
.annex-source-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.contract-status {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: .42rem;
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}
.contract-terms-date { white-space: nowrap; }
.prepared-document { display: block; margin-top: .25rem; color: var(--muted); }
.contract-status.is-prepared { background: #e8f4eb; color: #215633; }
.contract-status.is-draft { background: #fff1d5; color: #714600; }
.contract-status.is-unprepared { background: #eef2f7; color: #47566c; }

.document-extras { display: grid; gap: .5rem; margin: 1rem 0 0; }
.document-extras label { display: flex; align-items: center; gap: .5rem; }
.document-extras p { margin: .25rem 0 0; }
.signed-upload h3, .signed-files { margin: .4rem 0; }
.signed-files { padding: 0; list-style: none; }
.signed-files li { display: flex; gap: .6rem; align-items: center; margin: .4rem 0; overflow-wrap: anywhere; }
[data-page="projekty"] .project-card-numbers { grid-template-columns: repeat(2,minmax(0,1fr)); }
#main[data-page="projekty"] > .portfolio-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.document-extras { margin: 0 0 1rem; }
.workflow-mark { display: inline-block; padding: .25rem .55rem; border-radius: .42rem; background: #edf2f8; color: #293e59; font-weight: 650; }
[data-signed-files] h4 { margin: .9rem 0 .25rem; }
.legacy-file-stage { display: flex; flex: 1 0 100%; align-items: center; gap: .5rem; }
.legacy-file-stage select { flex: 1; min-width: 0; }
.signed-files li { flex-wrap: wrap; }

.portfolio-window {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 30%);
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
}
.portfolio-project-list, .portfolio-recent {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--surface-shadow);
}
.portfolio-project-list { padding: clamp(.875rem, 2vw, 1.5rem); }
.portfolio-panel-heading { display: flex; align-items: center; gap: .625rem; }
.portfolio-panel-heading h2 { margin: 0; font-size: 1.125rem; line-height: 1.35; }
.portfolio-count {
  min-width: 1.65rem;
  padding: .175rem .45rem;
  border-radius: 2rem;
  background: #eef3f9;
  color: #38516c;
  font-size: .875rem;
  font-weight: 650;
  text-align: center;
}
.portfolio-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 34%);
  gap: .75rem;
  margin: 1rem 0;
}
.portfolio-toolbar .search-box { width: 100%; min-width: 0; }
.portfolio-toolbar :is(input, select) { min-height: 2.75rem; font-size: .875rem; }
.portfolio-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: .875rem;
  container-type: inline-size;
}
.portfolio-project-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  min-width: 0;
  padding: clamp(.875rem, 1.8vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: #fbfcfe;
}
.portfolio-project-info { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.portfolio-project-symbol, .portfolio-recent-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .65rem;
  background: #edf2f8;
  color: #345873;
}
.portfolio-project-info h3 { margin: 0 0 .3rem; font-size: 1.125rem; line-height: 1.25; overflow-wrap: anywhere; }
.portfolio-project-info h3 a, .portfolio-project-counts a { color: var(--text); }
.portfolio-project-location, .portfolio-project-investor { margin: 0; color: var(--muted); overflow-wrap: anywhere; font-size: .875rem; }
.portfolio-project-location .icon { width: .875rem; height: .875rem; margin-right: .25rem; vertical-align: -.12em; }
.portfolio-project-investor { margin-top: .2rem; }
.portfolio-project-summary { align-self: end; border: 1px solid #e3eaf2; border-radius: .625rem; background: #f2f6fa; }
.portfolio-project-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portfolio-project-counts a { padding: .55rem .45rem; text-align: center; text-decoration: none; }
.portfolio-project-counts a + a { border-left: 1px solid #e0e7ef; }
.portfolio-project-counts a:hover { background: #e8eff7; }
.portfolio-project-counts span { display: block; font-size: .8rem; color: #526982; }
.portfolio-project-counts strong { font-size: 1rem; }
.portfolio-project-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .125rem .5rem; margin: 0; padding: .55rem .7rem; border-top: 1px solid #e0e7ef; }
.portfolio-project-total dt { font-size: .8rem; color: #526982; }
.portfolio-project-total dd { margin: 0; font-weight: 700; font-size: .9rem; }
.portfolio-project-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.portfolio-project-actions .btn { min-height: 2.5rem; }
.portfolio-recent .portfolio-panel-heading { padding: clamp(.875rem, 2vw, 1.5rem); border-bottom: 1px solid var(--line); }
.portfolio-recent ul { list-style: none; padding: 0 .75rem; margin: 0; }
.portfolio-recent li + li { border-top: 1px solid var(--line); }
.portfolio-recent-link { display: flex; align-items: flex-start; gap: .625rem; padding: .75rem .5rem; color: var(--text); text-decoration: none; border-radius: .5rem; }
.portfolio-recent-link:hover { background: #f2f6fa; color: var(--text); }
.portfolio-recent-icon { width: 1.875rem; height: 1.875rem; border-radius: .4rem; }
.portfolio-recent-icon .icon { width: 1rem; height: 1rem; }
.portfolio-recent-description { min-width: 0; overflow-wrap: anywhere; }
.portfolio-recent-description strong { font-size: .875rem; display: block; line-height: 1.35; }
.portfolio-recent-description :is(span, small) { display: block; margin-top: .2rem; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.portfolio-recent-empty { padding: .875rem 1.25rem; color: var(--muted); }
@container (min-width: 39rem) {
  .is-single .portfolio-project-card { grid-template-columns: minmax(0, 1fr) minmax(16rem, 46%); grid-template-rows: auto auto; align-items: center; }
  .is-single .portfolio-project-summary { align-self: center; }
  .is-single .portfolio-project-actions { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .portfolio-window { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  .portfolio-toolbar { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .portfolio-toolbar :is(input, select) { font-size: 1rem; }
  .portfolio-project-symbol { width: 2rem; height: 2rem; }
}

.signed-files li[data-workflow-file] { justify-content: space-between; }
.workflow-file-name { flex: 1 1 12rem; min-width: 0; }
.workflow-file-name small { display: inline-block; margin-left: .25rem; color: var(--muted); }
.workflow-file-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.workflow-file-actions button { white-space: nowrap; }
.workflow-file-editor { display: grid; flex: 1 0 100%; min-width: 0; gap: .65rem; margin: .3rem 0; }
.workflow-file-editor [data-edit-feedback] { margin: 0; }
.workflow-file-editor [data-edit-feedback]:empty { display: none; }
