/* Faro Seguros: the back office (erp slot). Noche sidebar, Arena page, Luz for what is active, Mar for data and links.
   Colours and faces come only from the brand tokens. Layout: container queries on `demo`. */

.d-erp { height: 100%; background: var(--b-paper); color: var(--b-ink); font: 400 13px/1.45 var(--b-font-body); }
.d-erp .x-num, .d-erp td, .d-erp dd { font-variant-numeric: tabular-nums; }
.e-app { height: 100%; display: grid; grid-template-columns: 208px minmax(0, 1fr); }
.e-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* sidebar */
.e-side { display: flex; flex-direction: column; gap: 22px; min-height: 0; padding: 20px 12px 16px; background: var(--b-secondary); color: var(--b-on-secondary); }
.e-brand { padding: 2px 8px 0; }
.e-nav { display: grid; gap: 3px; }
.e-nb { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px; padding: 8px 10px; border-radius: var(--b-radius); color: color-mix(in srgb, var(--b-on-secondary) 76%, var(--b-secondary)); font-weight: 500; font-size: 14px; transition: background-color .15s ease-out, color .15s ease-out; }
button.e-nb:hover { background: color-mix(in srgb, var(--b-on-secondary) 9%, var(--b-secondary)); color: var(--b-on-secondary); }
.e-nb[aria-pressed="true"], .e-nb.on { background: var(--b-primary); color: var(--b-on-primary); font-weight: 600; }
.e-nl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-badge { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--b-on-secondary) 14%, var(--b-secondary)); color: var(--b-on-secondary); font-size: 12.5px; font-weight: 600; }
.e-nb[aria-pressed="true"] .e-badge, .e-nb.on .e-badge { background: var(--b-secondary); color: var(--b-on-secondary); }
.e-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid color-mix(in srgb, var(--b-on-secondary) 14%, var(--b-secondary)); font-size: 13px; }
.e-user b { display: block; font-weight: 600; }
.e-user small { display: block; font-size: 12.5px; color: color-mix(in srgb, var(--b-on-secondary) 76%, var(--b-secondary)); }
.e-av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--b-accent); color: var(--b-on-accent); font: 600 13px/1 var(--b-font-display); }
.e-av.big { width: 42px; height: 42px; font-size: 15px; }
.e-av.c2 { background: var(--b-primary); color: var(--b-on-primary); }

