/* Scoped presentation for Funil e regioes. Data rendering stays in analise.js. */
:root {
  --accent:#3159b6; --accent-dark:#244693; --border:#e1e6ef;
  --muted:#69778b; --surface:#fff; --ink:#223047;
  color:var(--ink); background:#f4f6fa;
}
body { background:#f4f6fa; }
.app-header { background:#fff; border-bottom:1px solid var(--border); }
.header-inner { max-width:1392px; padding:15px 32px; gap:24px; }
.brand { color:#25374e; gap:11px; font-size:.9rem; letter-spacing:-.015em; }
.brand-mark.small { width:38px; height:38px; border-radius:11px; background:#edf2ff; color:var(--accent); font-size:.7rem; }
.brand-caption { display:block; color:#8893a3; font-size:.64rem; font-weight:450; letter-spacing:0; margin-top:1px; }
.main-nav { margin:0; padding:0; max-width:none; gap:5px; }
.nav-button { display:flex; align-items:center; min-height:37px; padding:7px 13px; border:0; border-radius:7px; text-decoration:none; color:#6a788b; font-size:.76rem; }
.nav-button.active { background:#eef3ff; color:var(--accent); }
.nav-button:hover { background:#f3f6fb; }
.main-content { max-width:1392px; padding:33px 32px 22px; }
.page-heading { align-items:center; margin:0 0 26px; gap:22px; }
.page-heading h1 { font-size:1.85rem; letter-spacing:-.045em; color:#1e2e45; margin-bottom:8px; }
.page-heading .eyebrow { color:#8090a7; font-size:.64rem; letter-spacing:.13em; margin-bottom:8px; }
.page-heading .muted { font-size:.85rem; color:#748196; margin:0; }
.heading-actions { display:flex; align-items:center; justify-content:flex-end; gap:18px; flex-shrink:0; }
.update-status { color:#7b899b; font-size:.69rem; margin:0; }
.update-status::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:#69a58b; margin-right:7px; vertical-align:1px; }
.heading-actions .button { min-height:38px; padding:8px 12px; font-size:.75rem; border-color:#d8e0ed; background:#fff; }
.button { border-radius:8px; }
.connection-error { font-size:.82rem; margin:0 0 18px; }
.loading-status { color:#7c8aa0; font-size:.73rem; margin:0 0 12px; }
.analysis-period-label{margin:0 0 16px;padding:10px 13px;border:1px solid #dce3ee;border-radius:8px;background:#f4f7fc;color:#304f7e;font-size:.78rem;font-weight:600}
.milestone-active-context{padding:13px 15px;margin:0 0 14px;border:1px solid #b9cae6;border-radius:9px;background:#edf3fc;color:#294c80;font-size:.78rem}.milestone-active-context p{margin:7px 0 12px;line-height:1.6}.milestone-active-context .button{font-size:.73rem}
body[data-report-state="loading"] #global-view,body[data-report-state="loading"] #brazil-view,body[data-report-state="loading"] #country-view,body[data-report-state="loading"] #leitura-view,body[data-report-state="loading"] #milestone-report,body[data-report-state="unavailable"] #global-view,body[data-report-state="unavailable"] #brazil-view,body[data-report-state="unavailable"] #country-view,body[data-report-state="unavailable"] #leitura-view,body[data-report-state="unavailable"] #milestone-report{display:none!important}
.auth-panel { max-width:440px; margin-bottom:22px; }
.auth-panel .muted { font-size:.8rem; margin-bottom:20px; }
.auth-panel .field { margin-bottom:15px; }
.analytics-filters { padding:20px 22px 0; border-radius:13px; box-shadow:0 3px 14px #25354c03; margin-bottom:15px; overflow:visible; }
.filter-primary { display:grid; grid-template-columns:1.3fr 1fr 1fr 1.1fr auto; align-items:end; gap:15px; }
.analytics-filters .field { margin:0; min-width:0; }
.analytics-filters label { color:#67758b; font-size:.7rem; font-weight:550; margin-bottom:7px; }
.analytics-filters input,.analytics-filters select { width:100%; min-height:42px; border:1px solid #dce3ee; border-radius:7px; font-size:.81rem; padding:9px 10px; }
.market-field select { font-weight:650; color:#294c8e; background:#f6f8ff; border-color:#cdd8f1; }
.analytics-filters .apply-filters { min-height:42px; padding:9px 23px; font-size:.8rem; }
.filter-toolbar { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:13px 0 12px; }
.period-shortcuts { display:flex; gap:4px; align-items:center; }
.period-shortcuts .button { min-height:30px; padding:5px 10px; font-size:.7rem; color:#61748c; }
.period-shortcuts .button:hover { background:#eff3fb; color:var(--accent); }
.period-shortcuts .button[aria-pressed="true"],.period-shortcuts .button.active { background:#edf2ff; color:var(--accent); }
.timezone-note { font-size:.66rem; color:#8a96a8; }
.report-timezone-field { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 9px; }
.report-timezone-field label,.report-timezone-field .field-help { grid-column:1/-1; }
.report-timezone-field label { margin-bottom:0; }
.report-timezone-field .button { min-height:42px; padding:8px 11px; font-size:.7rem; white-space:nowrap; }
.report-timezone-field .field-help { margin:0; font-size:.66rem; min-height:1.4em; }
@media(max-width:600px){.report-timezone-field { grid-template-columns:minmax(0,1fr); }.report-timezone-field .button { grid-column:1; justify-self:start; }.report-timezone-field label,.report-timezone-field .field-help { grid-column:1; }}
.advanced-filters { border-top:1px solid #edf0f5; }
.advanced-filters>summary { padding:12px 1px; cursor:pointer; color:#526782; font-size:.72rem; font-weight:600; list-style:none; display:flex; align-items:center; gap:8px; }
.advanced-filters>summary::-webkit-details-marker { display:none; }
.advanced-filters>summary::before { content:"+"; font-size:1rem; line-height:1; color:#7186a5; font-weight:400; }
.advanced-filters[open]>summary::before { content:"−"; }
.advanced-filters>summary span { color:#94a0b0; font-size:.66rem; font-weight:400; margin-left:auto; }
.filter-advanced-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; gap:16px 14px; padding:9px 0 18px; }
.filter-advanced-grid>.button { justify-self:start; align-self:end; min-height:42px; font-size:.74rem; }
.analytics-checks { display:flex; align-items:center; flex-wrap:wrap; gap:16px 22px; border-top:1px solid #edf0f5; padding-top:15px; }
.analytics-checks label { display:flex; align-items:center; gap:8px; margin:0; font-size:.72rem; color:#64738a; }
.analytics-checks input { width:16px; min-height:16px; height:16px; }
.analytics-checks .button { margin-left:auto; font-size:.69rem; min-height:33px; padding:6px 10px; }
.advanced-filters>.field-help { font-size:.68rem; padding:0 0 17px; color:#8c98a9; }
.scope-line { display:flex; gap:12px; align-items:center; margin:17px 0; }
.market-badge { flex-shrink:0; display:inline-flex; align-items:center; border:1px solid #d7e1f5; border-radius:6px; background:#edf2ff; color:#365eab; padding:5px 9px; font-size:.7rem; font-weight:650; }
#country-scope { font-size:.69rem; color:#7b899c; line-height:1.6; margin:0; }
.active-filters { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:-5px 0 16px; }
.active-filters>* { display:inline-flex; font-size:.68rem; padding:4px 8px; background:#fff; border:1px solid var(--border); border-radius:5px; color:#6a7c94; }
.stats { display:grid; gap:14px; }
#metrics { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:25px; }
.stat-card { border:1px solid var(--border); background:#fff; padding:20px 22px 18px; border-radius:12px; min-width:0; box-shadow:0 3px 14px #24334903; }
.stat-card p { color:#6a7b92; font-size:.73rem; font-weight:500; margin:0 0 13px; }
.stat-card strong,.analytics-table { font-variant-numeric:tabular-nums; }
#metrics .stat-card strong { font-size:2.2rem; letter-spacing:-.045em; line-height:1.15; margin-bottom:9px; color:#253a58; }
#metrics .stat-card:nth-child(3) { background:#f3faf7; border-color:#d6e8df; }
#metrics .stat-card:nth-child(3) strong { color:#2d795b; }
.stat-card span { display:block; font-size:.67rem; line-height:1.65; color:#8b98aa; }
.analysis-tabs { display:flex; gap:3px; border-bottom:1px solid #dce3ef; margin-bottom:22px; padding:0; overflow-x:auto; overscroll-behavior-inline:contain; scrollbar-width:thin; scrollbar-color:#d5deec transparent; }
.analysis-tab { position:relative; min-height:46px; flex-shrink:0; padding:12px 18px 15px; border:0; border-radius:0; color:#7b899d; background:transparent; font-size:.79rem; font-weight:550; white-space:nowrap; }
.analysis-tab:first-child { padding-left:4px; padding-right:22px; }
.analysis-tab.active,.analysis-tab[aria-selected="true"] { color:#3159b6; }
.analysis-tab.active::after,.analysis-tab[aria-selected="true"]::after { position:absolute; content:""; height:3px; border-radius:3px 3px 0 0; left:16px; right:16px; bottom:0; background:#3159b6; }
.analysis-tab:first-child.active::after,.analysis-tab:first-child[aria-selected="true"]::after { left:0; }
.analysis-tab:hover { color:#3159b6; background:#edf2fb80; }
.analysis-tab:focus-visible { outline-offset:-4px; }
[data-analysis-view] { min-width:0; }
.analytics-panel { min-width:0; padding:25px; margin-bottom:20px; border-radius:13px; scroll-margin-top:24px; }
.analytics-panel h2 { color:#2a3d58; font-size:1.04rem; letter-spacing:-.02em; margin:0 0 9px; font-weight:650; }
.analytics-panel .eyebrow { font-size:.61rem; color:#8998ad; letter-spacing:.12em; margin-bottom:6px; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.section-heading h2 { margin-bottom:0; }
.section-chip { display:inline-flex; color:#7d8da3; background:#f5f7fb; border:1px solid #e8edf5; border-radius:5px; font-size:.62rem; padding:5px 8px; white-space:nowrap; font-weight:450; }
.section-description { font-size:.76rem; line-height:1.7; color:#8090a5; margin:10px 0 0; }
.analytics-panel>.field-help { font-size:.72rem; line-height:1.8; color:#7e8ca0; }
.analytics-scroll { overflow:auto; overscroll-behavior-inline:contain; border:1px solid #e8edf4; border-radius:9px; margin-top:18px; scrollbar-width:thin; scrollbar-color:#d1dbea #f6f8fc; }
.analytics-table { width:100%; border-collapse:separate; border-spacing:0; text-align:left; font-size:.77rem; }
.analytics-table th,.analytics-table td { padding:14px 13px; vertical-align:middle; border-bottom:1px solid #edf0f6; }
.analytics-table th { background:#f7f9fc; font-size:.65rem; line-height:1.6; color:#7b8aa1; font-weight:550; }
.analytics-table td { color:#52647c; }
.analytics-table td:first-child { min-width:160px; color:#344d70; font-weight:500; overflow-wrap:anywhere; line-height:1.65; }
.analytics-table td:not(:first-child),.analytics-table th:not(:first-child) { text-align:right; }
.analytics-table td:not(:first-child) { white-space:nowrap; }
.analytics-table tbody tr:last-child td { border-bottom:0; }
.analytics-table tbody tr:hover td { background:#f7faff; }
.funnel-table td:first-child { width:35%; min-width:230px; }
.funnel-table td:nth-child(2) { font-size:1.02rem; font-weight:650; color:#2b4263; }
.funnel-table td:nth-child(3) { font-weight:600; color:#47799b; }
.stage-number { display:inline-grid; place-items:center; width:22px; height:22px; margin-right:9px; border:1px solid #e1e8f3; border-radius:6px; background:#f4f7fc; color:#7c92b2; font-size:.62rem; vertical-align:middle; }
.stage-label { vertical-align:middle; }
.funnel-table tbody tr:last-child { background:#f4faf7; }
.funnel-table tbody tr:last-child td { color:#3b7a5d; }
.analytics-bar { height:5px; background:#eef2f8; border-radius:3px; max-width:240px; margin-top:8px; }
.analytics-bar span { display:block; height:5px; background:#7b98d4; border-radius:3px; max-width:100%; }
.funnel-table tbody tr:last-child .analytics-bar span { background:#73ac91; }
.analytics-tags { font-size:.68rem; font-weight:400; color:#8a98aa; line-height:1.8; overflow-wrap:anywhere; }
.method-note { margin-top:18px; padding-top:12px; border-top:1px solid #edf1f6; }
.method-note summary { color:#8291a6; font-size:.67rem; cursor:pointer; }
.method-note p { color:#8896a8; font-size:.7rem; line-height:1.9; margin:10px 0 0; max-width:1000px; }
#conversion-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin:22px 0 15px; }
#conversion-metrics .stat-card { border:0; box-shadow:none; border-radius:0; padding:0 20px; border-left:1px solid #e8edf5; }
#conversion-metrics .stat-card:first-child { border-left:0; padding-left:0; }
#conversion-metrics .stat-card:last-child { padding-right:0; }
#conversion-metrics .stat-card p { font-size:.69rem; margin-bottom:10px; }
#conversion-metrics .stat-card strong { font-size:1.6rem; color:#3b60ab; margin-bottom:6px; letter-spacing:-.04em; }
#conversion-metrics .stat-card span { font-size:.64rem; }
.sample-note { font-size:.73rem; color:#7a8b9f; line-height:1.8; margin:12px 0 0; }
.conversion-priorities { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:18px; }
.conversion-insight { min-width:0; background:#f8fafd; border:1px solid #e6edf7; border-radius:9px; padding:18px; }
.conversion-insight h3 { font-size:.79rem; line-height:1.6; color:#36557c; margin:0 0 10px; }
.conversion-insight p { font-size:.72rem; color:#78899f; line-height:1.85; margin:0 0 7px; }
.conversion-insight .field-help { font-size:.67rem; margin-bottom:0; color:#91a0b2; }
.view-intro { margin:4px 1px 21px; }
.view-intro h2 { color:#324964; font-size:1.1rem; margin-bottom:6px; }
.view-intro p { color:#8896a9; font-size:.76rem; margin:0; }
.subsection-title { color:#526d91; font-size:.81rem; margin:26px 0 0; padding-top:22px; border-top:1px solid #e9eef6; }
.analytics-grid { display:grid; grid-template-columns:1fr 1.35fr; gap:20px; }
#campaigns .analytics-table td:first-child { min-width:250px; max-width:420px; font-weight:400; font-size:.71rem; line-height:1.8; }
.external-checkout { max-width:850px; border-left:3px solid #7b99cc; }
.external-checkout .section-chip { margin-bottom:15px; background:#eef4ff; color:#6787bc; }
.external-checkout>p:not(.field-help) { font-size:.85rem; line-height:1.85; color:#6d829b; }
.analytics-visit { border:1px solid #e4eaf3; border-radius:9px; background:#fff; margin-top:12px; padding:15px 17px; }
.analytics-visit[open] { background:#f8faff; border-color:#c9d8ef; }
.analytics-visit summary { cursor:pointer; color:#4a668d; font-size:.75rem; line-height:1.9; overflow-wrap:anywhere; }
.analytics-visit .analytics-tags { margin-top:12px; }
.analytics-visit ol { padding-left:22px; color:#72849e; font-size:.71rem; line-height:2.1; }
.analytics-visit li::marker { color:#91a8c9; }
.analytics-visit .button { font-size:.68rem; min-height:35px; margin-top:8px; }
.analytics-visit h3 { font-size:.8rem; color:#637fa3; margin:18px 0 5px; }
.analytics-empty { padding:22px 18px; background:#f7f9fc; border:1px dashed #e0e7f1; color:#8a98ac; border-radius:9px; font-size:.77rem; margin:18px 0 0; }
.records-panel { max-width:1000px; }
.record-details { border-top:1px solid #e9eef6; margin-top:20px; }
.record-details+.record-details { margin-top:0; }
.record-details>summary { padding:18px 0; color:#6480a1; font-size:.78rem; font-weight:550; cursor:pointer; }
.record-body { padding:0 12px 20px 17px; border-left:2px solid #d8e2f1; margin:0 0 18px; }
.record-body p { font-size:.72rem; color:#8191a7; line-height:1.9; margin:0 0 14px; }
.record-body p:last-child { margin-bottom:0; }
.record-body strong { color:#6a82a2; font-weight:550; }
#started { margin:0 0 12px; }
.analysis-footer { border-top:1px solid #e1e7f0; display:flex; justify-content:space-between; gap:20px; color:#9ba7b8; font-size:.62rem; padding:20px 1px 6px; margin-top:28px; }
@media(min-width:1100px) { .funnel-panel { padding:28px; } }
@media(max-width:1100px) {
  .conversion-priorities { grid-template-columns:1fr; }
  .analytics-grid { grid-template-columns:1fr; gap:0; }
  .heading-actions { flex-direction:column-reverse; align-items:flex-end; gap:7px; }
  .filter-primary { grid-template-columns:1.2fr 1fr 1fr 1fr auto; gap:11px; }
  .analytics-filters .apply-filters { padding-inline:16px; }
}
@media(max-width:900px) {
  .main-content { padding:25px 22px 18px; }
  .header-inner { padding-inline:22px; }
  .filter-primary { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .market-field { grid-column:span 2; }
  .filter-primary>.field:nth-child(4) { grid-column:span 3; }
  .filter-advanced-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stat-card { padding:18px; }
  #metrics .stat-card strong { font-size:1.95rem; }
  .analysis-tab { font-size:.74rem; padding-inline:14px; }
}
@media(max-width:640px) {
  .header-inner { padding:13px 17px; gap:12px; }
  .brand { font-size:.8rem; gap:8px; }
  .brand-mark.small { width:32px; height:34px; font-size:.62rem; }
  .brand-caption { font-size:.57rem; }
  .main-nav { gap:0; }
  .nav-button { padding:7px 9px; font-size:.66rem; min-height:34px; }
  .main-content { padding:25px 16px 18px; }
  .page-heading { align-items:flex-start; gap:13px; margin-bottom:21px; }
  .page-heading h1 { font-size:1.53rem; letter-spacing:-.04em; }
  .page-heading .eyebrow { font-size:.58rem; }
  .page-heading .muted { font-size:.75rem; max-width:245px; line-height:1.7; }
  .heading-actions { align-items:flex-end; gap:8px; padding-top:4px; }
  .heading-actions .button { min-height:35px; margin:0; padding:7px 9px; font-size:.67rem; }
  .heading-actions .button svg { width:14px; }
  .update-status { font-size:.56rem; white-space:nowrap; }
  .update-status::before { display:none; }
  .analytics-filters { padding:16px 16px 0; border-radius:11px; }
  .filter-primary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 11px; }
  .market-field { grid-column:span 2; }
  .filter-primary>.field:nth-child(4) { grid-column:span 1; }
  .analytics-filters label { font-size:.66rem; }
  .analytics-filters input,.analytics-filters select { font-size:.77rem; min-height:43px; }
  .analytics-filters .apply-filters { min-height:43px; width:100%; font-size:.75rem; }
  .filter-toolbar { gap:7px; padding-block:12px; }
  .timezone-note { font-size:.58rem; }
  .period-shortcuts .button { padding-inline:7px; font-size:.64rem; }
  .advanced-filters>summary { font-size:.68rem; }
  .advanced-filters>summary span { font-size:.58rem; max-width:145px; text-align:right; }
  .filter-advanced-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px 11px; }
  .analytics-checks { gap:15px; }
  .analytics-checks label { font-size:.67rem; }
  .analytics-checks .button { margin-left:0; padding-left:0; }
  .advanced-filters>.field-help { line-height:1.8; font-size:.64rem; }
  .scope-line { align-items:flex-start; gap:9px; margin:15px 0; }
  .market-badge { font-size:.61rem; padding:5px 7px; margin-top:1px; }
  #country-scope { font-size:.62rem; }
  #metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:17px; }
  .stat-card { padding:17px 15px; border-radius:10px; }
  .stat-card p { font-size:.68rem; margin-bottom:10px; }
  #metrics .stat-card strong { font-size:1.95rem; margin-bottom:7px; }
  .stat-card span { font-size:.61rem; }
  .analysis-tabs { margin:0 -16px 18px; padding-left:16px; padding-right:16px; }
  .analysis-tab { min-height:47px; font-size:.72rem; padding:12px 14px 14px; }
  .analysis-tab:first-child { padding-left:2px; padding-right:17px; }
  .analytics-panel { padding:19px 16px; border-radius:11px; margin-bottom:15px; }
  .analytics-panel h2 { font-size:.94rem; }
  .analytics-panel .eyebrow { font-size:.56rem; }
  .section-heading { align-items:flex-start; gap:10px; }
  .section-chip { max-width:105px; white-space:normal; text-align:center; font-size:.55rem; padding:4px 6px; }
  .section-description { font-size:.7rem; line-height:1.8; }
  .analytics-panel>.field-help { font-size:.67rem; line-height:1.9; }
  .analytics-scroll { margin-top:16px; border-radius:7px; }
  .analytics-table { font-size:.7rem; }
  .analytics-table th,.analytics-table td { padding:12px 11px; }
  .analytics-table th { font-size:.6rem; min-width:95px; }
  .analytics-table td:first-child { min-width:155px; }
  .funnel-table th:first-child,.funnel-table td:first-child { min-width:158px; max-width:180px; position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 #e8edf4; }
  .funnel-table th:first-child { background:#f7f9fc; z-index:2; }
  .funnel-table td:nth-child(2) { font-size:.94rem; }
  .stage-number { width:18px; height:18px; margin-right:6px; font-size:.56rem; }
  .funnel-table tbody tr:last-child td:first-child { background:#f4faf7; }
  .analytics-bar { height:4px; }
  .analytics-bar span { height:4px; }
  .analytics-tags { font-size:.61rem; }
  .method-note { margin-top:15px; padding-top:11px; }
  .method-note summary { font-size:.63rem; }
  .method-note p { font-size:.65rem; }
  #conversion-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 0; margin-top:21px; }
  #conversion-metrics .stat-card { padding:0 13px; }
  #conversion-metrics .stat-card:nth-child(odd) { border-left:0; padding-left:0; }
  #conversion-metrics .stat-card p { font-size:.66rem; }
  #conversion-metrics .stat-card strong { font-size:1.45rem; }
  #conversion-metrics .stat-card span { font-size:.59rem; }
  .sample-note { font-size:.68rem; }
  .conversion-priorities { gap:10px; margin-top:15px; }
  .conversion-insight { padding:15px; }
  .conversion-insight h3 { font-size:.74rem; }
  .conversion-insight p { font-size:.67rem; }
  .conversion-insight .field-help { font-size:.63rem; }
  .view-intro { margin:0 0 18px; }
  .view-intro h2 { font-size:1rem; }
  .view-intro p { font-size:.7rem; line-height:1.8; }
  .subsection-title { font-size:.74rem; margin-top:21px; padding-top:19px; }
  .analytics-visit { padding:13px; }
  .analytics-visit summary { font-size:.68rem; }
  .analytics-visit ol { font-size:.65rem; }
  .analytics-empty { padding:18px 13px; font-size:.7rem; }
  .record-details>summary { font-size:.71rem; line-height:1.8; }
  .record-body p { font-size:.65rem; }
  .analysis-footer { flex-direction:column; gap:5px; font-size:.57rem; padding-top:17px; }
}
@media(max-width:380px) {
  .main-content { padding-left:12px; padding-right:12px; }
  .header-inner { padding-inline:12px; flex-wrap:nowrap; }
  .brand-caption { display:none; }
  .brand { font-size:.72rem; }
  .brand-mark.small { width:28px; height:29px; }
  .nav-button { padding-inline:6px; font-size:.6rem; }
  .page-heading { flex-direction:row; }
  .page-heading h1 { font-size:1.36rem; }
  .page-heading .muted { font-size:.69rem; }
  .heading-actions .button { width:auto; font-size:.62rem; }
  .heading-actions { gap:6px; }
  .update-status { font-size:.52rem; }
  .analytics-filters { padding-inline:13px; }
  .stat-card { padding:15px 12px; }
  .stat-card p { font-size:.63rem; }
  #metrics .stat-card strong { font-size:1.8rem; }
  .analysis-tabs { margin-inline:-12px; padding-inline:12px; }
  .analytics-panel { padding:17px 13px; }
}
@media(prefers-reduced-motion:no-preference) {
  .analysis-tab,.button { transition:background-color .14s,color .14s,border-color .14s; }
}

.payment-summary { grid-template-columns:repeat(4,minmax(0,1fr)); margin:0 0 22px; }
@media(max-width:900px){.payment-summary{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* Comparison stays folded so the chosen funnel remains the primary view. */
.markets-overview { padding:0 22px; margin:17px 0; border-radius:11px; }
.markets-overview>summary { display:flex; align-items:center; gap:14px; padding:16px 0; color:#3f5d85; font-size:.78rem; font-weight:600; cursor:pointer; list-style:none; }
.markets-overview>summary::before { content:'+'; font-size:1.1rem; color:#8398b7; font-weight:400; }
.markets-overview[open]>summary::before { content:'−'; }
.markets-overview>summary::-webkit-details-marker { display:none; }
.market-overview-status { margin-left:auto; font-size:.65rem; color:#8190a4; font-weight:400; }
.markets-overview-body { padding:0 0 17px; border-top:1px solid #edf0f5; }
.markets-overview-body>.field-help { font-size:.69rem; color:#8090a6; line-height:1.85; margin:15px 0 0; }
.overview-scope { display:flex; align-items:center; gap:9px; font-size:.7rem; color:#607997; margin-top:13px; }
.overview-scope input { width:16px; height:16px; min-height:16px; flex-shrink:0; }
.market-overview-name { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }
.market-overview-open { color:#3560aa; background:transparent; border:0; border-radius:4px; padding:3px 0; min-height:28px; font:inherit; font-weight:600; cursor:pointer; text-align:left; }
.market-overview-open:hover { text-decoration:underline; }
.market-overview-country { color:#8a99ac; font-size:.63rem; font-weight:400; }
.market-unavailable td:not(:first-child) { color:#9a7180; font-size:.65rem; }
.market-selected td { background:#f2f6ff; }
.step-behavior-stage { border:1px solid #e5ebf4; border-radius:9px; margin-top:12px; }
.step-behavior-stage>summary { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 15px; color:#526d91; font-size:.76rem; cursor:pointer; }
.step-behavior-base { color:#8c9bb0; font-size:.66rem; text-align:right; }
.step-behavior-body { padding:0 15px 15px; border-top:1px solid #edf1f6; }
.step-behavior-body>.field-help { font-size:.68rem; color:#8291a7; line-height:1.8; }
.step-behavior-body .analytics-empty { margin-top:15px; }
@media(max-width:640px){
  .markets-overview { padding-inline:15px; margin:15px 0; }
  .markets-overview>summary { font-size:.71rem; gap:9px; }
  .market-overview-status { font-size:.58rem; }
  .markets-overview-body>.field-help,.overview-scope { font-size:.64rem; }
  .markets-overview .analytics-table th:first-child,.markets-overview .analytics-table td:first-child { position:sticky; left:0; z-index:1; background:#fff; min-width:150px; box-shadow:1px 0 #e8edf4; }
  .markets-overview .analytics-table th:first-child { background:#f7f9fc; z-index:2; }
  .markets-overview .market-selected td:first-child { background:#f2f6ff; }
  .step-behavior-stage>summary { padding:13px 12px; font-size:.68rem; gap:10px; }
  .step-behavior-base { font-size:.6rem; max-width:104px; }
  .step-behavior-body { padding:0 11px 12px; }
}

/* Seven-market overview. Detail views retain the existing panel presentation. */
.overview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:29px 0 21px}
.overview-heading h2{font-size:1.32rem;color:#273f60;letter-spacing:-.035em;margin:0}
.overview-heading .eyebrow{font-size:.63rem;color:#7287a7;margin-bottom:7px}
.overview-heading .section-description{font-size:.72rem;max-width:850px;margin-top:10px}
.coverage-badge{flex-shrink:0;border:1px solid #d1e7dc;background:#eff8f3;color:#367659;border-radius:20px;padding:7px 12px;font-size:.66rem;font-weight:650;margin-top:3px}
.coverage-badge.partial{background:#fff7e9;border-color:#eddbba;color:#9a722e}
.global-metrics{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:24px}
.global-metrics .stat-card{padding:18px 17px;min-height:153px}
.global-metrics .stat-card p{font-size:.69rem;margin-bottom:15px;min-height:20px}
.global-metrics .stat-card strong{display:block;font-size:2rem;line-height:1.15;font-weight:700;letter-spacing:-.045em;color:#29466c;margin-bottom:12px}
.global-metrics .stat-card span{font-size:.63rem;line-height:1.7}
.global-metrics .conversion-kpi{background:#edf5f2;border-color:#cde1d7}
.global-metrics .conversion-kpi strong{color:#2e795b}
.global-metrics .coverage-inline{color:#9a722e;margin-top:6px}
.coverage-inline{display:block;font-size:.61rem;color:#9a722e;line-height:1.7}
.global-journey{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px;margin-top:23px}
.journey-stage{position:relative;padding:16px 14px;background:#f6f8fc;border:1px solid #e4eaf4;border-radius:9px;min-width:0}
.journey-step{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#eaf0fa;color:#6b86af;border-radius:6px;font-size:.6rem;margin-bottom:12px}
.journey-stage h3{font-size:.72rem;font-weight:600;line-height:1.6;color:#526b8f;margin:0 0 11px;min-height:23px}
.journey-value{font-size:1.55rem;color:#2b4974;line-height:1.2;letter-spacing:-.04em}
.journey-rate{font-size:.62rem;color:#6b7f9b;line-height:1.75;margin:12px 0 6px;overflow-wrap:anywhere}
.journey-loss,.journey-direct{display:block;font-size:.6rem;line-height:1.7;color:#8d7991}
.journey-direct{color:#8a98ac;margin-top:3px}
.journey-result{background:#f1f8f5;border-color:#d7e8df}
.journey-result .journey-value{color:#36795e}
.journey-stage:nth-child(n+7){grid-column:span 2;display:grid;grid-template-columns:auto 1fr auto;column-gap:12px;align-items:center;padding:15px 18px}
.journey-stage:nth-child(n+7) .journey-step{margin:0}.journey-stage:nth-child(n+7) h3{margin:0;min-height:0}
.journey-stage:nth-child(n+7) .journey-rate,.journey-stage:nth-child(n+7) .journey-loss,.journey-stage:nth-child(n+7) .journey-direct,.journey-stage:nth-child(n+7) .coverage-inline{grid-column:2 / 4}
.global-journey-panel>.field-help{margin-top:18px;font-size:.67rem}
.sort-field{min-width:175px;margin:0}.sort-field label{font-size:.62rem;color:#7e8ea6;margin-bottom:5px}.sort-field select{min-height:37px;font-size:.72rem;padding:7px 9px;border-color:#dbe3ef}
.global-comparison .analytics-scroll{margin-top:22px;border-radius:10px}
.overview-country-table{table-layout:auto;min-width:1000px}
.overview-country-table th{font-size:.64rem;white-space:nowrap}
.overview-country-table td{padding:18px 13px 12px;white-space:normal!important}
.overview-country-table td:first-child{min-width:140px}
.market-overview-name strong{font-size:.8rem;font-weight:650;color:#31527c}
.overview-number strong{display:block;font-size:1.03rem;line-height:1.4;color:#385576;font-weight:650}
.overview-number span{display:block;font-size:.6rem;line-height:1.65;font-weight:400;color:#8b98ac;max-width:132px;margin:5px 0 0 auto;white-space:normal}
.overview-country-table td:nth-child(7) .overview-number strong{color:#348063}
.overview-detail{font-size:.64rem;min-height:34px;padding:7px 9px;border-color:#d8e2f1;color:#4d6d9a;background:#f8faff;white-space:nowrap}
.overview-country-table .market-path-row td{padding:0 13px 18px!important;border-bottom:1px solid #e3eaf4!important;background:#fff!important;text-align:left}
.market-stage-path{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;padding:10px 13px;background:#f7f9fc;border-radius:7px}
.market-stage-item{display:flex;align-items:center;justify-content:space-between;gap:7px;border-right:1px solid #e1e8f2;padding-right:12px;min-width:0}
.market-stage-item:last-child{border:0;padding-right:0}.market-stage-item>span{font-size:.58rem;line-height:1.6;color:#8a99af;font-weight:400}.market-stage-item strong{color:#587497;font-size:.68rem;font-weight:600}
.comparison-method{font-size:.66rem;color:#8594a9;line-height:1.9;margin:17px 0 0;max-width:1050px}
.global-attention{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0 0}
.global-attention .conversion-insight{background:#faf9f5;border-color:#eae3d4}
.global-attention .conversion-insight h3{color:#826d42}
.global-attention-panel>.field-help{margin-top:16px;font-size:.67rem}
.unavailable-value{font-size:.63rem;color:#a07f89}
.country-navigation{display:flex;align-items:center;gap:14px;margin:22px 0}
.country-navigation .button{font-size:.72rem;min-height:37px}.country-navigation>span{font-size:.68rem;color:#8494aa;line-height:1.8}
#country-view[data-state="loading"]>*:not(.country-navigation),#country-view[data-state="unavailable"]>*:not(.country-navigation){display:none}
#global-scope-control{margin:0 0 0 auto;font-size:.67rem;color:#6b819f;font-weight:450}
.filter-toolbar{flex-wrap:wrap}.filter-toolbar .timezone-note{margin-left:auto}
@media(min-width:1100px){body[data-analysis-mode="all"] .filter-primary{grid-template-columns:1.45fr 1fr 1fr auto}}
@media(max-width:1100px){.global-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.global-metrics .stat-card{min-height:139px}.global-journey{grid-template-columns:repeat(3,minmax(0,1fr))}.journey-stage:nth-child(n+7){grid-column:auto;display:block}.journey-stage:nth-child(n+7) .journey-step{margin-bottom:12px}.journey-stage:nth-child(n+7) h3{margin-bottom:11px}.global-attention{grid-template-columns:1fr}.overview-heading{gap:15px}.global-journey-panel .section-chip{white-space:normal;max-width:160px}}
@media(max-width:760px){
 .overview-heading{flex-direction:column;margin:23px 0 17px;gap:10px}.overview-heading h2{font-size:1.13rem}.coverage-badge{font-size:.62rem;padding:6px 10px}
 .global-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.global-metrics .stat-card{padding:17px 15px;min-height:145px}.global-metrics .stat-card p{font-size:.67rem;min-height:31px;margin-bottom:9px}.global-metrics .stat-card strong{font-size:1.85rem;margin-bottom:9px}.global-metrics .stat-card span{font-size:.61rem}
 .global-journey{gap:8px;margin-top:18px}.journey-stage,.journey-stage:nth-child(n+7){padding:13px 11px}.journey-stage h3{font-size:.64rem;min-height:32px;margin-bottom:8px}.journey-value{font-size:1.35rem}.journey-rate{font-size:.58rem}.journey-loss,.journey-direct{font-size:.56rem}.journey-step{width:20px;height:20px;font-size:.55rem}
 .global-comparison .section-heading{flex-direction:column;gap:14px}.sort-field{min-width:100%;max-width:100%}.sort-field select{min-height:40px;font-size:.75rem}
 .global-comparison .analytics-scroll{border:0;overflow:visible;margin-top:19px}.overview-country-table{display:block;min-width:0}.overview-country-table thead{display:none}.overview-country-table tbody{display:block}
 .overview-country-table tr:not(.market-path-row){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 12px;padding:17px 14px 15px;border:1px solid #e0e8f2;border-bottom:0;border-radius:9px 9px 0 0;background:#fff}
 .overview-country-table tr.market-unavailable{border-bottom:1px solid #e0e8f2;border-radius:9px;margin-bottom:14px}
 .overview-country-table td{display:block;border:0!important;padding:0!important;text-align:left!important;min-width:0!important;position:static!important}
 .overview-country-table td::before{content:attr(data-label);display:block;color:#8a99af;font-size:.58rem;margin-bottom:5px;font-weight:400}
 .overview-country-table td:first-child{grid-column:1/3;align-self:center}.overview-country-table td:first-child::before,.overview-country-table td:last-child::before{display:none}
 .overview-country-table td:last-child{grid-column:3;grid-row:1;justify-self:end;align-self:center}.market-overview-name strong{font-size:.86rem}.overview-number strong{font-size:1.1rem}.overview-number span{margin-left:0;max-width:100%;font-size:.57rem}
 .overview-country-table .market-path-row{display:block;margin-bottom:14px}.overview-country-table .market-path-row td{display:block;padding:0 14px 14px!important;border:1px solid #e0e8f2!important;border-top:0!important;border-radius:0 0 9px 9px}.overview-country-table .market-path-row td::before{display:none}
 .market-stage-path{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;padding:11px}.market-stage-item{border:0;padding-right:0;flex-direction:column;align-items:flex-start;gap:3px}.market-stage-item>span{font-size:.55rem}.market-stage-item strong{font-size:.72rem}
 .global-attention{gap:10px}.country-navigation{align-items:flex-start;flex-direction:column;gap:8px}.country-navigation>span{font-size:.63rem}
 #global-scope-control{order:3;width:100%;margin-top:2px;font-size:.64rem}.filter-toolbar .timezone-note{font-size:.59rem}.page-heading h1{max-width:430px}
}
@media(max-width:380px){.global-metrics .stat-card{padding:14px 12px;min-height:144px}.global-metrics .stat-card strong{font-size:1.65rem}.global-journey{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-country-table tr:not(.market-path-row){padding-inline:11px;gap:13px 10px}.overview-detail{font-size:.58rem;padding:6px 7px}.market-stage-path{padding-inline:9px;gap:8px}.global-journey-panel .section-chip{max-width:90px}}

/* Brazil keeps its session journey and order totals in explicitly separate bases. */
.brazil-panel{margin-bottom:24px;border-top:3px solid #198754}.brazil-client{display:flex;flex-direction:column;gap:5px;max-width:270px;overflow-wrap:anywhere}.brazil-client span,.brazil-client small{font-size:.75rem;color:#64748b}.brazil-state{display:inline-block;padding:5px 9px;border-radius:999px;background:#eef2f7;white-space:nowrap}.brazil-paid{color:#166534;background:#dcfce7}.brazil-pending{color:#854d0e;background:#fef9c3}.brazil-uncertain,.brazil-failed{color:#9a3412;background:#ffedd5}#brazil-orders .analytics-table{min-width:900px}#brazil-view .stats{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:760px){#brazil-view .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.brazil-panel .section-heading{align-items:flex-start;flex-direction:column;gap:12px}}
#brazil-view>.scope-line p{margin:0;color:#7b899c;font-size:.73rem}
.portugal-financial-panel{border-top:3px solid #4f7d71;margin-bottom:24px}.portugal-financial-panel .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:19px 0 17px}.portugal-financial-panel .stat-card{box-shadow:none;background:#f7faf9;border:1px solid #e0ebe6;padding:18px}.portugal-financial-panel .stat-card strong{display:block;color:#244e43;font-size:1.9rem;line-height:1.2;letter-spacing:-.04em;margin-bottom:8px}.portugal-financial-reconciliation{border-top:1px solid #e1e9e6;padding-top:16px;margin:0 0 10px;font-size:.78rem;line-height:1.9;color:#536a62}.portugal-financial-panel[data-state="unavailable"]{border-top-color:#a8b1bd}.portugal-financial-panel[data-state="unavailable"] .stat-card{background:#f8fafc;border-color:#e2e8f0}
@media(max-width:760px){.portugal-financial-panel .section-heading{align-items:flex-start;flex-direction:column;gap:10px}.portugal-financial-panel .stats{grid-template-columns:1fr;gap:10px}.portugal-financial-panel .stat-card{padding:16px 18px}.portugal-financial-panel .stat-card strong{font-size:1.7rem}.portugal-financial-reconciliation{font-size:.74rem}}
#brazil-funnel-metrics{margin-bottom:22px}
#brazil-view .stat-card strong{display:block;font-size:1.9rem;letter-spacing:-.04em;line-height:1.15;margin-bottom:9px;color:#253a58}
.brazil-funnel-panel{border-top:3px solid #7b98d4}
#brazil-funnel-stages .analytics-table{min-width:650px}
#brazil-funnel-stages .analytics-table td:first-child{min-width:210px}
#brazil-funnel-stages .analytics-table td:nth-child(2){font-size:1rem;font-weight:650;color:#2b4263}
.brazil-stage-name{display:flex;align-items:center;line-height:1.5}
.brazil-stage-name .stage-number{flex-shrink:0}
.brazil-linked-panel .stats{margin-top:20px;gap:12px}
.brazil-linked-panel .stat-card{box-shadow:none;background:#f8fafc;padding:17px}
.brazil-linked-panel .stat-card strong{font-size:1.65rem!important}
.brazil-orders-heading{border-top:1px solid #dce3ef;margin-top:31px;padding-top:25px}
.brazil-orders-heading .eyebrow{font-size:.61rem;color:#8998ad;letter-spacing:.12em;margin-bottom:7px}
.brazil-orders-heading h2{font-size:1.15rem;color:#2a3d58;letter-spacing:-.02em;margin:0 0 9px}
.brazil-orders-heading>p:last-child{font-size:.76rem;color:#7e8ca0;line-height:1.8;margin:0 0 20px}
#brazil-note{font-size:.72rem;color:#7e8ca0;line-height:1.8;margin:15px 0 22px}
@media(max-width:760px){.brazil-funnel-panel .section-heading,.brazil-linked-panel .section-heading{align-items:flex-start;flex-direction:column;gap:10px}#brazil-view .stat-card strong{font-size:1.6rem}#brazil-funnel-stages .analytics-table td:first-child,#brazil-funnel-stages .analytics-table th:first-child{position:sticky;left:0;z-index:1;background:#fff;min-width:164px;max-width:185px;box-shadow:1px 0 #e8edf4}#brazil-funnel-stages .analytics-table th:first-child{background:#f7f9fc;z-index:2}.brazil-linked-panel .stat-card{padding:14px}.brazil-stage-name .stage-number{margin-right:6px}}

/* Analysis controls are compact disclosures; the stage report is always outside them. */
.analysis-filter-disclosure{margin-bottom:10px;border:1px solid #dce3ee;border-radius:10px;background:#fff}.analysis-filter-disclosure>summary,.milestone-options>summary{cursor:pointer;display:flex;align-items:center;gap:12px;justify-content:space-between;font-size:.81rem;font-weight:650;padding:14px 16px;list-style:none;min-height:48px}.analysis-filter-disclosure>summary::after,.milestone-options>summary::after{content:'+';font-size:20px;font-weight:400;color:#667892;flex:0 0 auto}.analysis-filter-disclosure[open]>summary::after,.milestone-options[open]>summary::after{content:'−'}.analysis-filter-disclosure>summary:focus-visible,.milestone-options>summary:focus-visible{outline:2px solid #315cc0;outline-offset:2px;border-radius:8px}
#filter-compact-summary,#milestone-compact-summary{margin-left:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;font-size:.72rem;color:#66758c}.analysis-filter-disclosure .analytics-filters{border:0;margin:0;box-shadow:none;border-top:1px solid #edf0f5;border-radius:0 0 10px 10px}.milestone-panel{padding:0!important;margin-bottom:16px;background:transparent!important;border:0!important;box-shadow:none!important}.milestone-options{border:1px solid #dce3ee;border-radius:10px;background:#fff;margin-bottom:12px}.milestone-options>.section-heading,.milestone-options>.milestone-controls,.milestone-options>#milestone-status{margin-left:16px;margin-right:16px}.milestone-options>.section-heading{margin-top:15px}.milestone-options>#milestone-status{margin-bottom:16px}.milestone-options .section-heading h2{font-size:.95rem}.milestone-options .section-heading .button{font-size:.72rem}.milestone-panel #milestone-report>details{padding:15px 2px;border-top:1px solid #dce3ee;font-size:.76rem}.milestone-panel #milestone-report>details>summary{cursor:pointer;font-weight:600}.milestone-panel #milestone-report .funnel-dashboard{margin-bottom:14px}
@media(max-width:760px){
 #analysis-main .page-heading{position:sticky;top:0;z-index:50;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:10px 0;margin-top:-10px;margin-bottom:12px;background:#f4f6fa;border-bottom:1px solid #dce3ee;box-shadow:0 -12px 0 0 #f4f6fa,0 4px 12px #e8edf2}
 #analysis-main .page-heading>div:first-child{grid-column:1;grid-row:1;min-width:0}.page-heading #analysis-title{font-size:1.1rem;line-height:1.3;letter-spacing:-.025em;margin:0}.page-heading #analysis-subtitle{display:none}.page-heading .heading-actions{display:contents}.page-heading #refresh{grid-column:2;grid-row:1/3;min-height:44px;width:auto;font-size:.76rem;padding:9px 12px;margin:0;border:1px solid #c5d2e7;color:#294d93;background:#fff}.page-heading #last-updated{grid-column:1;grid-row:2;font-size:.61rem;text-align:left;line-height:1.4;margin:0;white-space:normal}
 .analysis-filter-disclosure>summary,.milestone-options>summary{padding:11px 13px;font-size:.75rem;gap:9px}#filter-compact-summary,#milestone-compact-summary{font-size:.64rem}.milestone-options .section-heading{display:flex;align-items:flex-start;gap:10px}.milestone-controls{gap:9px;margin-top:8px}.milestone-controls>*{min-width:0!important;min-height:44px}.milestone-options>.section-heading,.milestone-options>.milestone-controls,.milestone-options>#milestone-status{margin-left:13px;margin-right:13px}.country-navigation{margin:12px 0}.country-navigation>span{display:none}.scope-line{margin:10px 0}.scope-line #country-scope{font-size:.68rem;line-height:1.5}.analysis-tabs{margin-top:16px}.page-footer{padding-top:18px}
}
/* Each funnel owns a saved reporting timezone. */
body .filter-primary,body[data-analysis-mode="all"] .filter-primary{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
body .filter-primary>.field,body .filter-primary>.field:nth-child(4){grid-column:auto}
body .filter-primary>.report-timezone-field{grid-column:span 2}
body .filter-primary>.apply-filters{align-self:end}
@media(max-width:640px){body .filter-primary,body[data-analysis-mode="all"] .filter-primary{grid-template-columns:repeat(2,minmax(0,1fr))}body .filter-primary>.market-field,body .filter-primary>.report-timezone-field{grid-column:1/-1}body .filter-primary>.apply-filters{grid-column:1/-1}}
