:root{--paper:#f5f4ef;--surface:#fffefa;--ink:#20302e;--muted:#75817c;--line:#e5e8e1;--forest:#19352f;--accent:#d77755;--mint:#dce9dc;--shadow:0 10px 34px rgba(29,46,39,.045)}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font-family:'Segoe UI Variable','Aptos','Segoe UI',sans-serif;font-size:14px;line-height:1.5}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.app-shell{min-height:100vh;display:grid;grid-template-columns:228px minmax(0,1fr)}
.sidebar{background:var(--forest);color:#f2f2e9;min-height:100vh;padding:34px 22px 26px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:11px;margin:0 0 76px 5px}.brand-mark{width:39px;height:39px;display:grid;place-items:center;background:#f0efe4;color:var(--forest);font-family:Georgia,serif;font-weight:700;font-size:25px;border-radius:11px;letter-spacing:-3px}.brand-mark span{color:var(--accent)}.brand-name{font-size:16px;font-weight:700;line-height:1.03;letter-spacing:-.05em}
.sidebar-label,.eyebrow,.overline{font-size:10px;font-weight:700;letter-spacing:.16em;text-transform:uppercase}.sidebar-label{color:#8da99d;margin:0 0 14px 13px}
.primary-nav{display:grid;gap:5px}.nav-link{display:flex;align-items:center;gap:13px;padding:12px 14px;border-radius:9px;color:#c2d0c8;font-weight:600;transition:background .18s,color .18s}.nav-link:hover,.nav-link:focus-visible{background:#2a4940;color:#fff}.nav-icon{font-size:18px;line-height:1;width:18px;text-align:center;font-weight:400}
.sidebar-bottom{margin-top:auto;border-top:1px solid #39554c;padding:24px 8px 0}.private-note{display:flex;align-items:center;gap:8px;color:#a4bbb0;font-size:11px}.private-dot{width:7px;height:7px;border-radius:50%;background:#a3c78d}.logout-button{border:0;background:none;color:#fff;padding:18px 0 0;font-weight:700;font-size:12px}.logout-button:hover{text-decoration:underline}
.main-content{padding:42px clamp(24px,5vw,78px) 100px;min-width:0;max-width:1600px;width:100%;margin:0 auto}.messages{margin-bottom:16px}.message{border:1px solid #c7dbc7;background:#e9f3e8;color:#28533d;padding:10px 15px;border-radius:9px;font-weight:600}
.eyebrow{color:var(--accent);display:flex;align-items:center;gap:12px}.eyebrow-line{width:24px;height:1px;background:#d8b39d}.page-header,.detail-header{display:flex;justify-content:space-between;align-items:flex-end;gap:25px;margin-bottom:37px}.page-header h1,.detail-header h1,.form-page h1,.login-page h1{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:clamp(42px,4vw,64px);line-height:1.12;letter-spacing:-.065em;margin:9px 0}.accent-period{color:var(--accent)}.page-subtitle{color:var(--muted);font-size:14px;margin:0}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:43px;padding:10px 17px;border-radius:8px;font-weight:700;font-size:12px;white-space:nowrap;border:1px solid transparent;transition:transform .18s,background .18s,border-color .18s}.button:hover{transform:translateY(-2px)}.button-primary{background:var(--forest);color:white}.button-primary:hover{background:#294d42}.button-outline{border-color:#bfc8bf;background:transparent}.button-outline:hover{border-color:var(--forest)}.button-quiet{color:var(--muted)}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 58px}.metric{background:var(--surface);border:1px solid var(--line);border-radius:12px;min-height:146px;padding:19px 21px;display:flex;flex-direction:column;transition:border-color .18s,transform .18s,box-shadow .18s}.metric:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.metric.selected{border-color:#8faa98;box-shadow:inset 0 3px var(--forest)}.metric-label{color:var(--muted);font-size:12px;font-weight:600}.metric strong{font-family:Georgia,serif;font-size:38px;line-height:1;margin-top:10px;font-weight:400;letter-spacing:-.05em}.metric-foot{font-size:10px;color:#789387;font-weight:700;margin-top:auto}
.section-toolbar,.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:20px}.section-toolbar{margin-bottom:20px}.section-toolbar h2,.section-heading h2{font-family:Georgia,serif;font-weight:400;font-size:28px;letter-spacing:-.045em;margin:3px 0 0}.section-heading{margin-bottom:21px}.section-heading p{color:var(--muted);margin:0;font-size:12px;max-width:310px;text-align:right}.search-form{position:relative}.search-form input{width:270px;padding:11px 40px 11px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface);outline:none}.search-form input:focus{border-color:#91a99c}.search-form button{border:0;background:none;position:absolute;right:11px;top:4px;font-size:25px;color:var(--muted)}
.project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.project-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:23px;min-height:229px;display:flex;flex-direction:column;justify-content:space-between;gap:25px;transition:transform .18s,border-color .18s,box-shadow .18s}.project-card:hover{transform:translateY(-4px);border-color:#b3c8b8;box-shadow:var(--shadow)}.project-card-top,.project-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.project-card-bottom{border-top:1px solid var(--line);padding-top:15px;color:#829088;font-size:10px;line-height:1.3}.project-client{font-size:10px;color:var(--accent);letter-spacing:.13em;font-weight:700;text-transform:uppercase}.project-card h3{font-family:Georgia,serif;letter-spacing:-.045em;font-weight:400;font-size:25px;line-height:1.18;margin:5px 0 8px}.project-card p{font-size:12px;color:var(--muted);margin:0;line-height:1.6}.card-arrow{font-size:19px;color:#a8b7ac;line-height:1}.stage-pill{font-size:10px;font-weight:700;display:inline-flex;align-items:center;border-radius:99px;padding:6px 10px}.stage-follow_up{color:#836637;background:#f7ead6}.stage-active{color:#336345;background:#e2efe1}.stage-rejected{color:#85565b;background:#f5e5e7}
.empty-state{grid-column:1/-1;padding:60px 24px;text-align:center;border:1px dashed #cad1c8;border-radius:12px}.empty-symbol{font-size:40px;color:#a3b5a7}.empty-state h3{font-family:Georgia,serif;font-size:26px;font-weight:400;margin:8px 0}.empty-state p{color:var(--muted)}.empty-state .button{margin-top:8px}
.back-link{display:inline-flex;color:#6f8176;font-weight:700;font-size:11px;margin-bottom:36px}.back-link:hover{color:var(--forest)}.detail-header{margin-bottom:26px}.detail-header h1{margin:8px 0 15px}.header-meta{display:flex;align-items:center;flex-wrap:wrap;gap:14px;color:var(--muted);font-size:11px}.header-meta>*+*{border-left:1px solid #cad4ca;padding-left:14px}.section-nav{display:flex;gap:25px;overflow-x:auto;border-bottom:1px solid #d9dfd7;margin-bottom:55px;white-space:nowrap}.section-nav a{font-size:11px;font-weight:700;color:#829088;padding:0 1px 15px;border-bottom:2px solid transparent}.section-nav a:hover,.section-nav a:focus-visible{color:var(--forest);border-bottom-color:var(--accent)}.detail-section{scroll-margin-top:24px;margin:0 0 59px}.surface{background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}.overview-grid,.two-column{display:grid;grid-template-columns:1.4fr 1fr;gap:14px}.overview-summary,.numbers-card{padding:25px}.overline{color:#87978a}.overview-summary>p{font-family:Georgia,serif;font-size:19px;line-height:1.55;color:#344440;max-width:640px;margin:15px 0 20px}.numbers-card{display:flex;flex-direction:column}.number-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:14px 0;font-size:11px;color:var(--muted)}.number-row:last-child{border-bottom:0}.number-row strong{font-size:14px;color:var(--ink)}.stage-card{margin-top:14px;padding:22px 25px;display:flex;align-items:center;justify-content:space-between;gap:20px}.stage-card p{font-size:12px;color:var(--muted);margin:6px 0 0}.stage-card .add-panel{min-width:190px;border:0}
.section-card{padding:23px;min-width:0}.full-card{margin-top:14px}.card-heading{display:flex;align-items:center;gap:10px;margin-bottom:18px}.card-heading h3{font-family:Georgia,serif;font-size:20px;letter-spacing:-.04em;font-weight:400;margin:0}.count-tag{background:#edf0e9;color:#687b6a;border-radius:99px;padding:3px 8px;font-size:10px;font-weight:700}.record-list{display:grid;gap:0}.record{padding:13px 0;border-top:1px solid var(--line)}.record:first-child{border-top:0;padding-top:0}.record>div{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.record strong{font-size:12px}.record span,.record p,.muted{color:var(--muted);font-size:11px}.record p{margin:6px 0 0;line-height:1.6}.quote-record strong{font-size:15px}.document-list{display:grid;gap:0}.document-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--line)}.document-row:first-child{border-top:0}.document-row:hover strong{text-decoration:underline}.document-row>span:nth-child(2){display:grid;gap:2px;flex:1}.document-row strong{font-size:12px}.document-row small{color:var(--muted);font-size:10px}.document-icon{width:34px;height:34px;border-radius:8px;background:#e8eee7;display:grid;place-items:center;color:#597667;font-size:18px}.tag-list{display:flex;flex-wrap:wrap;gap:7px}.tech-tag{border:1px solid #cfdace;background:#f1f6ee;color:#42654f;border-radius:99px;padding:6px 11px;font-size:11px;font-weight:700}.total-estimate{margin-left:auto;color:#2b5a3d;font-size:17px}.cost-table-wrap{overflow-x:auto}.cost-table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap}.cost-table th{text-align:left;color:#89958a;font-size:9px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;border-bottom:1px solid var(--line);padding:9px 10px 12px 0}.cost-table td{padding:14px 10px 14px 0;border-bottom:1px solid var(--line);color:#64756b}.cost-table td:last-child{color:var(--ink)}.cost-table td strong{display:block;color:var(--ink)}.cost-table td small{display:block;color:var(--muted)}
.add-panel{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}.add-panel summary{list-style:none;display:flex;align-items:center;gap:8px;color:#315b44;font-size:11px;font-weight:700;cursor:pointer}.add-panel summary::-webkit-details-marker{display:none}.plus-circle{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e6efe3;font-size:15px;font-weight:400}.inline-form{display:grid;gap:11px;padding:18px 0 0;max-width:460px}.inline-form .button{justify-self:start}.field{display:grid;gap:5px}.field label,.login-card label{font-size:11px;font-weight:700;color:#53675a}.field input,.field select,.field textarea,.login-card input{display:block;width:100%;padding:10px 11px;background:white;border:1px solid #d7ded4;border-radius:7px;color:var(--ink);outline:none;font-size:12px}.field input:focus,.field select:focus,.field textarea:focus,.login-card input:focus{border-color:#638b72;box-shadow:0 0 0 3px #e4f0e5}.field small{font-size:10px;color:var(--muted)}.form-error{color:#a34438;font-size:11px;font-weight:600}
.work-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.work-card{padding:21px}.work-card-top,.work-card-footer{display:flex;justify-content:space-between;gap:10px;align-items:center}.type-pill{background:#f2ede6;color:#896b54;padding:5px 9px;border-radius:99px;text-transform:uppercase;letter-spacing:.08em;font-weight:700;font-size:9px}.status-text{font-size:10px;color:#557b5f;font-weight:700}.work-card h3{font-family:Georgia,serif;font-weight:400;font-size:20px;margin:13px 0 5px}.work-card p{font-size:11px;color:var(--muted);min-height:31px;margin:0 0 20px}.work-card-footer{border-top:1px solid var(--line);padding-top:12px;font-size:10px;color:var(--muted)}.work-card-footer form{display:flex;gap:6px}.work-card-footer select,.work-card-footer button{border:1px solid #d5ded3;background:white;border-radius:6px;color:var(--forest);font-size:10px;padding:5px}.work-card-footer button{background:#edf3eb;font-weight:700}.empty-inline{padding:26px;color:var(--muted);font-size:12px}.timeline-card{padding:10px 26px}.timeline-entry{display:grid;grid-template-columns:18px 1fr;gap:12px;position:relative;padding:18px 0}.timeline-entry:not(:last-child):before{content:'';position:absolute;width:1px;background:#d5dfd4;left:5px;top:28px;bottom:-18px}.timeline-dot{width:11px;height:11px;border-radius:50%;background:#8bac90;border:3px solid #e5efe3;margin-top:4px}.timeline-entry strong{font-size:12px}.timeline-entry p{font-size:11px;color:var(--muted);margin:3px 0}.timeline-entry time{display:block;font-size:10px;color:#9aa59b;margin-top:4px}
.form-page{max-width:660px}.form-surface{padding:28px;margin-top:28px;display:grid;gap:17px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:10px}.login-page{max-width:500px;margin:9vh auto 0}.login-page>p{color:var(--muted)}.login-card{padding:30px;background:var(--surface);border:1px solid var(--line);border-radius:12px;margin-top:25px;display:grid;gap:9px}.login-card input{margin-bottom:9px}.login-card .button{margin-top:8px}
.cost-edit-link:hover{text-decoration:underline}
@media(max-width:1150px){.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.app-shell{display:block}.sidebar{position:static;height:auto;min-height:0;padding:15px 20px;display:flex;flex-direction:row;align-items:center;gap:16px}.brand{margin:0 auto 0 0}.brand-mark{width:32px;height:32px;font-size:21px}.brand-name{font-size:12px}.sidebar-label,.private-note{display:none}.sidebar-bottom{margin:0;padding:0;border:0}.logout-button{padding:0;font-size:11px}.primary-nav{display:flex}.nav-link{font-size:0;padding:8px}.nav-icon{font-size:22px}.main-content{padding:28px 18px 70px}.page-header,.detail-header{align-items:flex-start}.page-header h1,.detail-header h1,.form-page h1,.login-page h1{font-size:45px}.page-header .button{align-self:center}.overview-grid,.two-column{grid-template-columns:1fr}.section-nav{margin-bottom:35px}.detail-section{margin-bottom:44px}}
@media(max-width:570px){.page-header,.detail-header,.section-toolbar,.section-heading{display:block}.page-header .button{margin-top:20px}.metrics{gap:8px}.metric{min-height:117px;padding:15px}.metric strong{font-size:30px}.metric-foot{font-size:9px}.project-grid,.work-grid{grid-template-columns:1fr}.search-form{margin-top:18px}.search-form input{width:100%}.section-heading p{text-align:left;margin-top:8px}.stage-card{display:block}.header-meta{gap:8px}.detail-header .button{margin-top:18px}.form-actions{flex-wrap:wrap}}

/* Refined project ledger */
:root{--paper:#f6f5f0;--surface:#fffefa;--ink:#1b302b;--muted:#667a70;--line:#dfe6dc;--forest:#163b31;--accent:#c96d4d;--shadow:0 18px 44px rgba(27,48,43,.075)}
body{background:radial-gradient(circle at 78% -15%,#e8eee4 0,transparent 42%),var(--paper)}
.app-shell{grid-template-columns:248px minmax(0,1fr)}
.sidebar{background:linear-gradient(155deg,#1c4438 0%,#17382f 48%,#102b27 100%);overflow:hidden}
.sidebar::after{content:'';position:absolute;width:260px;height:260px;border:1px solid rgba(255,255,255,.08);border-radius:50%;right:-160px;bottom:60px;pointer-events:none}
.sidebar>*{position:relative;z-index:1}
.brand{margin-bottom:80px}.brand-mark{box-shadow:0 8px 20px rgba(0,0,0,.12)}
.nav-link.is-active{background:#e4eee3;color:#173d32;box-shadow:0 4px 16px rgba(0,0,0,.08)}
.nav-link.is-active:hover{background:#fffefa;color:#173d32}
.user-badge{display:flex;align-items:center;gap:10px;margin-bottom:20px;color:#fff}
.user-avatar{width:33px;height:33px;display:grid;place-items:center;border-radius:10px;background:#e8eee3;color:#1e4638;font-family:Georgia,serif;font-size:17px;font-weight:700}
.user-badge span:last-child{display:grid;line-height:1.25}.user-badge strong{font-size:12px}.user-badge small{font-size:10px;color:#a7bdb0;margin-top:2px}
.private-note{font-size:11px}.logout-button{transition:color .2s}.logout-button:hover{color:#f2c3ad}
.main-content{padding-top:50px}
.skip-link{position:absolute;top:-60px;left:16px;z-index:100;background:#fffefa;color:#173d32;padding:10px 14px;border:2px solid #173d32;border-radius:8px}
.skip-link:focus{top:12px}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #df9b78;outline-offset:3px}
.page-header{margin-bottom:42px}.page-header h1{max-width:850px}.page-subtitle{max-width:640px;line-height:1.65}
.metric{position:relative;overflow:hidden}.metric::after{content:'';position:absolute;right:-25px;top:-25px;width:100px;height:100px;border-radius:50%;background:#dce9dc;opacity:.28;transition:transform .25s}
.metric:hover::after{transform:scale(1.25)}.metric>*{position:relative;z-index:1}.metric.selected{background:#edf4ed;border-color:#9bbba4}.metric.selected .metric-foot{color:#315f45}
.project-card{position:relative;overflow:hidden}.project-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent);transform:scaleY(0);transform-origin:top;transition:transform .2s}.project-card:hover::before,.project-card:focus-visible::before{transform:scaleY(1)}
.project-card-bottom{flex-wrap:wrap}.project-card-bottom span:first-child{font-weight:700;color:#526e5d}
.search-form{display:flex;align-items:center;gap:8px}.search-form input{width:min(310px,32vw);padding:11px 14px;min-height:43px}.search-form button{position:static;display:inline-flex;align-items:center;justify-content:center;min-height:43px;border:1px solid var(--forest);border-radius:8px;background:var(--forest);color:#fff;font-size:12px;font-weight:700;padding:0 16px}.search-form button:hover{background:#2b5344}.clear-search{font-size:11px;color:#416d53;font-weight:700;padding:8px}.clear-search:hover{text-decoration:underline}
.empty-state{background:var(--surface);padding:70px 24px}.empty-state h3{color:var(--forest)}
.section-nav{position:sticky;top:0;z-index:5;background:rgba(246,245,240,.96);backdrop-filter:blur(10px);padding-top:15px}.section-nav a{font-size:12px}.section-nav a:hover{border-bottom-color:var(--accent)}
.detail-section{scroll-margin-top:80px}.section-card,.overview-summary,.numbers-card{box-shadow:0 8px 30px rgba(27,48,43,.035)}
.add-panel summary{font-size:12px;min-height:32px}.add-panel summary:hover{color:#1c4438}.plus-circle{width:25px;height:25px}
.form-surface{gap:20px}.form-intro{margin:0 0 3px;color:var(--muted);font-size:12px;line-height:1.55}.required-mark{color:#b35c45;font-weight:800}
.field{gap:7px}.field label{font-size:12px}.field input,.field select,.field textarea,.login-card input{min-height:44px;font-size:13px;padding:11px 12px;transition:border-color .18s,box-shadow .18s}.field textarea{min-height:90px;resize:vertical}.field:has(.form-error) input,.field:has(.form-error) select,.field:has(.form-error) textarea{border-color:#bc6551}
.form-error{font-size:12px}.error-banner{background:#fff1ec;border:1px solid #efc5b8;border-radius:8px;padding:10px 12px}
.message{box-shadow:0 5px 18px rgba(27,48,43,.05)}.message-error{background:#fff1ec;border-color:#efc5b8;color:#8e3f2c}
.auth-shell .main-content{min-height:100vh;display:grid;place-items:center;padding:40px}.auth-shell .sidebar{justify-content:space-between}.auth-shell .brand{margin-bottom:0}.auth-shell .sidebar-bottom{margin-top:0}.auth-shell .private-note{font-size:12px}
.login-page{width:min(100%,480px);max-width:none;margin:0}.login-page h1{font-size:clamp(48px,5vw,68px)}.login-page>p{font-size:14px;line-height:1.65}.login-card{padding:30px 32px;border-radius:15px;box-shadow:0 24px 60px rgba(27,48,43,.09)}.login-card-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.login-card-heading strong{font-family:Georgia,serif;font-size:20px;font-weight:400}.login-card-heading span{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#668071;font-weight:700}.login-card .button{width:100%;font-size:13px;min-height:47px}.login-footnote{text-align:center;font-size:11px!important;margin-top:18px}
@media(max-width:780px){.app-shell{display:block}.sidebar{overflow:visible}.sidebar::after{display:none}.nav-link{font-size:11px;padding:8px 10px;gap:6px}.nav-icon{font-size:16px;width:16px}.user-badge,.private-note{display:none}.sidebar-bottom{display:block}.auth-shell .main-content{min-height:calc(100vh - 80px)}.auth-shell .private-note{display:none}.main-content{padding-top:30px}.section-nav{top:0}}
@media(max-width:570px){.sidebar{gap:12px;flex-wrap:wrap}.brand{margin-right:auto}.primary-nav{order:3;width:100%;justify-content:space-between;gap:8px}.nav-link{flex:1;justify-content:center;font-size:11px}.sidebar-bottom{margin-left:auto}.page-header h1{font-size:41px}.search-form{flex-wrap:wrap}.search-form input{width:100%;flex:1 0 100%}.search-form button{flex:1}.clear-search{text-align:center;flex:1}.metric{min-height:123px}.metric-label{line-height:1.25}.metric-foot{line-height:1.3}.section-nav{margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}.form-surface,.login-card{padding:22px}.auth-shell .main-content{padding:35px 20px}.login-page h1{font-size:48px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
.brand-mark{display:flex;align-items:center;justify-content:center;letter-spacing:-3px}.brand-mark span{display:inline;line-height:1;margin-left:1px}