/* main column and header */
.e-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 18px; }
.e-head { display: flex; align-items: center; gap: 14px; }
.e-ht { min-width: 0; margin-right: auto; }
.e-ht h2 { font: var(--b-display-weight) 22px/1.15 var(--b-font-display); color: var(--b-ink); }
.e-ht p { margin-top: 2px; color: var(--b-muted); font-size: 13px; }
.e-search { flex: 0 1 300px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface); color: var(--b-muted); font-size: 13px; }
.e-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--b-ink); font: inherit; outline: none; }
.e-search input::placeholder { color: var(--b-muted); opacity: 1; }
.e-search:focus-within { border-color: var(--b-accent); box-shadow: inset 0 0 0 1px var(--b-accent); }
.e-today { flex: none; padding: 9px 12px; border-radius: var(--b-radius); background: color-mix(in srgb, var(--b-accent) 10%, var(--b-surface)); color: var(--b-link); font-weight: 600; font-size: 13px; }
.e-view { position: relative; flex: 1; min-height: 0; }
.e-view > * { height: 100%; }
.motion .d-erp .e-view.swap > * { animation: e-in .32s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes e-in { from { opacity: 0; transform: translateY(8px); } }

/* shared parts */
.e-card { min-width: 0; min-height: 0; padding: 14px 16px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface); }
.e-ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: 14px; }
.e-ch > b { font: 600 14px/1.2 var(--b-font-display); white-space: nowrap; }
.e-more { color: var(--b-link); font-weight: 600; font-size: 13px; padding: 4px 2px; }
.e-more:hover { text-decoration: underline; }
.e-k { display: flex; align-items: center; gap: 6px; color: var(--b-muted); font-size: 12.5px; font-weight: 500; }
.e-dot { display: inline-block; width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--b-c1); }
.e-dot.c2 { background: var(--b-c2); } .e-dot.c3 { background: var(--b-c3); } .e-dot.c4 { background: var(--b-c4); }
.e-st { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-weight: 600; font-size: 12.5px; line-height: 1.3; white-space: nowrap; }
.e-st.ok, .e-st.s3 { background: color-mix(in srgb, var(--b-accent) 14%, var(--b-surface)); color: var(--b-link); }
.e-st.due, .e-st.s1, .e-st.s2 { background: color-mix(in srgb, var(--b-primary) 32%, var(--b-surface)); color: var(--b-ink); }
.e-st.rev, .e-st.s0 { border: 1px solid var(--b-ink); padding: 2px 8px; color: var(--b-ink); }
.e-st.late { background: var(--b-secondary); color: var(--b-primary); }
.e-st.done, .e-st.s4 { background: var(--b-accent); color: var(--b-on-accent); }
.e-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; border-radius: var(--b-radius); background: var(--b-primary); color: var(--b-on-primary); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color .15s ease-out, transform .15s ease-out; }
.e-btn:hover { background: color-mix(in srgb, var(--b-secondary) 12%, var(--b-primary)); }
.e-btn:active { transform: translateY(1px); }
.e-btn.alt { background: var(--b-accent); color: var(--b-on-accent); }
.e-btn.alt:hover { background: color-mix(in srgb, var(--b-secondary) 22%, var(--b-accent)); }
.e-btn.sm { min-height: 32px; padding: 5px 10px; font-size: 12.5px; }
.e-done { display: inline-flex; align-items: center; gap: 8px; color: var(--b-link); font-weight: 600; font-size: 14px; }
.e-done .e-ico { stroke-width: 2.4; }
.e-goal { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--b-line); overflow: hidden; }
.e-goal i { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 4px; background: var(--b-accent); transform-origin: left; transition: transform .8s cubic-bezier(.2, .7, .2, 1) .2s; }
.motion .d-erp:not(.is-open) .e-goal i { transform: scaleX(0); }
.e-li, .e-dayp li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border-bottom: 1px solid var(--b-line); }
button.e-li { border-radius: 4px; transition: background-color .15s ease-out; }
button.e-li:hover { background: color-mix(in srgb, var(--b-paper) 70%, var(--b-surface)); }
li:last-child > .e-li, .e-dayp li:last-child { border-bottom: 0; }
.e-lt { min-width: 0; }
.e-lt b { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-lt small { display: block; color: var(--b-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-amt { font: 600 13px/1.2 var(--b-font-display); white-space: nowrap; }
.e-when { color: var(--b-link); font-weight: 600; font-size: 13px; white-space: nowrap; }
.e-foot { margin-top: auto; padding: 10px 14px; border-top: 1px solid var(--b-line); color: var(--b-muted); font-size: 12.5px; }

/* summary */
.e-sum { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "k k" "m r" "a s"; gap: 14px; }
.e-kpis { grid-area: k; display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.e-kpi { position: relative; min-width: 0; padding: 13px 16px 12px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface); overflow: hidden; }
.e-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--b-c1); }
.e-kpi:nth-child(3)::before { background: var(--b-c3); }
.e-kpi:nth-child(4)::before { background: var(--b-c4); }
.e-kpi.main { background: var(--b-primary); border-color: var(--b-primary); color: var(--b-on-primary); }
.e-kpi.main::before { display: none; }
.e-kl { font-size: 12.5px; font-weight: 500; color: var(--b-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-kv { margin-top: 3px; font: var(--b-display-weight) clamp(20px, 2.1cqi, 30px)/1.15 var(--b-font-display); white-space: nowrap; letter-spacing: -0.01em; }
.e-kn { margin-top: 4px; font-size: 12.5px; color: var(--b-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-kpi.main .e-kl, .e-kpi.main .e-kn { color: var(--b-on-primary); }
.e-kpi.main .e-goal { margin-top: 8px; height: 6px; background: color-mix(in srgb, var(--b-on-primary) 16%, var(--b-primary)); }
.e-kpi.main .e-goal i { background: var(--b-on-primary); }
.e-months { grid-area: m; display: flex; flex-direction: column; }
.e-mbars { flex: 1; min-height: 110px; display: flex; gap: 10px; padding-top: 22px; }
.e-mb { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; border-radius: 4px; }
.e-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* read aloud, not shown */
.e-mbt { position: relative; flex: 1; }
.e-mbt i { position: absolute; left: 16%; right: 16%; bottom: 0; height: var(--h); border-radius: 5px 5px 0 0; background: var(--b-accent); transform-origin: bottom; transition: transform .7s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * 70ms), background-color .15s ease-out; }
.e-mb.now .e-mbt i { background: var(--b-primary); }
.e-mb:hover .e-mbt i { background: color-mix(in srgb, var(--b-secondary) 25%, var(--b-accent)); }
.e-mb.now:hover .e-mbt i { background: color-mix(in srgb, var(--b-secondary) 12%, var(--b-primary)); }
.e-mb[aria-pressed="true"] .e-mbt i { outline: 2px solid var(--b-ink); outline-offset: 2px; }
.e-mbt em { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font: 600 12.5px/1 var(--b-font-display); font-style: normal; color: var(--b-ink); white-space: nowrap; }
.motion .d-erp:not(.is-open) .e-mbt i { transform: scaleY(0); }
.e-ml { text-align: center; color: var(--b-muted); font-size: 12.5px; font-weight: 500; }
.e-mb[aria-pressed="true"] .e-ml { color: var(--b-ink); font-weight: 600; }
.e-unit { margin-top: 6px; color: var(--b-muted); font-size: 12.5px; }
.e-ramos { grid-area: r; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; align-items: center; }
.e-ramos .e-ch { grid-column: 1 / -1; align-self: start; }
.e-donut { position: relative; width: clamp(112px, 11cqi, 170px); aspect-ratio: 1; }
.e-donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
.e-donut .e-arc { fill: none; stroke-width: 7; stroke: var(--b-c1); transition: opacity .5s ease-out calc(.3s + var(--i) * 120ms); }
.e-donut .e-arc.c2 { stroke: var(--b-c2); } .e-donut .e-arc.c3 { stroke: var(--b-c3); } .e-donut .e-arc.c4 { stroke: var(--b-c4); }
.motion .d-erp:not(.is-open) .e-donut .e-arc { opacity: 0; }
.e-donut p { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.e-donut b { font: var(--b-display-weight) 18px/1.1 var(--b-font-display); }
.e-donut span { color: var(--b-muted); font-size: 12.5px; }
.e-leg { display: grid; gap: 8px; }
.e-leg li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto 34px; align-items: center; gap: 8px; font-size: 13px; }
.e-leg b { font-weight: 600; }
.e-leg small { text-align: right; color: var(--b-muted); font-size: 12.5px; }
.e-appr { grid-area: a; }
.e-soon { grid-area: s; }
.e-appr .e-ch, .e-soon .e-ch { margin-bottom: 4px; }
.e-appr .e-li { grid-template-columns: 9px minmax(0, 1fr) auto 104px; }
.e-appr .e-amt { text-align: right; }
.is-hero .e-sum { grid-template-areas: "k k" "m r" "a a"; }

/* policies */
.e-pol { position: relative; display: flex; flex-direction: column; gap: 12px; }
.e-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.e-tl { color: var(--b-muted); font-size: 13px; }
.e-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.e-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 13px; border: 1px solid var(--b-line); border-radius: 999px; background: var(--b-surface); font-weight: 600; font-size: 13px; transition: background-color .15s ease-out, border-color .15s ease-out; }
.e-chip:hover { border-color: var(--b-ink); }
.e-chip small { color: var(--b-muted); font-size: 12.5px; font-weight: 500; }
.e-chip[aria-pressed="true"] { background: var(--b-secondary); border-color: var(--b-secondary); color: var(--b-on-secondary); }
.e-chip[aria-pressed="true"] small { color: color-mix(in srgb, var(--b-on-secondary) 78%, var(--b-secondary)); }
.e-table { flex: 1; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.e-table th { padding: 10px 14px; border-bottom: 1px solid var(--b-line); background: color-mix(in srgb, var(--b-paper) 55%, var(--b-surface)); color: var(--b-muted); font-weight: 600; font-size: 12.5px; text-align: left; white-space: nowrap; }
.e-table .num { text-align: right; }
.e-sort { display: inline-flex; align-items: center; gap: 5px; color: var(--b-link); font-weight: 600; }
.e-sort i { font-style: normal; width: 10px; }
.e-sort i::before { content: "↕"; }
[aria-sort="ascending"] .e-sort i::before { content: "↑"; }
[aria-sort="descending"] .e-sort i::before { content: "↓"; }
.e-table td { padding: 8px 14px; border-bottom: 1px solid var(--b-line); font-size: 13px; white-space: nowrap; }
.e-table tbody tr { cursor: pointer; transition: background-color .15s ease-out; }
.e-table tbody tr:hover { background: color-mix(in srgb, var(--b-paper) 60%, var(--b-surface)); }
.e-table tbody tr.sel { background: color-mix(in srgb, var(--b-primary) 16%, var(--b-surface)); }
.e-table tr.e-empty { cursor: default; } .e-table tr.e-empty td { padding: 28px 14px; color: var(--b-muted); white-space: normal; }
.e-c-who b { display: block; font-weight: 600; }
.e-c-who small { display: block; color: var(--b-muted); font-size: 12.5px; }
.e-c-line .e-dot { margin-right: 7px; }
.e-c-prem { font: 600 13px var(--b-font-display); }
.e-lnk { color: var(--b-link); font-weight: 600; }
.e-lnk:hover { text-decoration: underline; }
.e-drawer { position: absolute; z-index: 2; top: 0; right: 0; bottom: 0; width: min(380px, 46%); display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; border: 1px solid var(--b-line); border-left: 4px solid var(--b-primary); border-radius: var(--b-radius); background: var(--b-surface); overflow: hidden; }
.motion .d-erp .e-drawer:not([hidden]) { animation: e-dw .3s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes e-dw { from { opacity: 0; transform: translateX(18px); } }
.e-dw-h { display: flex; align-items: flex-start; gap: 10px; }
.e-dw-h h4 { margin-top: 2px; font: var(--b-display-weight) 20px/1.15 var(--b-font-display); }
.e-dw-h .e-st { margin: 4px 0 0 auto; }
.e-x { width: 36px; height: 36px; flex: none; display: grid; place-items: center; margin: -4px -6px 0 0; border-radius: var(--b-radius); color: var(--b-muted); }
.e-x:hover { background: var(--b-paper); color: var(--b-ink); }
.e-dl { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 7px 12px; font-size: 13px; }
.e-dl dt { color: var(--b-muted); }
.e-dl dd { font-weight: 500; }
.e-pays p { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 13px; color: var(--b-muted); }
.e-pays b { color: var(--b-ink); }
.e-pg { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.e-pg i { height: 10px; border-radius: 2px; background: var(--b-line); }
.e-pg i.y { background: var(--b-accent); }
.e-dw-a { margin-top: auto; }

/* claims */
.e-cl { display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); gap: 14px; }
.e-cli .e-lt small { white-space: normal; }
.e-cl-list { padding: 6px; overflow: hidden; }
.e-cl-list ul { display: grid; gap: 2px; }
.e-cli { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: var(--b-radius); transition: background-color .15s ease-out; }
.e-cli:hover { background: color-mix(in srgb, var(--b-paper) 70%, var(--b-surface)); }
.e-cli[aria-selected="true"] { background: color-mix(in srgb, var(--b-primary) 20%, var(--b-surface)); }
.e-cr { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.e-cr b { font: 600 13px var(--b-font-display); }
.e-cl-det { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px; overflow: hidden; }
.e-cd-h { display: flex; align-items: flex-start; gap: 12px; }
.e-cd-h > div { margin-right: auto; min-width: 0; }
.e-cd-h h4 { margin-top: 3px; font: var(--b-display-weight) 21px/1.15 var(--b-font-display); }
.e-cd-h h4 span { color: var(--b-muted); font: 500 14px var(--b-font-body); }
.e-cd-s { margin-top: 3px; color: var(--b-muted); font-size: 13px; }
.e-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.e-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.e-steps li + li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 17px); right: calc(50% + 17px); height: 2px; background: var(--b-line); }
.e-steps li.y + li::before { background: var(--b-accent); }
.e-steps i { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--b-line); border-radius: 50%; background: var(--b-surface); color: var(--b-on-accent); }
.e-steps i .e-ico { width: 14px; height: 14px; stroke-width: 2.6; }
.e-steps .y i { background: var(--b-accent); border-color: var(--b-accent); }
.e-steps .now i { background: var(--b-primary); border-color: var(--b-primary); color: var(--b-on-primary); }
.e-steps b { font-size: 12.5px; font-weight: 600; }
.e-steps li:not(.y):not(.now) b { color: var(--b-muted); font-weight: 500; }
.e-steps small { min-height: 17px; color: var(--b-muted); font-size: 12.5px; }
.motion .d-erp .e-steps .pop i { animation: e-pop .45s cubic-bezier(.2, .7, .3, 1.3) both; }
@keyframes e-pop { from { opacity: 0; transform: scale(.4); } }
.e-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.e-figs p { padding: 10px 12px; border-radius: var(--b-radius); background: var(--b-paper); }
.e-figs span { display: block; color: var(--b-muted); font-size: 12.5px; }
.e-figs b { font: var(--b-display-weight) 17px/1.25 var(--b-font-display); white-space: nowrap; }
.e-figs .hi { background: var(--b-secondary); color: var(--b-on-secondary); }
.e-figs .hi span { color: color-mix(in srgb, var(--b-on-secondary) 76%, var(--b-secondary)); }
.e-figs .hi b { color: var(--b-primary); }
.e-cd-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 18px; }
.e-cd-2 .e-k { margin-bottom: 8px; }
.e-adj-p { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.e-adj-p b { display: block; font-weight: 600; }
.e-adj-p small { display: flex; align-items: center; gap: 5px; color: var(--b-muted); font-size: 12.5px; }
.e-ico.sm { width: 13px; height: 13px; }
.e-docs li { display: flex; align-items: center; gap: 9px; padding: 6px 0; border-bottom: 1px solid var(--b-line); font-size: 13px; }
.e-docs li:last-child { border-bottom: 0; }
.e-docs li > .e-ico { color: var(--b-link); }
.e-docs span { flex: 1; min-width: 0; }
.e-docs small { margin-left: 6px; color: var(--b-muted); font-size: 12.5px; }
.e-docs em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--b-link); }
.e-docs .miss em { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--b-primary) 32%, var(--b-surface)); color: var(--b-ink); }
.e-cd-a { margin-top: auto; display: flex; justify-content: flex-end; }

