:root{
  --surface-base:#f1eee6;--surface-paper:#faf8f2;--surface-ink:#11110f;--surface-quiet:#e5e1d7;
  --text-primary:#171612;--text-muted:#68645c;--text-inverse:#f7f4ec;--action-primary:#c84132;
  --action-hover:#a93225;--proof:#225f47;--warning:#9b6b19;--line-subtle:#cfc9bc;--line-strong:#8d877b;
  --radius-control:2px;--space-section:clamp(72px,9vw,132px);--motion-medium:420ms;
  --ease-out:cubic-bezier(.16,1,.3,1);--max:1240px
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--surface-base);color:var(--text-primary);font-family:Arial,Helvetica,sans-serif;line-height:1.55;text-rendering:optimizeLegibility}
a{color:inherit}button,input,textarea,select{font:inherit}:focus-visible{outline:3px solid var(--action-primary);outline-offset:3px}
.skip-link{position:absolute;left:-9999px;top:12px;background:#fff;padding:10px 14px;z-index:999}.skip-link:focus{left:12px}
.site-header{position:sticky;top:0;z-index:80;background:rgba(241,238,230,.95);backdrop-filter:blur(12px);border-bottom:1px solid var(--line-subtle)}
.nav-wrap{max-width:var(--max);margin:0 auto;padding:0 24px;min-height:70px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:24px}
.brand{display:flex;align-items:baseline;gap:8px;text-decoration:none;font-weight:900;letter-spacing:-.04em;font-size:1.2rem}
.brand-mark{width:18px;height:18px;background:var(--action-primary);display:inline-block;transform:rotate(45deg)}
.brand small{font:500 .63rem/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}
.site-nav{display:flex;justify-content:center;gap:24px;align-items:center}.site-nav a{font-size:.86rem;text-decoration:none;color:var(--text-muted);border-bottom:1px solid transparent;padding:23px 0 20px}
.site-nav a:hover{color:var(--text-primary);border-color:var(--text-primary)}.nav-actions{display:flex;gap:10px;align-items:center}
.nav-toggle{display:none;background:none;border:1px solid var(--line-strong);padding:8px 10px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid var(--text-primary);border-radius:var(--radius-control);text-decoration:none;font-weight:700;font-size:.86rem;background:transparent;color:var(--text-primary);cursor:pointer;transition:background .15s,color .15s,transform .15s}
.btn:hover{transform:translateY(-1px)}.btn-primary{background:var(--action-primary);border-color:var(--action-primary);color:#fff}.btn-primary:hover{background:var(--action-hover)}
.btn-ink{background:var(--surface-ink);border-color:var(--surface-ink);color:var(--text-inverse)}.btn-quiet{border-color:var(--line-subtle)}.btn-link{border:0;padding:0;min-height:auto;text-decoration:underline;text-underline-offset:4px}
.shell{max-width:var(--max);margin:0 auto;padding-left:24px;padding-right:24px}.page-shell{max-width:var(--max);margin:0 auto;padding:56px 24px var(--space-section)}
.eyebrow{font:700 .69rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase;letter-spacing:.12em;color:var(--action-primary)}
.display{font-size:clamp(3.6rem,8vw,8.3rem);line-height:.88;letter-spacing:-.065em;margin:18px 0 26px;font-weight:900;max-width:10ch}
.h1{font-size:clamp(2.5rem,5vw,5.2rem);line-height:.95;letter-spacing:-.055em;margin:16px 0 24px;max-width:13ch}
.h2{font-size:clamp(1.9rem,3.3vw,3.4rem);line-height:1;letter-spacing:-.045em;margin:0}.h3{font-size:1.2rem;line-height:1.2;margin:0}
.lede{font-size:clamp(1.05rem,1.6vw,1.35rem);max-width:700px;color:var(--text-muted);line-height:1.55}.micro{font:500 .72rem/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text-muted)}
.hero{min-height:calc(100vh - 70px);display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);border-bottom:1px solid var(--line-strong)}
.hero-copy{padding:clamp(70px,9vw,130px) 40px clamp(60px,8vw,110px) max(24px,calc((100vw - var(--max))/2 + 24px))}
.hero-proof{border-left:1px solid var(--line-strong);background:var(--surface-paper);padding:clamp(70px,9vw,130px) max(24px,calc((100vw - var(--max))/2 + 24px)) 60px 40px;display:flex;flex-direction:column;justify-content:space-between;gap:54px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:32px}.route-list{margin:0;padding:0;list-style:none;border-top:1px solid var(--line-strong)}.route-list li{border-bottom:1px solid var(--line-subtle)}
.route-list a{display:grid;grid-template-columns:38px 1fr auto;gap:16px;align-items:start;padding:18px 0;text-decoration:none}.route-list a:hover .route-name{text-decoration:underline;text-underline-offset:5px}
.route-index{font:700 .72rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--action-primary)}.route-name{font-weight:800}.route-desc{display:block;color:var(--text-muted);font-size:.88rem;margin-top:3px}.arrow{font-size:1.25rem}
.section{padding:var(--space-section) 0;border-bottom:1px solid var(--line-subtle)}.section-head{display:grid;grid-template-columns:220px 1fr;gap:40px;margin-bottom:50px}.section-head .lede{margin-top:12px}
.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong)}
.choice{padding:34px 28px 42px;border-right:1px solid var(--line-subtle);text-decoration:none;min-height:280px;display:flex;flex-direction:column;justify-content:space-between;gap:30px}.choice:last-child{border-right:0}.choice:hover{background:var(--surface-paper)}
.choice strong{font-size:1.5rem;letter-spacing:-.03em;display:block}.choice p{color:var(--text-muted);margin:8px 0 0}.choice .micro{color:var(--action-primary)}
.service-rows{border-top:1px solid var(--line-strong)}.service-row{display:grid;grid-template-columns:220px 1.2fr .8fr auto;gap:28px;align-items:start;padding:30px 0;border-bottom:1px solid var(--line-subtle)}
.service-row p{margin:0;color:var(--text-muted)}.service-row .price{font:700 .82rem ui-monospace,SFMono-Regular,Consolas,monospace;white-space:nowrap}.service-row .actions{white-space:nowrap}
.process{counter-reset:steps;border-top:1px solid var(--line-strong)}.process-step{counter-increment:steps;display:grid;grid-template-columns:90px 240px 1fr;gap:28px;padding:28px 0;border-bottom:1px solid var(--line-subtle)}
.process-step:before{content:"0" counter(steps);font:700 .72rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--action-primary)}.process-step p{margin:0;color:var(--text-muted)}
.retainer-ledger{border-top:1px solid var(--line-strong)}.retainer-row{display:grid;grid-template-columns:1.25fr .45fr 1fr auto;gap:30px;align-items:start;padding:30px 0;border-bottom:1px solid var(--line-subtle)}.retainer-row h3{font-size:1.45rem;letter-spacing:-.03em;margin:8px 0}.retainer-row p{margin:0;color:var(--text-muted)}.retainer-row>strong{font-size:1.65rem;letter-spacing:-.04em;white-space:nowrap}.retainer-row>strong small{display:block;font-size:.72rem;letter-spacing:.02em;color:var(--text-muted)}.retainer-row ul{list-style:none;padding:0;margin:0}.retainer-row li{padding:6px 0;border-bottom:1px solid var(--line-subtle);font-size:.87rem}.retainer-row-featured{background:var(--surface-paper);padding-left:18px;padding-right:18px;border-left:3px solid var(--action-primary)}
.price-bands{border-top:1px solid var(--line-strong)}.price-band{display:grid;grid-template-columns:220px 180px 1fr 1fr;gap:28px;padding:28px 0;border-bottom:1px solid var(--line-subtle)}
.price-band .range{font-weight:900;font-size:1.15rem}.price-band p{margin:0;color:var(--text-muted)}
.callout{background:var(--surface-ink);color:var(--text-inverse);padding:clamp(38px,6vw,72px);display:grid;grid-template-columns:1fr auto;gap:40px;align-items:end}.callout p{color:#c8c4bb;max-width:680px}.callout .btn{border-color:#fff;color:#fff}.callout .btn-primary{border-color:var(--action-primary)}
.proof-table{width:100%;border-collapse:collapse}.proof-table th,.proof-table td{padding:15px 12px;border-bottom:1px solid var(--line-subtle);text-align:left;vertical-align:top}.proof-table th{font:.7rem ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted)}
.form-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:54px;align-items:start}.form-stack{display:grid;gap:26px}.field{display:grid;gap:8px}.field label{font-weight:700;font-size:.86rem}.field .help{font-size:.78rem;color:var(--text-muted)}
.field input,.field textarea,.field select{width:100%;border:1px solid var(--line-strong);background:var(--surface-paper);color:var(--text-primary);padding:13px 14px;border-radius:0;min-height:46px}.field textarea{min-height:130px;resize:vertical}
.field input:focus,.field textarea:focus,.field select:focus{outline:3px solid rgba(200,65,50,.2);border-color:var(--action-primary)}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.form-note{border-top:3px solid var(--action-primary);padding-top:16px;color:var(--text-muted)}.summary-rail{position:sticky;top:100px;border-top:1px solid var(--line-strong);padding-top:18px}
.summary-rail dl{display:grid;grid-template-columns:1fr auto;gap:10px;margin:0}.summary-rail dt{color:var(--text-muted)}.summary-rail dd{font-weight:700;margin:0;text-align:right}
.status{display:inline-block;padding:4px 8px;border:1px solid var(--line-strong);font:700 .67rem ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase;letter-spacing:.05em}.status-success{color:var(--proof);border-color:var(--proof)}.status-pending{color:var(--warning);border-color:var(--warning)}
.ledger-stats{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line-strong);border-left:1px solid var(--line-subtle)}.ledger-stats>div{padding:24px;border-right:1px solid var(--line-subtle);border-bottom:1px solid var(--line-subtle)}.ledger-stats span{display:block;font:700 .68rem ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted)}.ledger-stats strong{display:block;font-size:2.4rem;letter-spacing:-.04em;margin-top:8px}
.deliverable-review{padding:24px 0}.deliverable-head{display:flex;justify-content:space-between;gap:24px;align-items:start}.feedback-log{margin:18px 0;border-left:2px solid var(--line-strong);padding-left:18px}.feedback-log>div{padding:10px 0;border-bottom:1px solid var(--line-subtle)}.feedback-log span{font:700 .67rem ui-monospace,SFMono-Regular,Consolas,monospace;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}.feedback-log p{margin:5px 0 0;color:var(--text-muted)}.review-form{margin-top:20px;background:var(--surface-paper);padding:18px;border-top:1px solid var(--line-strong)}.review-form textarea{min-height:88px}.review-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.workspace-grid{display:grid;grid-template-columns:1fr 1fr;gap:42px}.list-block{border-top:1px solid var(--line-strong)}.list-item{padding:20px 0;border-bottom:1px solid var(--line-subtle)}.list-item strong{display:block}.list-item small{color:var(--text-muted)}
.auth-page{min-height:100vh;display:grid;grid-template-columns:1fr minmax(360px,520px)}.auth-story{background:var(--surface-ink);color:var(--text-inverse);padding:70px max(32px,8vw);display:flex;flex-direction:column;justify-content:space-between}.auth-story p{color:#c9c5bc;max-width:570px}
.auth-panel{padding:70px 50px;display:flex;align-items:center;background:var(--surface-paper)}.auth-box{width:100%;max-width:420px}.auth-box h1{font-size:2.7rem;letter-spacing:-.05em;margin:12px 0 30px}.auth-links{display:flex;justify-content:space-between;gap:20px;margin-top:22px;font-size:.85rem}
.site-footer{background:var(--surface-ink);color:var(--text-inverse);padding:54px 0}.footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:50px}.site-footer a{color:#cbc7be;text-decoration:none}.site-footer a:hover{text-decoration:underline}.site-footer ul{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:8px}
.notice{padding:12px 14px;border-left:3px solid var(--action-primary);background:var(--surface-paper);margin:0 0 24px}.messages{position:fixed;right:20px;top:88px;z-index:120;width:min(380px,calc(100vw - 40px))}.message{background:var(--surface-ink);color:#fff;padding:14px 16px;margin-bottom:8px;border-left:4px solid var(--action-primary);box-shadow:0 10px 28px rgba(0,0,0,.2)}
.reveal{opacity:0;transform:translateY(16px);transition:opacity var(--motion-medium) var(--ease-out),transform var(--motion-medium) var(--ease-out)}.reveal.is-visible{opacity:1;transform:none}
@media(max-width:980px){.site-nav{display:none;position:absolute;top:70px;left:0;right:0;background:var(--surface-base);border-bottom:1px solid var(--line-strong);padding:12px 24px;flex-direction:column;align-items:flex-start}.site-nav.open{display:flex}.site-nav a{padding:9px 0}.nav-toggle{display:block}.nav-actions .btn-quiet{display:none}.hero{grid-template-columns:1fr}.hero-copy{padding:80px 24px 60px}.hero-proof{border-left:0;border-top:1px solid var(--line-strong);padding:50px 24px}.section-head{grid-template-columns:1fr;gap:16px}.choice-grid{grid-template-columns:1fr}.choice{border-right:0;border-bottom:1px solid var(--line-subtle);min-height:0}.service-row{grid-template-columns:1fr;gap:10px}.process-step{grid-template-columns:54px 1fr}.process-step p{grid-column:2}.retainer-row{grid-template-columns:1fr 1fr}.retainer-row ul,.retainer-row .btn{grid-column:1/-1}.price-band{grid-template-columns:1fr 1fr}.price-band p{grid-column:1/-1}.form-layout{grid-template-columns:1fr}.summary-rail{position:static}.workspace-grid{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr}}
@media(max-width:640px){.ledger-stats{grid-template-columns:1fr 1fr}.retainer-row{grid-template-columns:1fr}.retainer-row>strong,.retainer-row ul,.retainer-row .btn{grid-column:auto}.retainer-row-featured{padding-left:14px;padding-right:14px}.nav-wrap{padding:0 16px}.nav-actions .btn-primary{display:none}.shell,.page-shell{padding-left:16px;padding-right:16px}.display{font-size:clamp(3rem,18vw,5.3rem)}.form-grid-2{grid-template-columns:1fr}.price-band{grid-template-columns:1fr}.callout{grid-template-columns:1fr}.auth-page{grid-template-columns:1fr}.auth-story{display:none}.auth-panel{padding:50px 20px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}.reveal{opacity:1;transform:none}}


/* Motion */
.site-header{transition:transform .45s var(--ease-out),background .25s ease,box-shadow .25s ease}
.js-ready .site-header{transform:translateY(-100%)}
.js-ready.page-ready .site-header{transform:translateY(0)}
.site-header:hover{box-shadow:0 8px 30px rgba(23,22,18,.06)}

.js-ready .hero-copy>*{opacity:0;transform:translateY(22px)}
.js-ready.page-ready .hero-copy>*{opacity:1;transform:none;transition:opacity .7s var(--ease-out),transform .7s var(--ease-out)}
.js-ready.page-ready .hero-copy>*:nth-child(1){transition-delay:.08s}
.js-ready.page-ready .hero-copy>*:nth-child(2){transition-delay:.15s}
.js-ready.page-ready .hero-copy>*:nth-child(3){transition-delay:.22s}
.js-ready.page-ready .hero-copy>*:nth-child(4){transition-delay:.29s}

.js-ready .hero-proof{opacity:0;transform:translateX(18px)}
.js-ready.page-ready .hero-proof{opacity:1;transform:none;transition:opacity .7s .2s var(--ease-out),transform .7s .2s var(--ease-out)}
.js-ready .route-list li{opacity:0;transform:translateX(14px)}
.js-ready.page-ready .route-list li{opacity:1;transform:none;transition:opacity .5s var(--ease-out),transform .5s var(--ease-out);transition-delay:calc(.3s + var(--route-order,0)*.06s)}

.motion-item{opacity:0;transform:translateY(18px);transition:opacity .65s var(--ease-out),transform .65s var(--ease-out);transition-delay:calc(var(--motion-order,0)*45ms)}
.motion-item.is-visible{opacity:1;transform:none}

.brand-mark{transition:transform .45s var(--ease-out),background .25s ease}
.brand:hover .brand-mark{transform:rotate(135deg)}
.site-nav a{position:relative}
.site-nav a:after{content:"";position:absolute;left:0;right:100%;bottom:16px;height:1px;background:currentColor;transition:right .25s var(--ease-out)}
.site-nav a:hover{border-color:transparent}
.site-nav a:hover:after{right:0}

.btn{position:relative;overflow:hidden;transition:background .2s,color .2s,transform .22s var(--ease-out),box-shadow .22s var(--ease-out)}
.btn:hover{transform:translateY(-2px);box-shadow:0 7px 18px rgba(23,22,18,.10)}
.btn:active{transform:translateY(0) scale(.985)}

.choice{transition:background .3s ease,transform .35s var(--ease-out),box-shadow .35s var(--ease-out)}
.choice:hover{transform:translateY(-5px);box-shadow:0 16px 36px rgba(23,22,18,.07)}
.choice>span:last-child{transition:transform .3s var(--ease-out)}
.choice:hover>span:last-child{transform:translateX(8px)}

.route-list a{transition:padding .3s var(--ease-out),background .25s ease}
.route-list a:hover{padding-left:10px;padding-right:8px;background:rgba(255,255,255,.45)}
.route-list .arrow{transition:transform .3s var(--ease-out)}
.route-list a:hover .arrow{transform:translate(4px,-4px)}

.service-row{transition:background .25s ease,padding .3s var(--ease-out)}
.service-row:hover{background:rgba(250,248,242,.75);padding-left:12px;padding-right:12px}
.process-step{transition:background .25s ease,padding .3s var(--ease-out)}
.process-step:hover{background:rgba(250,248,242,.6);padding-left:10px;padding-right:10px}

.retainer-row,.price-band,.list-item{transition:background .25s ease,transform .3s var(--ease-out)}
.retainer-row:hover,.price-band:hover,.list-item:hover{background:rgba(250,248,242,.68)}
.retainer-row:hover{transform:translateX(5px)}

.proof-table tbody tr{transition:background .2s ease,transform .25s var(--ease-out)}
.proof-table tbody tr:hover{background:rgba(250,248,242,.8);transform:translateX(3px)}

.field input,.field textarea,.field select{transition:border-color .2s ease,box-shadow .25s ease,background .25s ease}
.field input:hover,.field textarea:hover,.field select:hover{border-color:var(--text-primary)}
.field input:focus,.field textarea:focus,.field select:focus{box-shadow:0 0 0 5px rgba(200,65,50,.07)}

.callout{position:relative;overflow:hidden}
.callout:after{content:"";position:absolute;width:260px;height:260px;border:1px solid rgba(255,255,255,.08);border-radius:50%;right:-130px;top:-130px;transition:transform .9s var(--ease-out)}
.callout:hover:after{transform:scale(1.35)}

.message{transition:opacity .25s ease,transform .25s var(--ease-out)}
.message-leave{opacity:0;transform:translateY(-10px)}

@media(prefers-reduced-motion:reduce){
  .js-ready .site-header,.js-ready .hero-copy>*,.js-ready .hero-proof,.js-ready .route-list li,.motion-item{opacity:1!important;transform:none!important}
  .site-header,.brand-mark,.site-nav a:after,.btn,.choice,.choice>span:last-child,.route-list a,.route-list .arrow,.service-row,.process-step,.retainer-row,.price-band,.list-item,.proof-table tbody tr,.field input,.field textarea,.field select,.callout:after,.message{transition:none!important}
}


/* Softer editorial composition */
.section{border-bottom:0}
.section + .section{margin-top:clamp(10px,2vw,28px)}
.section:nth-of-type(even){background:linear-gradient(180deg,rgba(250,248,242,.4),rgba(250,248,242,0))}
.hero{position:relative;max-width:var(--max);margin:0 auto;min-height:auto;grid-template-columns:minmax(0,1.18fr) minmax(310px,.72fr);gap:clamp(34px,6vw,86px);padding:clamp(68px,8vw,118px) 24px clamp(54px,7vw,94px);border-bottom:0;overflow:visible}
.hero:before{content:"";position:absolute;width:min(46vw,620px);height:min(46vw,620px);border-radius:50%;background:radial-gradient(circle,rgba(200,65,50,.10),rgba(200,65,50,0) 68%);left:-18vw;top:-20vw;pointer-events:none}
.hero-copy{padding:0;position:relative;z-index:1}
.hero-proof{border:0;border-radius:24px;background:rgba(250,248,242,.82);box-shadow:0 26px 70px rgba(23,22,18,.09);padding:34px;align-self:end;transform:translateY(34px);backdrop-filter:blur(8px)}
.display{max-width:11ch}
.language-statement{padding-top:clamp(42px,6vw,80px);padding-bottom:clamp(58px,8vw,110px)}
.statement-shell{display:grid;grid-template-columns:180px minmax(0,1fr);gap:clamp(30px,7vw,90px);align-items:start}
.statement-shell .h2{max-width:760px}
.statement-copy{font-size:clamp(1.2rem,2vw,1.7rem);line-height:1.45;max-width:820px;color:var(--text-muted);margin:24px 0 0}
.choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;border:0;align-items:start}
.choice{border:0;background:rgba(250,248,242,.82);border-radius:20px;padding:32px;min-height:300px;box-shadow:0 12px 34px rgba(23,22,18,.045)}
.choice:nth-child(2){transform:translateY(28px)}
.choice:nth-child(3){transform:translateY(-12px)}
.choice:hover{background:var(--surface-paper)}
.service-rows{border-top:0;display:grid;gap:12px}
.service-row{border:0;background:rgba(250,248,242,.72);border-radius:16px;padding:24px 26px}
.process{border-top:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px}
.process-step{display:block;border:0;border-radius:18px;background:rgba(250,248,242,.72);padding:24px;min-height:160px}
.process-step:before{display:block;margin-bottom:24px}
.process-step p{margin-top:8px}
.price-bands,.retainer-ledger{border-top:0}
.price-band,.retainer-row{border-bottom:0;border-radius:16px;background:rgba(250,248,242,.65);padding:24px;margin-bottom:12px}
.price-band{grid-template-columns:200px 170px 1fr 1fr}
.retainer-row-featured{border-left:0;box-shadow:inset 4px 0 0 var(--action-primary)}
.callout{border-radius:24px}
.closing-shell{padding:var(--space-section) 24px}
.page-shell{padding-top:clamp(64px,8vw,106px);padding-bottom:clamp(56px,7vw,96px)}
.service-family:nth-of-type(odd) .section-head{grid-template-columns:170px 1fr}
.service-family:nth-of-type(even) .section-head{grid-template-columns:1fr 170px}
.service-family:nth-of-type(even) .section-head>div:first-child{grid-column:2;grid-row:1;text-align:right}
.service-family:nth-of-type(even) .section-head>div:last-child{grid-column:1;grid-row:1}

@media(max-width:980px){
  .hero{grid-template-columns:1fr;padding:72px 24px 48px}
  .hero-proof{transform:none}
  .statement-shell{grid-template-columns:1fr}
  .choice-grid{grid-template-columns:1fr}
  .choice:nth-child(2),.choice:nth-child(3){transform:none}
  .service-family:nth-of-type(even) .section-head,.service-family:nth-of-type(odd) .section-head{grid-template-columns:1fr}
  .service-family:nth-of-type(even) .section-head>div:first-child,.service-family:nth-of-type(even) .section-head>div:last-child{grid-column:auto;grid-row:auto;text-align:left}
  .process{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .hero{padding-left:16px;padding-right:16px}
  .hero-proof{padding:24px;border-radius:18px}
  .choice{border-radius:16px;padding:25px}
  .process{grid-template-columns:1fr}
  .price-band{grid-template-columns:1fr}
}


/* About and legal pages */
.about-hero .h1{max-width:14ch}
.about-grid{display:grid;grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr);gap:clamp(42px,8vw,110px);align-items:start}
.about-copy{max-width:760px;font-size:1.08rem;line-height:1.75;color:var(--text-muted)}
.about-copy p{margin:0 0 20px}.about-copy a{color:var(--text-primary);text-underline-offset:4px}
.about-services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:980px;margin-left:auto}
.about-services>div{background:rgba(250,248,242,.72);border-radius:18px;padding:28px}
.about-services strong{display:block;font-size:1.25rem;margin:8px 0 10px;letter-spacing:-.02em}
.about-services p{margin:0;color:var(--text-muted)}
.oauth-info{background:linear-gradient(180deg,rgba(250,248,242,.68),rgba(241,238,230,0))}

