/* Reference tokens only: adapt to the existing app architecture. */
[data-theme="dark"] {
  color-scheme: dark;
  --np-canvas: #071321;
  --np-nav: #0A192B;
  --np-surface: #10243B;
  --np-raised: #17334F;
  --np-text: #F1F6FF;
  --np-muted: #ACC0D6;
  --np-subtle: #94ABC3;
  --np-border: #355472;
  --np-controlBorder: #7595B5;
  --np-blue: #70B5FF;
  --np-gold: #E7BE6A;
  --np-goldInk: #201807;
  --np-teal: #70DCCB;
  --np-warning: #F2C775;
  --np-danger: #FF9FAD;
  --np-focus: #9ACEFF;
  --np-grid: #28425D;
  --np-heroEnd: #173E66;
}
[data-theme="light"] {
  color-scheme: light;
  --np-canvas: #F1F5FA;
  --np-nav: #FFFFFF;
  --np-surface: #FFFFFF;
  --np-raised: #E6EFF9;
  --np-text: #142A43;
  --np-muted: #435D77;
  --np-subtle: #526A81;
  --np-border: #C1CFDD;
  --np-controlBorder: #6A8198;
  --np-blue: #175DB3;
  --np-gold: #916313;
  --np-goldInk: #201807;
  --np-teal: #126C62;
  --np-warning: #805810;
  --np-danger: #B12645;
  --np-focus: #175DB3;
  --np-grid: #DCE5EE;
  --np-heroEnd: #DDEBFA;
}