/* agents */
.e-ag { display: flex; flex-direction: column; gap: 12px; }
.e-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--b-line); border-radius: calc(var(--b-radius) + 3px); background: var(--b-surface); }
.e-seg button { min-height: 32px; padding: 5px 12px; border-radius: var(--b-radius); font-weight: 600; font-size: 13px; color: var(--b-muted); }
.e-seg button:hover { color: var(--b-ink); }
.e-seg button[aria-pressed="true"] { background: var(--b-secondary); color: var(--b-on-secondary); }
.e-agrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; }
.e-agc { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.e-agh { display: flex; align-items: center; gap: 11px; }
.e-agh b { display: block; font: var(--b-display-weight) 15px/1.2 var(--b-font-display); }
.e-agh small { display: block; color: var(--b-muted); font-size: 12.5px; }
.e-rank { margin-left: auto; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid var(--b-line); border-radius: 50%; color: var(--b-muted); font-weight: 600; font-size: 12.5px; }
.e-ags { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; }
.e-ags div { padding: 8px 10px; border-radius: var(--b-radius); background: var(--b-paper); transition: background-color .2s ease-out; }
.e-ags div.on { background: color-mix(in srgb, var(--b-primary) 30%, var(--b-surface)); }
.e-ags dt { color: var(--b-muted); font-size: 12.5px; white-space: nowrap; }
.e-ags div.on dt { color: var(--b-ink); }
.e-ags dd { font: 600 14.5px/1.3 var(--b-font-display); white-space: nowrap; }
.e-agg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.e-agg .e-goal { flex: 1; }
.e-agg b { font-size: 13px; font-weight: 600; }
.e-agg small { color: var(--b-muted); font-size: 12.5px; white-space: nowrap; }

/* renewals */
.e-rn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 14px; }
.e-cal { display: flex; flex-direction: column; }
.e-legend { display: flex; gap: 3px; }
.e-legend i, .e-day { background: color-mix(in srgb, var(--b-accent) 9%, var(--b-surface)); }
.e-legend i { width: 14px; height: 10px; border-radius: 2px; }
.e-legend .h2, .e-day.h2 { background: color-mix(in srgb, var(--b-accent) 22%, var(--b-surface)); }
.e-legend .h3, .e-day.h3 { background: color-mix(in srgb, var(--b-accent) 38%, var(--b-surface)); }
.e-legend .h4, .e-day.h4 { background: color-mix(in srgb, var(--b-accent) 56%, var(--b-surface)); }
.e-wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding-bottom: 6px; color: var(--b-muted); font-size: 12.5px; font-weight: 600; text-align: center; }
.e-days { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 6px; }
.e-day { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; min-width: 0; padding: 7px 9px; border-radius: var(--b-radius); text-align: left; transition: background-color .15s ease-out, transform .15s ease-out; }
.e-day.blank { background: none; }
.e-day b { font-weight: 600; font-size: 13px; }
.e-day small { font: 600 12.5px/1 var(--b-font-display); }
button.e-day:hover { transform: translateY(-1px); }
.e-day.past { background: color-mix(in srgb, var(--b-ink) 5%, var(--b-surface)); color: var(--b-muted); }
.e-day.today b { padding: 0 6px; border-radius: 999px; background: var(--b-primary); color: var(--b-on-primary); }
.e-day[aria-pressed="true"] { background: var(--b-secondary); color: var(--b-on-secondary); }
.e-day[aria-pressed="true"] small { color: var(--b-primary); }
.e-dayp { display: flex; flex-direction: column; }
.e-dayp ul { display: grid; }
.e-dayp li { grid-template-columns: 9px minmax(0, 1fr) auto auto; padding: 9px 0; }
.e-dayp .e-foot { padding: 10px 0 0; }

