/*
 * AFDES PUBLIC OPINION OBSERVATORY
 * Authoritative shared visual system
 * United States / ANES + Latin America / Latinobarometro + future AFDES Studies
 * Source-specific statistical/data logic remains separate.
 */

/* ===== United States / ANES shell ===== */

:root{
  --navy:#0b263f;
  --navy2:#143b5d;
  --ink:#13283a;
  --muted:#677785;
  --line:#dbe3e9;
  --paper:#f4f7f9;
  --card:#ffffff;
  --gold:#f5c451;
  --low:#dcebf2;
  --m1:#b8d4e2;
  --m2:#87b7cc;
  --m3:#4f8caa;
  --high:#245e7b;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;min-width:0;background:transparent;color:var(--ink);font-family:Inter,Arial,Helvetica,sans-serif}
body{padding:18px}
button,select{font:inherit}
.oe-shell{width:min(1800px,100%);margin:0 auto}
.oe-header{
  background:var(--navy);color:#fff;border-radius:18px 18px 0 0;
  padding:22px 26px;display:flex;align-items:center;justify-content:space-between;gap:24px
}
.oe-brand{display:flex;align-items:center;gap:17px;min-width:0}
.oe-brand img{width:62px;height:62px;object-fit:contain;flex:0 0 auto}
.oe-eyebrow,.oe-map-kicker,.oe-detail-kicker{
  margin:0 0 5px;text-transform:uppercase;letter-spacing:.12em;font-size:11px;font-weight:800
}
.oe-brand h1{margin:0;font-size:29px;line-height:1.05}
.oe-brand h1 span{font-weight:400}
.oe-brand p:last-child{margin:7px 0 0;color:#c8d6e1;font-size:13px}
.oe-engine-badge{
  display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid rgba(255,255,255,.24);
  border-radius:999px;font-size:12px;white-space:nowrap
}
.oe-engine-badge i{width:8px;height:8px;background:#56c08b;border-radius:50%}


/* ===== Observatory source tabs =====
   Compact, prominent source switch. The group is only as wide as its labels;
   it never stretches the individual tabs across the Observatory. */
.po-source-switch{
  display:flex;
  align-items:center;
  gap:5px;
  width:max-content;
  max-width:calc(100% - 32px);
  min-width:0;
  margin:12px 16px;
  padding:5px;
  background:#eef3f6;
  border:1px solid #cfd9e0;
  border-radius:12px;
  box-shadow:0 3px 12px rgba(11,38,63,.07);
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}
.po-source-option{
  display:flex;
  align-items:center;
  gap:6px;
  min-height:38px;
  flex:0 0 auto;
  padding:0 14px;
  border:1px solid transparent;
  border-radius:8px;
  background:#fff;
  color:#536b7c;
  text-decoration:none;
  white-space:nowrap;
  font-size:11px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(11,38,63,.04);
}
.po-source-option span{color:inherit;font-weight:750}
.po-source-option strong{color:inherit;font-weight:900}
.po-source-option small{
  color:#8b9aa5;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.po-source-option:hover:not(.po-source-option-disabled){
  color:var(--navy);
  border-color:#aebdc8;
  background:#f9fbfc;
}
.po-source-option.active{
  color:#fff;
  background:var(--navy);
  border-color:var(--navy);
  box-shadow:0 3px 9px rgba(11,38,63,.18);
}
.po-source-option.active span,
.po-source-option.active strong{color:#fff}
.po-source-option.active::before{
  content:'';
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--gold);
  flex:0 0 auto;
}
.po-source-option-disabled{
  background:#f7f9fa;
  color:#8a98a2;
  opacity:.72;
  cursor:not-allowed;
  user-select:none;
  box-shadow:none;
}
.oe-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#102f49;color:#fff}
.oe-strip div{padding:14px 18px;border-right:1px solid rgba(255,255,255,.12);min-width:0}
.oe-strip div:last-child{border-right:0}
.oe-strip span{display:block;color:#a9bfd0;font-size:10px;letter-spacing:.09em;text-transform:uppercase;margin-bottom:4px}
.oe-strip strong{display:block;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oe-definition{
  background:#edf4f8;border:1px solid #dce8ee;border-top:0;padding:12px 18px;
  display:flex;gap:14px;align-items:baseline;flex-wrap:wrap
}
.oe-definition strong{color:var(--navy);font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.oe-definition p{margin:0;color:#526b7b;font-size:12px;line-height:1.5}
.oe-controls{
  display:grid;grid-template-columns:1.1fr 1.2fr .9fr 1.1fr 1.2fr;gap:12px;
  background:#fff;border:1px solid var(--line);border-top:0;padding:16px 18px
}
.oe-controls label,.oe-geography-control{display:block;min-width:0}
.oe-controls label>span,.oe-geography-control>span{
  display:block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#627480;margin-bottom:6px
}
.oe-controls select{
  width:100%;min-width:0;height:39px;border:1px solid #cfd9df;border-radius:9px;background:#fff;color:var(--ink);padding:0 10px
}
.oe-segmented{display:flex;height:39px}
.oe-segmented button{
  flex:1;border:1px solid #cfd9df;background:#fff;color:#6a7984;padding:0 10px
}
.oe-segmented button:first-child{border-radius:9px 0 0 9px}
.oe-segmented button:last-child{border-left:0;border-radius:0 9px 9px 0}
.oe-segmented button.active{background:var(--navy);border-color:var(--navy);color:#fff}
.oe-segmented button:disabled{background:#eef1f3;color:#a7afb5;cursor:not-allowed}
.oe-workspace{
  display:grid;grid-template-columns:minmax(0,1.75fr) minmax(330px,.65fr);gap:14px;
  align-items:stretch;
  background:var(--paper);padding:14px;border:1px solid var(--line);border-top:0
}
.oe-map-card,.oe-detail-card{background:#fff;border:1px solid var(--line);border-radius:14px;min-width:0}
.oe-map-card{overflow:hidden;align-self:start}
.oe-map-head{
  display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:17px 18px;border-bottom:1px solid var(--line)
}
.oe-map-kicker,.oe-detail-kicker{color:#70828f}
.oe-map-head h2,.oe-detail-card h2{margin:0;font-size:20px}
.oe-map-head p:last-child{margin:6px 0 0;font-size:12px;color:var(--muted)}
.oe-period-pill{background:#eef4f7;color:var(--navy);border-radius:999px;padding:7px 10px;font-size:11px;font-weight:800;white-space:nowrap}
.oe-map-stage{position:relative;height:620px;background:#fcfcfc;overflow:hidden}
#map-svg{display:block;width:100%;height:100%}
.oe-loading{position:absolute;inset:0;display:grid;place-items:center;color:#73838d;font-size:13px;background:#fcfcfc;z-index:4}
.state-shape{fill:#d3d3d3;stroke:#fff;stroke-width:1.15;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .12s ease}
.state-shape:hover{filter:brightness(.94)}
.state-shape.selected{fill:var(--gold)!important}
.state-label{pointer-events:none;font-size:8px;font-weight:800;fill:#17324a;text-anchor:middle}
.oe-tooltip{
  position:absolute;z-index:8;background:#0b263f;color:#fff;padding:9px 11px;border-radius:8px;
  font-size:11px;line-height:1.45;pointer-events:none;box-shadow:0 8px 24px rgba(0,0,0,.16)
}
.oe-tooltip strong{font-size:12px}
.oe-legend{padding:13px 18px 4px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.oe-legend-scale{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.oe-legend-item{display:flex;align-items:center;gap:5px;font-size:10px;color:#647681}
.oe-legend-item i,.oe-selection-key i{width:13px;height:13px;border-radius:3px;display:inline-block;border:1px solid rgba(0,0,0,.06)}
.oe-selection-key{display:flex;align-items:center;gap:5px;font-size:10px;color:#647681;margin-left:auto}
.oe-selection-key i{background:var(--gold)}
.oe-legend-note{margin:0;padding:4px 18px 14px;color:#82909a;font-size:10px}
.oe-detail-card{padding:18px;display:flex;flex-direction:column;gap:17px}
.oe-detail-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.oe-status-pill{font-size:10px;font-weight:800;border-radius:999px;padding:6px 9px;background:#eef4f7;color:var(--navy);white-space:nowrap}
.oe-primary-stat{padding:18px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.oe-primary-stat strong{display:block;font-size:44px;line-height:1;color:var(--navy);letter-spacing:-.04em}
.oe-primary-stat span{display:block;margin-top:7px;color:var(--muted);font-size:12px}
.oe-comparison-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.oe-comparison-grid div{background:#f5f7f8;border-radius:10px;padding:10px;min-width:0}
.oe-comparison-grid span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#788792;margin-bottom:5px}
.oe-comparison-grid strong{font-size:16px;color:var(--navy)}
.oe-source-card{border:1px solid var(--line);border-radius:12px;padding:14px}
.oe-source-card h3{margin:0;font-size:14px}
.oe-source-card>p:not(.oe-detail-kicker):not(.oe-source-note){margin:5px 0 12px;color:var(--muted);font-size:11px}
.oe-source-card dl{margin:0}
.oe-source-card dl div{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px;padding:6px 0;border-top:1px solid #edf1f3;font-size:10px}
.oe-source-card dt{color:#75858f}
.oe-source-card dd{margin:0;font-weight:700;color:#304a5e;overflow-wrap:anywhere}
.oe-source-note{font-size:10px!important;line-height:1.5;color:#7c8992!important;margin:10px 0 0!important}
.oe-integrity{background:#fff8e5;border-left:3px solid var(--gold);padding:12px 13px}
.oe-integrity strong{font-size:11px;color:#5d4817}
.oe-integrity p{margin:5px 0 0;font-size:10px;line-height:1.5;color:#74643b}
.oe-roadmap{
  display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr auto 1fr;gap:10px;align-items:center;
  padding:14px 18px;background:#fff;border:1px solid var(--line);border-top:0
}
.oe-roadmap div{min-width:0}
.oe-roadmap span{display:block;color:#86939c;font-size:9px;letter-spacing:.08em;font-weight:800}
.oe-roadmap strong{display:block;font-size:12px;color:var(--navy);margin:3px 0}
.oe-roadmap small{color:#71818c;font-size:10px}
.oe-roadmap i{font-style:normal;color:#aeb8bf}
.oe-footer{
  display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;background:var(--navy);
  color:#c4d2dc;padding:13px 18px;border-radius:0 0 14px 14px;font-size:10px
}


@media(max-width:720px){
  .po-source-switch{
    gap:4px;
    max-width:calc(100% - 20px);
    margin:9px 10px;
    padding:4px;
  }
  .po-source-option{
    min-height:36px;
    padding:0 11px;
    font-size:10px;
    line-height:1;
  }
  .po-source-option small{
    display:none;
  }
}

@media(max-width:1080px){
  .oe-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-workspace{grid-template-columns:1fr}
  .oe-map-stage{height:570px}
}
@media(max-width:720px){
  body{padding:8px}
  .oe-header{padding:17px;align-items:flex-start}
  .oe-brand img{width:48px;height:48px}
  .oe-brand h1{font-size:22px}
  .oe-brand p:last-child{font-size:11px}
  .oe-engine-badge{display:none}
  .oe-controls{grid-template-columns:1fr}
  .oe-map-stage{height:470px}
  .oe-roadmap{grid-template-columns:1fr 1fr}
  .oe-roadmap i{display:none}
}
@media(max-width:480px){
  body{padding:4px}
  .oe-header{border-radius:12px 12px 0 0}
  .oe-brand{align-items:flex-start}
  .oe-brand img{width:42px;height:42px}
  .oe-brand h1{font-size:19px}
  .oe-strip{grid-template-columns:1fr 1fr}
  .oe-strip div{padding:10px}
  .oe-strip strong{font-size:11px}
  .oe-definition{padding:10px}
  .oe-controls{padding:12px}
  .oe-workspace{padding:8px}
  .oe-map-head{padding:13px;display:block}
  .oe-period-pill{display:inline-block;margin-top:9px}
  .oe-map-stage{height:390px}
  .oe-legend{padding-left:12px;padding-right:12px}
  .oe-selection-key{margin-left:0}
  .oe-detail-card{padding:14px}
  .oe-detail-top{display:block}
  .oe-status-pill{display:inline-block;margin-top:8px}
  .oe-primary-stat strong{font-size:38px}
  .oe-comparison-grid{grid-template-columns:1fr}
  .oe-roadmap{grid-template-columns:1fr}
  .oe-footer{display:block}
  .oe-footer span{display:block;margin:4px 0}
}


/* v0.2 — multi-indicator / county interaction */
.oe-map-context-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.oe-map-context-row .oe-map-kicker{margin:0}
.oe-back{
  border:0;background:#eef4f7;color:var(--navy);border-radius:999px;
  padding:6px 9px;font-size:10px;font-weight:800;cursor:pointer
}
.oe-back:hover{background:#e1ebf0}
.county-shape{
  fill:#d3d3d3;stroke:#fff;stroke-width:.8;vector-effect:non-scaling-stroke;
  cursor:pointer;transition:fill .12s ease
}
.county-shape:hover{filter:brightness(.94)}
.county-shape.selected{fill:var(--gold)!important}
.oe-loading.is-message{
  padding:32px;text-align:center;line-height:1.6;color:#5f7180
}
.oe-loading.is-message strong{display:block;color:var(--navy);font-size:14px;margin-bottom:6px}
.oe-controls option[data-pending="true"]{color:#6f7f89}


/* v0.3 — comparison, ranking, source links */
.oe-detail-section-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px
}
.oe-detail-section-head h3{margin:0;font-size:13px;color:var(--navy)}
.oe-compare,.oe-ranking{
  border-top:1px solid var(--line);padding-top:15px
}
.oe-compare-label{display:block;margin-top:10px}
.oe-compare-label>span{
  display:block;font-size:9px;font-weight:800;text-transform:uppercase;
  letter-spacing:.07em;color:#788792;margin-bottom:5px
}
.oe-compare-label select{
  width:100%;height:38px;border:1px solid #cfd9df;border-radius:9px;
  background:#fff;color:var(--ink);padding:0 10px
}
.oe-compare-result{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);
  grid-template-areas:"side-a vs side-b" "difference difference difference";
  gap:10px;
  align-items:stretch;
  margin-top:12px;
  padding:0;
  background:transparent;
  border-radius:0
}
.oe-compare-result>div:not(.oe-vs){
  min-width:0;
  min-height:96px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  padding:12px;
  border:1px solid #dfe7ec;
  border-radius:12px;
  background:#f7f9fa
}
.oe-compare-result>div:not(.oe-vs):first-child{grid-area:side-a}
.oe-compare-result>div:not(.oe-vs):nth-of-type(3){grid-area:side-b}
.oe-compare-result span{
  display:block;
  min-height:28px;
  margin:0 0 5px;
  color:#74848f;
  font-size:9px;
  font-weight:800;
  line-height:1.35;
  letter-spacing:.035em;
  white-space:normal;
  overflow-wrap:anywhere
}
.oe-compare-result strong{
  display:block;
  color:var(--navy);
  font-size:20px;
  line-height:1.05
}
.oe-compare-meter{
  height:7px;
  margin-top:auto;
  padding-top:10px;
  box-sizing:content-box;
  overflow:hidden
}
.oe-compare-meter::before{
  content:"";
  display:block;
  width:100%;
  height:7px;
  border-radius:999px;
  background:#e1e8ec
}
.oe-compare-meter i{
  display:block;
  width:var(--oe-compare-level,0%);
  height:7px;
  margin-top:-7px;
  border-radius:999px;
  background:#4f8caa;
  transition:width .24s ease
}
.oe-compare-result .oe-vs{
  grid-area:vs;
  align-self:center;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  margin:auto;
  border:1px solid #d9e2e7;
  border-radius:50%;
  background:#fff;
  color:#7f8d96;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase
}
.oe-compare-result p{
  grid-area:difference;
  margin:0;
  padding:10px 12px;
  border:1px solid #e2e8ec;
  border-radius:10px;
  background:#f8fafb;
  color:#566b7a;
  font-size:10px;
  line-height:1.5
}
.oe-compare-result p::before{
  content:"Difference";
  display:block;
  margin-bottom:4px;
  color:#7b8992;
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase
}
.oe-ranking-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.oe-ranking-grid>div{background:#f5f7f8;border-radius:10px;padding:10px;min-width:0}
.oe-ranking-label{
  display:block;font-size:9px;text-transform:uppercase;letter-spacing:.07em;
  color:#75858f;font-weight:800;margin-bottom:7px
}
.oe-ranking ol{margin:0;padding:0;list-style:none}
.oe-ranking li{
  display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:6px;
  align-items:center;padding:5px 0;border-top:1px solid #e5eaed;font-size:10px
}
.oe-ranking li:first-child{border-top:0}
.oe-ranking li b{color:#87959d;font-weight:700}
.oe-ranking li span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oe-ranking li strong{color:var(--navy);font-size:10px}
.oe-source-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}
.oe-source-links a{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:32px;padding:0 10px;border:1px solid #cfd9df;border-radius:8px;
  color:var(--navy);text-decoration:none;font-size:10px;font-weight:800
}
.oe-source-links a:hover{background:#eef4f7}
.oe-source-links a[hidden]{display:none!important}

@media(max-width:480px){
  .oe-ranking-grid{grid-template-columns:1fr}
  .oe-compare-result{
    grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);
    gap:7px
  }
  .oe-compare-result>div:not(.oe-vs){
    min-height:92px;
    padding:10px
  }
  .oe-compare-result span{
    min-height:30px;
    font-size:8px
  }
  .oe-compare-result strong{font-size:18px}
  .oe-compare-result .oe-vs{
    width:28px;
    height:28px;
    font-size:8px
  }
  .oe-compare-result p{
    padding:9px 10px;
    font-size:9px
  }
}


/* v0.5 political research layer */
.oe-coverage-card{
  border:1px solid #d9e2e7;
  border-left:3px solid #f5c451;
  border-radius:10px;
  background:#fffaf0;
  padding:11px 12px;
}
.oe-coverage-card>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.oe-coverage-card span{
  color:#78672f;
  font-size:9px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.oe-coverage-card strong{
  color:#0b263f;
  font-size:12px;
}
.oe-coverage-card p{
  margin:6px 0 0;
  color:#756743;
  font-size:9px;
  line-height:1.5;
}


/* v0.5.3 — balanced research workspace */
.oe-left-column{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:14px;
  align-self:stretch;
}

.oe-left-column .oe-map-card{
  flex:0 0 auto;
  align-self:stretch;
}

.oe-research-snapshot{
  flex:1 1 auto;
  min-height:190px;
  border:1px solid var(--line);
  border-radius:14px;
  background:
    radial-gradient(circle at 100% 0%,rgba(36,94,123,.08),transparent 34%),
    #fff;
  padding:16px 18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.oe-snapshot-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.oe-snapshot-head h3{
  margin:0;
  color:var(--navy);
  font-size:15px;
}

.oe-snapshot-period{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 9px;
  border:1px solid #d7e1e6;
  border-radius:999px;
  background:#f5f8fa;
  color:#667985;
  font-size:9px;
  font-weight:800;
}

.oe-snapshot-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}

.oe-snapshot-grid>div{
  min-width:0;
  border:1px solid #e0e7eb;
  border-radius:10px;
  background:#f7f9fa;
  padding:11px;
}

.oe-snapshot-grid span{
  display:block;
  color:#7b8b95;
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.oe-snapshot-grid strong{
  display:block;
  margin-top:5px;
  color:var(--navy);
  font-size:15px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.oe-snapshot-grid small{
  display:block;
  margin-top:4px;
  color:#7b8b95;
  font-size:8px;
  line-height:1.35;
}

.oe-snapshot-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}

.oe-snapshot-actions button{
  min-height:34px;
  border:1px solid #cdd9df;
  border-radius:9px;
  background:#fff;
  color:var(--navy);
  padding:0 11px;
  font:inherit;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
}

.oe-snapshot-actions button:hover{
  background:#eef4f7;
}

@media(max-width:1050px){
  .oe-snapshot-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .oe-left-column{
    display:block;
  }

  .oe-research-snapshot{
    margin-top:14px;
    min-height:0;
  }
}

@media(max-width:520px){
  .oe-snapshot-grid{
    grid-template-columns:1fr;
  }

  .oe-snapshot-head{
    flex-direction:column;
  }
}


/* v0.6 — survey variable registry */
.oe-survey-registry{
  margin:20px 0;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
}

.oe-survey-registry-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:22px;
  padding:24px 26px;
  background:
    radial-gradient(circle at 100% 0%,rgba(36,94,123,.10),transparent 36%),
    linear-gradient(135deg,#fafcfd,#eef4f7);
  border-bottom:1px solid var(--line);
}

.oe-survey-registry-head h2{
  margin:0;
  color:var(--navy);
  font-size:clamp(21px,2.7vw,31px);
  line-height:1.1;
}

.oe-survey-registry-head p:not(.oe-lab-eyebrow){
  max-width:790px;
  margin:9px 0 0;
  color:#667a87;
  font-size:11px;
  line-height:1.65;
}

.oe-registry-badge{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 11px;
  border:1px solid #cbd8df;
  border-radius:999px;
  background:#fff;
  color:var(--navy);
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
}

.oe-registry-boundary{
  margin:16px 20px 0;
  border-left:3px solid #f5c451;
  border-radius:0 9px 9px 0;
  background:#fffaf0;
  padding:11px 13px;
}

.oe-registry-boundary strong{
  color:var(--navy);
  font-size:10px;
}

.oe-registry-boundary p{
  margin:4px 0 0;
  color:#716441;
  font-size:9px;
  line-height:1.55;
}

.oe-registry-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(180px,280px);
  gap:10px;
  padding:16px 20px 0;
}

.oe-registry-toolbar label>span{
  display:block;
  margin-bottom:5px;
  color:#75858f;
  font-size:8px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.oe-registry-toolbar input,
.oe-registry-toolbar select{
  width:100%;
  height:40px;
  border:1px solid #ccd8df;
  border-radius:9px;
  background:#fff;
  color:#233a49;
  padding:0 10px;
  font:inherit;
  font-size:10px;
}

#survey-registry-status{
  padding:0 20px;
}

.oe-registry-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  padding:4px 20px 20px;
}

.oe-registry-card{
  min-width:0;
  border:1px solid #dbe4e8;
  border-radius:11px;
  background:#f8fafb;
  padding:12px;
}

.oe-registry-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.oe-registry-card h3{
  margin:0;
  color:var(--navy);
  font-size:11px;
  line-height:1.3;
}

.oe-registry-family{
  flex:0 0 auto;
  border-radius:999px;
  background:#eaf1f5;
  color:#526b7a;
  padding:4px 6px;
  font-size:7px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.oe-registry-variable{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px;
  align-items:start;
  padding:8px 0;
  border-top:1px solid #e3e9ec;
}

.oe-registry-variable:first-of-type{
  margin-top:9px;
}

.oe-registry-variable strong{
  display:block;
  color:#344e5e;
  font-size:9px;
  line-height:1.35;
}

.oe-registry-variable code{
  color:#0b263f;
  background:#edf2f5;
  border-radius:5px;
  padding:3px 5px;
  font-size:8px;
  white-space:nowrap;
}

.oe-registry-variable small{
  grid-column:1/-1;
  color:#7b8b95;
  font-size:8px;
  line-height:1.4;
}

.oe-survey-next{
  display:grid;
  grid-template-columns:minmax(160px,230px) 1fr;
  gap:18px;
  align-items:center;
  margin:0 20px 20px;
  border:1px solid #d8e2e7;
  border-radius:10px;
  padding:13px 14px;
  background:#0b263f;
}

.oe-survey-next h3{
  margin:0;
  color:#fff;
  font-size:15px;
}

.oe-survey-next p:not(.oe-detail-kicker){
  margin:0;
  color:#cfdae1;
  font-size:9px;
  line-height:1.6;
}

@media(max-width:1100px){
  .oe-registry-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:820px){
  .oe-registry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-survey-registry-head{flex-direction:column}
}

@media(max-width:620px){
  .oe-registry-toolbar{grid-template-columns:1fr}
  .oe-registry-grid{grid-template-columns:1fr}
  .oe-survey-next{grid-template-columns:1fr}
}


/* v0.6.2 survey registry research-family label */
.oe-registry-group-label{
  display:block;
  margin-top:5px;
  color:#82909a;
  font-size:7px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

/* ==========================================================
   v0.12.1 — viewport hardening
   Persistent Observatory layout must never widen the page on
   narrow phones, regardless of SPSS labels or result content.
========================================================== */
.oe-shell,
.oe-shell > *,
.oe-shell section,
.oe-shell article,
.oe-shell form,
.oe-shell label,
.oe-shell div {
  min-width: 0;
  max-width: 100%;
}

.oe-shell img,
.oe-shell svg,
.oe-shell canvas {
  max-width: 100%;
}

.oe-shell button,
.oe-shell select,
.oe-shell input,
.oe-shell textarea {
  max-width: 100%;
  font: inherit;
}

.oe-shell h1,
.oe-shell h2,
.oe-shell h3,
.oe-shell p,
.oe-shell small,
.oe-shell strong,
.oe-shell span,
.oe-shell label,
.oe-shell button,
.oe-shell a,
.oe-shell dd,
.oe-shell dt {
  overflow-wrap: anywhere;
}

@media(max-width:420px){
  .oe-header{gap:12px;padding:14px}
  .oe-brand{gap:11px}
  .oe-brand h1{font-size:18px}
  .oe-strip{grid-template-columns:1fr}
  .oe-strip div{border-right:0;border-bottom:1px solid rgba(255,255,255,.10)}
  .oe-strip div:last-child{border-bottom:0}
  .oe-controls{padding:10px}
  .oe-workspace{padding:6px}
  .oe-map-stage{height:clamp(320px,100vw,370px)}
  .oe-map-head h2,.oe-detail-card h2{font-size:18px}
  .oe-primary-stat strong{font-size:34px}
}

/* ==========================================================================
   v0.12.5 — shared Observatory layout
   Latinobarometro workspace structure + AFDES/ANES typography authority.
   Layout-only: no data, map, SPSS, weighting or analysis behavior changes.
   ========================================================================== */

.oe-workspace{
  grid-template-columns:minmax(0,1.8fr) minmax(330px,.72fr);
  align-items:start;
}

.oe-left-column{
  gap:14px;
}

.oe-detail-card{
  align-self:start;
}

.oe-research-snapshot{
  flex:0 0 auto;
  min-height:0;
}

/* Source & methodology now follows the research snapshot in the wide
   left column, matching the simpler Latinobarometro information flow. */
.oe-source-card-wide{
  border-radius:14px;
  padding:16px 18px;
  background:#fff;
}

.oe-source-card-wide .oe-source-wide-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:12px;
}

.oe-source-card-wide .oe-source-wide-head>p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  text-align:right;
}

.oe-source-card-wide dl{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  border:1px solid #e7ecef;
  border-radius:10px;
  overflow:hidden;
}

.oe-source-card-wide dl div{
  display:block;
  min-width:0;
  padding:10px 12px;
  border-top:0;
  border-right:1px solid #e7ecef;
}

.oe-source-card-wide dl div:last-child{
  border-right:0;
}

.oe-source-card-wide dt{
  font-size:10px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.oe-source-card-wide dd{
  margin:4px 0 0;
  font-size:12px;
}

.oe-source-wide-bottom{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:end;
  margin-top:10px;
}

.oe-source-card-wide .oe-source-note{
  margin:0!important;
  font-size:10px!important;
}

.oe-source-card-wide .oe-source-links{
  margin-top:0;
  justify-content:flex-end;
}

.oe-integrity-wide{
  margin:0;
  border-radius:0 9px 9px 0;
}

/* Keep the complete ANES/SPSS registry, but remove it from the default
   reading path. The registry remains available on demand. */
.oe-survey-registry-collapsible{
  margin:14px 0;
}

.oe-survey-registry-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:17px 20px;
  cursor:pointer;
  user-select:none;
  list-style:none;
  background:
    radial-gradient(circle at 100% 0%,rgba(36,94,123,.08),transparent 36%),
    linear-gradient(135deg,#fafcfd,#eef4f7);
}

.oe-survey-registry-summary::-webkit-details-marker{
  display:none;
}

.oe-registry-summary-copy{
  display:block;
  min-width:0;
}

.oe-registry-summary-copy .oe-lab-eyebrow{
  display:block;
  margin-bottom:5px;
}

.oe-registry-summary-copy>strong{
  display:block;
  color:var(--navy);
  font-size:18px;
  line-height:1.2;
}

.oe-registry-summary-description{
  display:block;
  margin-top:5px;
  color:#667a87;
  font-size:10px;
  line-height:1.5;
}

.oe-survey-registry-summary::after{
  content:"Open registry";
  flex:0 0 auto;
  color:#526b7a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.oe-survey-registry-collapsible[open] .oe-survey-registry-summary{
  border-bottom:1px solid var(--line);
}

.oe-survey-registry-collapsible[open] .oe-survey-registry-summary::after{
  content:"Close registry";
}

@media(max-width:900px){
  .oe-source-card-wide .oe-source-wide-head{
    display:block;
  }

  .oe-source-card-wide .oe-source-wide-head>p{
    margin-top:5px;
    text-align:left;
  }

  .oe-source-card-wide dl{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .oe-source-card-wide dl div:nth-child(2){
    border-right:0;
  }

  .oe-source-card-wide dl div:nth-child(-n+2){
    border-bottom:1px solid #e7ecef;
  }

  .oe-source-wide-bottom{
    grid-template-columns:1fr;
  }

  .oe-source-card-wide .oe-source-links{
    justify-content:flex-start;
  }
}

@media(max-width:520px){
  .oe-source-card-wide{
    padding:14px;
  }

  .oe-source-card-wide dl{
    grid-template-columns:1fr;
  }

  .oe-source-card-wide dl div{
    border-right:0!important;
    border-bottom:1px solid #e7ecef;
  }

  .oe-source-card-wide dl div:last-child{
    border-bottom:0;
  }

  .oe-survey-registry-summary{
    display:block;
  }

  .oe-registry-badge{
    margin-top:10px;
  }

  .oe-survey-registry-summary::after{
    display:block;
    margin-top:10px;
  }
}

/* ==========================================================================
   v0.12.6 — Latinobarometro-style primary controls
   Study/variable/category/period/geography selector alignment only.
   The state/county switch remains the same DOM control and behavior; it is
   simply relocated to the map header because it controls map geography, not
   the active study. No SPSS, weighting, map or analysis logic changes.
   ========================================================================== */

.oe-controls{
  grid-template-columns:.82fr 1.28fr 1.15fr .92fr 1.13fr;
}

.oe-controls .oe-variable-control{
  min-width:0;
}

.oe-controls select:disabled{
  color:#4c5e6a;
  background:#f7f9fa;
  cursor:default;
  opacity:1;
}

.oe-map-tools{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  gap:10px;
  flex:0 0 auto;
}

.oe-map-geography-control{
  width:220px;
}

.oe-map-geography-control>span{
  display:block;
  margin-bottom:5px;
  color:#70828f;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-align:right;
}

.oe-map-geography-control .oe-segmented{
  height:34px;
}

.oe-map-geography-control .oe-segmented button{
  padding:0 14px;
  font-size:11px;
}

.oe-map-tools .oe-period-pill{
  align-self:flex-end;
  min-height:34px;
  display:inline-flex;
  align-items:center;
}

@media(max-width:1080px){
  .oe-controls{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .oe-controls .oe-variable-control{
    grid-column:span 2;
  }
}

@media(max-width:720px){
  .oe-controls{
    grid-template-columns:1fr;
  }

  .oe-controls .oe-variable-control{
    grid-column:auto;
  }

  .oe-map-head{
    display:block;
  }

  .oe-map-tools{
    justify-content:space-between;
    align-items:flex-end;
    margin-top:12px;
  }

  .oe-map-geography-control{
    width:min(230px,72%);
  }

  .oe-map-geography-control>span{
    text-align:left;
  }
}

@media(max-width:480px){
  .oe-map-tools{
    align-items:stretch;
    gap:8px;
  }

  .oe-map-geography-control{
    width:auto;
    flex:1 1 auto;
  }

  .oe-map-tools .oe-period-pill{
    flex:0 0 auto;
  }
}

/* ==========================================================================
   v0.12.7 — full-width post-map research details
   ========================================================================== */
.oe-post-map-stack{
  display:grid;
  gap:14px;
  margin:14px 0 0;
}

.oe-post-map-stack .oe-research-snapshot,
.oe-post-map-stack .oe-source-card-wide,
.oe-post-map-stack .oe-integrity-wide{
  width:100%;
  max-width:none;
}

.oe-post-map-stack .oe-research-snapshot{
  min-height:0;
  justify-content:flex-start;
}

@media(max-width:720px){
  .oe-post-map-stack{gap:10px;margin-top:10px}
}


/* ===== Shared Analysis Lab / ANES implementation ===== */

:root{
  --lab-navy:#0b263f;
  --lab-blue:#245e7b;
  --lab-gold:#f5c451;
  --lab-ink:#223746;
  --lab-muted:#6e7f8a;
  --lab-line:#d9e1e6;
  --lab-soft:#f4f7f9;
  --lab-bg:#ffffff;
}

.oe-lab{
  margin:26px 0 20px;
  border:1px solid var(--lab-line);
  border-radius:18px;
  overflow:hidden;
  background:var(--lab-bg);
  box-shadow:0 18px 50px rgba(11,38,63,.07);
}

.oe-lab-hero{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:flex-start;
  padding:26px 28px;
  background:
    radial-gradient(circle at 100% 0%,rgba(36,94,123,.12),transparent 35%),
    linear-gradient(135deg,#f9fbfc,#eef4f7);
  border-bottom:1px solid var(--lab-line);
}

.oe-lab-eyebrow{
  margin:0 0 7px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.14em;
  color:var(--lab-blue);
}

.oe-lab-hero h2{
  margin:0;
  color:var(--lab-navy);
  font-size:clamp(22px,3vw,34px);
  line-height:1.08;
}

.oe-lab-hero p:not(.oe-lab-eyebrow){
  max-width:760px;
  margin:10px 0 0;
  color:var(--lab-muted);
  font-size:13px;
  line-height:1.65;
}

.oe-lab-badge{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:0 12px;
  border:1px solid #cbd8df;
  border-radius:999px;
  background:#fff;
  color:var(--lab-navy);
  font-size:10px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.oe-lab-badge i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--lab-gold);
  box-shadow:0 0 0 4px rgba(245,196,81,.2);
}

.oe-lab-tabs{
  display:flex;
  gap:6px;
  padding:12px 16px 0;
  background:#fff;
}

.oe-lab-tabs button{
  min-height:40px;
  border:1px solid transparent;
  border-radius:10px 10px 0 0;
  background:transparent;
  color:#758590;
  padding:0 16px;
  font:inherit;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.oe-lab-tabs button.active{
  color:var(--lab-navy);
  background:var(--lab-soft);
  border-color:var(--lab-line);
  border-bottom-color:var(--lab-soft);
}

.oe-lab-panel{
  margin:-1px 16px 0;
  padding:22px;
  border:1px solid var(--lab-line);
  border-radius:0 12px 12px 12px;
  background:var(--lab-soft);
}

.oe-lab-panel-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}

.oe-lab-panel-head h3{
  margin:2px 0 6px;
  color:var(--lab-navy);
  font-size:19px;
}

.oe-lab-panel-head p{
  margin:0;
  max-width:720px;
  color:var(--lab-muted);
  font-size:11px;
  line-height:1.6;
}

.oe-lab-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
  margin-top:18px;
}

.oe-lab-controls-one{
  grid-template-columns:minmax(220px,420px);
}

.oe-lab-controls label span{
  display:block;
  margin-bottom:5px;
  color:#71828d;
  font-size:9px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.oe-lab-controls select{
  width:100%;
  height:42px;
  border:1px solid #cbd7de;
  border-radius:9px;
  background:#fff;
  color:var(--lab-ink);
  padding:0 10px;
}

.oe-lab-primary,
.oe-lab-secondary,
.oe-lab-export{
  border-radius:9px;
  font:inherit;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}

.oe-lab-primary{
  height:42px;
  border:1px solid var(--lab-navy);
  background:var(--lab-navy);
  color:#fff;
  padding:0 16px;
}

.oe-lab-secondary,
.oe-lab-export{
  min-height:34px;
  border:1px solid #c7d3da;
  background:#fff;
  color:var(--lab-navy);
  padding:0 12px;
}

.oe-lab-export:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.oe-lab-status{
  margin:14px 0 0;
  min-height:18px;
  color:#697c88;
  font-size:10px;
}

.oe-lab-warning{
  margin-top:14px;
  border-left:3px solid var(--lab-gold);
  border-radius:0 8px 8px 0;
  background:#fffaf0;
  padding:10px 12px;
  color:#6f5b29;
  font-size:10px;
  line-height:1.55;
}

.oe-lab-warning.is-period-mismatch{
  border-left-color:#b46a35;
  background:#fff5ed;
  color:#784d2c;
}

.oe-lab-stat-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}

.oe-lab-stat-grid>div{
  min-width:0;
  padding:11px;
  border:1px solid #dce4e8;
  border-radius:10px;
  background:#fff;
}

.oe-lab-stat-grid span{
  display:block;
  color:#75858f;
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.oe-lab-stat-grid strong{
  display:block;
  margin-top:5px;
  color:var(--lab-navy);
  font-size:16px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.oe-correlation-stats{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.oe-lab-chart-card{
  margin-top:14px;
  overflow:hidden;
  border:1px solid #d9e2e7;
  border-radius:12px;
  background:#fff;
}

.oe-lab-chart-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #e3e9ec;
}

.oe-lab-chart-head>div{
  min-width:0;
}

.oe-lab-chart-head strong{
  display:block;
  color:var(--lab-navy);
  font-size:12px;
}

.oe-lab-chart-head span{
  display:block;
  margin-top:3px;
  color:#7a8992;
  font-size:9px;
}

.oe-lab-chart-stage{
  position:relative;
  min-height:310px;
  padding:10px;
}

.oe-lab-chart-stage svg{
  display:block;
  width:100%;
  height:300px;
}

.oe-scatter-stage,
.oe-scatter-stage svg{
  min-height:380px;
  height:380px;
}

.oe-lab-tooltip{
  position:absolute;
  z-index:10;
  pointer-events:none;
  max-width:240px;
  border:1px solid #c8d5dd;
  border-radius:8px;
  background:rgba(255,255,255,.97);
  box-shadow:0 8px 24px rgba(11,38,63,.13);
  padding:8px 10px;
  color:var(--lab-ink);
  font-size:10px;
  line-height:1.45;
}

.oe-frequency-table-wrap{
  overflow:auto;
  margin-top:12px;
  border:1px solid #dae3e7;
  border-radius:10px;
  background:#fff;
}

.oe-frequency-table{
  width:100%;
  border-collapse:collapse;
  font-size:10px;
}

.oe-frequency-table th,
.oe-frequency-table td{
  padding:9px 11px;
  border-bottom:1px solid #e7ecef;
  text-align:left;
}

.oe-frequency-table th{
  color:#73838e;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.oe-frequency-table td:nth-child(2),
.oe-frequency-table td:nth-child(3),
.oe-frequency-table th:nth-child(2),
.oe-frequency-table th:nth-child(3){
  text-align:right;
}

.oe-frequency-table tbody tr:last-child td{
  border-bottom:0;
}

.oe-correlation-readout{
  margin-top:12px;
  border:1px solid #d8e2e7;
  border-radius:10px;
  background:#fff;
  padding:13px 14px;
}

.oe-correlation-readout strong{
  color:var(--lab-navy);
  font-size:12px;
}

.oe-correlation-readout p{
  margin:5px 0 0;
  color:#667a87;
  font-size:10px;
  line-height:1.6;
}

.oe-lab-integrity-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  padding:16px;
}

.oe-lab-integrity-grid article{
  min-width:0;
  border:1px solid var(--lab-line);
  border-radius:10px;
  padding:12px;
  background:#fff;
}

.oe-lab-integrity-grid article>span{
  display:block;
  color:var(--lab-gold);
  font-size:10px;
  font-weight:900;
}

.oe-lab-integrity-grid strong{
  display:block;
  margin-top:5px;
  color:var(--lab-navy);
  font-size:10px;
}

.oe-lab-integrity-grid p{
  margin:5px 0 0;
  color:#74858f;
  font-size:9px;
  line-height:1.5;
}

/* D3 chart treatment */
.oe-lab .axis text{
  fill:#6f808a;
  font-size:9px;
}

.oe-lab .axis path,
.oe-lab .axis line{
  stroke:#d6e0e5;
}

.oe-lab .hist-bar{
  fill:#4f8caa;
}

.oe-lab .hist-bar:hover{
  fill:#245e7b;
}

.oe-lab .scatter-dot{
  fill:#245e7b;
  fill-opacity:.72;
  stroke:#fff;
  stroke-width:1;
}

.oe-lab .scatter-dot:hover{
  fill:#f5c451;
  fill-opacity:1;
  stroke:#0b263f;
}

.oe-lab .regression-line{
  stroke:#0b263f;
  stroke-width:2;
  stroke-dasharray:6 4;
}

.oe-lab .zero-grid{
  stroke:#e9eef1;
  stroke-width:1;
}

@media(max-width:960px){
  .oe-lab-stat-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .oe-correlation-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .oe-lab-integrity-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:680px){
  .oe-lab-hero,
  .oe-lab-panel-head,
  .oe-lab-chart-head{
    flex-direction:column;
  }

  .oe-lab-hero{
    padding:20px;
  }

  .oe-lab-badge{
    align-self:flex-start;
  }

  .oe-lab-tabs{
    overflow:auto;
    white-space:nowrap;
  }

  .oe-lab-panel{
    margin-left:10px;
    margin-right:10px;
    padding:16px;
  }

  .oe-lab-controls{
    grid-template-columns:1fr;
  }

  .oe-lab-stat-grid,
  .oe-correlation-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .oe-lab-integrity-grid{
    grid-template-columns:1fr;
    padding:10px;
  }

  .oe-lab-chart-stage,
  .oe-lab-chart-stage svg{
    height:280px;
    min-height:280px;
  }

  .oe-scatter-stage,
  .oe-scatter-stage svg{
    height:340px;
    min-height:340px;
  }
}


/* v0.6.1 — Frequency Explorer category navigation */
.oe-frequency-category-nav{
  margin-top:16px;
  border-top:1px solid #dbe4e8;
  border-bottom:1px solid #dbe4e8;
  background:#fff;
}

.oe-frequency-category-scroll{
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:9px 2px;
  scrollbar-width:thin;
  scrollbar-color:#cbd7de transparent;
  -webkit-overflow-scrolling:touch;
}

.oe-frequency-category-scroll::-webkit-scrollbar{
  height:5px;
}

.oe-frequency-category-scroll::-webkit-scrollbar-thumb{
  background:#cbd7de;
  border-radius:999px;
}

.oe-frequency-category-scroll button{
  flex:0 0 auto;
  min-height:34px;
  border:1px solid #d3dde2;
  border-radius:999px;
  background:#fff;
  color:#657985;
  padding:0 12px;
  font:inherit;
  font-size:9px;
  font-weight:900;
  letter-spacing:.025em;
  white-space:nowrap;
  cursor:pointer;
}

.oe-frequency-category-scroll button:hover{
  background:#f2f6f8;
  color:#0b263f;
}

.oe-frequency-category-scroll button.active{
  border-color:#0b263f;
  background:#0b263f;
  color:#fff;
}

.oe-frequency-category-scroll button:focus-visible{
  outline:2px solid #f5c451;
  outline-offset:2px;
}

@media(max-width:680px){
  .oe-frequency-category-nav{
    margin-left:-16px;
    margin-right:-16px;
    padding-left:16px;
    padding-right:16px;
  }

  .oe-frequency-category-scroll{
    padding-top:9px;
    padding-bottom:9px;
  }
}


/* v0.6.2 — broad research-group tabs + association rule */
.oe-association-rule{
  margin-top:14px;
  border:1px solid #d7e1e6;
  border-left:3px solid #245e7b;
  border-radius:0 9px 9px 0;
  background:#f7fafb;
  padding:10px 12px;
}

.oe-association-rule strong{
  color:#0b263f;
  font-size:10px;
}

.oe-association-rule p{
  margin:4px 0 0;
  color:#667a87;
  font-size:9px;
  line-height:1.55;
}


/* v0.6.3 — political-science frequency structure */
.oe-frequency-mode{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:15px;
  max-width:520px;
}

.oe-frequency-mode button{
  min-height:38px;
  border:1px solid #ccd8df;
  border-radius:9px;
  background:#fff;
  color:#627681;
  font:inherit;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}

.oe-frequency-mode button.active{
  background:#0b263f;
  border-color:#0b263f;
  color:#fff;
}

.oe-frequency-category-scroll{
  display:grid;
  grid-template-columns:repeat(5,minmax(145px,1fr));
  overflow-x:auto;
}

.oe-frequency-category-scroll button{
  border-radius:9px;
  white-space:normal;
  line-height:1.2;
  padding:8px 10px;
}

.oe-frequency-survey-browser{
  margin-top:14px;
  border:1px solid #d8e2e7;
  border-radius:12px;
  background:#fff;
  padding:14px;
}

.oe-frequency-survey-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.oe-frequency-survey-head h4{
  margin:0;
  color:#0b263f;
  font-size:15px;
}

.oe-frequency-survey-head>span{
  flex:0 0 auto;
  border:1px solid #d4dfe4;
  border-radius:999px;
  padding:5px 8px;
  color:#657984;
  font-size:8px;
  font-weight:900;
}

.oe-frequency-survey-groups{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:12px;
}

.oe-frequency-survey-groups button{
  min-height:32px;
  border:1px solid #d5e0e5;
  border-radius:999px;
  background:#f7f9fa;
  color:#536b79;
  padding:0 10px;
  font:inherit;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}

.oe-frequency-survey-groups button.active{
  background:#245e7b;
  border-color:#245e7b;
  color:#fff;
}

.oe-frequency-survey-details{
  margin-top:11px;
  border-top:1px solid #e1e7ea;
  padding-top:11px;
}

.oe-survey-variable-detail,
.oe-survey-domain-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.oe-survey-variable-detail>div:first-child span,
.oe-survey-domain-title span{
  display:block;
  color:#7c8b94;
  font-size:8px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.oe-survey-variable-detail strong,
.oe-survey-domain-title strong{
  display:block;
  margin-top:3px;
  color:#0b263f;
  font-size:12px;
}

.oe-survey-variable-detail small{
  display:block;
  margin-top:4px;
  color:#82919a;
  font-size:8px;
}

.oe-survey-category-chips{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.oe-survey-category-chips span{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  border:1px solid #d7e1e6;
  border-radius:999px;
  background:#f5f8fa;
  color:#455e6d;
  padding:0 8px;
  font-size:8px;
  font-weight:800;
}

.oe-survey-variable-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}

.oe-survey-variable-list article{
  min-width:0;
  border:1px solid #dfe6ea;
  border-radius:9px;
  background:#f8fafb;
  padding:10px;
}

.oe-survey-variable-list article>div:first-child strong{
  display:block;
  color:#294453;
  font-size:9px;
  line-height:1.35;
}

.oe-survey-variable-list article>div:first-child small{
  display:block;
  margin-top:4px;
  color:#829099;
  font-size:8px;
  line-height:1.35;
}

.oe-survey-variable-list .oe-survey-category-chips{
  justify-content:flex-start;
  margin-top:8px;
}

.oe-frequency-survey-note{
  margin-top:11px;
  border-left:3px solid #f5c451;
  background:#fffaf0;
  border-radius:0 8px 8px 0;
  padding:9px 10px;
  color:#74643d;
  font-size:9px;
  line-height:1.5;
}

@media(max-width:980px){
  .oe-frequency-category-scroll{
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x proximity;
  }

  .oe-frequency-category-scroll button{
    min-width:180px;
    scroll-snap-align:start;
  }
}

@media(max-width:680px){
  .oe-frequency-mode{
    grid-template-columns:1fr;
    max-width:none;
  }

  .oe-frequency-survey-head,
  .oe-survey-variable-detail,
  .oe-survey-domain-title{
    flex-direction:column;
  }

  .oe-frequency-survey-head>span{
    align-self:flex-start;
  }

  .oe-survey-category-chips{
    justify-content:flex-start;
  }

  .oe-survey-variable-list{
    grid-template-columns:1fr;
  }

  .oe-frequency-survey-groups{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
  }

  .oe-frequency-survey-groups button{
    flex:0 0 auto;
  }
}


/* v0.7 — ANES weighted survey frequencies */
.oe-survey-frequency-output{
  margin-top:12px;
  border-top:1px solid #dfe7eb;
  padding-top:12px;
}

.oe-survey-frequency-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.oe-survey-frequency-summary>div{
  border:1px solid #dce5e9;
  border-radius:9px;
  background:#f8fafb;
  padding:10px;
}

.oe-survey-frequency-summary span{
  display:block;
  color:#7d8d96;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
}

.oe-survey-frequency-summary strong{
  display:block;
  margin-top:5px;
  color:#0b263f;
  font-size:14px;
}

.oe-survey-frequency-bars{
  display:grid;
  gap:9px;
  margin-top:12px;
}

.oe-survey-frequency-row{
  display:grid;
  grid-template-columns:minmax(160px,1.2fr) minmax(180px,2fr) 78px;
  gap:10px;
  align-items:center;
}

.oe-survey-frequency-label{
  color:#3e5664;
  font-size:9px;
  line-height:1.35;
}

.oe-survey-frequency-track{
  height:10px;
  border-radius:999px;
  background:#e8eef1;
  overflow:hidden;
}

.oe-survey-frequency-fill{
  height:100%;
  border-radius:999px;
  background:#245e7b;
}

.oe-survey-frequency-value{
  text-align:right;
  color:#0b263f;
  font-size:10px;
  font-weight:900;
}

.oe-survey-frequency-value small{
  display:block;
  margin-top:2px;
  color:#81919a;
  font-size:7px;
  font-weight:700;
}

.oe-survey-variable-list article{
  cursor:pointer;
}

.oe-survey-variable-list article.active{
  border-color:#245e7b;
  box-shadow:inset 0 0 0 1px #245e7b;
}

.oe-controlled-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr)) auto;
  gap:9px;
  align-items:end;
  margin-top:15px;
}

.oe-controlled-grid label>span{
  display:block;
  margin-bottom:5px;
  color:#71828c;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
}

.oe-controlled-grid select{
  width:100%;
  min-height:40px;
  border:1px solid #ccd8df;
  border-radius:9px;
  background:#fff;
  color:#294453;
  padding:0 10px;
  font:inherit;
  font-size:10px;
}

.oe-controlled-grid button{
  min-height:40px;
  border:0;
  border-radius:9px;
  background:#0b263f;
  color:#fff;
  padding:0 14px;
  font:inherit;
  font-size:9px;
  font-weight:900;
  cursor:pointer;
}

.oe-controlled-results{
  display:grid;
  gap:8px;
  margin-top:14px;
}

.oe-controlled-stratum{
  display:grid;
  grid-template-columns:minmax(150px,1fr) 100px minmax(180px,2fr);
  gap:10px;
  align-items:center;
  border:1px solid #dce5e9;
  border-radius:10px;
  background:#f8fafb;
  padding:11px 12px;
}

.oe-controlled-stratum strong{
  color:#0b263f;
  font-size:10px;
}

.oe-controlled-stratum span{
  color:#607580;
  font-size:9px;
}

.oe-controlled-stratum small{
  color:#7c8d96;
  font-size:8px;
  line-height:1.4;
}

@media(max-width:980px){
  .oe-controlled-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:680px){
  .oe-survey-frequency-summary{
    grid-template-columns:1fr;
  }

  .oe-survey-frequency-row{
    grid-template-columns:1fr 70px;
  }

  .oe-survey-frequency-track{
    grid-column:1/-1;
    grid-row:2;
  }

  .oe-controlled-grid,
  .oe-controlled-stratum{
    grid-template-columns:1fr;
  }
}

/* ==========================================================
   AFDES Analysis Lab v0.11.0 — SPSS-first unified workflow
   ========================================================== */

.oe-simple-workflow{
  display:grid;
  grid-template-columns:auto 28px auto 28px auto 28px auto;
  align-items:center;
  gap:10px;
  padding:16px 22px;
  border-bottom:1px solid var(--lab-line);
  background:#fff;
}

.oe-simple-workflow>div{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  color:var(--lab-ink);
  font-size:11px;
}

.oe-simple-workflow>div span{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  flex:0 0 26px;
  border-radius:50%;
  background:var(--lab-navy);
  color:#fff;
  font-size:10px;
  font-weight:900;
}

.oe-simple-workflow>div strong{
  white-space:nowrap;
}

.oe-simple-workflow>i{
  display:block;
  height:1px;
  background:linear-gradient(90deg,#d1dce2,#aabcc7);
}

.oe-analysis-context{
  display:grid;
  grid-template-columns:minmax(220px,1.1fr) minmax(220px,1fr) minmax(220px,1fr);
  gap:10px;
  padding:14px 16px 4px;
  background:#fff;
}

.oe-analysis-place,
.oe-analysis-context-card{
  min-width:0;
  padding:12px 14px;
  border:1px solid #d9e2e7;
  border-radius:11px;
  background:#f9fbfc;
}

.oe-analysis-place>span,
.oe-analysis-context-card>span{
  display:block;
  margin-bottom:6px;
  color:#748590;
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.oe-analysis-place select{
  width:100%;
  height:38px;
  border:1px solid #cbd7de;
  border-radius:8px;
  background:#fff;
  color:var(--lab-navy);
  padding:0 10px;
  font:inherit;
  font-size:11px;
  font-weight:800;
}

.oe-analysis-context-card strong{
  display:block;
  color:var(--lab-navy);
  font-size:12px;
}

.oe-analysis-context-card small{
  display:block;
  margin-top:4px;
  color:#7b8b95;
  font-size:9px;
  line-height:1.45;
}

.oe-variable-group-nav{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:6px;
  margin-top:18px;
}

.oe-variable-group-nav button{
  min-height:34px;
  border:1px solid #d0dbe1;
  border-radius:8px;
  background:#fff;
  color:#687b88;
  padding:6px 8px;
  font:inherit;
  font-size:8px;
  font-weight:900;
  cursor:pointer;
}

.oe-variable-group-nav button.active{
  border-color:var(--lab-navy);
  background:var(--lab-navy);
  color:#fff;
}

.oe-lab-controls-frequency{
  grid-template-columns:minmax(260px,1.2fr) minmax(220px,.9fr) auto;
}

.oe-lab-status.is-error{
  color:#a13c36;
}

.oe-frequency-summary-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.oe-correlation-summary-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
}

.oe-analysis-result-card{
  margin-top:14px;
  border:1px solid #d9e2e7;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}

.oe-analysis-bars{
  display:grid;
  gap:10px;
  padding:18px;
}

.oe-analysis-bar-row{
  display:grid;
  grid-template-columns:minmax(150px,280px) minmax(160px,1fr) 92px;
  gap:12px;
  align-items:center;
}

.oe-analysis-bar-label{
  color:#344b5b;
  font-size:10px;
  font-weight:800;
  line-height:1.35;
}

.oe-analysis-bar-track{
  position:relative;
  height:12px;
  overflow:hidden;
  border-radius:999px;
  background:#e9eff3;
}

.oe-analysis-bar-fill{
  height:100%;
  min-width:1px;
  border-radius:inherit;
  background:linear-gradient(90deg,#1f5d7c,#78a9c2);
}

.oe-analysis-bar-value{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:6px;
  white-space:nowrap;
}

.oe-analysis-bar-value strong{
  color:var(--lab-navy);
  font-size:12px;
}

.oe-analysis-bar-value span{
  color:#84929b;
  font-size:8px;
}

.oe-analysis-empty{
  padding:18px;
  border:1px dashed #cad7de;
  border-radius:10px;
  color:#71838e;
  background:#fff;
  font-size:10px;
}

.oe-analysis-breakdown{
  margin-top:14px;
  border:1px solid #d9e2e7;
  border-radius:12px;
  background:#fff;
  padding:16px;
}

.oe-analysis-breakdown-head,
.oe-controlled-summary-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:12px;
}

.oe-analysis-breakdown-head span,
.oe-controlled-summary-head span{
  display:block;
  color:#7c8d97;
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.oe-analysis-breakdown-head strong,
.oe-controlled-summary-head strong{
  display:block;
  margin-top:3px;
  color:var(--lab-navy);
  font-size:12px;
}

.oe-analysis-breakdown-head small,
.oe-controlled-summary-head small{
  color:#7c8d97;
  font-size:9px;
}

.oe-analysis-breakdown-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.oe-analysis-breakdown-card{
  padding:12px;
  border:1px solid #e0e7eb;
  border-radius:10px;
  background:#fafcfd;
}

.oe-analysis-breakdown-title{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.oe-analysis-breakdown-title strong{
  color:var(--lab-navy);
  font-size:10px;
}

.oe-analysis-breakdown-title span{
  color:#7c8d97;
  font-size:8px;
}

.oe-breakdown-mini-row{
  display:grid;
  grid-template-columns:minmax(110px,1fr) minmax(80px,1fr) 48px;
  align-items:center;
  gap:7px;
  margin-top:6px;
}

.oe-breakdown-mini-row>span{
  color:#60727e;
  font-size:8px;
}

.oe-breakdown-mini-row>div{
  height:7px;
  overflow:hidden;
  border-radius:999px;
  background:#e7edf1;
}

.oe-breakdown-mini-row i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:#6d9eb7;
}

.oe-breakdown-mini-row>strong{
  text-align:right;
  color:#29475a;
  font-size:8px;
}

.oe-analysis-method-note{
  margin-top:14px;
  padding:11px 12px;
  border-left:3px solid #9ab5c4;
  border-radius:0 8px 8px 0;
  background:#eef4f7;
  color:#5e7380;
  font-size:9px;
  line-height:1.55;
}

.oe-survey-crosstab-wrap{
  margin-top:14px;
  overflow:auto;
  border:1px solid #d9e2e7;
  border-radius:12px;
  background:#fff;
}

.oe-survey-crosstab{
  width:100%;
  border-collapse:collapse;
  min-width:680px;
}

.oe-survey-crosstab th,
.oe-survey-crosstab td{
  padding:10px;
  border-bottom:1px solid #e5ebee;
  border-right:1px solid #eef2f4;
  text-align:center;
  font-size:9px;
}

.oe-survey-crosstab thead th{
  background:#f4f7f9;
  color:#536a78;
  font-weight:900;
}

.oe-survey-crosstab tbody th{
  text-align:left;
  color:var(--lab-navy);
  background:#fbfcfd;
}

.oe-survey-crosstab td strong{
  display:block;
  color:var(--lab-navy);
  font-size:10px;
}

.oe-survey-crosstab td span{
  display:block;
  margin-top:2px;
  color:#8a989f;
  font-size:7px;
}

.oe-controlled-card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.oe-controlled-card{
  padding:14px;
  border:1px solid #dce4e8;
  border-radius:11px;
  background:#fff;
}

.oe-controlled-card>span{
  display:block;
  color:#6f828e;
  font-size:9px;
  font-weight:900;
}

.oe-controlled-card>strong{
  display:block;
  margin:8px 0 4px;
  color:var(--lab-navy);
  font-size:22px;
}

.oe-controlled-card>small{
  display:block;
  color:#728590;
  font-size:8px;
  line-height:1.4;
}

.oe-controlled-card>p{
  margin:8px 0 0;
  color:#73848e;
  font-size:8px;
  line-height:1.5;
}

@media (max-width:980px){
  .oe-simple-workflow{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .oe-simple-workflow>i{display:none;}
  .oe-simple-workflow>div{
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
  }
  .oe-simple-workflow>div strong{white-space:normal;}
  .oe-analysis-context{grid-template-columns:1fr;}
  .oe-variable-group-nav{grid-template-columns:repeat(3,minmax(0,1fr));}
  .oe-frequency-summary-grid,
  .oe-correlation-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .oe-analysis-breakdown-grid{grid-template-columns:1fr;}
  .oe-controlled-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media (max-width:680px){
  .oe-simple-workflow{grid-template-columns:repeat(2,minmax(0,1fr));}
  .oe-variable-group-nav{grid-template-columns:repeat(2,minmax(0,1fr));}
  .oe-lab-controls,
  .oe-lab-controls-frequency,
  .oe-controlled-grid{grid-template-columns:1fr;}
  .oe-frequency-summary-grid,
  .oe-correlation-summary-grid{grid-template-columns:1fr 1fr;}
  .oe-analysis-bar-row{grid-template-columns:1fr;gap:5px;}
  .oe-analysis-bar-value{justify-content:flex-start;}
  .oe-controlled-card-grid{grid-template-columns:1fr;}
}

/* ==========================================================
   v0.12.1 — Analysis Lab responsive hardening
========================================================== */
.oe-analysis-lab,
.oe-analysis-lab *,
.oe-analysis-shell,
.oe-analysis-shell * {
  min-width: 0;
  max-width: 100%;
}

.oe-analysis-lab select,
.oe-analysis-lab input,
.oe-analysis-lab button,
.oe-analysis-shell select,
.oe-analysis-shell input,
.oe-analysis-shell button {
  max-width: 100%;
  font: inherit;
}

.oe-analysis-lab h1,
.oe-analysis-lab h2,
.oe-analysis-lab h3,
.oe-analysis-lab p,
.oe-analysis-lab small,
.oe-analysis-lab strong,
.oe-analysis-lab span,
.oe-analysis-lab label,
.oe-analysis-lab button,
.oe-analysis-shell h1,
.oe-analysis-shell h2,
.oe-analysis-shell h3,
.oe-analysis-shell p,
.oe-analysis-shell small,
.oe-analysis-shell strong,
.oe-analysis-shell span,
.oe-analysis-shell label,
.oe-analysis-shell button {
  overflow-wrap: anywhere;
}

.oe-analysis-table-wrap,
.oe-crosstab-wrap,
.oe-controlled-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

@media (max-width:420px){
  .oe-simple-workflow,
  .oe-variable-group-nav,
  .oe-frequency-summary-grid,
  .oe-correlation-summary-grid,
  .oe-controlled-card-grid{
    grid-template-columns:1fr;
  }
  .oe-lab-controls button,
  .oe-controlled-grid button{
    width:100%;
  }
}

/* Apply the same viewport safeguards to the actual Analysis Lab root. */
.oe-lab,
.oe-lab *,
.oe-lab *::before,
.oe-lab *::after {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.oe-lab select,
.oe-lab input,
.oe-lab button,
.oe-lab textarea {
  max-width: 100%;
  font: inherit;
}

.oe-lab h1,
.oe-lab h2,
.oe-lab h3,
.oe-lab p,
.oe-lab small,
.oe-lab strong,
.oe-lab span,
.oe-lab label,
.oe-lab button,
.oe-lab a,
.oe-lab td,
.oe-lab th {
  overflow-wrap: anywhere;
}

@media (max-width:420px){
  .oe-lab-hero{padding:18px 16px;gap:14px;flex-direction:column}
  .oe-lab-badge{white-space:normal}
  .oe-simple-workflow,
  .oe-variable-group-nav,
  .oe-frequency-summary-grid,
  .oe-correlation-summary-grid,
  .oe-controlled-card-grid{grid-template-columns:1fr}
}

/* ==========================================================
   v0.13.0 — Latinobarometro-parity Analysis Lab
   Frequencies · Crosstabs · Correlation matrix
   ========================================================== */
.oe-analysis-context{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.oe-corr-controls{
  display:grid;
  grid-template-columns:minmax(140px,.72fr) repeat(4,minmax(170px,1fr)) auto;
  gap:10px;
  align-items:end;
  margin-top:14px;
}

.oe-corr-controls label{
  min-width:0;
}

.oe-corr-controls label>span,
.oe-lab-controls label>span{
  display:block;
  margin-bottom:6px;
  color:#748590;
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.oe-corr-controls select{
  width:100%;
  height:38px;
  padding:0 10px;
  border:1px solid #cbd7de;
  border-radius:8px;
  background:#fff;
  color:var(--lab-navy);
  font:inherit;
  font-size:11px;
  font-weight:700;
}

.oe-correlation-matrix-summary-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.oe-correlation-matrix-wrap{
  width:100%;
  max-width:100%;
  margin-top:14px;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid #d9e2e7;
  border-radius:12px;
  background:#fff;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
}

.oe-correlation-matrix{
  width:100%;
  min-width:900px;
  max-width:none;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:9px;
}

.oe-correlation-matrix th,
.oe-correlation-matrix td{
  padding:9px 8px;
  border-right:1px solid #edf1f3;
  border-bottom:1px solid #e4eaee;
  text-align:center;
  vertical-align:middle;
}

.oe-correlation-matrix thead th{
  background:#f2f6f8;
  color:#526a79;
  font-weight:900;
}

.oe-correlation-matrix thead th b{
  display:block;
  margin-bottom:3px;
  color:var(--lab-navy);
  font-size:11px;
}

.oe-correlation-matrix thead th span{
  display:block;
  max-width:150px;
  color:#647985;
  font-size:8px;
  line-height:1.25;
}

.oe-corr-title-cell,
.oe-corr-axis-title{
  color:var(--lab-navy)!important;
  background:#eaf1f5!important;
  text-transform:uppercase;
  letter-spacing:.05em;
  font-size:8px!important;
}

.oe-corr-method-stub{
  min-width:92px;
  background:#f6f9fa;
  color:var(--lab-navy);
  font-weight:900;
}

.oe-corr-variable-stub{
  min-width:170px;
  max-width:210px;
  position:sticky;
  left:0;
  z-index:4;
  background:#fbfcfd!important;
  color:var(--lab-navy);
  text-align:left!important;
}

.oe-corr-variable-stub b{
  margin-right:5px;
}

.oe-corr-variable-stub span{
  line-height:1.3;
}

.oe-corr-stat-stub{
  min-width:126px;
  background:#f8fafb!important;
  color:#5e7380;
  text-align:left!important;
  font-weight:800;
}

.oe-corr-data-cell{
  min-width:96px;
  color:#304c5f;
}

.oe-corr-data-cell strong{
  color:var(--lab-navy);
  font-size:10px;
}

.oe-correlation-matrix-wrap[data-var-count="2"] .oe-correlation-matrix{
  width:100%;
  min-width:720px;
}
.oe-correlation-matrix-wrap[data-var-count="3"] .oe-correlation-matrix{width:100%;min-width:820px}
.oe-correlation-matrix-wrap[data-var-count="4"] .oe-correlation-matrix{width:100%;min-width:920px}

.oe-matrix-scroll-note{
  display:none;
  margin:8px 2px 0;
  color:#6f818d;
  font-size:9px;
  line-height:1.4;
}

.oe-correlation-matrix-wrap.matrix-scrollable + .oe-matrix-scroll-note,
.oe-survey-crosstab-wrap.matrix-scrollable + .oe-matrix-scroll-note{
  display:block;
}

.oe-corr-mobile-key{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:12px;
}

.oe-corr-mobile-key[hidden]{display:none!important}

.oe-corr-mobile-key>div{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  gap:7px;
  align-items:start;
  padding:7px 8px;
  border:1px solid #dde5e9;
  border-radius:8px;
  background:#fafcfd;
}

.oe-corr-mobile-key b{
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--lab-navy);
  color:#fff;
  font-size:8px;
}

.oe-corr-mobile-key span{
  color:#536d7e;
  font-size:8px;
  line-height:1.3;
}

/* SPSS-style crosstab density and fixed row-label behavior. */
.oe-survey-crosstab{
  width:max-content;
  min-width:100%;
  max-width:none;
}

.oe-survey-crosstab tbody th:first-child{
  position:sticky;
  left:0;
  z-index:3;
}

@media(max-width:1180px){
  .oe-corr-controls{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .oe-corr-controls .oe-lab-primary{min-height:38px}
}

@media(max-width:980px){
  .oe-analysis-context{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-correlation-matrix-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-corr-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:680px){
  .oe-analysis-context,
  .oe-correlation-matrix-summary-grid,
  .oe-corr-controls{grid-template-columns:1fr}
  .oe-corr-mobile-key{grid-template-columns:1fr}

  /* Crosstabs become semantic row cards instead of forcing the page wide. */
  .oe-survey-crosstab-wrap{overflow:visible;border:0;background:transparent;border-radius:0}
  .oe-survey-crosstab{display:block;width:100%;min-width:0!important;max-width:100%;font-size:10px;border:0}
  .oe-survey-crosstab thead{display:none}
  .oe-survey-crosstab tbody{display:grid;grid-template-columns:1fr;gap:10px;width:100%}
  .oe-survey-crosstab tbody tr{display:block;width:100%;min-width:0;border:1px solid #d5dfe5;border-radius:10px;overflow:hidden;background:#fff}
  .oe-survey-crosstab tbody th:first-child{display:block;position:static!important;width:100%;max-width:none;padding:10px 11px!important;border:0;border-bottom:1px solid #d5dfe5;background:#f1f5f7!important;color:var(--lab-navy);font-size:11px;font-weight:900;text-align:left}
  .oe-survey-crosstab tbody td{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:10px;row-gap:1px;width:100%;padding:8px 11px!important;border:0;border-bottom:1px solid #edf1f3;text-align:right;align-items:center;min-width:0;background:#fff}
  .oe-survey-crosstab tbody td:last-child{border-bottom:0}
  .oe-survey-crosstab tbody td::before{content:attr(data-label);grid-column:1;grid-row:1 / span 2;align-self:center;color:#536d7e;font-size:9px;font-weight:800;line-height:1.25;text-align:left}
  .oe-survey-crosstab tbody td strong{grid-column:2;grid-row:1;margin:0;font-size:11px;white-space:nowrap}
  .oe-survey-crosstab tbody td span{grid-column:2;grid-row:2;margin:1px 0 0;font-size:8px;white-space:nowrap}
  .oe-survey-crosstab-wrap + .oe-matrix-scroll-note{display:none!important}

  /* Correlation matrix stays readable on phones and scrolls horizontally when needed. */
  .oe-correlation-matrix-wrap{
    width:100%;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border-radius:9px;
    -webkit-overflow-scrolling:touch;
  }
  .oe-correlation-matrix{
    width:100%!important;
    min-width:680px!important;
    max-width:none!important;
    table-layout:fixed!important;
    font-size:9px;
  }
  .oe-correlation-matrix-wrap[data-var-count="2"] .oe-correlation-matrix{min-width:620px!important}
  .oe-correlation-matrix-wrap[data-var-count="3"] .oe-correlation-matrix{min-width:720px!important}
  .oe-correlation-matrix-wrap[data-var-count="4"] .oe-correlation-matrix{min-width:820px!important}
  .oe-correlation-matrix thead tr:first-child{display:none}
  .oe-corr-method-stub,
  .oe-correlation-matrix thead tr:nth-child(2) th:first-child{display:none!important}
  .oe-correlation-matrix thead tr:nth-child(2) th:nth-child(2){width:28px!important;min-width:28px!important;max-width:28px!important;font-size:0!important}
  .oe-correlation-matrix thead tr:nth-child(2) th:nth-child(2)::after{content:'Row';font-size:8px}
  .oe-correlation-matrix thead tr:nth-child(2) th:nth-child(3){width:52px!important;min-width:52px!important;max-width:52px!important;font-size:0!important}
  .oe-correlation-matrix thead tr:nth-child(2) th:nth-child(3)::after{content:'Stat.';font-size:8px}
  .oe-correlation-matrix thead th{padding:6px 2px!important;overflow:hidden}
  .oe-correlation-matrix thead th b{font-size:9px!important;margin:0!important}
  .oe-correlation-matrix thead th span{display:none!important}
  .oe-corr-variable-stub{position:static!important;width:28px!important;min-width:28px!important;max-width:28px!important;padding:5px 2px!important;text-align:center!important}
  .oe-corr-variable-stub span{display:none}
  .oe-corr-variable-stub b{margin:0;font-size:9px}
  .oe-corr-stat-stub{width:52px!important;min-width:52px!important;max-width:52px!important;padding:5px 2px!important;font-size:0!important;text-align:center!important}
  .oe-correlation-matrix tbody tr:nth-child(3n+1) .oe-corr-stat-stub::after{content:'Coeff.';font-size:8px}
  .oe-correlation-matrix tbody tr:nth-child(3n+2) .oe-corr-stat-stub::after{content:'Sig.';font-size:8px}
  .oe-correlation-matrix tbody tr:nth-child(3n) .oe-corr-stat-stub::after{content:'N';font-size:8px}
  .oe-corr-data-cell{min-width:0!important;padding:6px 2px!important;font-size:8px}
  .oe-corr-data-cell strong{font-size:9px}
  .oe-correlation-matrix-wrap + .oe-matrix-scroll-note{display:block!important}
}

/* ===== Source-specific geography only: Latinobarometro ===== */
:root{--context:#e9eef1}

/* Latin America uses the shared .oe-* shell, cards, controls and Analysis Lab.
   Only the SVG geography needs source-specific selectors. */
.la-country{
  fill:#d3d3d3;
  stroke:#fff;
  stroke-width:1.35;
  vector-effect:non-scaling-stroke;
  stroke-linejoin:round;
  cursor:pointer;
  transition:fill .12s ease,filter .12s ease;
}
.la-country:hover{filter:brightness(.94)}
.la-country.context{fill:#d3d3d3;cursor:default}
.la-country.sample{fill:#d3d3d3}
.la-country.selected{fill:var(--gold)!important;stroke:#fff;stroke-width:1.6}
.la-country-label{
  font-size:9.3px;
  font-weight:900;
  fill:#0b263f;
  pointer-events:none;
  paint-order:normal;
  stroke:none;
  stroke-width:0;
  text-shadow:none;
  letter-spacing:.005em;
}
.oe-loading-rich{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-align:center;
  padding:30px;
}
.oe-loading-rich strong{color:var(--navy);font-size:13px}
.oe-loading-rich span{color:#71818c;font-size:11px}
.oe-loading-rich[hidden]{display:none}

/* ========================================================================== 
   v1.2.0 — authoritative cross-source responsive system
   Applies to ANES and Latinobarometro. Source adapters may change data and
   geography, never the responsive component behavior.
   ========================================================================== */

html,body{max-width:100%;overflow-x:hidden}
.oe-shell,.oe-shell *{min-width:0}
.oe-shell{width:min(1800px,100%)}

/* Both map adapters use the same neutral/no-data geography treatment.
   Latin America keeps stronger white internal boundaries so adjacent neutral
   countries remain distinct even when every fill is #d3d3d3. */
.la-country.context,
.la-country.sample{
  fill:#d3d3d3!important;
  stroke:#fff!important;
  stroke-width:1.35!important;
  vector-effect:non-scaling-stroke;
}
.la-country.selected{
  fill:var(--gold)!important;
  stroke:#fff!important;
  stroke-width:1.6!important;
}
.la-country-label{
  font-family:Inter,Arial,Helvetica,sans-serif;
  font-size:9.3px;
  font-weight:900;
  fill:#0b263f;
  stroke:none!important;
  stroke-width:0!important;
  paint-order:normal!important;
  text-shadow:none!important;
  letter-spacing:.005em;
}

/* Source and analysis tabs are scrollable controls, never page-width breakers. */
.oe-lab-tabs{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
}
.po-source-switch{
  flex-wrap:nowrap;
  overscroll-behavior-inline:contain;
}
.po-source-option,
.oe-lab-tabs button{flex:0 0 auto;white-space:nowrap}

/* Header and shared shell scale smoothly rather than at one phone breakpoint. */
.oe-brand h1{font-size:clamp(20px,2.2vw,29px)}
.oe-brand p:last-child{font-size:clamp(10px,1vw,13px)}
.oe-header{min-width:0}
.oe-brand>div{min-width:0}
.oe-brand h1,.oe-brand p{overflow-wrap:anywhere}

/* Prevent controls and result cards from ever forcing the viewport wider. */
.oe-controls,
.oe-workspace,
.oe-post-map-stack,
.oe-analysis-context,
.oe-lab-controls,
.oe-corr-controls,
.oe-lab-stat-grid,
.oe-frequency-summary-grid,
.oe-correlation-summary-grid,
.oe-analysis-breakdown-grid,
.oe-lab-integrity-grid{max-width:100%}

.oe-controls select,
.oe-lab select,
.oe-detail-card select{width:100%;max-width:100%}

/* Desktop: preserve the established two-column research workspace. */
.oe-workspace{grid-template-columns:minmax(0,1.75fr) minmax(300px,.65fr)}
.oe-map-stage{height:clamp(500px,40vw,620px)}

/* Tables/matrices own their overflow; the page itself never does. */
.oe-frequency-table-wrap,
.oe-survey-crosstab-wrap,
.oe-correlation-matrix-wrap,
.oe-analysis-table-wrap,
.oe-crosstab-wrap,
.oe-controlled-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-inline:contain;
}
.oe-correlation-matrix{max-width:none}

/* Wide laptop / small desktop. */
@media(max-width:1280px){
  body{padding:14px}
  .oe-controls{grid-template-columns:repeat(3,minmax(0,1fr))}
  .oe-controls .oe-variable-control{grid-column:span 2}
  .oe-map-stage{height:clamp(480px,48vw,600px)}
  .oe-lab-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Tablet landscape and compact laptops: stack map/result instead of squeezing. */
@media(max-width:1100px){
  .oe-workspace{grid-template-columns:1fr}
  .oe-map-card,.oe-detail-card{width:100%}
  .oe-map-stage{height:clamp(440px,60vw,570px)}
  .oe-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-controls .oe-variable-control{grid-column:span 2}
  .oe-simple-workflow{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .oe-simple-workflow>i{display:none}
  .oe-simple-workflow>div{justify-content:flex-start}
  .oe-analysis-context{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-variable-group-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .oe-lab-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .oe-correlation-summary-grid,
  .oe-correlation-matrix-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Tablet portrait. */
@media(max-width:820px){
  body{padding:9px}
  .oe-header{padding:18px;gap:14px;align-items:flex-start}
  .oe-brand{gap:12px}
  .oe-brand img{width:50px;height:50px}
  .oe-engine-badge{display:none}
  .oe-controls{grid-template-columns:1fr 1fr;padding:13px}
  .oe-controls .oe-variable-control{grid-column:span 2}
  .oe-map-head{flex-wrap:wrap}
  .oe-map-tools{width:100%;justify-content:space-between;flex-wrap:wrap}
  .oe-map-geography-control{width:min(260px,60%)}
  .oe-map-stage{height:clamp(410px,72vw,540px)}
  .oe-snapshot-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-lab{border-radius:14px}
  .oe-lab-hero{padding:20px;gap:14px;flex-direction:column}
  .oe-simple-workflow{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 16px}
  .oe-analysis-context{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-lab-panel{margin:-1px 10px 0;padding:17px}
  .oe-lab-controls,
  .oe-lab-controls-frequency,
  .oe-corr-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-lab-primary{width:100%;min-height:42px}
  .oe-lab-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .oe-analysis-breakdown-grid{grid-template-columns:1fr}
  .oe-lab-integrity-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phones and narrow tablets. */
@media(max-width:620px){
  body{padding:4px}
  .oe-header{padding:14px 12px;border-radius:12px 12px 0 0}
  .oe-brand{align-items:flex-start;gap:9px}
  .oe-brand img{width:42px;height:42px}
  .oe-eyebrow{font-size:8px;letter-spacing:.09em}
  .oe-brand h1{font-size:clamp(18px,6vw,23px);line-height:1.08}
  .oe-brand p:last-child{margin-top:5px;font-size:10px;line-height:1.4}
  .po-source-switch{max-width:calc(100% - 16px);margin:8px;padding:4px}
  .po-source-option{min-height:35px;padding:0 10px;line-height:1;font-size:10px}
  .oe-strip{grid-template-columns:1fr}
  .oe-strip div{padding:9px 11px;border-right:0;border-bottom:1px solid rgba(255,255,255,.1)}
  .oe-strip div:last-child{border-bottom:0}
  .oe-definition{padding:10px 11px;gap:6px}
  .oe-definition strong,.oe-definition p{width:100%}
  .oe-controls{grid-template-columns:1fr;padding:11px;gap:9px}
  .oe-controls .oe-variable-control{grid-column:auto}
  .oe-workspace{padding:7px;gap:9px}
  .oe-map-head{padding:12px}
  .oe-map-head h2,.oe-detail-card h2{font-size:17px}
  .oe-map-head p:last-child{font-size:10px}
  .oe-map-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}
  .oe-map-geography-control{width:auto}
  .oe-map-stage{height:clamp(350px,100vw,470px)}
  .oe-legend{padding:10px 11px 3px;gap:8px}
  .oe-legend-item,.oe-selection-key{font-size:8px}
  .oe-legend-note{padding:4px 11px 10px;font-size:8px}
  .oe-detail-card{padding:12px;gap:13px}
  .oe-primary-stat strong{font-size:36px}
  .oe-comparison-grid{grid-template-columns:1fr}
  .oe-snapshot-grid{grid-template-columns:1fr}
  .oe-source-card-wide .oe-source-wide-head{display:block}
  .oe-source-card-wide dl{grid-template-columns:1fr!important}
  .oe-post-map-stack{gap:9px;margin-top:9px}
  .oe-simple-workflow{grid-template-columns:1fr;padding:10px 12px;gap:7px}
  .oe-simple-workflow>div strong{white-space:normal}
  .oe-analysis-context{grid-template-columns:1fr;padding:10px 10px 2px}
  .oe-lab{margin:16px 0 12px;border-radius:12px}
  .oe-lab-hero{padding:16px 13px}
  .oe-lab-hero h2{font-size:clamp(21px,7vw,27px)}
  .oe-lab-hero p:not(.oe-lab-eyebrow){font-size:10px;line-height:1.5}
  .oe-lab-tabs{gap:3px;padding:8px 8px 0}
  .oe-lab-tabs button{min-height:38px;padding:0 12px;font-size:10px}
  .oe-lab-panel{margin:-1px 6px 0;padding:13px;border-radius:0 9px 9px 9px}
  .oe-lab-panel-head{display:block}
  .oe-lab-panel-head h3{font-size:17px}
  .oe-variable-group-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
  .oe-lab-controls,
  .oe-lab-controls-frequency,
  .oe-corr-controls{grid-template-columns:1fr}
  .oe-lab-controls-one{grid-template-columns:1fr}
  .oe-lab-controls button,
  .oe-corr-controls button{width:100%}
  .oe-frequency-summary-grid,
  .oe-correlation-summary-grid,
  .oe-correlation-matrix-summary-grid,
  .oe-lab-stat-grid{grid-template-columns:1fr 1fr}
  .oe-analysis-bars{padding:12px}
  .oe-analysis-bar-row{grid-template-columns:1fr;gap:5px}
  .oe-analysis-bar-value{justify-content:flex-start}
  .oe-analysis-breakdown{padding:12px}
  .oe-breakdown-mini-row{grid-template-columns:minmax(90px,1fr) minmax(60px,1fr) 42px}
  .oe-lab-integrity-grid{grid-template-columns:1fr;padding:10px}
  .oe-roadmap{grid-template-columns:1fr;padding:10px}
  .oe-roadmap i{display:none}
  .oe-footer{padding:11px 12px;font-size:9px}
  .la-country-label{font-size:10.5px;font-weight:900}
}

/* Very narrow phones: no component may assume >320 CSS pixels. */
@media(max-width:390px){
  .oe-brand img{width:36px;height:36px}
  .oe-brand h1{font-size:18px}
  .oe-map-tools{grid-template-columns:1fr}
  .oe-map-tools .oe-period-pill{justify-self:start}
  .oe-map-stage{height:clamp(330px,105vw,410px)}
  .oe-variable-group-nav{grid-template-columns:1fr}
  .oe-frequency-summary-grid,
  .oe-correlation-summary-grid,
  .oe-correlation-matrix-summary-grid,
  .oe-lab-stat-grid{grid-template-columns:1fr}
  .oe-corr-mobile-key{grid-template-columns:1fr}
  .oe-lab-panel{margin:-1px 4px 0;padding:11px}
  .oe-correlation-matrix-wrap,
  .oe-frequency-table-wrap{border-radius:8px}
  .la-country-label{font-size:11px}
}

/* ===== Neutral research start / reset control ===== */
.oe-controls-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin:-4px 18px 14px;
}
.oe-reset-analysis{
  appearance:none;
  border:1px solid rgba(11,38,63,.22);
  background:#fff;
  color:var(--navy,#0b263f);
  border-radius:999px;
  min-height:34px;
  padding:0 14px;
  font:800 11px/1 Inter,Arial,Helvetica,sans-serif;
  letter-spacing:.035em;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(11,38,63,.04);
}
.oe-reset-analysis:hover{background:#f5f8fa;border-color:rgba(11,38,63,.38)}
.oe-reset-analysis:focus-visible{outline:3px solid rgba(193,154,62,.3);outline-offset:2px}
.oe-controls select:disabled,
.oe-lab-controls select:disabled,
.oe-corr-controls select:disabled{cursor:not-allowed}

@media (max-width:720px){
  .oe-controls-actions{margin:-2px 11px 11px}
  .oe-reset-analysis{min-height:36px;padding:0 13px}
}
@media (max-width:420px){
  .oe-controls-actions{justify-content:stretch}
  .oe-reset-analysis{width:100%}
}


/* Source selector: compact, fully visible and non-stretched at tablet/phone widths. */
@media(max-width:900px){
  .po-source-switch{
    display:inline-flex;
    width:max-content;
    max-width:calc(100% - 18px);
    margin:9px;
    padding:4px;
    gap:4px;
    overflow:visible;
    scrollbar-width:none;
  }
  .po-source-switch::-webkit-scrollbar{display:none}
  .po-source-option{
    flex:0 0 auto;
    min-width:0;
    min-height:48px;
    padding:6px 11px;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:2px;
    white-space:normal;
    line-height:1.05;
  }
  .po-source-option span{font-size:9px;line-height:1.05;font-weight:800;white-space:nowrap}
  .po-source-option strong{font-size:10.5px;line-height:1.05;font-weight:900;white-space:nowrap}
  .po-source-option.active::before{display:none}
}
@media(max-width:390px){
  .po-source-switch{max-width:calc(100% - 12px);margin:6px;padding:3px;gap:3px}
  .po-source-option{min-height:44px;padding:5px 8px}
  .po-source-option span{font-size:8px}
  .po-source-option strong{font-size:9px}
}
