.cloud-card{max-width:470px;margin:55px auto;padding:30px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 45px #080c2020}.cloud-card h1{font-family:inherit;font-size:28px;margin:8px 0 12px}.cloud-card label{display:block;font-size:12px;font-weight:650;margin-top:15px}.cloud-card input{width:100%;border-radius:8px;margin:5px 0 0;min-height:44px}.cloud-card .tools{margin-top:20px}.cloud-card .tools button{flex:1}.cloud-card p{font-size:13px;color:var(--muted);line-height:1.7}.cloud-card [role=status]{margin-top:16px;color:var(--ink)}.cloud-badge{font-size:11px;font-weight:750;letter-spacing:.12em;color:var(--accent)}
#account-bar{max-width:1544px;margin:15px auto 0;padding:10px 16px;background:var(--surface);border:1px solid var(--line);border-radius:9px;display:flex;gap:9px;align-items:center;flex-wrap:wrap;font-size:12px}#account-email{font-weight:650}#account-role{color:var(--muted);margin-right:auto}.connection-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#a78bfa;margin-right:5px}.account-dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:15px;width:min(850px,94vw);max-height:85vh;padding:25px}.account-dialog::backdrop{background:#070a1bb0}.account-dialog .scroll{max-height:360px}.account-dialog .tools{margin:15px 0;align-items:end}.account-dialog label{display:block;font-size:12px}.account-dialog input[type=email]{min-width:240px}.saved-item{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid var(--line)}.cloud-spinner{width:26px;height:26px;border:3px solid var(--line);border-top-color:#a78bfa;border-radius:50%;animation:cloud-spin 1s linear infinite;margin-bottom:20px}@keyframes cloud-spin{to{transform:rotate(360deg)}}
@media(max-width:670px){.cloud-card{margin:24px 15px;padding:23px}#account-bar{margin:12px 14px 0}#account-bar button{font-size:11px}.account-dialog{padding:18px}.account-dialog input[type=email]{min-width:0;width:100%}}
@media print{#auth-panel,#cloud-progress,#account-bar,.account-dialog{display:none!important}}

.saved-item{flex-wrap:wrap}.saved-item>strong{flex:1;min-width:0;overflow-wrap:anywhere}.saved-actions{display:flex;gap:8px;flex-wrap:wrap}.saved-actions .saved-delete{color:#d34468;border-color:#d3446860}.saved-actions .saved-delete:hover{background:#d3446815}


.prospect-fields{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px;align-items:end;margin:13px 0}
.prospect-fields input,.prospect-fields select,.prospect-fields button{width:100%;min-width:0;box-sizing:border-box;min-height:44px}
@media(max-width:1150px){.prospect-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.prospect-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:380px){.prospect-fields{grid-template-columns:1fr}}

#prospect-selection{padding:12px;background:var(--surface-raised);border-radius:9px;margin-bottom:16px}
#prospect-selection[hidden]{display:none}
#prospect-quote-selected:disabled{opacity:.55;cursor:default}

.history-technology-chip{display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid var(--line);border-radius:8px}
.history-technology-chip>span{width:12px;height:12px;border-radius:3px}
#market-history-chart .history-growth{fill:#17734e}
#market-history-chart .history-decline{fill:#a93248}
#market-history-chart .history-bar-mass{fill:#171329}
[data-theme="dark"] #market-history-chart .history-growth{fill:#80deb0}
[data-theme="dark"] #market-history-chart .history-decline{fill:#ffa5b2}

#market-history-insights{margin:12px 0;padding:12px 16px;background:var(--surface-raised);border:1px solid var(--line);border-radius:8px}
#market-history-insights h3{margin:0 0 5px}
#market-history-insight-list{list-style:none;margin:0;padding:0}
#market-history-insight-list li{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;padding:4px 0}
#market-history-insight-list li span{color:var(--muted)}
#market-history-chart .history-insight-bar{stroke:var(--ink);stroke-width:2}

:is(#prospect-own-options,#comparison-unit-options){display:grid;gap:4px}
:is(#prospect-own-options,#comparison-unit-options) label{display:flex;align-items:center;gap:8px;min-height:30px;margin:0;cursor:pointer}
:is(#prospect-own-options,#comparison-unit-options) input[type="checkbox"]{flex:0 0 18px;width:18px;height:18px;min-width:0;min-height:0;margin:0;padding:0;cursor:pointer}

/* Compact dashboard and establishment searches. */
@media screen{
 #overview,#overview>.grid{gap:14px}
 #overview>article.panel{margin:0;min-width:0}
 #overview .readout:empty,#directory-status:empty{display:none}
 #overview>.class-explanation{margin:0}
 #monthly-panel,#state-panel,#destination-panel{padding:clamp(14px,2vw,22px)}
 #monthly-panel .monthly-chart{min-height:0;max-height:300px}
 .monthly-point .monthly-marker{stroke:var(--surface);stroke-width:1.5}
 .monthly-point:hover .monthly-marker,.monthly-point:focus-visible .monthly-marker,.monthly-point[aria-pressed=true] .monthly-marker{stroke:var(--ink);stroke-width:2.5}
 #directory-form .tools,.prospect-fields{gap:10px;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr))}
 #directory-form .tools input:not([type=checkbox]),#directory-form .tools select{width:100%;min-width:0}
 #directory-tech-picker{position:relative;min-width:0}
 #directory-tech-summary{min-height:40px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:7px 10px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);cursor:pointer;overflow-wrap:anywhere;font-size:13px}
 #directory-tech-summary::after{content:"▾"}
 #directory-tech-summary:focus-visible,#directory-result-panel .scroll:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
 .directory-tech-menu{position:absolute;inset-inline-start:0;z-index:5;width:min(330px,76vw);padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 6px 18px #18153120}
 .directory-tech-actions{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}
 .directory-tech-actions button{min-height:32px;padding:4px 8px}
 #directory-tech-options{max-height:260px;overflow:auto}
 #directory-tech-options label{display:flex;align-items:center;gap:8px;margin:0;padding:6px 4px;cursor:pointer}
 #directory-tech-options .directory-select-box,#directory-results .directory-select-box,#prospect-rows .directory-select-box{flex:0 0 18px;width:18px;min-width:0;height:18px;min-height:0;padding:0}
 #directory-tech-options .directory-select-box{margin:0}
 #directory-result-panel .scroll{max-height:min(67vh,640px);overflow:auto;scrollbar-gutter:stable}
 #directory-result-panel thead th{position:sticky;top:0;z-index:1;background:var(--surface-raised)}
 #directory-result-panel th button{min-height:0;padding:2px 0;border:0;background:transparent;color:inherit;font:inherit;text-align:inherit}
 #directory-result-panel th[aria-sort=ascending] button::after{content:" ↑"}
 #directory-result-panel th[aria-sort=descending] button::after{content:" ↓"}
 #directory-result-panel tbody tr:nth-child(even){background:var(--surface-raised)}
 #directory-result-panel tbody tr:focus-within{background:var(--surface-hover)}
 @media(max-width:540px){
  #directory-form .tools,.prospect-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
  #directory-query-field{grid-column:1/-1}
  .directory-tech-menu{position:static;width:auto}
  #directory-result-panel .scroll{max-height:55vh}
 }
}

#cards > .panel-head{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px 16px}
#cards > .panel-head > h2{margin:0}

#cards > .panel-head > .local-year-filter{width:auto;margin-left:0;justify-content:flex-start}

/* Mercado SP visual hierarchy */
:root{--market-font:system-ui,-apple-system,"Segoe UI",sans-serif}
body,button,input,select,textarea,body h1,body h2,body h3,body h4,.history-chart text{font-family:var(--market-font)}
body{font-size:15px}
#market-main h2{font-size:22px}
#market-main h3{font-size:18px}
#market-main :is(button,input,select,textarea,label,td,th){font-size:14px}
#market-main .masthead{min-height:0;padding:22px 28px;background:linear-gradient(110deg,#225b50,#397966);border-color:#387663}
#market-main .masthead h1{font-size:clamp(25px,3vw,34px);color:white}
#market-main .masthead h1 span{color:#e0fff1}
#market-main .masthead :is(p,.dashboard-eyebrow){color:#f1fbf6;font-size:14px}
.market-history-summary:empty{display:none}
.market-history-summary .history-kpi{background:#3f54ad;color:white;border:0;padding:16px 18px}
.market-history-summary .history-kpi:nth-child(2){background:#286747}
.market-history-summary .history-kpi:nth-child(3){background:#67519d}
.market-history-summary .history-kpi :is(span,strong){color:white}
.market-history-summary .history-kpi span{font-size:14px}
.market-history-summary .history-kpi strong{font-size:clamp(21px,2.4vw,28px)}
#market-history-chart .market-history-line{min-width:720px;max-height:none;margin-top:6px}
#market-history-chart .history-gridline{stroke:var(--line);stroke-width:1}
#market-history-chart .history-partial-divider{stroke:var(--muted);stroke-width:1;stroke-dasharray:4 5}
#market-history-chart .history-point-mass{fill:var(--ink)}
#market-history-chart .history-insight-bar{stroke:var(--ink);stroke-width:3;r:8px}
@media(max-width:680px){
 .market-history-summary{grid-template-columns:1fr}
 #market-main .masthead{padding:17px}
}

.profile-waste-table,
#company-print-report .profile-waste-table {
 width:100%;
 table-layout:fixed;
 font: .875rem/1.4 Arial,sans-serif;
}
.profile-waste-table .waste-col-code {width:8%}
.profile-waste-table .waste-col-year {width:5%}
.profile-waste-table .waste-col-company {width:22%}
.profile-waste-table .waste-col-class {width:8%}
.profile-waste-table .waste-col-technology {width:12%}
.profile-waste-table .waste-col-unit {width:7%}
.profile-waste-table .waste-col-quantity {width:10%}
.profile-waste-table :is(th,td),
#company-print-report .profile-waste-table :is(th,td) {
 padding:.55em .65em;
 font:inherit;
 vertical-align:top;
 white-space:normal;
 overflow-wrap:anywhere;
}
.profile-waste-table thead th,
#company-print-report .profile-waste-table thead th {
 background:#edf0f7;
 color:#26334b;
 font-weight:700;
 text-transform:none;
 letter-spacing:normal;
}
.profile-waste-table tr > :last-child,
#company-print-report .profile-waste-table tr > :last-child {
 text-align:right;
 font-variant-numeric:tabular-nums;
}
.profile-waste-table .profile-link {
 padding:0;
 min-height:0;
 font:inherit;
 font-weight:700;
}
.profile-waste-table small {font-size:.88em}
@media screen {
 .profile-waste-table {min-width:960px}
}
@media print {
 @page company-report {size:A4 landscape}
 #company-print-report {page:company-report}
 #company-print-report .profile-waste-table {
  font-size:9pt;
  print-color-adjust:exact;
 }
}

.profile-chart-sections {
 display:grid;
 gap:1rem;
 margin-block:.75rem 1rem;
}
.profile-chart-sections h3,
#profile-top-panel h3 {margin:0 0 .15rem}
.profile-chart-sections h3 + p,
#profile-top-note {margin:0 0 .4rem}
#profile-analytics :is(#profile-classes,#profile-tech) {
 display:grid;
 grid-template-columns:repeat(auto-fit,minmax(min(100%,17rem),1fr));
 gap:.3rem .85rem;
}
#profile-analytics :is(#profile-classes,#profile-tech) .row {
 display:grid;
 grid-template-columns:minmax(0,1fr) auto;
 grid-template-rows:auto auto;
 gap:.25rem .5rem;
 align-content:start;
 align-items:start;
 width:100%;
 min-width:0;
 min-height:0;
 margin:0;
 padding:.35rem .45rem;
}
#profile-analytics :is(#profile-classes,#profile-tech) .row > span:first-child {
 grid-area:1 / 1;
 font-size:.8125rem;
 line-height:1.35;
}
#profile-analytics :is(#profile-classes,#profile-tech) .row > strong {
 grid-area:1 / 2;
 font-size:.75rem;
 line-height:1.45;
 white-space:nowrap;
 font-variant-numeric:tabular-nums;
}
#profile-analytics :is(#profile-classes,#profile-tech) .row > .track {
 grid-area:2 / 1 / 3 / -1;
 width:100%;
 height:5px;
}
#profile-analytics :is(#profile-units,#profile-classes-detail,#profile-tech-detail,#profile-top-companies-detail):empty {
 display:none;
}