.legal-head{padding-bottom:clamp(36px,5vw,62px)}
.legal-copy{max-width:820px;margin-left:auto;margin-right:auto}
.legal-copy h2{font-size:1.35rem;letter-spacing:-.025em;margin:44px 0 12px}
.legal-copy h2:first-child{margin-top:0}
.legal-copy p{font-size:1rem;line-height:1.78;color:#47433c;margin:0 0 16px}
.legal-copy a{text-underline-offset:4px}

.auth-legal{font-size:.78rem;line-height:1.55;color:var(--text-muted);margin-top:24px}
.auth-legal a{text-underline-offset:3px}

.site-footer .footer-grid{grid-template-columns:1.35fr 1fr 1fr 1fr}

@media(max-width:980px){
  .about-grid{grid-template-columns:1fr;gap:24px}
  .about-services{margin-left:0}
  .site-footer .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .about-services{grid-template-columns:1fr}
  .site-footer .footer-grid{grid-template-columns:1fr}
  .legal-copy h2{margin-top:34px}
}


/* Humanizer */
.humanizer-page{position:relative;overflow:hidden;padding:clamp(64px,8vw,110px) 0 var(--space-section)}
.humanizer-page:before{content:"";position:absolute;width:min(52vw,720px);height:min(52vw,720px);border-radius:50%;background:radial-gradient(circle,rgba(200,65,50,.10),rgba(200,65,50,0) 70%);top:-280px;right:-240px;pointer-events:none}
.humanizer-intro{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:40px;align-items:end;margin-bottom:clamp(38px,6vw,72px)}
.humanizer-intro .h1{max-width:14ch}
.humanizer-intro .lede{max-width:690px}
.humanizer-account{min-width:150px;text-align:right;padding-bottom:8px}
.humanizer-account strong{display:block;font-size:2rem;line-height:1;letter-spacing:-.04em;margin:8px 0}
.humanizer-account a{font-size:.8rem;color:var(--text-muted);text-underline-offset:4px}

.humanizer-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(20px,3vw,34px);align-items:start;position:relative}
.editor-card{background:rgba(250,248,242,.91);border:1px solid rgba(141,135,123,.34);border-radius:24px;box-shadow:0 18px 55px rgba(23,22,18,.07);padding:clamp(22px,3vw,34px);position:relative;transition:transform .35s var(--ease-out),box-shadow .35s var(--ease-out),border-color .25s ease}
.editor-card:hover{box-shadow:0 24px 70px rgba(23,22,18,.10);border-color:rgba(141,135,123,.5)}
.editor-card-input{transform:translateY(14px)}
.editor-card-output{transform:translateY(-14px);background:rgba(255,253,248,.96)}
.editor-card-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px}
.editor-card-head h2{font-size:1.35rem;letter-spacing:-.025em;margin:6px 0 0}
.editor-count{font:600 .72rem/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text-muted);white-space:nowrap}