/* medium: smaller laptops and the hero copy */
@container demo (max-width: 1099px) {
  .e-app { grid-template-columns: 188px minmax(0, 1fr); }
  .e-main { padding: 14px 16px 16px; gap: 12px; }
  .e-search { flex-basis: 220px; }
  .e-c-ag { display: none; }
  .e-cd-2 { grid-template-columns: 1fr; }
  .e-agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  .e-ags dd { font-size: 13.5px; }
}

/* phone: the sidebar becomes a top bar, every module stacks */
@container demo (max-width: 599px) {
  .e-app { display: block; height: auto; }
  .e-side { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 12px 10px; }
  .e-brand { padding: 0; }
  .e-user { margin: 0; padding: 0; border: 0; }
  .e-user > div { display: none; }
  .e-nav { grid-column: 1 / -1; display: flex; gap: 6px; margin: 0 -12px; padding: 0 12px 2px; overflow-x: auto; scrollbar-width: none; }
  .e-nav::-webkit-scrollbar { display: none; }
  .e-nb { flex: none; width: auto; min-height: 42px; padding: 8px 12px; }
  .is-hero .e-nav { display: none; }
  .e-main { padding: 14px 12px 16px; gap: 12px; }
  .e-head { flex-wrap: wrap; gap: 10px; }
  .e-ht h2 { font-size: 20px; }
  .e-search { order: 3; flex: 1 1 100%; height: 44px; }
  .is-hero .e-search { display: none; }
  .e-view > * { height: auto; }
  .e-sum { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "k" "m" "r" "a" "s"; gap: 12px; }
  .is-hero .e-sum { grid-template-areas: "k" "m"; }
  .is-hero .e-ramos, .is-hero .e-appr { display: none; }
  .e-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .e-kpi.main { grid-column: 1 / -1; }
  .e-kv { font-size: 21px; }
  .e-kpi.main .e-kv { font-size: 26px; }
  .e-kl, .e-kn { white-space: normal; }
  .e-mbars { height: 170px; flex: none; }
  .e-ramos { grid-template-columns: 116px minmax(0, 1fr); }
  .e-donut { width: 116px; }
  .e-appr .e-li { grid-template-columns: 9px minmax(0, 1fr) auto; }
  .e-appr .e-li .e-st { display: none; }
  .e-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .e-chip { flex: none; min-height: 40px; }
  .e-table thead { display: none; }
  .e-table table, .e-table tbody { display: block; }
  .e-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 12px 14px; border-bottom: 1px solid var(--b-line); }
  .e-table tbody tr[hidden] { display: none; }
  .e-table td { padding: 0; border: 0; }
  .e-table td:first-child { grid-column: 1; grid-row: 1; }
  .e-table .e-c-st { grid-column: 2; grid-row: 1; justify-self: end; }
  .e-table .e-c-who { grid-column: 1; grid-row: 2; }
  .e-table .e-c-prem { grid-column: 2; grid-row: 2; align-self: center; }
  .e-table .e-c-line { grid-column: 1; grid-row: 3; color: var(--b-muted); font-size: 12.5px; }
  .e-table .e-c-due { grid-column: 2; grid-row: 3; color: var(--b-muted); font-size: 12.5px; }
  .e-lnk { min-height: 32px; }
  .e-table tr.e-xrow { display: block; padding: 0 0 12px; cursor: default; background: none; }
  .e-table tr.e-xrow td { display: block; }
  .e-xrow .e-drawer { position: static; width: auto; margin: 0 10px; animation: none; }
  .e-dl { grid-template-columns: 112px minmax(0, 1fr); }
  .e-dl dd { white-space: normal; }
  .e-cl { grid-template-columns: 1fr; gap: 12px; }
  .e-cl-det { padding: 16px 14px; }
  .e-cd-h { flex-wrap: wrap; }
  .e-steps { grid-template-columns: 1fr; gap: 0; }
  .e-steps li { flex-direction: row; gap: 10px; min-height: 40px; text-align: left; }
  .e-steps li + li::before { top: -12px; left: 13px; right: auto; width: 2px; height: 12px; }
  .e-steps small { margin-left: auto; min-height: 0; }
  .e-figs { grid-template-columns: 1fr; gap: 6px; }
  .e-figs p { display: flex; justify-content: space-between; align-items: baseline; }
  .e-figs b { font-size: 16px; }
  .e-cd-a .e-btn { width: 100%; min-height: 44px; }
  .e-tools { flex-wrap: wrap; }
  .e-agrid { grid-template-columns: 1fr; grid-template-rows: none; }
  .e-rn { grid-template-columns: 1fr; gap: 12px; }
  .e-days { grid-auto-rows: 52px; gap: 4px; }
  .e-wk { gap: 4px; }
  .e-day { padding: 5px 6px; }
  .e-dayp li { grid-template-columns: 9px minmax(0, 1fr) auto; }
  .e-dayp li > .e-st, .e-dayp li > .e-btn { grid-column: 2 / -1; justify-self: start; }
}

