/* CEO round 5 (owner Nov 3 11:30 and 11:45): glass panel laws L1-L10, contiguous-US map (round 6) on the same transparent glass, one 32 px person avatar.
   Loaded last. Presentation only. */

/* ======================= US Installation & Service Map: same transparent glass as every other panel (L7) ======================= */
/* No dark plate and no dark header corner: the land is a light translucent shape drawn straight onto the glass, the sea shows through. */
html body #main .atlas .map, html[data-theme] body #main .atlas .map { background: none !important; }
html body #main .atlas .ach::before { display: none; }
html body #main .atlas {
  --map-col: 252px;
  --land-a: rgba(170,255,244,.26); --land-b: rgba(120,238,232,.13); --land-dot: rgba(210,255,250,.28); --state: rgba(215,255,250,.55);
  --coast: #8ffff0; --coast-glow: .5; --state-glow: .22; --pt: #ffffff; --pt-ring: #7ff6ff; --wh: #ffc44a; --wh-fill: rgba(40,26,0,.55);
  --map-halo: 0 0 2px rgba(1,26,38,.95), 0 0 6px rgba(1,26,38,.8), 0 0 14px rgba(1,26,38,.55);
}
html[data-theme=light] body #main .atlas {
  --land-a: rgba(6,118,142,.26); --land-b: rgba(6,118,142,.14); --land-dot: rgba(6,90,120,.22); --state: rgba(6,90,120,.55);
  --coast: #0a8aa3; --coast-glow: .3; --state-glow: 0; --pt: #075f78; --pt-ring: #ffffff; --wh: #c26a00; --wh-fill: #fff6df;
  --map-halo: 0 0 2px rgba(255,255,255,.98), 0 0 6px rgba(255,255,255,.9), 0 0 14px rgba(255,255,255,.7);
}
html[data-theme=dark] body #main .atlas {
  --land-a: rgba(255,196,140,.2); --land-b: rgba(255,160,90,.1); --land-dot: rgba(255,190,130,.22); --state: rgba(255,205,160,.5);
  --coast: #ff9a4a; --coast-glow: .45; --state-glow: .2; --pt: #ffd9b0; --pt-ring: #ff9a4a; --wh: #7fd8ff; --wh-fill: rgba(0,20,40,.6);
  --map-halo: 0 0 2px rgba(0,0,0,.95), 0 0 7px rgba(0,0,0,.8), 0 0 14px rgba(0,0,0,.55);
}
html body #main .atlas :is(.ach h2, .ach .sub, .ach .sub *) { text-shadow: var(--map-halo); }
html body #main .atlas .ach .sub { color: var(--platform-ink); }
html body #main .atlas #amap .land-glow { opacity: calc(var(--coast-glow) * .22); }
html body #main .atlas #amap .pt { stroke-width: .5; }
html body #main .atlas #amap .halo { opacity: .4; }
html body #main .atlas #amap .pt-bloom circle { opacity: .28; }
html body #main .atlas #amap .pools circle { opacity: .4; }

/* Map card layout: title row, a left column of equal flat rows (figures, then legend), the map centred in the rest, buttons on the padding line. */
@media (min-width: 1280px) {
  html body .mid { grid-template-columns: minmax(0, 6.4fr) minmax(0, 7.2fr); }
  html body #main .atlas .ach { padding: var(--r4-pad); gap: 8px; align-items: flex-start; }
  html body #main .atlas .ach > h2 { flex: none; }
  html body #main .atlas .ach > .sub { order: 2; flex: 1 1 0; min-height: 0; width: var(--map-col, 232px); max-width: none; display: flex; flex-direction: column; gap: 4px; margin: 0; }
  html body #main .atlas .ach > .sub > .sep { display: none; }
  html body #main .atlas .ach > .sub > span { flex: 1 1 0; min-height: 0; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--platform-row-line); background: var(--platform-row); font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none; }
  html body #main .atlas .ach > .sub > span.det { font-size: 13px; }
  html body #main .atlas .ach > .alegend { order: 3; margin: 0; width: var(--map-col, 232px); box-sizing: border-box; flex-direction: column; gap: 3px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--platform-row-line) !important; background: var(--platform-row) !important; box-shadow: none !important; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 12.5px; color: var(--platform-ink); }
  html body #main .atlas .ach > .alegend li.attrib { font-size: 11px; }
  html body #main .atlas .atlas-expand { top: var(--r4-pad); right: var(--r4-pad); height: 30px; width: auto; padding: 0 12px; }
  html body #main .atlas .fit { position: absolute; right: var(--r4-pad); bottom: var(--r4-pad); align-self: auto; height: 30px; }
}

/* ======================= People: one 32 px round avatar everywhere a person is listed (L6) ======================= */
html body #main .ceo-av { position: relative; display: inline-grid; place-items: center; flex: none; box-sizing: border-box; width: 32px !important; height: 32px !important; border-radius: 50%; overflow: hidden; padding: 0; margin: 0;
  font-size: 12px; font-weight: 700; line-height: 1; color: var(--platform-ink); background: color-mix(in srgb, var(--platform-accent) 16%, transparent); border: 1px solid var(--platform-row-line); }