.editor-card textarea{width:100%;min-height:430px;border:0;background:transparent;color:var(--text-primary);padding:4px 2px;resize:vertical;font:400 1rem/1.78 Arial,Helvetica,sans-serif}
.editor-card textarea::placeholder{color:#9d978c}
.editor-card textarea:focus{outline:0}
.editor-card-input textarea{border-top:1px solid rgba(141,135,123,.28);padding-top:22px}
.output-wrap{position:relative;border-top:1px solid rgba(141,135,123,.28);padding-top:22px}
.output-wrap textarea{position:relative;z-index:2}
.output-empty{position:absolute;inset:22px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#9b958a;pointer-events:none}
.output-empty[hidden]{display:none}
.output-mark{font:700 2.7rem/1 Georgia,serif;letter-spacing:-.08em;color:#c9c2b7}
.output-empty p{margin:0;font-size:.9rem}
.has-output{animation:output-in .45s var(--ease-out)}
@keyframes output-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}

.rewrite-controls{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;border-top:1px solid rgba(141,135,123,.28);padding-top:22px;margin-top:18px}
.variation-control{display:grid;gap:10px;flex:1;max-width:470px}
.variation-control>span:first-child{display:flex;align-items:baseline;gap:10px}
.variation-control strong{font-size:.85rem}
.variation-control small{font-size:.76rem;color:var(--text-muted)}
.variation-range{display:grid;grid-template-columns:auto minmax(120px,1fr) auto;align-items:center;gap:10px;color:var(--text-muted);font-size:.7rem}
.variation-range input{width:100%;accent-color:var(--action-primary)}
.rewrite-button{min-width:118px}
.rewrite-button.is-working{cursor:wait;opacity:.75}

.output-actions{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid rgba(141,135,123,.28);padding-top:20px;margin-top:18px}
.output-actions>div{display:flex;gap:8px;flex-shrink:0}
.tool-status{font-size:.78rem;color:var(--text-muted)}
.output-actions button:disabled{opacity:.42;cursor:default;transform:none;box-shadow:none}

.humanizer-notes{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:clamp(42px,6vw,72px)}
.humanizer-notes>div{padding:20px 2px}
.humanizer-notes p{margin:8px 0 0;color:var(--text-muted);max-width:330px;font-size:.9rem;line-height:1.6}

@media(max-width:980px){
  .humanizer-intro{grid-template-columns:1fr;align-items:start}
  .humanizer-account{text-align:left;display:flex;gap:12px;align-items:baseline}
  .humanizer-account strong{font-size:1.4rem;margin:0}
  .humanizer-workspace{grid-template-columns:1fr}
  .editor-card-input,.editor-card-output{transform:none}
  .editor-card textarea{min-height:330px}
}
@media(max-width:640px){
  .humanizer-page{padding-top:46px}
  .humanizer-intro{gap:20px}
  .editor-card{border-radius:18px;padding:20px}
  .rewrite-controls{align-items:stretch;flex-direction:column}
  .variation-control{max-width:none}
  .variation-control>span:first-child{display:block}
  .variation-control small{display:block;margin-top:4px}
  .rewrite-button{width:100%}
  .output-actions{align-items:stretch;flex-direction:column}
  .output-actions>div{width:100%}
  .output-actions button{flex:1}
  .humanizer-notes{grid-template-columns:1fr;gap:0}
}
@media(prefers-reduced-motion:reduce){
  .has-output{animation:none}
  .editor-card{transition:none}
}


/* Account + QuickPay */
.workspace-head{display:flex;align-items:flex-end;justify-content:space-between;gap:30px}
.workspace-actions{display:flex;gap:10px;flex-wrap:wrap;padding-bottom:6px}
.payment-ledger{display:grid;gap:10px}
.payment-row{display:grid;grid-template-columns:170px minmax(0,1fr) auto;gap:24px;align-items:center;padding:18px 22px;border-radius:15px;background:rgba(250,248,242,.72)}
.payment-row strong,.payment-row small{display:block}.payment-row small{margin-top:5px;color:var(--text-muted)}
.payment-row>div:last-child{text-align:right}

.quickpay-head .h1{max-width:12ch}
.quickpay-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.55fr);gap:clamp(28px,6vw,82px);align-items:start}
.quickpay-card{background:rgba(250,248,242,.88);border-radius:22px;padding:clamp(24px,4vw,38px);box-shadow:0 18px 55px rgba(23,22,18,.07)}
.quickpay-amount{display:grid;grid-template-columns:160px 1fr;gap:14px}
.quickpay-confirm{display:flex;align-items:flex-start;gap:10px;font-size:.85rem;line-height:1.5;color:var(--text-muted)}
.quickpay-confirm input{margin-top:3px}
.quickpay-side{position:sticky;top:108px;padding-top:10px}
.quickpay-side p{color:var(--text-muted);line-height:1.7;margin:12px 0 18px}
.quickpay-history-row{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;gap:22px;align-items:center}
.quickpay-history-row>div:nth-child(2){text-align:right}

@media(max-width:800px){
  .workspace-head{align-items:flex-start;flex-direction:column}
  .quickpay-layout{grid-template-columns:1fr}
  .quickpay-side{position:static}
  .payment-row{grid-template-columns:1fr auto}
  .payment-row>div:nth-child(2){grid-column:1/-1;grid-row:2}
  .quickpay-history-row{grid-template-columns:1fr auto}
  .quickpay-history-row>div:nth-child(2){text-align:left}
}
@media(max-width:520px){
  .quickpay-amount{grid-template-columns:1fr}
  .payment-row{grid-template-columns:1fr}
  .payment-row>div:last-child{text-align:left}
  .quickpay-history-row{grid-template-columns:1fr}
}


/* Home word story */
.hero-word-story{
  max-width:none;
  width:min(100%,9.5ch);
  margin:18px 0 30px;
  font-size:clamp(4rem,8.5vw,8.7rem);
  line-height:.82;
  letter-spacing:-.07em;
  text-wrap:balance;
}
.hero-story-line,.hero-story-answer{display:block}
.hero-story-prefix{display:block}
.hero-story-slot{
  display:block;
  position:relative;
  width:max-content;
  min-height:.88em;
  color:var(--text-primary);
  transform-origin:left center;
}
.hero-story-slot:after{
  content:"";
  position:absolute;
  left:.03em;
  right:.01em;
  bottom:-.035em;
  height:.035em;
  background:var(--action-primary);
  transform:scaleX(.08);
  transform-origin:left;
  opacity:.9;
  animation:story-underline 7.6s var(--ease-out) infinite;
}
.hero-story-answer{
  margin-top:.13em;
  max-width:8.3ch;
  position:relative;
}
.hero-story-answer:after{
  content:"";
  position:absolute;
  width:.12em;
  height:.12em;
  border-radius:50%;
  background:var(--action-primary);
  right:-.02em;
  bottom:.08em;
  opacity:.85;
  animation:story-dot 3.8s ease-in-out infinite;
}
.story-glyph{
  display:inline-block;
  will-change:transform,opacity,filter;
  animation:story-glyph-in .56s var(--ease-out) both;
  animation-delay:calc(var(--glyph-order,0) * 34ms);
}
.story-glyph-space{width:.24em}
.story-glyph-punct{color:var(--action-primary)}
.hero-story-slot.is-changing{
  animation:story-word-out .22s cubic-bezier(.7,0,.84,0) both;
}
@keyframes story-glyph-in{
  from{opacity:0;transform:translateY(.34em) rotate(2.5deg);filter:blur(8px)}
  55%{filter:blur(0)}
  to{opacity:1;transform:none;filter:blur(0)}
}
@keyframes story-word-out{
  to{opacity:0;transform:translateY(-.18em);filter:blur(7px)}
}
@keyframes story-underline{
  0%,7%{transform:scaleX(.08);opacity:.35}
  18%,72%{transform:scaleX(1);opacity:.92}
  84%,100%{transform:scaleX(.08);opacity:.35}
}
@keyframes story-dot{
  0%,100%{transform:scale(.7);opacity:.45}
  50%{transform:scale(1.25);opacity:1}
}
.hero-copy .lede{max-width:610px}

@media(max-width:980px){
  .hero-word-story{width:min(100%,10ch);font-size:clamp(4rem,13vw,7.7rem)}
  .hero-story-answer{max-width:8.6ch}
}
@media(max-width:640px){
  .hero-word-story{font-size:clamp(3.5rem,18vw,5.7rem);line-height:.84;letter-spacing:-.065em}
  .hero-story-answer{max-width:8.8ch}
}
@media(prefers-reduced-motion:reduce){
  .hero-story-slot:after,.hero-story-answer:after,.story-glyph,.hero-story-slot.is-changing{animation:none!important}
}

/* Service pricing disclosure */
.service-price{align-self:start;font-size:.82rem;color:var(--text-muted)}
.service-price summary{cursor:pointer;list-style:none;text-decoration:underline;text-underline-offset:4px;font-weight:700}
.service-price summary::-webkit-details-marker{display:none}
.service-price[open] span{display:block;margin-top:7px;font:700 .78rem ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text-primary)}
.retainer-row-featured{box-shadow:none!important;border-left:0!important}


/* Notes */
.notes-head .h1{max-width:15ch}
.notes-index{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 28px}
.note-card{padding:30px 0 34px;border-top:1px solid var(--line-subtle)}
.note-card h2{font-size:clamp(1.5rem,2.4vw,2.35rem);line-height:1.04;letter-spacing:-.04em;margin:12px 0 14px;max-width:16ch}
.note-card h2 a{text-decoration:none}
.note-card h2 a:hover{text-decoration:underline;text-underline-offset:5px}
.note-card p{max-width:560px;color:var(--text-muted);margin:0 0 18px;line-height:1.65}
.note-date{font:600 .72rem/1.3 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em}

