:root:not([data-restored]){--background:#f7f8f5;--surface:#fff;--surface-secondary:#ebefee;--text-primary:#171c1e;--text-secondary:#565e62;--border:#d9dedb;--button-primary:#2149d8;--button-secondary:#fff;--on-accent:#fff;--on-orange:#171c1e;--inverse-surface:#171c1e;--inverse-text:#fff}
:root:not([data-restored])[data-theme=dark]{--background:#101517;--surface:#1c2428;--surface-secondary:#252f34;--text-primary:#f2f5f6;--text-secondary:#b5c0c5;--border:#46545b;--button-primary:#4167e8;--button-secondary:#27343a;--ink:var(--text-primary);--paper:var(--background);--white:var(--surface);--muted:var(--text-secondary);--line:var(--border);--soft:var(--surface-secondary);--blue:#274dc8;--blue-dark:#2343aa}
.theme-toggle{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:52px;min-height:44px;padding:8px 12px;border:1px solid var(--border);border-radius:24px;color:var(--text-primary);background:var(--surface);font:600 13px/1.2 Manrope,Arial,sans-serif;cursor:pointer}.theme-toggle[aria-pressed=true]{border-color:var(--accent,#ff8b4a)}.theme-toggle:focus-visible{outline:3px solid var(--accent,#ff8b4a);outline-offset:3px}.nav-inner{gap:16px}.restored-theme{position:fixed;right:16px;top:84px;z-index:60}
html:not([data-restored]) .btn:not(.light):not(.orange):not(.outline){color:var(--on-accent)}html:not([data-restored]) .btn.orange{color:var(--on-orange)}html:not([data-restored]) .hero,html:not([data-restored]) .hero h1 em,html:not([data-restored]) .image-card,html:not([data-restored]) .blue:not(.page-head),html:not([data-restored]) .intro-stat:last-child{color:var(--inverse-text)}html:not([data-restored]) .dark,html:not([data-restored]) .footer{background:var(--inverse-surface);color:var(--inverse-text)}[data-theme=dark] .nav-side a:last-child{background:var(--surface-secondary);color:var(--text-primary)}[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select{color:var(--text-primary);background-color:var(--surface)}
.journey h2{max-width:1100px}.journey-intro{font-size:20px;max-width:1080px;margin-top:24px}.evolution{padding-top:64px}.evolution-grid{display:grid;grid-template-columns:1fr 48px 1fr;gap:24px;align-items:stretch;margin-top:32px}.evolution-grid article{padding:32px;border:1px solid #ffffff26;border-radius:16px;background:#ffffff08}.evolution-grid article p{color:#e1e6e8;margin-top:16px}.evolution-grid .phase{font-style:italic;color:#acbac2;margin-top:8px}.evolution-arrow{align-self:center;text-align:center;font-size:40px;color:var(--accent)}.legacy-line{margin-top:32px;text-align:center;font-size:24px;color:#fff}.service-list{margin-top:48px}.service-row{display:grid;grid-template-columns:48px 1fr 1.15fr;gap:32px;padding:32px 0;border-top:1px solid var(--line);scroll-margin-top:112px}.service-row h3{font-size:28px}.text-link{display:inline-block;margin-top:20px;border-bottom:1px solid currentColor;font-size:14px}.service-group:nth-of-type(even){background:var(--soft)}
@media(max-width:760px){.nav-inner{gap:8px}.theme-toggle{min-width:44px;padding:8px}.nav .logo img{max-width:108px}.evolution-grid{grid-template-columns:1fr;gap:16px}.evolution-arrow{transform:rotate(90deg)}.service-row{grid-template-columns:32px 1fr;gap:16px}.service-row>div{grid-column:2}.service-row h3{font-size:24px}.journey-intro{font-size:18px}.evolution-grid article{padding:24px}.legacy-line{font-size:20px}.restored-theme{top:76px}}
@media(prefers-reduced-motion:no-preference){body,.nav,.theme-toggle,input,textarea,select{transition:background-color .2s,color .2s,border-color .2s}}

html[data-restored]{--text-primary:#171c1e;--surface:#fff;--border:#d9dedb}html[data-restored][data-theme=dark]{--text-primary:#f2f5f6;--surface:#1c2428;--border:#46545b}html[data-restored=construction][data-theme=dark]{--background:#101517;--foreground:#f2f5f6;--card:#1c2428;--card-foreground:#f2f5f6;--popover:#1c2428;--popover-foreground:#f2f5f6;--primary:#ff7b36;--primary-foreground:#171c1e;--muted:#252f34;--muted-foreground:#b5c0c5;--accent:#ff7b36;--accent-foreground:#171c1e}

html:not([data-restored]) .cta{background:var(--inverse-surface);color:var(--inverse-text)}html:not([data-restored]) .cap-card:nth-child(2){color:var(--inverse-text)}
html[data-restored=construction][data-theme=dark]{--color-white:#fff;--color-slate-900:#f2f5f6;--color-slate-800:#e2e8ed;--color-slate-700:#cbd5dd;--color-slate-600:#b5c0c5;--color-slate-500:#a9b7bf;--color-gray-900:#f2f5f6;--color-gray-700:#cbd5dd;--color-gray-600:#b5c0c5;--color-gray-500:#a9b7bf;--color-gray-100:#252f34;--color-gray-200:#46545b;--color-slate-200:#46545b}
html[data-restored=construction][data-theme=dark] :is(.bg-white,.bg-gray-50,.bg-slate-50,[class~="bg-[#f8fafc]"]){background-color:var(--surface)}html[data-restored=construction][data-theme=dark] .bg-slate-100{background-color:#252f34}html[data-restored=construction][data-theme=dark] [class~=from-white]{--tw-gradient-from:var(--background)}html[data-restored=construction][data-theme=dark] header{background:var(--surface)}
html:not([data-restored])[data-theme=dark] .page-head .eyebrow{color:#91aaff}
html[data-restored=construction] .restored-theme{top:28px;right:12px}html[data-restored=construction] header>div{padding-right:84px}@media(max-width:760px){html[data-restored=construction] .restored-theme{top:20px;right:12px}}
html[data-restored=construction]{overflow-x:clip}html[data-restored=construction][data-theme=dark] .text-charcoal{color:var(--foreground)}html[data-restored=construction][data-theme=dark] header>div{background-color:var(--surface)!important}html[data-restored=construction][data-theme=dark] [class~="text-charcoal/70"]{color:var(--muted-foreground)}
/* Show the hero immediately while retaining the restored controls and section motion. */
html[data-restored=construction] header,html[data-restored=construction] section:first-of-type>.container>.grid>div{opacity:1!important;transform:none!important}
/* Construction: accessible on/off switch with a 44px touch target. */
html[data-restored=construction] .restored-theme{width:56px;min-width:56px;height:44px;min-height:44px;padding:0;border:0;background:transparent;box-shadow:none}
html[data-restored=construction] .restored-theme::before{content:"";position:absolute;inset:8px 0;border-radius:999px;background:#64748b;box-shadow:inset 0 0 0 1px #0002}
html[data-restored=construction] .restored-theme::after{content:"";position:absolute;left:3px;top:11px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;transform:translateX(0)}
html[data-restored=construction][data-theme=dark] .restored-theme::before{background:#e75f00}
html[data-restored=construction][data-theme=dark] .restored-theme::after{transform:translateX(28px)}
@media(prefers-reduced-motion:no-preference){html[data-restored=construction] .restored-theme::before{transition:background-color .2s}html[data-restored=construction] .restored-theme::after{transition:transform .2s}}
@media(forced-colors:active){html[data-restored=construction] .restored-theme::before{border:1px solid ButtonText}html[data-restored=construction] .restored-theme::after{background:ButtonText}}
/* Header/footer refinement: shared pill switch, centered nav, bottom crop. */
html .theme-toggle,html header .premium-theme,html[data-restored=construction] .restored-theme{position:relative;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:24px;background:transparent;box-shadow:none;cursor:pointer}
html .theme-toggle::before,html header .premium-theme::before,html[data-restored=construction] .restored-theme::before{content:"";position:absolute;inset:10px 0;border-radius:999px;background:#7b838b;box-shadow:inset 0 0 0 1px #0000000d}
html .theme-toggle::after,html header .premium-theme::after,html[data-restored=construction] .restored-theme::after{content:"";position:absolute;left:3px;top:13px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transform:translateX(0)}
html[data-theme=dark] .theme-toggle::before,html[data-theme=dark] header .premium-theme::before,html[data-restored=construction][data-theme=dark] .restored-theme::before{background:#0f2d44}
html[data-theme=dark] .theme-toggle::after,html[data-theme=dark] header .premium-theme::after,html[data-restored=construction][data-theme=dark] .restored-theme::after{transform:translateX(20px)}
html header .premium-theme>svg{display:none}
html .theme-toggle:focus-visible,html header .premium-theme:focus-visible{outline:3px solid var(--accent,#ff8b4a);outline-offset:3px}
html[data-restored=construction] .restored-theme{position:fixed;top:28px;right:12px}
html:not([data-restored]) .nav-inner{position:relative;gap:0}
html:not([data-restored]) .nav-side{margin-left:auto}
html:not([data-restored]) .nav-inner>.theme-toggle{margin-left:20px}
@media(min-width:1024px){html:not([data-restored]) .nav #primary-nav{position:absolute;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 620px);justify-content:center;gap:16px}html:not([data-restored]) .nav #primary-nav a{white-space:nowrap}}
@media(max-width:1023px){html:not([data-restored]) .menu-toggle{margin-left:auto}html:not([data-restored]) .nav #primary-nav{transform:none}}
html footer,html:not([data-restored]) .footer{position:relative;isolation:isolate;overflow:hidden;padding-bottom:clamp(104px,18vw,270px)}
html footer::after{content:"TendXP";position:absolute;left:0;right:0;bottom:-.36em;display:block;text-align:center;font-size:clamp(112px,29vw,440px);font-weight:550;letter-spacing:-.075em;line-height:1;white-space:nowrap;color:currentColor;opacity:.085;pointer-events:none;user-select:none;z-index:-1}
html footer .footer-word{display:none}
@media(max-width:767px){html[data-restored=construction] .restored-theme{top:20px}html footer,html:not([data-restored]) .footer{padding-bottom:clamp(104px,21vw,160px)}}
@media(prefers-reduced-motion:no-preference){html .theme-toggle::before,html header .premium-theme::before{transition:background-color .18s}html .theme-toggle::after,html header .premium-theme::after{transition:transform .18s cubic-bezier(.2,.8,.2,1)}}
@media(forced-colors:active){html .theme-toggle::before,html header .premium-theme::before{border:1px solid ButtonText}html .theme-toggle::after,html header .premium-theme::after{background:ButtonText}}
/* Compact medium-sized header destination controls. */
html:not([data-restored]) .nav-side a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;font-size:14px;line-height:22px}
/* Homepage hero CTA uses the Construction section blue. */
html:not([data-restored]) .hero .actions a.btn.orange[href="/projects"]{background:var(--blue);color:#fff}
/* Shared CTA and semantic theme palette. Construction blue is the single source. */
:root{--construction-blue:#2149d8;--blue:var(--construction-blue);--cta:var(--construction-blue);--cta-hover:#1537ac;--on-cta:#fff;--theme-card:var(--surface,#fff);--theme-input:var(--surface,#fff);--text-muted:var(--text-secondary,#565e62);--icon:var(--text-primary,#171c1e)}
html:not([data-restored])[data-theme=dark],html[data-restored][data-theme=dark]{--background:#101719;--surface:#1b252a;--surface-secondary:#243138;--theme-card:#202c32;--theme-input:#162126;--border:#43555e;--text-primary:#f2f5f6;--text-secondary:#bdc9cf;--text-muted:#9eafb8;--icon:#d9e3e8;--inverse-surface:#172126;--inverse-text:#f2f5f6;--blue:var(--construction-blue);--cta:var(--construction-blue);--cta-hover:#1537ac}
html:not([data-restored]) .btn.orange,html:not([data-restored]) .hero .actions a.btn.orange[href="/projects"]{background:var(--cta);color:var(--on-cta)}
html:not([data-restored]) .btn.orange:hover{background:var(--cta-hover)}
html[data-restored=construction] :is(a,button)[class~=bg-safety-orange]:not([class~=h-2\.5]){background-color:var(--cta);color:var(--on-cta)}
html[data-restored=construction] :is(a,button)[class~=bg-safety-orange]:hover{background-color:var(--cta-hover)}
html[data-theme=dark]:not([data-restored]){--ink:var(--text-primary);--paper:var(--background);--white:var(--surface);--muted:var(--text-secondary);--soft:var(--surface-secondary);--line:var(--border)}
html[data-theme=dark]:not([data-restored]) :is(.detail-card,.form,.feature-copy){background:var(--theme-card);color:var(--text-primary);border-color:var(--border)}
html[data-theme=dark]:not([data-restored]) :is(button,input,textarea,select){color:var(--text-primary)}
html[data-theme=dark]:not([data-restored]) :is(input,textarea,select){background:var(--theme-input);border-color:var(--border)}
html[data-theme=dark]:not([data-restored]) :is(.project-hero,.filters button.active,.service-nav a:hover){color:#fff}
html[data-theme=dark]:not([data-restored]) .btn:not(.light):not(.outline){color:#fff}
html[data-theme=dark]:not([data-restored]) .client-logos img{mix-blend-mode:normal;background:#fff;border-radius:8px;padding:8px}
html[data-theme=dark]:not([data-restored]) .footer .logo span{color:inherit}
html[data-theme=dark]:not([data-restored]) .nav-side a:last-child{border-color:var(--border)}
html[data-theme=dark] .theme-toggle::before{box-shadow:inset 0 0 0 1px var(--border)}
/* Restored construction: map utility surfaces without changing light-mode tokens. */
html[data-restored=construction][data-theme=dark]{--foreground:var(--text-primary);--card:var(--theme-card);--card-foreground:var(--text-primary);--popover:var(--surface);--popover-foreground:var(--text-primary);--muted:var(--surface-secondary);--muted-foreground:var(--text-secondary);--input:var(--border);--color-charcoal:#152128;--color-slate-900:#152128;--color-slate-800:#202e36;--color-slate-700:#cbd5dd;--color-slate-600:var(--text-secondary);--color-slate-500:var(--text-muted);--color-slate-200:var(--border);--color-gray-200:var(--border);--color-gray-100:var(--surface-secondary)}
html[data-restored=construction][data-theme=dark] :is(.text-slate-900,.text-slate-800,.text-gray-900,.text-charcoal){color:var(--text-primary)}
html[data-restored=construction][data-theme=dark] :is(.bg-gray-50,.bg-slate-50,[class~="bg-[#f8fafc]"]){background-color:var(--background)}
html[data-restored=construction][data-theme=dark] :is(.bg-white,.bg-gray-100,.bg-slate-100){background-color:var(--surface)}
html[data-restored=construction][data-theme=dark] [class~="bg-white/70"],html[data-restored=construction][data-theme=dark] [class~="bg-white/80"],html[data-restored=construction][data-theme=dark] [class~="bg-slate-50/50"]{background:var(--surface-secondary)}
html[data-restored=construction][data-theme=dark] :is(input,textarea,[role=combobox]){background:var(--theme-input);color:var(--text-primary);border-color:var(--border)}
html[data-restored=construction][data-theme=dark] [class*=border-slate],html[data-restored=construction][data-theme=dark] [class*=border-gray]{border-color:var(--border)}
html[data-restored=construction][data-theme=dark] .absolute.rounded-full[class*=blur-]{display:none}
html[data-restored=construction][data-theme=dark] .pointer-events-none.absolute[class*=to-transparent]{display:none}

html[data-restored=construction][data-theme=dark] [class~=bg-orange-100]{background:var(--surface-secondary);color:var(--text-primary)}
html[data-restored=construction][data-theme=dark] [class*=shadow-orange],html[data-restored=construction][data-theme=dark] [class*=shadow-safety-orange]{--tw-shadow-color:transparent}
.process-sequence{font-size:clamp(1.6rem,3vw,2.7rem);line-height:1.4;overflow-wrap:anywhere}.process-sequence+p{max-width:900px}.page-head p{overflow-wrap:break-word}
.hero:has(.hero-bottom p){height:auto;min-height:calc(100svh - 112px)}
@media(max-width:767px){.hero:has(.hero-bottom p){min-height:720px}.process-sequence{font-size:1.6rem}.project-hero h1{overflow-wrap:break-word}}
html[data-restored=construction][data-theme=dark] [class~="bg-slate-50/40"]{background-color:var(--surface-secondary)}
html[data-restored=construction][data-theme=dark] [class*="hover:bg-slate-50"]:hover{background-color:var(--theme-card)}
html[data-restored=cafes] :is(a,button).bg-brand{background-color:var(--cta);color:var(--on-cta)}
html[data-restored=cafes] :is(a,button).bg-brand:hover{background-color:var(--cta-hover)}
html[data-restored=construction] #contact .grid>div{min-width:0}
html[data-restored=construction] #contact [role=combobox]{min-width:0;max-width:100%}

/* Final targeted dark-mode cleanup. Filters preserve each approved logo's alpha and geometry. */
html[data-theme=dark] :is(.nav .logo img,header .tendxp-logo,header img[src*="tendxp-logo"],footer img[src*="tendxp"]){filter:brightness(0) invert(1);background:transparent;border-radius:0}
/* Ticker edge overlays created rectangular blocks in both themes. */
html[data-restored=construction] .pointer-events-none.absolute[class*=to-transparent]{display:none}
html[data-restored=construction] .relative:has(> .w-max) {background:transparent}
html[data-restored=construction] .w-max img{background:transparent}
/* Scope comparison colours to its existing card; keep its grids, dimensions and rhythm. */
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"]:has([class~="grid-cols-[1.7fr_0.65fr_0.65fr]"]){
 --comparison-success:#62cc92;--comparison-success-surface:#173a2c;
 --comparison-danger:#f08a8a;--comparison-danger-surface:#42272e;
 --comparison-accent:#ffab70;
 background:var(--surface);border-color:var(--border)
}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"]:has([class~="grid-cols-[1.7fr_0.65fr_0.65fr]"]) > .grid{background:linear-gradient(110deg,var(--surface),var(--surface-secondary));color:var(--text-primary);border-color:var(--border)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] :is(.text-slate-300,.text-slate-600,.text-slate-500){color:var(--text-secondary)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] [class~="bg-orange-500/95"]{background:var(--surface-secondary);box-shadow:inset 0 0 0 1px var(--comparison-accent);color:var(--text-primary)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] :is(.text-orange-600,.text-orange-300){color:var(--comparison-accent)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] .text-orange-50{color:var(--text-secondary)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] .bg-green-100{background:var(--comparison-success-surface)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] .text-green-600{color:var(--comparison-success)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] .bg-red-100{background:var(--comparison-danger-surface)}
html[data-restored=construction][data-theme=dark] [class~="rounded-[30px]"] .text-red-500{color:var(--comparison-danger)}

/* Migration rules */
[hidden]{display:none!important}
.next-mobile-nav{position:absolute;top:100%;left:0;right:0;padding:16px 24px;background:var(--surface,#fff);border-bottom:1px solid var(--border,#ddd);z-index:70}
.next-mobile-nav a{display:block;padding:10px 0;color:var(--text-primary,inherit)}
html[data-restored=construction] [data-ticker]{animation:tendxp-ticker 22s linear infinite}
@keyframes tendxp-ticker{to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){html[data-restored=construction] [data-ticker]{animation:none}}
html[data-restored=construction] select{appearance:auto;min-width:0;max-width:100%;padding-right:12px}
html[data-restored=construction] body{overflow-x:clip}
html[data-restored=cafes] button:disabled{cursor:not-allowed;opacity:.4}

/* Form status messages */
.form-status{margin-top:16px;padding:12px 16px;border-radius:8px;font-size:14px;line-height:1.5}
.form-status.is-success{background:rgba(34,197,94,0.15);color:#15803d;border:1px solid rgba(34,197,94,0.3)}
.form-status.is-error{background:rgba(239,68,68,0.15);color:#b91c1c;border:1px solid rgba(239,68,68,0.3)}
[data-theme=dark] .form-status.is-success{color:#4ade80;background:rgba(34,197,94,0.2)}
[data-theme=dark] .form-status.is-error{color:#f87171;background:rgba(239,68,68,0.2)}

/* 768px fixes */
@media(max-width:1023px){
  #pricing .container{overflow-x:clip;padding-top:1.5rem;padding-bottom:1.5rem}
}
@media(min-width:768px) and (max-width:1023px){
  .service-showcase .cards{grid-template-columns:1fr;gap:var(--s6)}
  .service-showcase .image-card{min-height:400px}
}

/* Modal / menu backdrop scroll lock */
body.menu-open{overflow:hidden}

/* Keyboard accessibility for cafe menu carousel */
[aria-label="Signature menu"]:focus-visible{outline:2px solid var(--brand,#ff8b4a);outline-offset:2px}