html body #main .ceo-av b { font-weight: 700; font-size: inherit; line-height: 1; }
html body #main .ceo-av > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
html body #main .ceo-av[data-photo] b { visibility: hidden; }
html body #main .bottom .card-scroll .ppl-stack { padding-left: 10px; }
html body #main .bottom .card-scroll .ppl-stack__av.ceo-av { margin-left: -10px; }
html body #main .bottom .card-scroll .ppl-lead { gap: 10px; }

/* ======================= Row rhythm: every list row is 36 px (32 px avatar + 2 px), so the bottom panels use 5, 4 or 3 rows by height ======================= */
:root { --foot-h: 272px; --r4-rows: 5; --r4-gap: 4px; }
@media (min-width: 1280px) and (max-height: 999px) { :root { --foot-h: 216px; --r4-rows: 4; --r4-gap: 3px; } }
@media (min-width: 1280px) and (max-height: 800px) { :root { --foot-h: 172px; --r4-rows: 3; } }

/* ======================= Middle row on shorter screens: nothing collapses, the lists scroll inside ======================= */
@media (min-width: 1280px) {
  html body #main .verify.pv > .calls { grid-auto-rows: minmax(calc(40px + var(--ceo-extra, 0px)), 1fr); }
}
@media (min-width: 1280px) and (max-width: 1599px) {
  html body #main .verify.pv .call .wave { display: none; }
  html body #main .verify.pv > .calls > .call { grid-template-columns: 28px minmax(0, 1fr) auto; }
}
@media (min-width: 1280px) and (max-height: 999px) {
  html body #main .verify.pv > .meta { display: none; }
  /* Map: three figure rows; the legend steps back to the OpenStreetMap credit (the pins and the house icon explain themselves in their tooltips). */
  html body #main .atlas .ach > .sub > span.det:last-child { display: none; }
  html body #main .atlas .ach > .alegend { position: absolute; left: var(--r4-pad); bottom: var(--r4-pad); width: var(--map-col, 232px); padding: 0; border: 0 !important; background: none !important; }
  html body #main .atlas .ach > .alegend li:not(.attrib) { display: none; }
  html body #main .atlas .ach > .sub { margin-bottom: 20px; }
}
@media (min-width: 1280px) and (max-height: 800px) {
  html body #main .verify.pv > .calls-legend { display: none; }
}

/* ======================= KPI row (L1: 16-20 px inside every edge, one idea per row) ======================= */
@media (min-width: 1280px) {
  html body #main .kband .kpi.pv { height: 110px; min-height: 110px; padding: var(--r4-pad); gap: 2px; }
  html body #main .kband .kpi.pv .lab { font-size: 14px; line-height: 16px; }
  html body #main .kband .kpi.pv .v, html body #main .kband .kpi.pv .v.none { line-height: 28px; }
  html body #main .kband .kpi.pv .d { line-height: 13px; }
  html body #main .kband .kpi.pv .chev { top: var(--r4-pad); right: var(--r4-pad); }
}
@media (min-width: 1280px) and (max-height: 999px) {
  html body #main .kband .kpi.pv { height: 96px; min-height: 96px; }
  html body #main .kband .kpi.pv .kic { width: 18px; height: 18px; }
}
@media (min-width: 1280px) and (max-height: 800px) {
  html body #main .kband .kpi.pv { height: 92px; min-height: 92px; }
  html body #main .kband .kpi.pv .v, html body #main .kband .kpi.pv .v.none { font-size: 22px; line-height: 22px; }
  html body #main .kband .kpi.pv .d { font-size: 11px; line-height: 12px; }
}
/* Map: both buttons on the header line, so they never sit over the map. */
@media (min-width: 1280px) {
  html body #main .atlas .fit { top: var(--r4-pad); bottom: auto; right: calc(var(--r4-pad) + 104px); }
}
@media (min-width: 1280px) and (max-width: 1499px) {
  html body #main .bottom .ch .dept-big.pill .ring small { display: none; }
}

/* ======================= Narrower desktops: single-line headers, rows and summaries; nothing wraps into a neighbour ======================= */
@media (min-width: 1280px) {
  html body #main .atlas .ach > h2 { max-width: calc(100% - 2 * var(--r4-pad) - 36px - 120px); overflow: hidden; text-overflow: ellipsis; }
  html body #main .verify.pv > .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html body #main .verify.pv > .ti-empty { white-space: nowrap; overflow: hidden; }
  html body #main .verify.pv > .ti-empty :is(b, span) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  html body #main .bottom .card-scroll > .ppl-af { flex-wrap: nowrap; overflow: hidden; }
  html body #main .bottom .card-scroll > .ppl-af .af-tag { white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 1280px) and (max-width: 1599px) {
  /* The zoom toggle moves to the empty ocean corner so the title keeps its room. */
  html body #main .atlas .fit { font-size: 11px; height: 28px; padding: 0 10px; top: auto; bottom: var(--r4-pad); right: var(--r4-pad); }
  html body #main .atlas .ach > h2 { max-width: calc(100% - 2 * var(--r4-pad) - 36px - 120px); }
  html body #main .bottom .card-scroll > .ppl-af .af-slow { display: none; }
}