.note-article-head{padding-bottom:clamp(38px,6vw,70px)}
.note-article-head .btn-link{margin-bottom:42px}
.note-article-head .h1{max-width:14ch;margin-top:12px}
.note-body{max-width:760px;margin:0 auto}
.note-body p{font-size:clamp(1.06rem,1.45vw,1.19rem);line-height:1.82;margin:0 0 28px;color:#2b2924}
.note-body p:first-child{font-size:clamp(1.18rem,1.75vw,1.35rem);line-height:1.72}

.home-note-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.home-note{padding:26px 0;border-top:1px solid var(--line-subtle)}
.home-note h3{font-size:1.5rem;line-height:1.08;letter-spacing:-.035em;margin:11px 0 12px}
.home-note h3 a{text-decoration:none}
.home-note h3 a:hover{text-decoration:underline;text-underline-offset:4px}
.home-note p{color:var(--text-muted);line-height:1.62;margin:0}
.home-notes-link{margin-top:34px}

@media(max-width:820px){
  .notes-index{grid-template-columns:1fr}
  .home-note-grid{grid-template-columns:1fr}
  .note-card,.home-note{padding-top:24px}
}


/* Worked-with brand rail */
.brand-rail{
  display:grid;
  grid-template-columns:minmax(150px,220px) minmax(0,1fr);
  align-items:center;
  background:var(--surface-ink);
  color:var(--text-inverse);
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
  overflow:hidden;
}
.brand-rail-label{
  padding:26px 24px 26px max(24px,calc((100vw - var(--max))/2 + 24px));
  font:700 .68rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#aaa69d;
  white-space:nowrap;
}
.brand-marquee{
  overflow:hidden;
  mask-image:linear-gradient(90deg,transparent 0,#000 5%,#000 95%,transparent 100%);
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 5%,#000 95%,transparent 100%);
}
.brand-marquee-track{
  width:max-content;
  display:flex;
  animation:brand-scroll 34s linear infinite;
  will-change:transform;
}
.brand-marquee:hover .brand-marquee-track{animation-play-state:paused}
.brand-marquee-group{
  display:flex;
  align-items:center;
  gap:clamp(44px,6vw,88px);
  padding:22px clamp(36px,5vw,72px);
  flex:none;
}
.partner-logo{
  min-width:max-content;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  gap:11px;
  color:#f4f0e7;
  text-decoration:none;
  opacity:.78;
  transition:opacity .25s ease,transform .25s var(--ease-out);
}
a.partner-logo:hover{opacity:1;transform:translateY(-2px)}
.partner-logo img{
  display:block;
  width:auto;
  max-width:122px;
  max-height:34px;
  object-fit:contain;
}
.partner-stashi img{
  max-width:116px;
  max-height:36px;
}
.partner-orbit img{
  width:31px;
  height:31px;
  border-radius:50%;
}
.partner-orbit>span{
  font-size:1.25rem;
  font-weight:720;
  letter-spacing:-.035em;
}
.partner-ynai img{
  width:28px;
  height:28px;
  border-radius:7px;
}
.partner-ynai>span{
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.35rem;
  font-weight:700;
  letter-spacing:-.03em;
}
.partner-emerald img{
  width:29px;
  height:29px;
}
.partner-emerald>span{
  font-family:Georgia,"Times New Roman",serif;
  font-size:1.28rem;
  letter-spacing:-.025em;
}
.partner-lune>span{
  font-size:1.3rem;
  font-weight:500;
  letter-spacing:.08em;
  text-transform:lowercase;
}
.partner-cravyo img{
  width:32px;
  height:32px;
}
.partner-cravyo>span{
  font-size:1.28rem;
  font-weight:800;
  letter-spacing:-.035em;
  text-transform:lowercase;
}
@keyframes brand-scroll{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}
@media(max-width:760px){
  .brand-rail{grid-template-columns:1fr}
  .brand-rail-label{
    padding:18px 16px 4px;
    text-align:center;
  }
  .brand-marquee-group{
    gap:44px;
    padding:18px 28px 22px;
  }
  .brand-marquee-track{animation-duration:28s}
}
@media(prefers-reduced-motion:reduce){
  .brand-marquee{
    overflow-x:auto;
    mask-image:none;
    -webkit-mask-image:none;
  }
  .brand-marquee-track{animation:none}
  .brand-marquee-group[aria-hidden="true"]{display:none}
}

.partner-valdace img{
  width:auto;
  max-width:138px;
  max-height:34px;
  object-fit:contain;
}
.partner-valdace-fallback{
  display:none;
  font-size:1.24rem;
  font-weight:760;
  letter-spacing:-.035em;
}
.partner-valdace img[src=""],
.partner-valdace img:not([src]){
  display:none;
}
.partner-valdace img[src=""] + .partner-valdace-fallback,
.partner-valdace img:not([src]) + .partner-valdace-fallback{
  display:inline;
}

/* ValdaceAI wordmark needs more visual width than the compact partner marks. */
.partner-valdace img{
  max-width:220px!important;
  max-height:48px!important;
  width:auto!important;
  height:auto!important;
  transform:scale(1.08);
  transform-origin:center;
}
.partner-valdace{min-width:190px}
@media(max-width:760px){
  .partner-valdace img{max-width:185px!important;max-height:44px!important}
  .partner-valdace{min-width:165px}
}


/* Google sign-in */
.google-auth-btn{
  min-height:50px;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  border:1px solid #c8c5be;
  border-radius:4px;
  background:#fff;
  color:#1f1f1f;
  text-decoration:none;
  font:600 .92rem/1 Arial,Helvetica,sans-serif;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease,transform .2s var(--ease-out);
}
.google-auth-btn:hover{
  background:#fafafa;
  border-color:#9f9b92;
  box-shadow:0 4px 14px rgba(0,0,0,.08);
  transform:translateY(-1px);
}
.google-auth-btn:focus-visible{outline:3px solid rgba(66,133,244,.28);outline-offset:3px}
.google-g{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px}
.google-g svg{display:block}
.auth-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:22px 0;
  color:var(--text-muted);
  font-size:.76rem;
}
.auth-divider:before,.auth-divider:after{
  content:"";
  height:1px;
  flex:1;
  background:var(--line-subtle);
}
.auth-divider span{white-space:nowrap}


/* Compact auth choice */
.auth-choice-panel[hidden]{display:none!important}
.auth-choice{margin-top:8px}
.auth-switch{
  display:block;
  width:100%;
  margin:14px 0 0;
  padding:7px 8px;
  border:0;
  background:transparent;
  color:var(--text-muted);
  font-size:.78rem;
  text-decoration:underline;
  text-underline-offset:4px;
  cursor:pointer;
}
.auth-switch:hover{color:var(--text-primary)}
.auth-switch-back{
  width:auto;
  margin:0 0 18px;
  padding:0;
}
.auth-email-panel{
  animation:auth-panel-in .24s var(--ease-out);
}
@keyframes auth-panel-in{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

/* Keep the Valdace wordmark legible without increasing the rail height. */
.partner-valdace{
  min-width:170px;
  justify-content:center;
}
.partner-valdace img{
  width:168px!important;
  max-width:168px!important;
  height:auto!important;
  max-height:38px!important;
  transform:none!important;
}
@media(max-width:760px){
  .partner-valdace{min-width:152px}
  .partner-valdace img{width:150px!important;max-width:150px!important;max-height:35px!important}
}
@media(prefers-reduced-motion:reduce){
  .auth-email-panel{animation:none}
}

/* Normalize partner wordmarks by visible height. */
.partner-stashi,.partner-valdace{
  min-width:160px!important;
  justify-content:center;
}
.partner-stashi img{
  width:auto!important;
  height:32px!important;
  max-width:160px!important;
  max-height:32px!important;
  object-fit:contain!important;
}
.partner-valdace img{
  width:auto!important;
  height:31px!important;
  max-width:165px!important;
  max-height:31px!important;
  object-fit:contain!important;
  transform:none!important;
}
@media(max-width:760px){
  .partner-stashi,.partner-valdace{min-width:145px!important}
  .partner-stashi img{height:29px!important;max-width:145px!important;max-height:29px!important}
  .partner-valdace img{height:28px!important;max-width:150px!important;max-height:28px!important}
}


/* Humanizer: keep the action visible and the two editors usable in one viewport. */
.humanizer-intro-compact{padding-top:44px;padding-bottom:22px;align-items:end}
.humanizer-intro-compact .h1{font-size:clamp(2rem,4vw,4rem);margin-bottom:8px}
.humanizer-intro-compact .lede{max-width:44rem}
.humanizer-workspace-compact{align-items:stretch}
.humanizer-workspace-compact .editor-card{display:flex;flex-direction:column;min-height:min(650px,68vh)}
.humanizer-workspace-compact .editor-card-input form{display:flex;flex-direction:column;flex:1;min-height:0}
.humanizer-workspace-compact textarea{flex:1;min-height:360px;resize:vertical}
.rewrite-toolbar{display:grid;grid-template-columns:minmax(150px,1fr) minmax(260px,1.2fr) auto;align-items:center;gap:22px;padding:0 0 18px;border-bottom:1px solid var(--line-subtle);margin-bottom:18px}
.editor-card-head-compact{margin:0;padding:0;border:0}
.variation-control-inline{margin:0;display:flex;align-items:center;gap:14px}
.variation-control-inline .variation-label{flex:0 0 auto}
.variation-control-inline .variation-range{flex:1;min-width:180px}
.rewrite-toolbar .rewrite-button{min-width:116px;align-self:center}
.editor-card-output textarea{background:transparent}
.editor-card-output textarea:focus{outline:2px solid rgba(180,55,41,.2);outline-offset:-2px}
.output-action-buttons{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.humanizer-notes-compact{padding-top:24px}
.tool-modal-backdrop{position:fixed;inset:0;z-index:1200;background:rgba(18,17,15,.58);display:grid;place-items:center;padding:20px}
.tool-modal-backdrop[hidden]{display:none!important}
.tool-modal{position:relative;width:min(520px,100%);background:var(--surface,#f5f1e8);border:1px solid var(--line);padding:30px;box-shadow:0 26px 80px rgba(0,0,0,.22)}
.tool-modal h2{font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.8rem,5vw,2.5rem);letter-spacing:-.035em;margin:8px 0 12px}
.tool-modal p{color:var(--text-muted);line-height:1.55}
.tool-modal-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}
.tool-modal-close{position:absolute;top:12px;right:14px;border:0;background:transparent;font-size:1.65rem;line-height:1;cursor:pointer;color:var(--text-muted)}
body.modal-open{overflow:hidden}
@media(max-width:900px){
  .rewrite-toolbar{grid-template-columns:1fr auto;gap:14px}
  .variation-control-inline{grid-column:1/-1;grid-row:2}
  .rewrite-toolbar .rewrite-button{grid-column:2;grid-row:1}
  .humanizer-workspace-compact .editor-card{min-height:560px}
}
@media(max-width:640px){
  .humanizer-intro-compact{padding-top:28px}
  .rewrite-toolbar{grid-template-columns:1fr}
  .rewrite-toolbar .rewrite-button,.variation-control-inline{grid-column:1;grid-row:auto;width:100%}
  .variation-control-inline{align-items:flex-start;flex-direction:column}
  .variation-control-inline .variation-range{width:100%;min-width:0}
  .humanizer-workspace-compact .editor-card{min-height:500px}
  .humanizer-workspace-compact textarea{min-height:300px}
  .tool-modal{padding:26px 22px}
}


/* Client workspace chat and project progress */
.client-chat-layout{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.45fr);gap:28px;align-items:start}
.client-progress-panel,.client-chat-panel{border:1px solid var(--line-subtle);background:var(--surface);padding:24px}
.section-head-compact{margin-bottom:18px}
.client-progress-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.client-deliverable-list{display:grid;gap:7px;margin:14px 0;padding-top:12px;border-top:1px solid var(--line-subtle)}
.client-deliverable-list>div{display:flex;justify-content:space-between;gap:12px;font-size:.84rem}
.client-deliverable-list small{white-space:nowrap}
.client-chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:18px;border-bottom:1px solid var(--line-subtle)}
.client-chat-head h2{font-family:Georgia,"Times New Roman",serif;font-size:1.7rem;margin-top:5px}
.client-chat-thread{display:flex;flex-direction:column;gap:14px;max-height:560px;overflow:auto;padding:22px 4px 22px 0}
.client-message{max-width:82%;border:1px solid var(--line-subtle);padding:14px 16px;background:#fff}
.client-message-user{align-self:flex-end;background:#171614;color:#f5f1e8;border-color:#171614}
.client-message-admin{align-self:flex-start}
.client-message-meta{display:flex;justify-content:space-between;gap:20px;margin-bottom:8px;font-size:.72rem}
.client-message-meta time{opacity:.65}
.client-message p{margin:0;line-height:1.55}
.client-chat-empty{padding:36px 10px;text-align:center;color:var(--text-muted)}
.client-chat-form{border-top:1px solid var(--line-subtle);padding-top:18px}
.client-chat-form label{display:block;font-size:.78rem;font-weight:700;margin-bottom:8px}
.client-chat-form textarea{width:100%;min-height:120px;resize:vertical}
.client-chat-send{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px}
@media(max-width:900px){
  .client-chat-layout{grid-template-columns:1fr}
  .client-chat-panel{order:1}
  .client-progress-panel{order:2}
}
@media(max-width:600px){
  .client-progress-panel,.client-chat-panel{padding:18px}
  .client-message{max-width:94%}
  .client-chat-send{align-items:flex-start;flex-direction:column}
  .client-chat-send .btn{width:100%}
}


/* Humanizer studio: one deliberate surface, aligned actions, minimal chrome. */
.humanizer-studio{
  min-height:calc(100vh - 70px);
  overflow:visible;
  padding:24px 0 28px;
  display:flex;
  flex-direction:column;
}
.humanizer-studio:before{display:none}
.humanizer-studio>.shell{
  max-width:min(1520px,calc(100vw - 64px));
  width:100%;
}
.humanizer-studio-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  margin-bottom:18px;
}
.humanizer-studio-head h1{
  margin:5px 0 2px;
  font-size:clamp(1.9rem,3vw,3rem);
  line-height:1;
  letter-spacing:-.045em;
}
.humanizer-studio-head p{
  margin:7px 0 0;
  color:var(--text-muted);
  font-size:.92rem;
}
.humanizer-account-inline{
  min-width:0;
  padding:0;
  text-align:right;
}
.humanizer-account-inline strong{
  font-size:1.25rem;
  margin:4px 0 2px;
}
.humanizer-surface{
  display:grid;
  grid-template-columns:1fr 1fr;
  height:clamp(480px,calc(100vh - 220px),720px);
  min-height:480px;
  background:rgba(250,248,242,.92);
  border:1px solid var(--line-subtle);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 16px 46px rgba(23,22,18,.055);
}
.humanizer-pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:20px 22px 18px;
}
.humanizer-source-pane{border-right:1px solid var(--line-subtle)}
.humanizer-pane-form{
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column;
}
.humanizer-pane-head{
  min-height:52px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  padding-bottom:12px;
}
.humanizer-pane-head h2{
  margin:3px 0 0;
  font-size:1.08rem;
  letter-spacing:-.02em;
}
.humanizer-pane textarea{
  width:100%;
  min-height:0!important;
  flex:1;
  resize:none;
  border:0!important;
  border-top:1px solid rgba(141,135,123,.24)!important;
  background:transparent!important;
  padding:18px 3px 12px!important;
  color:var(--text-primary);
  font:400 1rem/1.7 Arial,Helvetica,sans-serif;
  outline:0!important;
  box-shadow:none!important;
}
.humanizer-pane textarea:focus,
.humanizer-pane textarea:focus-visible{
  outline:0!important;
  box-shadow:none!important;
}
.humanizer-pane textarea::placeholder{color:#aaa49a}
.humanizer-actionbar{
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-top:1px solid rgba(141,135,123,.24);
  padding-top:14px;
}
.humanizer-variation{
  display:grid;
  grid-template-columns:auto minmax(110px,180px);
  align-items:center;
  gap:4px 12px;
  color:var(--text-muted);
  font-size:.74rem;
}
.humanizer-variation>span:first-child{
  grid-row:1;
  font-weight:700;
  color:var(--text-primary);
}
.humanizer-variation input{
  grid-column:2;
  grid-row:1;
  width:100%;
  accent-color:var(--action-primary);
  outline:0;
}
.humanizer-variation .micro{
  grid-column:2;
  grid-row:2;
  font-size:.62rem;
  letter-spacing:.02em;
}
.humanizer-main-action{
  min-width:118px;
  flex:0 0 auto;
}
.humanizer-main-action.is-working{opacity:.72;cursor:wait}
.humanizer-result-actions{align-items:center}
.humanizer-action-buttons{
  display:flex;
  align-items:center;
  gap:8px;
}
.humanizer-result-actions .tool-status{
  min-height:1em;
  white-space:nowrap;
}
.humanizer-action-buttons .btn{min-width:92px}
.humanizer-footnote{
  min-height:34px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:9px 4px 0;
  color:var(--text-muted);
  font-size:.72rem;
}
.humanizer-studio .btn:focus-visible{
  outline:2px solid rgba(200,65,50,.48);
  outline-offset:2px;
}
.humanizer-studio input[type="range"]:focus-visible{outline:0}
.humanizer-studio .editor-card,
.humanizer-studio .editor-card:hover{
  transform:none;
  box-shadow:none;
}
@media(max-width:900px){
  .humanizer-studio{padding-top:18px}
  .humanizer-studio-head{align-items:flex-start}
  .humanizer-surface{
    height:auto;
    min-height:0;
    grid-template-columns:1fr;
  }
  .humanizer-pane{
    min-height:460px;
  }
  .humanizer-source-pane{
    border-right:0;
    border-bottom:1px solid var(--line-subtle);
  }
}
@media(max-width:640px){
  .humanizer-studio{padding:14px 0 22px}
  .humanizer-studio-head{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
    margin-bottom:12px;
  }
  .humanizer-account-inline{
    display:flex;
    align-items:baseline;
    gap:9px;
    text-align:left;
  }
  .humanizer-account-inline strong{font-size:1rem}
  .humanizer-surface{border-radius:14px}
  .humanizer-pane{
    min-height:430px;
    padding:16px 16px 14px;
  }
  .humanizer-actionbar{
    align-items:stretch;
    flex-direction:column;
    gap:10px;
  }
  .humanizer-variation{
    width:100%;
    grid-template-columns:auto 1fr;
  }
  .humanizer-main-action{width:100%}
  .humanizer-result-actions{flex-direction:row;align-items:center}
  .humanizer-action-buttons{margin-left:auto}
  .humanizer-action-buttons .btn{min-width:80px;padding-left:12px;padding-right:12px}
  .humanizer-footnote{
    align-items:flex-start;
    flex-direction:column;
    gap:2px;
  }
}


/* Progressive auth and verified contact */
.auth-panel-copy{color:var(--text-muted);line-height:1.6;margin:10px 0 26px}
.auth-disclosure{border-top:1px solid var(--line-subtle);margin-top:16px}
.auth-disclosure:last-of-type{border-bottom:1px solid var(--line-subtle)}
.auth-disclosure summary{list-style:none;cursor:pointer;padding:16px 0;font-weight:700;display:flex;align-items:center;justify-content:space-between}
.auth-disclosure summary::-webkit-details-marker{display:none}
.auth-disclosure summary:after{content:"+";font-size:1.2rem;font-weight:400;color:var(--text-muted)}
.auth-disclosure[open] summary:after{content:"−"}
.auth-disclosure-body{padding:2px 0 20px}
.auth-check{display:flex;align-items:center;gap:8px;font-size:.85rem}
.auth-check input{width:auto;min-height:auto}

.contact-head .h1{max-width:14ch}
.contact-flow-section{padding-top:12px}
.contact-flow-shell{max-width:920px}
.contact-progress{display:flex;align-items:center;justify-content:center;margin-bottom:20px}
.contact-progress span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);font:700 .7rem/1 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--text-muted);background:var(--surface)}
.contact-progress span.is-current{background:var(--surface-ink);color:var(--text-inverse);border-color:var(--surface-ink)}
.contact-progress span.is-done{background:var(--action-primary);color:#fff;border-color:var(--action-primary)}
.contact-progress i{display:block;width:74px;height:1px;background:var(--line)}
.contact-flow-card{max-width:680px;margin:0 auto;background:rgba(250,248,242,.88);border:1px solid var(--line-subtle);border-radius:22px;padding:clamp(28px,5vw,46px);box-shadow:0 16px 50px rgba(23,22,18,.055)}
.contact-step h2{font-size:clamp(1.8rem,4vw,3rem);letter-spacing:-.045em;margin:10px 0 8px}
.contact-step>p{color:var(--text-muted);margin:0 0 26px;line-height:1.6}
.contact-step-form{max-width:560px}
.contact-step-form .btn-primary{align-self:flex-start;min-width:150px}
.contact-resend{margin-top:12px}
.verification-code-input{font:700 1.6rem/1 ui-monospace,SFMono-Regular,Consolas,monospace!important;letter-spacing:.28em;max-width:260px}
.contact-identity{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:22px;margin-bottom:28px;border-bottom:1px solid var(--line-subtle)}
.contact-identity strong,.contact-identity span{display:block}
.contact-identity strong{margin:6px 0 3px}
.contact-identity span{font-size:.85rem;color:var(--text-muted)}
.contact-identity>a{font-size:.78rem;color:var(--text-muted)}
.contact-flow-note{max-width:680px;margin:16px auto 0;padding:0 4px;display:grid;grid-template-columns:110px 1fr;gap:18px;color:var(--text-muted)}
.contact-flow-note p{margin:0;line-height:1.55;font-size:.82rem}
.section-tight{padding-top:16px;padding-bottom:0}
.kes-price{margin-top:7px;font-size:.76rem;color:var(--text-muted)}
.kes-price summary{cursor:pointer;list-style:none;text-decoration:underline;text-underline-offset:3px}
.kes-price summary::-webkit-details-marker{display:none}
.kes-price[open] span{display:block;margin-top:5px;color:var(--text-primary)}
@media(max-width:640px){
  .contact-flow-card{border-radius:16px;padding:24px 20px}
  .contact-progress i{width:44px}
  .contact-flow-note{grid-template-columns:1fr;gap:5px}
  .contact-identity{align-items:flex-start;flex-direction:column}
}


/* Reliable ValdaceAI partner mark: rendered locally so the rail never shows a broken image. */
.partner-valdace{
  min-width:164px!important;
  justify-content:center;
  gap:9px!important;
}
.valdace-mark{
  width:22px;
  height:22px;
  display:inline-block;
  flex:0 0 22px;
  background:var(--action-primary);
  transform:rotate(45deg);
  border-radius:2px;
  position:relative;
}
.valdace-mark:after{
  content:"";
  position:absolute;
  inset:5px;
  background:var(--surface-ink);
  border-radius:1px;
}
.valdace-wordmark{
  font-size:1.28rem;
  font-weight:800;
  letter-spacing:-.045em;
  color:#d8d5cf;
  white-space:nowrap;
}

/* Mobile account access */
.mobile-auth-links{display:none}
@media(max-width:980px){
  .nav-actions .btn-quiet{
    display:inline-flex;
  }
  .site-nav.open{
    padding-bottom:18px;
  }
  .mobile-auth-links{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    padding-top:14px;
    margin-top:6px;
    border-top:1px solid var(--line-subtle);
  }
  .mobile-auth-links a{
    min-height:44px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:10px 12px!important;
    border:1px solid var(--line-subtle);
    color:var(--text-primary)!important;
    background:var(--surface-paper);
    font-weight:700;
  }
  .mobile-auth-links a:hover{
    border-color:var(--line-strong);
    text-decoration:none;
  }
  .mobile-auth-links .mobile-auth-primary{
    background:var(--surface-ink);
    border-color:var(--surface-ink);
    color:var(--text-inverse)!important;
  }
}
@media(max-width:640px){
  .nav-wrap{
    grid-template-columns:auto 1fr auto;
    gap:10px;
  }
  .nav-actions{
    gap:8px;
  }
  .nav-actions .btn-quiet{
    display:inline-flex;
    min-height:38px;
    padding:7px 11px;
    font-size:.78rem;
  }
  .nav-toggle{
    min-height:38px;
    padding:7px 9px;
  }
  .valdace-wordmark{font-size:1.14rem}
  .valdace-mark{width:19px;height:19px;flex-basis:19px}
}


/* Progressive logged-in workspace */
.account-home{padding:48px 0 70px}
.account-home-head{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin-bottom:26px}
.account-home-head h1{font-size:clamp(2.4rem,5vw,4.8rem);line-height:.95;letter-spacing:-.055em;margin:10px 0 8px;max-width:12ch}
.account-home-head p{margin:0;color:var(--text-muted)}
.account-home-body{display:grid;gap:22px}
.account-next-card{min-height:190px;display:flex;justify-content:space-between;align-items:flex-end;gap:28px;padding:28px 30px;background:var(--surface-ink);color:var(--text-inverse);text-decoration:none;border-radius:18px}
.account-next-card h2{font-size:clamp(1.6rem,3vw,2.7rem);letter-spacing:-.045em;margin:8px 0 6px}
.account-next-card p{margin:0;color:#c9c5bc}
.account-next-card>strong{white-space:nowrap}
.account-next-clear{background:var(--surface-paper);color:var(--text-primary);border:1px solid var(--line-subtle)}
.account-next-clear p{color:var(--text-muted)}
.account-route-grid{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line-subtle);border-radius:18px;overflow:hidden;background:var(--surface-paper)}
.account-route{position:relative;min-height:180px;padding:24px 22px;text-decoration:none;border-right:1px solid var(--line-subtle)}
.account-route:last-child{border-right:0}
.account-route:hover{background:#fff}
.account-route strong{display:block;font-size:1.25rem;margin:9px 0 4px;letter-spacing:-.025em}
.account-route p{margin:0;color:var(--text-muted);font-size:.84rem}
.account-route-arrow{position:absolute;right:20px;bottom:18px;font-size:1.2rem}
.account-quiet-row{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:18px 2px;border-top:1px solid var(--line-subtle)}
.account-quiet-row strong{display:block;margin-top:4px}
.account-quiet-row>a{font-size:.82rem;color:var(--text-muted)}
.account-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:28px}
.account-list-section{padding-top:20px}
.account-list{border-top:1px solid var(--line-strong)}
.account-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:22px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line-subtle);text-decoration:none}
.account-list-row strong,.account-list-row small{display:block}
.account-list-row small{color:var(--text-muted);margin-top:3px}
.account-list-row-static:hover{background:transparent}
.account-money{font-weight:800;white-space:nowrap}
.account-empty{padding:30px 0;border-bottom:1px solid var(--line-subtle)}
.account-empty p{color:var(--text-muted)}
.account-secondary-list{margin-top:28px;border-top:1px solid var(--line-subtle)}
.account-secondary-list>summary{cursor:pointer;padding:18px 0;font-weight:700}
.account-chat-page{padding:44px 0 70px}
.account-chat-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:20px}
.account-chat-head h1{font-size:clamp(2.2rem,4vw,4rem);letter-spacing:-.05em;margin:8px 0 6px}
.account-chat-head p{margin:0;color:var(--text-muted)}
.account-chat-shell{max-width:920px}
.client-chat-panel-focused{border-radius:18px;background:var(--surface-paper)}
.account-context-drawer{margin-top:14px;border-top:1px solid var(--line-subtle)}
.account-context-drawer>summary{cursor:pointer;padding:14px 2px;font-weight:700;font-size:.84rem}
.account-context-list{display:grid;border-top:1px solid var(--line-subtle)}
.account-context-list a{display:flex;justify-content:space-between;gap:18px;padding:14px 0;border-bottom:1px solid var(--line-subtle);text-decoration:none}
.account-context-list small{display:block;color:var(--text-muted)}
.checkout-return{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-top:-10px;font-size:.78rem;color:var(--text-muted)}
.checkout-return a{color:var(--text-muted)}
#checkout-status{text-align:right}