@media print {
 #company-print-report {font-family:Arial,sans-serif;print-color-adjust:exact}
 #company-print-report .print-brand {color:#22594d;text-transform:uppercase}
 #company-print-report h1 {font-size:22pt;color:#182b31}
 #company-print-report .print-registration {
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1mm 4mm;
  margin-block:2mm;
 }
 #company-print-report .print-registration dt {display:inline;font-weight:700}
 #company-print-report .print-registration dt::after {content:" · "}
 #company-print-report .print-registration dd {display:inline;text-align:left}
 #company-print-report .print-summaries {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:3mm;
  margin-block:3mm;
  align-items:start;
 }
 #company-print-report .print-summaries.with-ranking {
  grid-template-columns:minmax(0,37fr) minmax(0,63fr);
 }
 #company-print-report .print-chart-section + .print-chart-section {margin-top:2mm}
 #company-print-report .print-chart-section h2 {
  margin:0;
  padding:1.3mm 2mm;
  background:#243c67;
  color:white;
  font-size:9pt;
 }
 #company-print-report .print-chart {font-size:8pt}
 #company-print-report .print-chart :is(th,td) {
  padding:.65mm 1.5mm;
  border:0;
  vertical-align:middle;
 }
 #company-print-report .print-chart tbody tr:nth-child(odd) td {background:#eef3fa}
 #company-print-report .print-chart td:nth-child(2) {width:24%}
 #company-print-report .print-chart td:last-child {
  width:17%;
  text-align:right;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
 }
 #company-print-report .print-chart svg {display:block;width:100%;height:2mm}
 #company-print-report .print-ranking :is(th,td):nth-child(1) {width:6%;font-weight:700}
 #company-print-report .print-ranking :is(th,td):nth-child(2) {width:38%;font-weight:700}
 #company-print-report .print-ranking :is(th,td):nth-child(3) {width:22%}
 #company-print-report .print-ranking :is(th,td):nth-child(4) {width:19%;text-align:right;font-weight:700}
 #company-print-report .print-ranking :is(th,td):nth-child(5) {width:15%;text-align:right}
 #company-print-report .print-ranking th {background:#eef3fa}
 #company-print-report .profile-waste-table thead th {background:#22594d;color:white}
 #company-print-report .profile-waste-table tbody tr:nth-child(odd) td {background:#eef5f2}
}