/* ======================= L3 type floor: 13 px minimum text at 1920 (and on every wide, tall desktop) ======================= */
@media (min-width: 1600px) and (min-height: 941px) {
  html body #main :is(.river .ch .eyebrow, .river .rlegend li, .river .stages button .num, .river .rv-water .flag, .kband .kpi.pv .d, .kband .kpi.pv .d > span,
    .atlas .alegend li, .atlas .alegend li.attrib, .atlas .alegend li.attrib a, .atlas .fit, .atlas .ach > .sub > span,
    .verify.pv .lt, .verify.pv .cwho, .verify.pv .cwho span, .verify.pv .score span, .verify.pv .meta, .verify.pv .calls-legend, .verify.pv .calls-legend span, .verify.pv > .ti-empty span,
    .decide .decision .dt > span:not(.sr),
    .reps .rep-all, .reps .rep small, .reps .rep .chg, .bottom .ch .dept-pill, .bottom .ch .dept-pill b, .bottom .ch .dept-big.pill .ring small, .bottom .ch .dept-big.pill .ring b,
    .bottom .inv-tile__units, .bottom .inv-tile__meta > b, .bottom .inv-chip, .bottom .inv-chip span, .bottom .inv-more,
    .bottom .card-scroll > *, .bottom .card-scroll .people-extra > *, .bottom .card-scroll .ppl-h, .bottom .card-scroll .ppl-txt, .bottom .card-scroll .ppl-long, .bottom .card-scroll .af-tag, .bottom .card-scroll .af-tag span,
    .bottom .act-chip, .bottom .act-chip span, .bottom .act-chip b, .bottom .dept-flag, .bottom .dept-flag *) { font-size: 13px; }
  html body #main .ceo-av, html body #main .ceo-av b, html body #main .bottom .dbody .metric-row .ml, html body #main .bottom .dbody .metric-row .ml * { font-size: 13px; }
  html body #main .bottom .dbody .metric-row .mv, html body #main .reps .rep .mv, html body #main .reps .rep .rn { font-size: 14px; }
  html body #main :is(.atlas-expand, .atlas-expand span, .verify.pv > .sub, .verify.pv > .sub b, .verify.pv > .sub span, .bottom .inv-tile__units b, .bottom .inv-tile__units, .bottom .ring small, .bottom .ring b) { font-size: 13px; }
  html body #main .river .stages button .sn { font-size: 15px; }
  html body #main .bottom .inv-chip { padding: 0 8px; line-height: 18px; height: 20px; }
  html body #main .bottom .card-scroll .act-chip { height: 24px; }
}
@media (min-width: 1600px) and (min-height: 941px) {
  html body #main .bottom .ch .dept-big.pill .ring small, html body #main .bottom .ch .dept-big.pill .ring b { font-size: 13px !important; }
}

/* Map figure column: wide enough for "3,142 installed accounts · all history" without an ellipsis (Spanish is longer). */
@media (min-width: 1600px) { html body #main .atlas { --map-col: 272px; } }
html[lang=es] body #main .atlas { --map-col: 296px; }
@media (min-width: 1280px) and (max-width: 1599px) {
  /* Watch list on a narrow desktop: tighter columns so the labels are not cut. */
  html body #main .decide .decision { grid-template-columns: 30px minmax(0, 1fr) 12px; column-gap: 8px; padding: 0 10px; }
  html body #main .decide .decision .dico { display: none; }
  html body #main .decide .decision .dt > b { grid-column: 1; }
  html body #main .decide .decision .dt > span:not(.sr) { grid-column: 2; }
  html body #main .decide .decision .chev { grid-column: 3; }
  html body #main .decide .decision .dt > span:not(.sr) { font-size: 12.5px; }
  html body #main .decide .decision .dt > b { font-size: 17px; }
  html body #main .bottom .ppl-lead .lw { display: none; }
}

/* Windows shorter than 750 px (for example 1280x720): the rows cannot all fit, so the content area scrolls inside the frame
   (top bar and AQUIS stay put) instead of squeezing the middle row until its text overlaps. */
@media (min-width: 1280px) and (max-height: 749px) {
  html body main { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
  html body .dash { height: auto; grid-template-rows: auto auto 224px var(--foot-h); }
}
/* 1440-1599: there is room on the header line for the zoom toggle beside Expand, clear of the pins. */
@media (min-width: 1440px) and (max-width: 1599px) {
  html body #main .atlas .fit { top: var(--r4-pad); bottom: auto; right: calc(var(--r4-pad) + 100px); }
  html body #main .atlas .ach > h2 { max-width: calc(100% - 2 * var(--r4-pad) - 36px - 230px); }
}