@media(max-width:900px){
  .account-route-grid{grid-template-columns:1fr 1fr}
  .account-route:nth-child(2){border-right:0}
  .account-route:nth-child(-n+2){border-bottom:1px solid var(--line-subtle)}
  .account-section-head,.account-home-head,.account-chat-head{align-items:flex-start;flex-direction:column}
}
@media(max-width:640px){
  .account-home{padding:28px 0 50px}
  .account-next-card{min-height:0;align-items:flex-start;flex-direction:column;padding:22px 20px}
  .account-route-grid{grid-template-columns:1fr}
  .account-route{min-height:130px;border-right:0!important;border-bottom:1px solid var(--line-subtle)}
  .account-route:last-child{border-bottom:0}
  .account-list-row{grid-template-columns:1fr auto;gap:10px}
  .account-list-row>.status,.account-list-row>.account-money{grid-column:2}
  .account-list-row>.btn{grid-column:1/-1;width:100%}
  .account-quiet-row{align-items:flex-start;flex-direction:column}
  .checkout-return{align-items:flex-start;flex-direction:column}
  #checkout-status{text-align:left}
}


/* Focused authentication: one decision per screen. */
.auth-clean-body{
  min-height:100vh;
  background:
    radial-gradient(circle at 12% 18%,rgba(200,65,50,.07),transparent 30%),
    var(--surface-base);
}
.auth-clean-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:34px 20px 46px;
  position:relative;
}
.auth-clean-brand{
  position:absolute;
  top:26px;
  left:30px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  font-size:1.05rem;
  letter-spacing:-.035em;
}
.auth-clean-brand .brand-mark{
  width:15px;
  height:15px;
}
.auth-clean-card{
  width:min(430px,100%);
  background:rgba(250,248,242,.96);
  border:1px solid var(--line-subtle);
  border-radius:20px;
  padding:34px;
  box-shadow:0 24px 70px rgba(23,22,18,.08);
}
.auth-choice-panel[hidden]{display:none!important}
.auth-clean-heading{margin-bottom:24px}
.auth-clean-heading h1{
  margin:8px 0 6px;
  font-size:2.35rem;
  line-height:1;
  letter-spacing:-.05em;
}
.auth-clean-heading p{
  margin:0;
  color:var(--text-muted);
  font-size:.92rem;
}
.auth-google-primary{
  width:100%;
  min-height:48px;
  justify-content:center;
  margin:0;
  background:#fff;
}
.auth-clean-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:20px 0;
  color:var(--text-muted);
  font-size:.72rem;
}
.auth-clean-divider:before,
.auth-clean-divider:after{
  content:"";
  height:1px;
  flex:1;
  background:var(--line-subtle);
}
.auth-clean-form{
  display:grid;
  gap:16px;
}
.auth-clean-form .field{
  display:grid;
  gap:7px;
}
.auth-clean-form .field label{
  margin:0;
  font-size:.78rem;
  font-weight:700;
}
.auth-clean-form input{
  width:100%;
  min-height:48px;
  border:1px solid var(--line-subtle);
  background:#fff;
  padding:10px 12px;
  border-radius:6px;
  outline:0;
  box-shadow:none;
}
.auth-clean-form input:focus{
  border-color:var(--line-strong);
  outline:0;
  box-shadow:0 0 0 2px rgba(23,22,18,.05);
}
.auth-field-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.auth-field-label-row a{
  color:var(--text-muted);
  font-size:.72rem;
  text-decoration:none;
}
.auth-field-label-row a:hover{text-decoration:underline}
.auth-clean-submit{
  width:100%;
  min-height:48px;
  margin-top:2px;
}
.auth-clean-switch{
  display:block;
  width:100%;
  margin:22px 0 0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--text-muted);
  text-align:center;
  font-size:.8rem;
  cursor:pointer;
}
.auth-clean-switch strong{
  color:var(--text-primary);
  text-decoration:underline;
  text-underline-offset:3px;
}
.auth-clean-note{
  margin:14px 0 0;
  color:var(--text-muted);
  font-size:.72rem;
  line-height:1.5;
  text-align:center;
}
.auth-clean-messages{margin-bottom:16px}
.auth-clean-card .notice{
  margin:0 0 16px;
  padding:11px 12px;
  font-size:.78rem;
  line-height:1.45;
}
@media(max-width:640px){
  .auth-clean-page{
    place-items:start center;
    padding:82px 14px 24px;
  }
  .auth-clean-brand{
    top:22px;
    left:20px;
  }
  .auth-clean-card{
    padding:26px 20px;
    border-radius:16px;
    box-shadow:none;
  }
  .auth-clean-heading h1{font-size:2rem}
}