#profile-top-panel {
 padding:0;
 overflow:hidden;
 border:1px solid #dce4f0;
}
#profile-top-panel h3 {
 padding:.65rem 1rem;
 background:#243c67;
 color:#fff;
 margin:0;
}
#profile-top-note {padding:.5rem 1rem 0}
#profile-top-companies-detail:not(:empty) {padding:.4rem 1rem}
.ranking-scroll {overflow-x:auto}
.ranking-table {min-width:40rem}
#profile-ranking-head,
#profile-top-panel #profile-top-companies .row {
 display:grid;
 grid-template-columns:2rem minmax(12rem,1fr) minmax(7rem,1fr) 8.4rem 6.4rem;
 align-items:center;
 gap:.6rem;
 padding:.35rem .8rem;
}
#profile-ranking-head[hidden] {display:none}
#profile-ranking-head {font-size:.75rem;font-weight:700;background:#e9eff8;color:#243c67}
#profile-ranking-head > :nth-last-child(-n+2) {text-align:right}
#profile-top-panel #profile-top-companies .row {
 grid-template-rows:auto;
 min-height:2.15rem;
 margin:0;
 border-radius:0;
 border:1px solid transparent;
 font-size:.8125rem;
 line-height:1.3;
}
#profile-top-companies .row:nth-child(odd) {background:#f1f5fa}
#profile-top-panel #profile-top-companies .row[aria-pressed=true] {
 background:#e0ebff;
 border-color:#3f68bd;
}
#profile-top-panel #profile-top-companies .row:focus-visible {outline-offset:-3px}
#profile-top-panel #profile-top-companies .rank-number {
 grid-area:auto;
 background:#304d7e;
 color:white;
 border-radius:4px;
 padding:.1rem .2rem;
 text-align:center;
 font-weight:700;
}
#profile-top-companies .rank-company {font-weight:650;overflow-wrap:anywhere}
#profile-top-panel #profile-top-companies .track {
 grid-area:auto;
 height:.65rem;
 background:#e4ebf7;
}
#profile-top-panel #profile-top-companies .bar {background:#7dabec!important}
#profile-top-panel #profile-top-companies .row:nth-child(-n+2) .bar {background:#3f68bd!important}
#profile-top-panel #profile-top-companies .rank-mass,
#profile-top-companies .rank-share {
 grid-area:auto;
 text-align:right;
 font-variant-numeric:tabular-nums;
 white-space:nowrap;
}