:root { --np-sidebar:264px; --np-gap:24px; --np-radius:16px; --np-font:Inter,system-ui,sans-serif; }
:root[data-theme] {
  --bg:var(--np-canvas); --side:var(--np-nav); --surface:var(--np-surface);
  --surface2:var(--np-raised); --surface3:var(--np-raised); --border:var(--np-border);
  --border2:var(--np-border); --text:var(--np-text); --muted:var(--np-muted);
  --subtle:var(--np-subtle); --gold:var(--np-gold); --gold2:var(--np-gold);
  --teal:var(--np-teal); --danger:var(--np-danger);
  --shadow:0 8px 28px #00000026;
}
:root[data-theme="light"] { --shadow:0 8px 28px #18324b0d; }
@media screen {
body {color:var(--text);background:var(--bg);font-family:var(--np-font);font-variant-numeric:tabular-nums}
.shell {grid-template-columns:264px minmax(0,1fr)}
.app-main,.topbar {background:var(--bg)}
.sidebar {width:auto;overflow-y:auto;background:var(--side);height:100dvh}
.brand img,.orbital-center {box-shadow:none;text-shadow:none}
.brand strong,#geo-areas button,.login-panel input {color:var(--text)}
.nav-link {min-height:44px;font-size:14px}
.nav-link.selected,.nav-link:hover,.workspace-switch,.button.ghost,.bottom-strip,.model-results,.dossier-headline,.event-metrics,.accounts-table-head {background:var(--np-raised)}
.nav-link.selected {color:var(--gold)}
.nav-link.selected::before {top:6px;bottom:6px;width:3px}
.nav-heading,.updated,.eyebrow.muted,.kpi-top,.side-status,.crumb {color:var(--np-subtle)}
.status-dot {display:none}
.topbar {min-height:72px;height:auto;padding:12px 40px;flex-wrap:wrap}
.top-actions {flex-wrap:wrap;gap:8px}.updated {display:flex}
main {padding:32px 40px;max-width:1640px}
.button,button.preset-btn,input:not([type=range]),select,.close-button {min-height:44px}
.button {font-size:14px;white-space:normal}
.button.small {font-size:12px}
.button.gold,.button.primary,.button.gold:hover {background:#e7be6a;color:#201807;border-color:#916313}
.button.gold:hover {background:#efcd88}
.button.outline,.button.ghost,.preset-btn,input:not([type=range]),select,.search-field,.select-field {border:1px solid var(--np-controlBorder);color:var(--text);background:var(--surface);border-radius:8px}
input:not([type=range]),select {max-width:100%;padding:8px 10px}
.search-field input,.select-field select {border:0;background:transparent}
.button.ghost[aria-pressed=true],.preset-btn.active {color:var(--gold);border-color:var(--gold);background:var(--np-raised)}
/* Only keyboard navigation adds a focus cue. Route headings also receive focus on load. */
:focus-visible {outline:none!important}
html.keyboard-navigation :is(button,a,summary,[role=button]):focus-visible {text-decoration:underline;text-decoration-color:var(--gold2);text-underline-offset:3px}
html.keyboard-navigation :is(input,select,textarea,button:has(svg:only-child),.kpi-drill):focus-visible {box-shadow:inset 0 -3px var(--gold2)}
.hero {min-height:268px;border-radius:20px;background:linear-gradient(112deg,var(--surface),var(--np-heroEnd));border-color:var(--border)}
.hero-copy {max-width:730px;padding:32px}
.hero h1,.view-heading h1 {font-size:clamp(32px,3.5vw,52px);line-height:1.08}
.hero h1 {margin:12px 0}
.hero p,.view-heading p {font-size:16px;line-height:1.5;color:var(--muted)}
.hero-sheen,.hero::before,.hero-orbit.b::before {display:none}
.hero-graphic {height:235px;min-width:220px;width:235px;margin:0 38px 0 0}
.hero-orbit.a,.hero-orbit.b,.hero-orbit.c {width:49%;height:auto;aspect-ratio:1;border:1px solid color-mix(in srgb,var(--np-blue) 45%,transparent);transform:none}
.hero-orbit.b {width:74%}.hero-orbit.c {width:100%}
.hero-graphic::before,.hero-graphic::after {position:absolute;content:"";width:110%;height:1px;background:color-mix(in srgb,var(--np-blue) 25%,transparent)}
.hero-graphic::after {transform:rotate(90deg)}
.orbital-center,.orbital-note {position:relative;z-index:1;color:var(--gold)}
.orbital-note {position:absolute;inset:61% 0 auto;text-align:center;font-size:9px;color:var(--muted)}
.disclosure {background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--np-warning);border-radius:12px;padding:16px}
.disclosure p,.kpi p,.panel-foot,.source-card p,.rank-item small,.view .scope-note {font-size:14px;color:var(--muted)}
.disclosure strong {color:var(--text)}
.panel,.kpi,.step,.source-card,.event-source-card,.login-panel {border-radius:16px;background:var(--surface);border-color:var(--border);box-shadow:var(--shadow)}
.panel,.kpi {padding:24px}
.kpi-grid,.overview-grid,.market-grid,.sim-grid {gap:24px}
.kpi-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
.kpi-top,.eyebrow,.overline,.panel-foot,.map-footer,.source-meta,.review-date,.scenario-label,.scenario-val {font-size:12px}
.kpi strong {font-size:36px}.kpi:nth-child(2) strong {color:var(--np-blue)}
.overview-grid {grid-template-columns:minmax(0,7fr) minmax(0,5fr);margin:24px 0}
.panel-title-row {flex-wrap:wrap}.rank-item strong {white-space:normal;font-size:14px}
.bar-track,.scenario-track {background:var(--np-grid)}.bar-track {height:10px}
.bar-fill {background:linear-gradient(90deg,var(--np-blue),var(--np-teal))}
.scenario-fill,.score-meter i {background:var(--np-blue)}
.bar-row span {font-size:14px;color:var(--text)}
.rank-score,.rank-no,.orbital-center,.mini-icon {color:var(--gold)}
.preset-row,.hero-buttons {flex-wrap:wrap}
.numeric-control {width:100px;display:block;margin:8px 0}
.disclosure,.bottom-strip,.panel,.event-card,.kpi,.view-heading {overflow-wrap:break-word}
.dossier-header,.dossier,.event-return-grid article,.playbook-caution,.result-caveat {background:var(--surface);color:var(--text)}
.geo-legend {color:var(--gold)}.geo-legend span:nth-child(2){color:var(--teal)}.geo-legend span:nth-child(3){color:var(--muted)}
.shortlist {margin:auto;max-width:1020px}.shortlist article {background:var(--surface);border:1px solid var(--border)}.shortlist a,.shortlist small {color:var(--gold)}
.mobile-nav,#open-menu,#close-menu {display:none}
@media (max-width:1439px){main {padding:32px}.topbar{padding-inline:32px}}
@media (max-width:1199px){.shell{grid-template-columns:240px minmax(0,1fr)}main{padding:24px}.topbar{padding-inline:24px}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-grid,.market-grid,.sim-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:899px){
.shell{display:block}.sidebar{display:none}.menu-open .sidebar{position:fixed;display:flex;inset:0 auto 0 0;width:min(304px,88vw);z-index:50}
.menu-open{overflow:hidden}#nav-shade{position:fixed;inset:0;background:#07132199;z-index:49}
#open-menu,#close-menu,.top-actions .ghost{display:inline-flex}#close-menu{align-self:flex-end;margin-bottom:12px}
.mobile-brand{display:flex;align-items:center;gap:8px;margin-right:auto}.mobile-brand small{display:block;font-size:12px;color:var(--muted)}
.crumb{display:none}.footer{padding-bottom:24px}.hero-graphic{display:none}
}
@media (max-width:599px){
main {padding:16px}.topbar{padding:12px 16px;gap:12px}.top-actions{width:100%;gap:6px}.updated{width:100%;font-size:10px}
.top-actions .button{flex:1;padding:8px 5px;font-size:12px;min-height:44px}
.kpi-grid,.filter-row{grid-template-columns:minmax(0,1fr)}.kpi-grid,.overview-grid{gap:16px}
.hero-copy,.panel,.kpi{padding:20px}.hero{min-height:0}.hero-buttons{display:grid;grid-template-columns:minmax(0,1fr)}
.hero h1{font-size:36px}.hero p{font-size:15px}.eyebrow{flex-wrap:wrap}
.geo-layout,.two-up,.source-list{grid-template-columns:minmax(0,1fr)}.bar-row span{font-size:12px}.select-field select{max-width:65%}
}
}
@media print {
  #open-menu,#close-menu,#nav-shade {display:none!important}
  .shell {display:block!important}
  .sidebar,.topbar,.hero-graphic,.footer,.loading-state,.numeric-control {display:none!important}
  .view.active,.view.active .disclosure {display:block!important}
  main {padding:0}
  .view.active *:not(svg *) {color:#142a43!important;background-color:white!important;background-image:none!important;box-shadow:none!important}
  .view.active .bar-fill,.view.active .scenario-fill {background:#396891!important;print-color-adjust:exact}
  .view.active .overview-grid,.view.active .geo-layout,.view.active .market-grid,.view.active .sim-grid {display:block}
  .panel,.kpi {break-inside:auto}
}
@media screen {
  .brazil-map .city-label {fill:#fff;paint-order:stroke;stroke:#18354d;stroke-width:3px;stroke-linejoin:round}
  .view {animation-duration:140ms}
  .shortlist {padding:24px}.shortlist article{padding:20px;border-radius:16px;margin:16px 0}
  .menu-open .sidebar-bottom {flex-shrink:0}
}

/* Executive workspace, matched to the photographic industrial reference. */
[data-theme=dark] {
  --np-canvas:#001329;--np-nav:#03172b;--np-surface:#061f38;--np-raised:#0b3150;
  --np-gold:#ffca62;--np-blue:#49baff;--np-border:#175582;--np-grid:#183f63;
  --panel-top:#092b49;--panel-bottom:#02172d;--edge:#2b9dd6;--glint:#309eff35;
  --hero-wash:#021831;--hero-fade:#02183100;--chrome:#061e36;
}
[data-theme=light] {
  --np-canvas:#f3f7fd;--np-nav:#edf4fc;--np-surface:#fff;--np-raised:#e5f0fd;
  --np-gold:#875300;--np-blue:#075ebc;--np-border:#bacfe8;--np-grid:#cfdded;
  --panel-top:#fff;--panel-bottom:#f4f8ff;--edge:#8bbcf0;--glint:#197ee319;
  --hero-wash:#f7faff;--hero-fade:#f7faff00;--chrome:#f9fbff;
}
@media screen {
.shell{grid-template-columns:clamp(200px,17vw,254px) minmax(0,1fr)}
.app-main{background:radial-gradient(ellipse at 82% 0,var(--glint),transparent 44%),var(--bg)}
main{padding:16px clamp(16px,1.8vw,32px) 32px}
.sidebar{background:linear-gradient(155deg,var(--chrome),var(--side) 62%);border-right:1px solid var(--np-border);padding:22px 14px}
.topbar{padding:8px clamp(16px,1.8vw,32px);min-height:58px;background:var(--chrome)}
.button.gold,.button.primary{background:linear-gradient(180deg,#ffe09a,#f5ba48);border-color:#e0a840;color:#231700;box-shadow:0 2px 8px #c891201f}
.nav-link.selected{background:linear-gradient(100deg,var(--np-raised),var(--np-surface));box-shadow:inset 0 0 0 1px var(--edge),inset 0 2px 12px var(--glint);color:var(--gold)}
[data-theme=light] .nav-link.selected{background:linear-gradient(90deg,#ffedc6,#fae1ad);color:#423219}
.workspace-switch,.panel,.kpi,.step,.source-card{background:linear-gradient(155deg,var(--panel-top),var(--panel-bottom));border:1px solid var(--np-border);box-shadow:0 3px 9px var(--glint);border-radius:12px}
[data-theme=dark] :is(.kpi,.exec-analysis>.panel,.exec-foot>.panel){border-top-color:var(--edge)}
.hero{border-radius:12px;border-color:var(--np-border);min-height:210px;background-color:var(--hero-wash);background-image:linear-gradient(90deg,var(--hero-wash) 10%,var(--hero-wash) 45%,var(--hero-fade) 72%),url('/steel-banner.jpg');background-size:100% 100%,auto 128%;background-position:center,right center;background-repeat:no-repeat}
.hero-copy{padding:24px;max-width:78%}.hero h1{font-size:clamp(34px,3.15vw,55px);letter-spacing:-.055em;font-weight:730;margin:10px 0}.hero h1 em{white-space:nowrap}
.hero p{max-width:64ch;font-size:14px;line-height:1.5;margin-bottom:16px}.hero-buttons .button{min-height:38px;padding:8px 16px}
#view-overview .disclosure{margin:10px 0;padding:8px 12px;border-radius:7px}
#view-overview .disclosure p{font-size:12px;line-height:1.45}
.kpi-grid,.exec-analysis,.exec-foot{gap:12px}.kpi{position:relative;padding:16px 12px 14px 62px;min-height:106px}
.kpi strong{font-size:clamp(25px,2.35vw,40px);line-height:1.1;margin:5px 0}.kpi-top{font-size:10px;letter-spacing:.055em}.kpi p{font-size:12px;line-height:1.4}
.mini-icon{position:absolute;top:17px;left:13px;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--np-raised);color:var(--np-blue);font-size:21px;box-shadow:inset 0 0 0 1px var(--np-border)}
.kpi:nth-child(2){border-color:#bf9144;background:linear-gradient(145deg,color-mix(in srgb,var(--np-surface) 88%,#be8c34),var(--panel-bottom))}.kpi:nth-child(2) .mini-icon{color:var(--np-gold)}
.exec-analysis,.exec-foot,.state-products{display:grid;grid-template-columns:minmax(0,0.85fr) minmax(0,1.25fr);margin-top:14px;align-items:stretch}
.exec-foot{grid-template-columns:repeat(3,minmax(0,1fr))}
.exec-analysis>.panel,.exec-foot>.panel{padding:18px;min-width:0}
.exec-analysis h3,.exec-foot h3{font-size:18px;margin:5px 0 8px}
.brazil-map{height:240px;background:radial-gradient(ellipse at 53% 63%,var(--glint),transparent 65%);margin:0}
.brazil-map image{filter:drop-shadow(0 0 4px #168fe882)}.brazil-map .map-dot{fill:#ffd169;stroke:#a6690e;filter:drop-shadow(0 0 4px #ffb72d)}
.city-index summary,.state-product summary{font-size:13px;cursor:pointer;color:var(--np-blue);padding:7px 0}
.city-index .map-directory{margin:10px 0}.map-footer{font-size:11px}
.commercial h2{margin:5px 0 0;color:var(--np-gold);font-size:clamp(28px,3vw,50px);line-height:1.1}
.brief-presets{display:flex;border:1px solid var(--np-controlBorder);border-radius:20px;overflow:hidden}
.brief-presets button{border:0;padding:8px;background:transparent;color:var(--text);font-size:12px}
.brief-presets button[aria-pressed=true]{background:#f5c45a;color:#261704}
.chart-pair{display:grid;grid-template-columns:1.1fr 1fr;gap:14px;margin-top:18px}.chart-pair>div+div{border-left:1px solid var(--border);padding-left:14px}
.chart-pair h3{font-size:15px}.chart-pair small{color:var(--muted);font-size:11px}
#brief-bars{display:flex;gap:7px;align-items:end;justify-content:space-evenly;margin:19px 0 8px;background:repeating-linear-gradient(to top,transparent 0 30px,var(--np-grid) 31px 32px)}
#brief-bars div{display:grid;justify-items:center;min-width:0}#brief-bars b{font-size:12px}#brief-bars svg{width:100%;max-width:54px;height:108px;fill:#168eed}
#brief-bars small{font-size:10px;text-transform:capitalize;background:var(--np-surface);padding:3px 0}
#brief-origin{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:5px}#brief-origin svg{width:clamp(85px,7vw,117px);height:auto}#brief-origin text{fill:var(--text);font:700 16px system-ui}#brief-origin circle{fill:none;stroke:var(--slice);stroke-width:14;transform:rotate(-90deg);transform-origin:center}
.arc-0{--slice:#268eff}.arc-1{--slice:#f3b641}.arc-2{--slice:#16b591}.arc-3{--slice:#8676cd}
#brief-origin ul{padding:0;margin:0;list-style:none;flex:1}#brief-origin li{display:flex;align-items:center;gap:5px;font-size:11px;margin:5px 0}#brief-origin b{margin-left:auto}.swatch{background:var(--slice);width:7px;height:7px;border-radius:100%}
.exec-foot .rank-list{margin:3px 0 0}.exec-foot .rank-item{padding:8px 0;gap:6px;grid-template-columns:19px minmax(0,1fr) 25px 10px}.exec-foot .rank-score{font-size:16px}.exec-foot .rank-item small{font-size:11px}
.calendar-entry{display:grid;gap:4px;padding:11px 0;border-bottom:1px solid var(--border)}.calendar-entry span,.next-call p{font-size:13px;color:var(--muted)}
.next-call{border-color:#b18538}.next-call h3{font-family:Georgia,serif;font-style:italic;font-size:24px;line-height:1.2}
#buyer-state-strip{padding:12px 14px;border-radius:8px;background:var(--surface2);display:flex;align-items:center;gap:7px 12px;flex-wrap:wrap;margin-bottom:18px}#buyer-state-strip .eyebrow{width:100%}#buyer-state-strip span{font-size:13px;font-weight:600}
#buyer-trade{margin-top:26px;scroll-margin-top:20px}.state-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.state-volume{font-size:30px;color:var(--np-blue);display:block;margin-top:14px}
.state-product table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}.state-product caption{text-align:left;font-weight:700;margin:10px 0}.state-product th,.state-product td{text-align:right;padding:7px 3px;border-bottom:1px solid var(--border)}.state-product :is(th,td):first-child{text-align:left}.state-product th{font-size:11px}.state-product summary{margin-top:12px}
@media(max-width:1199px){.exec-analysis{grid-template-columns:1fr 1.2fr}.exec-foot{grid-template-columns:1fr 1fr}.next-call{grid-column:1/-1}.kpi{padding-left:54px}.hero-copy{max-width:75%}}
@media(max-width:899px){.shell{display:block}.exec-analysis{grid-template-columns:1fr 1.15fr}.topbar{padding:10px 16px}.chart-pair{gap:8px}.hero-copy{max-width:72%}.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.exec-analysis,.exec-foot,.state-products{grid-template-columns:1fr}.hero{background-size:100% 100%,auto 95%;background-position:center,top right;background-image:linear-gradient(90deg,var(--hero-wash) 4%,color-mix(in srgb,var(--hero-wash) 91%,transparent) 43%,var(--hero-fade) 110%),url('/steel-banner.jpg')}.hero-copy{max-width:100%;padding:18px}.hero p{max-width:74%;font-size:13px}.hero-buttons{display:flex;flex-direction:row;gap:6px}.hero-buttons .button{flex:1}.kpi{padding:12px;min-height:106px}.mini-icon{position:static;width:22px;height:22px;flex-shrink:0;font-size:14px}.kpi-top{font-size:9px}.kpi-grid{gap:8px}.kpi strong{font-size:27px}.kpi p{font-size:11px}.brief-presets button{font-size:11px}.state-product{padding:14px}.state-product table{font-size:12px}.hero h1{max-width:75%}}
@media(max-width:360px){.chart-pair{grid-template-columns:1fr}.chart-pair>div+div{border:0;padding:0}.hero h1{font-size:29px}.hero p{max-width:90%}}
}
@media print{.exec-analysis,.exec-foot,.state-products{display:block}.brief-presets{display:none}#brief-origin svg{width:130px}#brief-bars svg{width:20px;height:40px}#brief-origin circle{fill:none;stroke:#526e87;stroke-width:12}.state-product table{width:100%}}
.atlas-callout path{stroke:#c69330;stroke-width:1.7;fill:none}.atlas-callout rect{fill:var(--np-surface);stroke:var(--edge);stroke-width:1.5}.atlas-callout text{font:700 15px system-ui;fill:var(--gold)}.atlas-callout .atlas-city{font:14px system-ui;fill:var(--text)}
.bar-legend{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:11px;color:var(--muted)}.bar-legend span::before{content:"";display:inline-block;margin-right:4px;width:8px;height:8px;border-radius:2px;background:#168eed}.bar-legend span+span::before,#brief-bars .profit-bar{background:#f5c45a;fill:#f5c45a}
#buyer-state-strip .strip-product{flex:1 1 135px;display:grid;gap:4px;padding:4px 0}.strip-product b,.strip-product small{font-size:11px;color:var(--muted)}.strip-product strong{font-size:20px}.strip-product+ .strip-product{border-left:1px solid var(--border);padding-left:12px!important}
@media screen {
.hero {background:var(--hero-wash);isolation:isolate}
.hero::before {content:"";display:block;position:absolute;inset:0 0 0 auto;width:53%;z-index:0;background:url('/steel-banner.jpg') right center/cover no-repeat;mask-image:linear-gradient(90deg,transparent 0%,#000 38%)}
.hero-copy{position:relative}
[data-theme=light] .topbar .button.ghost {color:#142a43;background:#f8fbff;border-color:#9cb8d3}
[data-theme=light] .hero::before {mask-image:linear-gradient(90deg,transparent,#000 54%)}
@media(max-width:700px){.hero::before{width:70%;opacity:.46;mask-image:linear-gradient(90deg,transparent,#000 75%)}}
}

[data-theme=dark]{--wordmark:url('/nexoproof-official-dark.png')}
[data-theme=light]{--wordmark:url('/nexoproof-official-light.png')}
.official-logo{display:block;width:205px;max-width:100%;aspect-ratio:963/348;background:var(--wordmark) left center/contain no-repeat}
.mobile-brand .official-logo{width:clamp(140px,38vw,164px)}
@media(max-width:899px){.topbar .mobile-brand{display:grid;gap:2px}.mobile-brand small{font-size:10px}}

/* Composite the supplied wordmarks against the sidebar, including its gradient. */
.logo-filters {position:absolute;pointer-events:none}
[data-theme=light] :is(.brand-main,.official-logo) {filter:url(#logo-light-matte)}
[data-theme=dark] :is(.brand-main,.official-logo) {filter:url(#logo-dark-matte)}
.theme-switch {display:inline-grid;place-items:center;flex:0 0 40px;width:40px;height:44px;padding:0;background:transparent;border:0;color:var(--muted);border-radius:8px;cursor:pointer}
.theme-switch svg {width:17px;height:17px}
.theme-switch:hover {color:var(--text);background:var(--np-raised)}
[data-theme=dark] .theme-moon,[data-theme=light] .theme-sun {display:none}