/* Auth modes: Google, email, and signup never compete on the same screen. */
.auth-mode-secondary{
  width:100%;
  min-height:48px;
  margin-top:10px;
  border-color:var(--line-subtle);
  background:transparent;
}
.auth-mode-links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid var(--line-subtle);
}
.auth-mode-links button{
  border:0;
  background:transparent;
  color:var(--text-muted);
  padding:0;
  font-size:.78rem;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:3px;
}
.auth-mode-links button:hover{color:var(--text-primary)}
@media(max-width:480px){
  .auth-mode-links{
    flex-direction:column;
    gap:8px;
  }
}


/* Quiet in-place contact flow */
.contact-head-clean{padding-bottom:10px}
.contact-head-clean .h1{margin-bottom:0}
.contact-flow-shell{position:relative}
.contact-flow-card{transition:opacity .16s ease,transform .16s ease}
.contact-email-line{
  margin:4px 0 24px;
  color:var(--text-muted);
  font-size:.86rem;
}
.contact-feedback{
  margin:0 0 18px;
  padding:10px 12px;
  border:1px solid var(--line-subtle);
  font-size:.8rem;
}
.contact-feedback.is-error{
  border-color:rgba(180,55,41,.35);
  color:#8e2f25;
  background:rgba(180,55,41,.045);
}
.contact-feedback.is-ok{
  color:var(--text-muted);
  background:rgba(23,22,18,.025);
}
.contact-step-done{text-align:center;padding:24px 0}
.contact-step-done h2{margin-bottom:8px}
.contact-step-done p{margin:0;color:var(--text-muted)}
.contact-step-form button[disabled],
.contact-resend button[disabled]{opacity:.6;cursor:wait}


/* ==========================================================================
   1. SAAS ADMIN OPERATIONS CONSOLE (.ops-*)
   ========================================================================== */
[hidden] {
  display: none !important;
}

.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;
}

.ops-body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: 100dvh;
  overflow: hidden;
}

.ops-body-locked {
  height: 100dvh;
  overflow: hidden;
}

.ops-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.ops-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.ops-body-locked .ops-shell {
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.ops-sidebar {
  background: var(--surface-ink);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
  padding: 20px 14px;
  min-width: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  position: sticky;
  top: 0;
  align-self: start;
  z-index: 80;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 244, 236, 0.2) transparent;
}

.ops-sidebar::-webkit-scrollbar {
  width: 5px;
}

.ops-sidebar::-webkit-scrollbar-thumb {
  background: rgba(247, 244, 236, 0.2);
  border-radius: 4px;
}

.ops-sidebar-brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 18px;
  border-bottom: 1px solid rgba(247, 244, 236, 0.12);
  margin-bottom: 16px;
}

.ops-brand-link {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
  text-decoration: none;
  white-space: nowrap;
}

.ops-brand-sub {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--action-primary);
  white-space: nowrap;
}

.ops-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.ops-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  color: var(--line-subtle);
  text-decoration: none;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.ops-nav-item:hover {
  background: rgba(247, 244, 236, 0.07);
  color: var(--text-inverse);
}

.ops-nav-item.is-active {
  background: var(--action-primary);
  color: var(--text-inverse);
  font-weight: 600;
}

.ops-nav-count {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  opacity: 0.9;
}

.ops-sidebar-foot {
  padding: 16px 10px 0;
  border-top: 1px solid rgba(247, 244, 236, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.ops-foot-link {
  color: var(--line-subtle);
  text-decoration: none;
  white-space: nowrap;
}

.ops-foot-link:hover {
  color: var(--text-inverse);
}

.ops-foot-sep {
  color: var(--line-strong);
}

/* Main Console Area */
.ops-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.ops-body-locked .ops-topbar {
  display: none !important;
}

.ops-topbar {
  height: 56px;
  flex-shrink: 0;
  background: var(--surface-paper);
  border-bottom: 1px solid var(--line-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.ops-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ops-crumb-link {
  color: var(--text-muted);
  text-decoration: none;
}

.ops-crumb-link:hover {
  color: var(--text-primary);
}

.ops-crumb-sep {
  color: var(--line-strong);
}

.ops-crumb-current {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ops-flash-list {
  padding: 10px 24px 0;
  flex-shrink: 0;
}

.ops-flash {
  padding: 10px 14px;
  background: var(--surface-paper);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  color: var(--text-primary);
}

.ops-viewport {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.ops-viewport::-webkit-scrollbar {
  width: 6px;
}

.ops-viewport::-webkit-scrollbar-thumb {
  background: var(--line-subtle);
  border-radius: 4px;
}

.ops-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--line-strong);
}

.ops-viewport-locked {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Buttons & Controls */
.ops-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius-control);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.ops-btn-sm {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}

.ops-btn-primary {
  background: var(--action-primary);
  color: var(--text-inverse);
  border: 1px solid var(--action-primary);
}

.ops-btn-primary:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
}

.ops-btn-secondary {
  background: var(--surface-paper);
  color: var(--text-primary);
  border: 1px solid var(--line-strong);
}

.ops-btn-secondary:hover {
  background: var(--surface-quiet);
  border-color: var(--text-primary);
}

/* Segmented Filter Controls */
.ops-segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface-quiet);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
}

.ops-thread-toolbar .ops-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.ops-segment {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-control);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.ops-segment:hover {
  color: var(--text-primary);
}

.ops-segment.is-active {
  background: var(--surface-paper);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 22, 18, 0.08);
}

/* Semantic Text States (Zero Pill Enclosures) */
.ops-state-settled {
  color: var(--proof);
  font-weight: 600;
}

.ops-state-open {
  color: var(--warning);
  font-weight: 600;
}

.ops-state-declined {
  color: var(--action-primary);
  font-weight: 600;
}

.ops-unread-text {
  color: var(--action-primary);
  font-weight: 600;
}

/* Locked Two-Pane Inbox Workspace (Incoming Chats List + Active Chat Interface) */
.ops-inbox-workspace {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface-base);
}

.ops-thread-pane {
  border-right: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  background: var(--surface-paper);
  overflow: hidden;
}

.ops-thread-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.ops-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ops-search-input,
.ops-input {
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-paper);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
}

.ops-search-input:focus,
.ops-input:focus {
  outline: 2px solid var(--action-primary);
  outline-offset: -1px;
  border-color: var(--action-primary);
}

.ops-new-client-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ops-thread-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.ops-thread-row {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-subtle);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.12s ease;
}

.ops-thread-row:hover {
  background: var(--surface-base);
}

.ops-thread-row.is-active {
  background: var(--surface-quiet);
  box-shadow: inset 3px 0 0 var(--action-primary);
}

.ops-thread-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ops-thread-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-thread-time {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ops-thread-preview {
  margin: 5px 0 0;
  font-size: 12.5px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-thread-sender {
  color: var(--text-primary);
  font-weight: 600;
}

.ops-thread-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Active Conversation Pane */
.ops-chat-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface-base);
  overflow: hidden;
}

.ops-chat-header {
  padding: 12px 24px;
  background: var(--surface-paper);
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.ops-chat-header-main {
  min-width: 0;
}

.ops-chat-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-chat-submeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.ops-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ops-status-text {
  font-size: 12.5px;
}

.ops-message-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ops-msg {
  max-width: min(640px, 76%);
  display: flex;
  flex-direction: column;
}

.ops-msg-incoming {
  align-self: flex-start;
}

.ops-msg-outgoing {
  align-self: flex-end;
}

.ops-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.ops-msg-outgoing .ops-msg-meta {
  justify-content: flex-end;
}

.ops-msg-meta time {
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
}

.ops-msg-bubble {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.ops-msg-incoming .ops-msg-bubble {
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  color: var(--text-primary);
}

.ops-msg-outgoing .ops-msg-bubble {
  background: var(--surface-ink);
  border: 1px solid var(--surface-ink);
  color: var(--text-inverse);
}

.ops-msg-bubble p {
  margin: 0;
}

.ops-stream-empty {
  margin: auto;
  color: var(--text-muted);
  font-size: 13.5px;
}

.ops-composer {
  background: var(--surface-paper);
  border-top: 1px solid var(--line-subtle);
  padding: 14px 24px;
  flex-shrink: 0;
}

.ops-composer textarea {
  width: 100%;
  min-height: 52px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-base);
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
  color: var(--text-primary);
}

.ops-composer textarea:focus {
  outline: 2px solid var(--action-primary);
  outline-offset: -1px;
  border-color: var(--action-primary);
}

.ops-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.ops-composer-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.ops-inline-form {
  display: inline;
  margin: 0;
}

.ops-text-action {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--action-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.ops-text-action:hover {
  color: var(--action-hover);
  text-decoration: underline;
}

/* Dedicated Data Pages: Invoices & Transactions */
.ops-data-page {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ops-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
}

.ops-kpi-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ops-kpi-cell:last-child {
  border-right: 0;
}

.ops-kpi-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.ops-kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.ops-kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.ops-table-section {
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
  overflow: hidden;
}

.ops-filter-bar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ops-filter-search {
  min-width: 260px;
  flex: 1;
  max-width: 400px;
}

.ops-table-container {
  overflow-x: auto;
}

.ops-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.ops-data-table th {
  padding: 10px 16px;
  background: var(--surface-base);
  border-bottom: 1px solid var(--line-subtle);
  color: var(--text-muted);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ops-data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
  color: var(--text-primary);
}

.ops-data-table tbody tr:hover {
  background: var(--surface-base);
}

.ops-col-num {
  text-align: right !important;
  white-space: nowrap;
}

.ops-col-actions {
  text-align: right !important;
  white-space: nowrap;
}

.ops-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ops-cell-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ops-table-empty {
  text-align: center;
  padding: 32px !important;
  color: var(--text-muted) !important;
}

/* Modal Dialog */
.ops-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 15, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}

.ops-modal-dialog {
  width: 100%;
  max-width: 460px;
  background: var(--surface-paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  padding: 24px;
  box-shadow: 0 20px 30px rgba(17, 17, 15, 0.22);
}

.ops-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-subtle);
  margin-bottom: 18px;
}

.ops-modal-head h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.ops-modal-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.ops-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ops-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ops-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.ops-field-grid {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
}

.ops-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
  margin-top: 4px;
}

.ops-form-feedback {
  font-size: 12.5px;
  color: var(--proof);
}

/* ==========================================================================
   2. CLIENT PORTAL & MESSENGER (.cp-*)
   ========================================================================== */