/* added after the first check: hero KPIs, policy activity, agent mix */
.is-hero .e-kpis { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); }
.e-donut .e-arc { stroke-width: 6; }
.e-donut b { font-size: 16px; }
.e-act ul { display: grid; margin-top: 6px; }
.e-act li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--b-line); font-size: 13px; }
.e-act li:last-child { border-bottom: 0; }
.e-act small { color: var(--b-muted); font-size: 12.5px; white-space: nowrap; }
.e-mixb { display: flex; gap: 2px; height: 10px; margin: 6px 0 7px; border-radius: 5px; overflow: hidden; }
.e-mixb i { background: var(--b-c1); }
.e-mixb .c2 { background: var(--b-c2); } .e-mixb .c3 { background: var(--b-c3); } .e-mixb .c4 { background: var(--b-c4); }
.e-mix ul { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--b-muted); font-size: 12.5px; }
.e-mix li { display: flex; align-items: center; gap: 5px; }
.e-mix b { color: var(--b-ink); font-weight: 600; }
@container demo (max-width: 599px) {
  .e-user { grid-row: 1; grid-column: 2; }
  .e-soon { display: none; }
  .e-cl-list { padding: 0; border: 0; background: none; overflow: visible; }
  .e-cl-list ul { display: flex; gap: 8px; margin: 0 -12px; padding: 0 12px 4px; overflow-x: auto; scrollbar-width: none; }
  .e-cl-list ul::-webkit-scrollbar { display: none; }
  .e-cl-list li { flex: none; width: 250px; }
  .e-cli { border: 1px solid var(--b-line); background: var(--b-surface); }
  .e-agc { gap: 10px; padding: 12px 14px; }
  .e-rank { display: none; }
}
@container demo (max-width: 599px) {
  .e-mix, .e-act { display: none; }
  .e-ags { grid-template-columns: 1fr; }
  .e-ags div:not(.on) { display: none; }
  .e-ags div.on { display: flex; justify-content: space-between; align-items: baseline; }
  .e-cli .e-lt small { white-space: normal; }
}
@container demo (max-width: 599px) { .is-hero .e-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* QA round 1: the donut grows with its card, each figure sits beside its name; phone tabs wrap instead of scrolling */
.e-leg li { display: contents; }
.e-leg { grid-template-columns: 9px auto auto auto; gap: 9px 12px; align-items: center; align-content: center; }
.e-donut { container-type: inline-size; }
.e-donut b { font-size: clamp(16px, 11cqi, 32px); }
.e-donut span { font-size: clamp(12.5px, 6cqi, 15px); }
@container demo (min-width: 600px) {
  .e-ramos { container: ramos / size; grid-template-columns: auto auto; justify-content: center; column-gap: 36px; }
  .e-donut { width: clamp(112px, min(calc(100cqh - 46px), 44cqw), 360px); }
}
@container demo (max-width: 599px) {
  .e-nav { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .e-nb { min-height: 40px; padding: 7px 11px; }
  .e-nb .e-ico { display: none; }
}
/* a tall, narrow card (the hero copy at 2560) stacks the legend under the donut, at the left */
@container ramos (min-height: 330px) and (max-width: 560px) {
  .e-donut, .e-leg { grid-column: 1 / -1; justify-self: start; }
  .e-donut { width: clamp(112px, min(calc(100cqh - 190px), 60cqw), 300px); }
  .e-leg { margin-top: 14px; }
}
@container demo (min-width: 600px) { .is-hero .e-ramos { justify-content: start; } }
/* a window of 600 to 1099 px (the hero beside the phone, smaller laptops): the donut card is narrow, so the % column
   goes, the donut gets a little smaller and every figure stays beside its name */
@container demo (min-width: 600px) and (max-width: 1099px) {
  .e-ramos { column-gap: 14px; }
  .e-leg { grid-template-columns: 9px auto auto; gap: 8px; }
  .e-leg li { font-size: 12.5px; }
  .e-leg small { display: none; }
  .e-donut { width: clamp(96px, min(calc(100cqh - 46px), 44cqw), 300px); }
  .e-donut b { font-size: clamp(15px, 15cqi, 18px); }
}
/* a short window: the charts keep at least 170 px, the lists below take what is left and show the rows that fit */
@container demo (min-width: 600px) {
  .e-sum { grid-template-rows: auto minmax(170px, 1fr) minmax(0, auto); }
  .e-appr, .e-soon { overflow: hidden; }
}
.e-appr li[hidden], .e-soon li[hidden] { display: none; }
/* a window of 600 to 759 px (a 1100 px browser): the sidebar becomes an icon rail with the symbol on a light tile,
   the summary splits in halves and the KPI labels wrap instead of being cut */
.e-brand .e-sym { display: none; }
@container demo (min-width: 600px) and (max-width: 759px) {
  .e-app { grid-template-columns: 64px minmax(0, 1fr); }
  .e-side { align-items: center; padding: 16px 8px 14px; }
  .e-brand { padding: 0; }
  .e-brand .e-logo { display: none; }
  .e-brand .e-sym { display: block; width: 40px; height: 40px; padding: 7px 9px; border-radius: var(--b-radius); background: var(--b-paper); }
  .e-nav { justify-items: center; }
  .e-nb { position: relative; justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .e-nl { display: none; }
  .e-badge { position: absolute; top: -5px; right: -9px; margin: 0; padding: 0 5px; }
  .e-user { justify-content: center; padding: 12px 0 0; }
  .e-user > div { display: none; }
  .e-sum { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .e-kl, .e-kn { white-space: normal; }
}
@container demo (min-width: 600px) and (max-width: 759px) {
  .e-kpis { grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)); }
  .e-kpi:nth-child(4) { display: none; }
  .e-appr .e-li { grid-template-columns: 9px minmax(0, 1fr) auto; }
  .e-appr .e-li .e-st { display: none; }
}
.e-mbars { min-height: 88px; }
@container demo (min-width: 600px) and (max-width: 1099px) { .e-kpis { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); } }
@container demo (min-width: 600px) and (max-width: 759px) {
  .e-kpis { grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr)); }
  .e-months .e-ch { flex-wrap: wrap; row-gap: 2px; }
  .e-mbars { min-height: 72px; }
}