.destination-flow {margin-block:1rem}
.destination-flow h3 {margin:0 0 .55rem}
.profile-chart-sections[hidden] {display:none}
.destination-flow-cards {display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:.65rem;margin-bottom:.65rem}
.destination-flow-cards > div {display:grid;gap:.1rem;padding:.55rem .75rem;border:1px solid var(--line);border-inline-start:4px solid var(--flow-color);border-radius:9px;background:var(--surface-raised)}
.destination-flow-cards strong {font-size:1.2rem}
.destination-flow-plot {border:1px solid var(--line);border-radius:9px;padding:.65rem}
.destination-flow-plot {overflow-x:auto}
.destination-flow-plot svg {display:block;width:100%;min-width:675px}
.destination-flow-band {fill-opacity:.5}
.destination-flow-band:hover {fill-opacity:.85}
.destination-flow-node[role=button] {cursor:pointer}
.destination-flow-node[role=button]:is(:hover,:focus-visible) rect {stroke:var(--ink);stroke-width:2}

#destination-details-dialog {width:min(76rem,96vw);max-width:96vw;max-height:88vh}
#destination-details-dialog tbody td:last-child {text-align:right;white-space:nowrap}
#destination-details-dialog .scroll[hidden] {display:none}
.destination-flow-band[role=button] {cursor:pointer}
.destination-flow-band[role=button]:focus-visible {stroke:var(--ink);stroke-width:2;fill-opacity:.9;outline:none}