.cp-body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.cp-body-chat {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cp-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* 3-Zone Top Bar Contract */
.cp-topbar {
  height: 56px;
  flex-shrink: 0;
  background: var(--surface-paper);
  border-bottom: 1px solid var(--line-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cp-brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.cp-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cp-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 17px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.cp-nav-link:hover {
  color: var(--text-primary);
}

.cp-nav-link.is-active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--action-primary);
}

.cp-account {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 13px;
}

.cp-account-email {
  color: var(--text-muted);
  white-space: nowrap;
}

.cp-signout {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.cp-signout:hover {
  text-decoration: underline;
}

/* Client Messenger Layout */
.cp-main-chat {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
}

.cp-chat-shell {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.cp-chat-column {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  background: var(--surface-paper);
  border-left: none;
  border-right: none;
  display: flex;
  flex-direction: column;
}

.cp-chat-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.cp-chat-subject {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.cp-chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.cp-sheet-trigger {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-paper);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.cp-sheet-trigger:hover {
  background: var(--surface-quiet);
}

.cp-open-invoice-bar {
  padding: 10px 20px;
  background: var(--surface-quiet);
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  flex-shrink: 0;
}

.cp-open-invoice-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 16px;
  border-radius: var(--radius-control);
  background: var(--action-primary);
  color: var(--text-inverse);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.cp-pay-btn:hover {
  background: var(--action-hover);
}

.cp-pay-btn-sm {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12px;
}

.cp-message-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  background: var(--surface-base);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cp-msg {
  max-width: 78%;
  display: flex;
  flex-direction: column;
}

.cp-msg-self {
  align-self: flex-end;
}

.cp-msg-team {
  align-self: flex-start;
}

.cp-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.cp-msg-self .cp-msg-meta {
  justify-content: flex-end;
}

.cp-msg-bubble {
  padding: 11px 15px;
  border-radius: 6px;
  font-size: 14.5px;
  line-height: 1.5;
}

.cp-msg-self .cp-msg-bubble {
  background: var(--surface-ink);
  color: var(--text-inverse);
}

.cp-msg-team .cp-msg-bubble {
  background: var(--surface-paper);
  color: var(--text-primary);
  border: 1px solid var(--line-subtle);
}

.cp-msg-bubble p {
  margin: 0;
}

.cp-msg-bubble a,
.ops-msg-bubble a {
  color: var(--accent, #c84132);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.cp-msg-bubble a:hover,
.ops-msg-bubble a:hover {
  opacity: 0.8;
}

.cp-msg-self .cp-msg-bubble a {
  color: #ff8c7a;
}

.cp-stream-empty {
  margin: auto;
  color: var(--text-muted);
  font-size: 14px;
}

.cp-composer,
.ops-composer {
  padding: 14px 20px 18px;
  background: var(--surface-paper);
  border-top: 1px solid var(--line-subtle);
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Modern Elevated Composer Card Container */
.cp-composer-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-base);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(17, 17, 15, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  overflow: hidden;
  position: relative;
}

.cp-composer-card:focus-within {
  border-color: var(--action-primary);
  box-shadow: 0 0 0 3px rgba(200, 65, 50, 0.12), 0 3px 10px rgba(17, 17, 15, 0.05);
}

.cp-composer-card.is-dragover {
  border-color: var(--action-primary);
  border-style: dashed;
  background: rgba(200, 65, 50, 0.03);
}

/* Textarea input body inside card */
.cp-composer-body {
  padding: 10px 14px 2px;
}

.cp-composer textarea,
.ops-composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 180px;
  padding: 2px 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-primary);
  display: block;
  box-sizing: border-box;
}

.cp-composer textarea::placeholder,
.ops-composer textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

/* Bottom Toolbar inside card */
.cp-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px;
  gap: 8px;
}

.cp-composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cp-icon-action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.cp-icon-action-btn:hover {
  background: var(--surface-paper);
  border-color: var(--line-subtle);
  color: var(--text-primary);
}

.cp-icon-action-btn.is-recording {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse-red 1.4s infinite;
}

.cp-composer-hint {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

@media (max-width: 640px) {
  .cp-composer-hint {
    display: none;
  }
}

.cp-composer-submit-wrap {
  display: flex;
  align-items: center;
}

.cp-send-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--surface-quiet);
  color: var(--line-strong);
  cursor: not-allowed;
  padding: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.cp-send-action-btn.is-active,
.cp-send-action-btn:not(:disabled) {
  background: var(--action-primary);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(200, 65, 50, 0.3);
}

.cp-send-action-btn.is-active:hover,
.cp-send-action-btn:not(:disabled):hover {
  background: var(--action-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(200, 65, 50, 0.4);
}

.cp-send-action-btn:active {
  transform: scale(0.95);
}

.ops-composer .cp-send-action-btn.is-active,
.ops-composer .cp-send-action-btn:not(:disabled) {
  background: var(--surface-ink);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(17, 17, 15, 0.35);
}

.ops-composer .cp-send-action-btn.is-active:hover,
.ops-composer .cp-send-action-btn:not(:disabled):hover {
  background: #2a2a26;
}

.cp-composer-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  min-height: 16px;
}

/* Slide-Over Client Invoices Sheet */
.cp-invoice-sheet {
  width: 340px;
  height: 100%;
  background: var(--surface-paper);
  border-left: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.cp-sheet-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cp-sheet-head h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.cp-sheet-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.cp-sheet-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cp-inv-row {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-subtle);
}

.cp-inv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13.5px;
}

.cp-inv-desc {
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.cp-inv-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.cp-inv-actions {
  margin-top: 8px;
}

.cp-state-paid {
  color: var(--proof);
  font-weight: 600;
}

.cp-state-open {
  color: var(--warning);
  font-weight: 600;
}

/* Client Portal Standard Container (Billing & Overview) */
.cp-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cp-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-subtle);
}

.cp-page-head h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cp-page-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.cp-btn-outline {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-paper);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.cp-btn-outline:hover {
  background: var(--surface-quiet);
}

.cp-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
}

.cp-summary-cell {
  padding: 20px;
  border-right: 1px solid var(--line-subtle);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cp-summary-cell:last-child {
  border-right: 0;
}

.cp-summary-cell:hover {
  background: var(--surface-quiet);
}

.cp-summary-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.cp-summary-val {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.cp-summary-link {
  font-size: 13px;
  color: var(--action-primary);
  font-weight: 600;
}

.cp-callout {
  padding: 20px 24px;
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cp-kicker {
  font-size: 12px;
  color: var(--action-primary);
  font-weight: 600;
}

.cp-callout h2 {
  margin: 4px 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
}

.cp-callout p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.cp-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cp-section-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.cp-table-wrap {
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-control);
  overflow-x: auto;
}

.cp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.cp-table th {
  padding: 11px 16px;
  background: var(--surface-base);
  border-bottom: 1px solid var(--line-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.cp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-subtle);
}

.cp-num {
  text-align: right !important;
  white-space: nowrap;
}

.cp-actions {
  text-align: right !important;
  white-space: nowrap;
}

.cp-empty-cell {
  text-align: center;
  padding: 28px !important;
  color: var(--text-muted);
}

.cp-muted {
  color: var(--text-muted);
  font-size: 12.5px;
}

@media (max-width: 860px) {
  .ops-body:not(.ops-body-locked) {
    height: auto;
    overflow: visible;
  }
  .ops-body:not(.ops-body-locked) .ops-shell {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .ops-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .ops-sidebar {
    height: auto;
    max-height: none;
    position: static;
    overflow-y: visible;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .ops-sidebar-brand {
    padding: 0;
    border: 0;
    margin: 0;
    gap: 10px;
  }
  .ops-sidebar-nav {
    flex-direction: row;
    flex: initial;
  }
  .ops-sidebar-foot {
    display: none;
  }
  .ops-body:not(.ops-body-locked) .ops-main {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .ops-body:not(.ops-body-locked) .ops-viewport {
    overflow-y: visible;
  }
}

@media (max-width: 720px) {
  .ops-inbox-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 220px minmax(0, 1fr);
  }
  .ops-thread-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line-subtle);
  }
  .ops-kpi-strip,
  .cp-summary-strip {
    grid-template-columns: 1fr;
  }
  .ops-kpi-cell,
  .cp-summary-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line-subtle);
  }
  .cp-account-email {
    display: none;
  }
  .cp-invoice-sheet {
    position: fixed;
    right: 0;
    top: 56px;
    bottom: 0;
    z-index: 60;
    width: 100%;
    max-width: 340px;
    box-shadow: -8px 0 24px rgba(17, 17, 15, 0.16);
  }
}

/* ==========================================================================
   3. CHAT ATTACHMENTS & FILE UPLOAD COMPOSER
   ========================================================================== */
.ops-attachment-list,
.cp-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.ops-msg-bubble p + .ops-attachment-list,
.cp-msg-bubble p + .cp-attachment-list {
  margin-top: 10px;
}

.ops-attachment-card,
.cp-attachment-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.ops-msg-incoming .ops-attachment-card,
.cp-msg-team .cp-attachment-card {
  background: var(--surface-base);
  border: 1px solid var(--line-subtle);
  color: var(--text-primary);
}

.ops-msg-incoming .ops-attachment-card:hover,
.cp-msg-team .cp-attachment-card:hover {
  background: var(--surface-quiet);
  border-color: var(--line-strong);
}

.ops-msg-outgoing .ops-attachment-card,
.cp-msg-self .cp-attachment-card {
  background: rgba(250, 248, 242, 0.09);
  border: 1px solid rgba(250, 248, 242, 0.22);
  color: var(--text-inverse);
}

.ops-msg-outgoing .ops-attachment-card:hover,
.cp-msg-self .cp-attachment-card:hover {
  background: rgba(250, 248, 242, 0.15);
  border-color: rgba(250, 248, 242, 0.38);
}

.ops-attachment-ext,
.cp-attachment-ext {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 3px;
  background: var(--action-primary);
  color: var(--text-inverse);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.ops-attachment-info,
.cp-attachment-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ops-attachment-name,
.cp-attachment-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-attachment-size,
.cp-attachment-size {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  opacity: 0.72;
}

.ops-attachment-dl,
.cp-attachment-dl {
  font-size: 12px;
  font-weight: 600;
  color: var(--action-primary);
  flex-shrink: 0;
  padding-left: 6px;
}

.ops-msg-outgoing .ops-attachment-dl,
.cp-msg-self .cp-attachment-dl {
  color: var(--surface-paper);
  text-decoration: underline;
}

.ops-composer-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Staged Attachment Chips inside composer card */
.cp-staged-files,
.ops-staged-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(241, 238, 230, 0.5);
  border-bottom: 1px solid var(--line-subtle);
}

.cp-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-paper);
  border: 1px solid var(--line-subtle);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(17, 17, 15, 0.04);
  max-width: 280px;
  transition: border-color 0.15s ease;
}

.cp-chip-icon {
  display: inline-flex;
  align-items: center;
  color: var(--action-primary);
  flex-shrink: 0;
}

.cp-chip-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.cp-chip-size {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cp-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: background 0.15s, color 0.15s;
}

.cp-chip-remove:hover {
  background: rgba(200, 65, 50, 0.12);
  color: var(--action-primary);
}

.ops-composer-files,
.cp-composer-files {
  margin: 6px 0;
  padding: 6px 10px;
  background: var(--surface-base);
  border: 1px solid var(--line-subtle);
  border-radius: 4px;
}

.ops-composer-file-list,
.cp-composer-file-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.cp-attach-btn {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-paper);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cp-attach-btn:hover {
  background: var(--surface-quiet);
}

.cp-file-clear-btn {
  border: 0;
  background: transparent;
  color: var(--action-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

/* Audio Player and Voice Note Recording Styling */
.ops-audio-card,
.cp-audio-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 6px;
  min-width: 280px;
  max-width: 440px;
  box-sizing: border-box;
}

.ops-msg-incoming .ops-audio-card,
.cp-msg-team .cp-audio-card {
  background: var(--surface-base);
  border: 1px solid var(--line-subtle);
  color: var(--text-primary);
}

.ops-msg-outgoing .ops-audio-card,
.cp-msg-self .cp-audio-card {
  background: rgba(250, 248, 242, 0.08);
  border: 1px solid rgba(250, 248, 242, 0.22);
  color: var(--text-inverse);
}

.ops-audio-meta,
.cp-audio-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.ops-audio-badge,
.cp-audio-badge {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #2a6f97;
  color: #ffffff;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.ops-audio-title,
.cp-audio-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.ops-audio-size,
.cp-audio-size {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  opacity: 0.75;
  flex-shrink: 0;
}

.ops-audio-element,
.cp-audio-element {
  width: 100%;
  height: 38px;
  outline: none;
  border-radius: 20px;
}

.ops-msg-outgoing .ops-audio-element,
.cp-msg-self .cp-audio-element {
  filter: invert(0.9) hue-rotate(180deg);
}

.ops-audio-foot,
.cp-audio-foot {
  display: flex;
  justify-content: flex-end;
  font-size: 11px;
}

.ops-audio-dl,
.cp-audio-dl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--action-primary);
  text-decoration: none;
}
.ops-audio-dl:hover,
.cp-audio-dl:hover {
  text-decoration: underline;
}
.ops-msg-outgoing .ops-audio-dl,
.cp-msg-self .cp-audio-dl {
  color: var(--surface-paper);
}

/* Voice Note Recording UI */
.cp-record-btn,
.ops-record-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-paper);
  color: var(--text-primary);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ops-record-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
.cp-record-btn:hover,
.ops-record-btn:hover {
  background: var(--surface-quiet);
}
.cp-record-btn.is-recording,
.ops-record-btn.is-recording {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
  animation: pulse-red 1.4s infinite;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Modern Live Voice Recording Banner inside card */
.cp-recording-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fef2f2;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12.5px;
  gap: 10px;
}

.cp-recording-live {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cp-recording-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  animation: blink-dot 1s infinite;
  flex-shrink: 0;
}

.cp-recording-label {
  font-weight: 600;
  font-size: 12.5px;
}

.cp-audio-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
  margin: 0 4px;
}

.cp-wave-bar {
  display: inline-block;
  width: 2.5px;
  background: #ef4444;
  border-radius: 2px;
  animation: sound-wave 0.8s ease-in-out infinite;
}

.cp-wave-bar:nth-child(1) { animation-delay: 0.1s; }
.cp-wave-bar:nth-child(2) { animation-delay: 0.3s; }
.cp-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.cp-wave-bar:nth-child(4) { animation-delay: 0.4s; }

@keyframes sound-wave {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.cp-recording-timer {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  color: #7f1d1d;
  font-size: 12px;
}

.cp-recording-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cp-rec-btn {
  border: none;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cp-rec-stop {
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cp-rec-stop:hover {
  background: #dc2626;
}

.cp-rec-cancel {
  background: transparent;
  color: #6b7280;
  text-decoration: underline;
  padding: 4px 6px;
}

.cp-rec-cancel:hover {
  color: #1f2937;
}

.cp-recording-bar,
.ops-recording-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  color: #991b1b;
  font-size: 13px;
  margin-bottom: 8px;
}

.recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  animation: blink-dot 1s infinite;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.recording-timer {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  color: #7f1d1d;
}

.recording-action-btn {
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.recording-stop-btn {
  background: #ef4444;
  color: #ffffff;
}
.recording-cancel-btn {
  background: transparent;
  color: #6b7280;
  text-decoration: underline;
}

/* Animated Tick & Smooth Creation Overlay */
.ops-tick-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 12, 20, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}

.ops-tick-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ops-tick-card {
  background: #0F172A;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 32px rgba(16, 185, 129, 0.22);
  border-radius: 20px;
  padding: 36px 44px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.82) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 380px;
  width: 90%;
}

.ops-tick-overlay.is-visible .ops-tick-card {
  transform: scale(1) translateY(0);
}

.ops-tick-badge {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
}

.ops-tick-svg {
  width: 48px;
  height: 48px;
}

.ops-tick-circle {
  stroke: #10B981;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: opsCircleDraw 0.55s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.ops-tick-check {
  stroke: #10B981;
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: opsCheckDraw 0.42s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

@keyframes opsCircleDraw {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes opsCheckDraw {
  100% {
    stroke-dashoffset: 0;
  }
}

.ops-tick-title {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: #F8FAFC;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.ops-tick-subtitle {
  font-size: 13px;
  color: #94A3B8;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 14px;
}

.ops-tick-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 999px;
  font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
  color: #A5B4FC;
}

/* Row Flash Highlight for Newly Created Invoices */
@keyframes opsRowHighlight {
  0% {
    background-color: rgba(16, 185, 129, 0.24);
    transform: translateY(-6px);
  }
  50% {
    background-color: rgba(16, 185, 129, 0.12);
  }
  100% {
    background-color: transparent;
    transform: translateY(0);
  }
}

.ops-row-new {
  animation: opsRowHighlight 2.4s ease-out forwards;
}

/* ==========================================================================
   WHATSAPP WEB INTERFACE REMODEL (Blue Read Status + Infini Brand Orange)
   ========================================================================== */

/* Full Viewport Workspace */
.ops-body-locked .ops-shell {
  grid-template-columns: 210px minmax(0, 1fr);
  width: 100vw;
  height: 100dvh;
}

.ops-inbox-workspace {
  grid-template-columns: 360px minmax(0, 1fr) !important;
  width: 100%;
  height: 100%;
  background: #ffffff;
}

/* WhatsApp Left Sidebar / Contact List */
.wa-thread-list {
  background: #ffffff;
  overflow-y: auto;
  border-right: 1px solid #e9edef;
}

.wa-thread-row {
  display: flex !important;
  align-items: center;
  gap: 12px;
  height: 72px;
  padding: 0 16px !important;
  border-bottom: 1px solid #f0f2f5 !important;
  background: #ffffff;
  text-decoration: none;
  transition: background-color 0.12s ease;
  box-sizing: border-box;
}

.wa-thread-row[hidden],
.ops-thread-row[hidden] {
  display: none !important;
}

.wa-thread-row:hover {
  background: #f5f6f6 !important;
}

.wa-thread-row.is-active {
  background: #f0f2f5 !important;
  box-shadow: inset 4px 0 0 #e25822 !important; /* Infini brand orange */
}

/* WhatsApp Date Separators */
.wa-date-divider {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 14px 0 8px !important;
  pointer-events: none !important;
  width: 100% !important;
}

.wa-date-pill {
  background: #ffffff !important;
  color: #54656f !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.35px !important;
  padding: 5px 12px !important;
  border-radius: 7.5px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13) !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}

/* Thread Reference Badges */
.ops-thread-ref-badge {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  margin-left: 6px;
  vertical-align: middle;
}

.ops-thread-row.is-active .ops-thread-ref-badge {
  background: #cbd5e1;
  color: #0f172a;
}

.ops-thread-ref-pill {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: normal;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1e40af;
  margin-left: 6px;
  vertical-align: middle;
}

.wa-thread-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-thread-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wa-thread-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.wa-thread-name {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 500 !important;
  color: #111b21 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-thread-time {
  font-size: 11.5px !important;
  color: #667781 !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  flex-shrink: 0;
}

.wa-thread-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.wa-thread-preview {
  font-size: 13px !important;
  color: #667781 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-preview-ticks {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wa-unread-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  background: #e25822; /* Infini brand orange */
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(226, 88, 34, 0.35);
}

/* WhatsApp Chat Header */
.wa-chat-header {
  height: 60px !important;
  padding: 10px 16px !important;
  background: #f0f2f5 !important;
  border-bottom: 1px solid #d1d7db !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-sizing: border-box;
}

.wa-header-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wa-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #aebac1 0%, #8696a0 100%);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-header-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wa-header-name {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #111b21 !important;
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.wa-header-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-status-online {
  color: #25d366 !important; /* WhatsApp active online green */
  font-weight: 500;
}

.wa-status-offline {
  color: #667781 !important;
  font-weight: 400;
}

.wa-header-sep {
  color: #aebac1;
}

.wa-header-email {
  color: #667781;
  font-size: 12px;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wa-thread-badge {
  font-size: 12px !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
}

.wa-btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  background: #e25822; /* Infini brand orange */
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(226, 88, 34, 0.3);
  text-decoration: none;
}

.wa-btn-orange:hover {
  background: #c84132;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(226, 88, 34, 0.4);
}

.wa-btn-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  background: #ffffff;
  color: #54656f;
  border: 1px solid #d1d7db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.wa-btn-subtle:hover {
  background: #f0f2f5;
  color: #111b21;
}

/* WhatsApp Message Stream & Wallpaper */
.wa-message-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px !important;
  background-color: #efeae2 !important; /* Signature WhatsApp wallpaper tone */
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath opacity='0.045' fill-rule='evenodd' clip-rule='evenodd' d='M20 20h20v20H20V20zm50 0h20v20H70V20zM20 70h20v20H20V70zm50 0h20v20H70V70z' fill='%23000'/%3E%3Ccircle opacity='0.035' cx='55' cy='55' r='10' fill='%23000'/%3E%3Cpath opacity='0.035' d='M85 35l8 8-8 8-8-8 8-8z' fill='%23000'/%3E%3C/svg%3E") !important;
  background-size: 120px 120px !important;
  background-repeat: repeat !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  box-sizing: border-box;
}

/* WhatsApp Speech Bubbles */
.wa-msg {
  max-width: min(85%, 780px) !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  margin-bottom: 2px !important;
}

.wa-msg-in {
  align-self: flex-start !important;
}

.wa-msg-out {
  align-self: flex-end !important;
}

.wa-msg-bubble {
  padding: 6px 9px 7px 10px !important;
  font-size: 14.2px !important;
  line-height: 19px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13) !important;
  border: none !important;
  position: relative !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  display: inline-block !important;
}

/* Incoming Bubble (White with left tail) */
.wa-msg-in .wa-msg-bubble {
  background: #ffffff !important;
  color: #111b21 !important;
  border-radius: 7.5px 7.5px 7.5px 0 !important;
}

/* Outgoing Bubble (WhatsApp Pale Mint/Green with right tail) */
.wa-msg-out .wa-msg-bubble {
  background: #d9fdd3 !important;
  color: #111b21 !important;
  border-radius: 7.5px 7.5px 0 7.5px !important;
}

.wa-msg-text {
  display: inline;
  white-space: pre-wrap;
  font-size: 14.2px;
  line-height: 19px;
  color: #111b21;
}

.wa-msg-text a {
  color: #027eb5 !important; /* WhatsApp link blue */
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Bottom Right Time & Checkmarks */
.wa-msg-meta {
  float: right;
  margin-left: 10px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  gap: 3px;
  font-size: 11px;
  line-height: 15px;
  color: #667781;
  user-select: none;
  white-space: nowrap;
  position: relative;
  bottom: -2px;
}

.wa-msg-time {
  font-size: 11px;
  color: #667781;
}

.wa-tick-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: 1px;
}

.wa-ticks {
  display: block;
}

/* Double Blue Checkmarks (#53bdeb WhatsApp iconic blue) */
.wa-ticks-read path {
  fill: #53bdeb !important;
}

/* Double Gray Checkmarks (#8696a0 delivered) */
.wa-ticks-unread path {
  fill: #8696a0 !important;
}

/* WhatsApp Attachments */
.wa-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 2px;
}

/* Document Card */
.wa-doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 9px 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.14s ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.wa-doc-card:hover {
  background: rgba(0, 0, 0, 0.09);
}

.wa-doc-badge {
  width: 36px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 9px;
  flex-shrink: 0;
  text-transform: uppercase;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.wa-badge-pdf { background: #ea4335 !important; }
.wa-badge-doc, .wa-badge-docx { background: #2b579a !important; }
.wa-badge-xls, .wa-badge-xlsx, .wa-badge-csv { background: #107c41 !important; }
.wa-badge-ppt, .wa-badge-pptx { background: #d24726 !important; }
.wa-badge-zip, .wa-badge-rar { background: #5c6bc0 !important; }
.wa-badge-file { background: #54656f !important; }

.wa-doc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wa-doc-name {
  font-size: 13.5px;
  font-weight: 500;
  color: #111b21;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-doc-sub {
  font-size: 11.5px;
  color: #667781;
  margin-top: 2px;
}

.wa-doc-dl {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #d1d7db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #54656f;
  background: #ffffff;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.wa-doc-card:hover .wa-doc-dl {
  background: #e25822; /* Infini brand orange */
  border-color: #e25822;
  color: #ffffff;
}

/* Voice Note Player */
.wa-voice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  min-width: 250px;
}

.wa-voice-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e25822; /* Infini brand orange */
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s ease;
  box-shadow: 0 1px 3px rgba(226, 88, 34, 0.35);
}

.wa-voice-btn:hover {
  transform: scale(1.05);
}

.wa-voice-btn .wa-icon-pause {
  display: none;
}

.wa-voice-btn.is-playing .wa-icon-play {
  display: none;
}

.wa-voice-btn.is-playing .wa-icon-pause {
  display: block;
}

.wa-voice-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wa-voice-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 22px;
}

.wa-voice-bars span {
  width: 2.5px;
  background: #8696a0;
  border-radius: 2px;
  display: block;
}

.wa-voice-bars span:nth-child(1) { height: 35%; }
.wa-voice-bars span:nth-child(2) { height: 65%; }
.wa-voice-bars span:nth-child(3) { height: 90%; }
.wa-voice-bars span:nth-child(4) { height: 50%; }
.wa-voice-bars span:nth-child(5) { height: 75%; }
.wa-voice-bars span:nth-child(6) { height: 100%; }
.wa-voice-bars span:nth-child(7) { height: 60%; }
.wa-voice-bars span:nth-child(8) { height: 85%; }
.wa-voice-bars span:nth-child(9) { height: 45%; }
.wa-voice-bars span:nth-child(10) { height: 80%; }
.wa-voice-bars span:nth-child(11) { height: 95%; }
.wa-voice-bars span:nth-child(12) { height: 55%; }
.wa-voice-bars span:nth-child(13) { height: 70%; }
.wa-voice-bars span:nth-child(14) { height: 40%; }

.wa-voice-btn.is-playing ~ .wa-voice-body .wa-voice-bars span {
  background: #53bdeb; /* Blue when playing */
}

.wa-voice-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #667781;
}

.wa-voice-dl {
  color: #027eb5;
  text-decoration: none;
}

.wa-voice-dl:hover {
  text-decoration: underline;
}

/* Image Card */
.wa-image-card {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
  max-width: 340px;
  position: relative;
}

.wa-image-thumb {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.wa-image-meta {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
}

/* WhatsApp Composer Bottom Bar */
.wa-composer-wrap {
  background: #f0f2f5 !important;
  border-top: 1px solid #d1d7db !important;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}

.wa-composer-bar {
  padding: 8px 16px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  box-sizing: border-box;
}

.wa-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #54656f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
  padding: 0;
}

.wa-tool-btn:hover {
  background: #e9edef;
  color: #111b21;
}

.wa-tool-btn.is-recording {
  background: #fee2e2;
  color: #ef4444;
  animation: pulse-red 1.4s infinite;
}

.wa-input-pill {
  flex: 1;
  min-height: 42px;
  background: #ffffff;
  border-radius: 20px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.wa-input-pill textarea {
  width: 100% !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  line-height: 20px !important;
  color: #111b21 !important;
  resize: none !important;
  min-height: 20px !important;
  max-height: 140px !important;
  overflow-y: hidden;
  box-sizing: border-box;
}

.wa-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e25822; /* Infini brand orange */
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(226, 88, 34, 0.35);
  padding: 0;
}

.wa-send-btn:hover:not(:disabled) {
  background: #c84132;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(226, 88, 34, 0.45);
}

.wa-send-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.wa-send-btn:disabled {
  background: #d1d7db;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.wa-staged-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 0;
  background: #f0f2f5;
}

.wa-recording-bar {
  margin: 8px 16px 0 !important;
  background: #ffffff !important;
  border: 1px solid #fee2e2 !important;
  border-radius: 12px !important;
}