#comparison #comparison-report {margin-block:1rem}
#comparison .comparison-mass-table {min-width:760px}
#comparison .comparison-mass-table td:not(:first-child) {text-align:right;font-variant-numeric:tabular-nums}
.comparison-chart-panel {margin-block:1rem;border:1px solid var(--line);border-radius:9px;padding:.65rem}
.comparison-chart-panel h4 {margin:0 0 .5rem}
.comparison-chart-panel .market-history-line {min-width:720px;max-height:none;margin-top:6px}
.comparison-chart-panel .history-gridline {stroke:var(--line);stroke-width:1}
.comparison-chart-panel .history-partial-divider {stroke:var(--muted);stroke-width:1;stroke-dasharray:4 5}
.comparison-chart-panel .history-point-mass {fill:var(--ink)}
.comparison-chart-panel .history-growth {fill:#17734e}
.comparison-chart-panel .history-decline {fill:#a93248}
[data-theme="dark"] .comparison-chart-panel .history-growth {fill:#80deb0}
[data-theme="dark"] .comparison-chart-panel .history-decline {fill:#ffa5b2}
.comparison-chart-key {font-size:.8rem;display:inline-flex;align-items:center;gap:.35rem}
.comparison-chart-key::before {content:"";width:.65rem;height:.65rem;border-radius:50%;background:var(--series-color)}
#comparison-form details {margin:.5rem 0 .75rem}
#comparison-form summary {cursor:pointer}
#comparison-unit-selected:not(:empty) {margin-block:.5rem}
#comparison :is(#comparison-group-form,#comparison-create-tools)[hidden]{display:none}
#comparison-group-form,#comparison-create-tools {margin-block:.6rem}
.comparison-group-card {margin-block:.55rem;padding:.6rem .8rem;border:1px solid var(--line);border-radius:9px}
.comparison-group-card summary {cursor:pointer;font-weight:650}
.comparison-group-card p {margin:.4rem 0}
#comparison-change-charts {display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,22rem),1fr))}
.comparison-change-chart h5 {margin:.4rem 0;font-size:.9rem}
.comparison-change-row {display:grid;grid-template-columns:minmax(0,1fr) minmax(3rem,.6fr) minmax(5rem,auto);gap:.4rem;align-items:center;padding:.35rem 0;border-bottom:1px solid var(--line);font-size:.8rem}
.comparison-change-row strong {text-align:right;font-variant-numeric:tabular-nums}
.comparison-change-track {position:relative;height:.65rem;background:var(--surface-raised)}
.comparison-change-track::before {content:"";position:absolute;left:50%;height:100%;border-left:1px solid var(--muted)}
.comparison-change-track i {position:absolute;height:100%;border-radius:2px}
#comparison-unit-options {max-height:22rem;overflow:auto}

@media screen {
 .destination-flow-frame {position:relative;background:#111514;border:1px solid #303936;border-radius:10px}
 .destination-flow-frame .destination-flow-plot {border:0;padding:.1rem .65rem .65rem;overflow-x:auto}
 .destination-flow-frame .destination-flow-plot svg {width:100%;min-width:800px;max-width:none}
 .destination-flow-stages {display:flex;flex-wrap:wrap;gap:.4rem;padding:.75rem .8rem .1rem}
 .destination-flow-stages span {display:inline-flex;align-items:center;gap:.35rem;padding:.22rem .5rem;border:1px solid #394340;border-radius:999px;color:#edf2ef;font-size:.72rem;font-weight:700}
 .destination-flow-stages span::before {content:"";width:.45rem;height:.45rem;background:var(--stage-color);border-radius:50%}
 .destination-mind-stroke {stroke-width:1.6;stroke-opacity:.52;transition:stroke-opacity .15s ease}
 .destination-mind-branch:is(:hover,:focus-visible) .destination-mind-stroke {stroke-opacity:1;stroke-width:2.5}
 .destination-mind-branch[role=button] {cursor:pointer}
 .destination-flow-frame .destination-flow-label {fill:#f1f5f3;font:600 13px var(--market-font,system-ui)}
 .destination-flow-frame .destination-flow-share {fill:#bfcac4;font-size:12px;font-weight:500}
 .destination-flow-frame .destination-flow-node[role=button]:is(:hover,:focus-visible) rect {stroke:#f1f5f3;stroke-width:1.5}
 .destination-flow-tooltip {position:absolute;inset-block-start:2.6rem;inset-inline-start:.8rem;z-index:1;max-width:min(48ch,85%);padding:.4rem .6rem;border:1px solid #51665d;border-radius:6px;background:#1d2825;color:#f1f5f3;font-size:.8rem;pointer-events:none}
 @media(prefers-reduced-motion:reduce) {.destination-mind-stroke {transition:none}}
}
@media print {
 .print-destination-flow .destination-flow-label {fill:#1e293b;font:600 13px system-ui}
 .print-destination-flow .destination-flow-share {font-size:12px;font-weight:500}
}
