/* Evidence Centre — ported from design_handoff_evidence_centre. Tokens follow the design;
   Poppins is the suite's Lexend (suite-wide swap, 2026-08-15). */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Mulish", system-ui, sans-serif; color: #33404F; background: #F3F5FA; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: #1E56C0; text-decoration: none; }
a:hover { color: #16408F; text-decoration: underline; }
::selection { background: #ffd9d0; }
:focus-visible { outline: 3px solid #1E56C0; outline-offset: 2px; border-radius: 4px; }
button { font: inherit; }
@keyframes ecFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
body.auth-pending .app-shell { display: none; }
/* Same container as the WCAG Checker: 90% wide, 32px inset (header, tabs, main, footer line up). */
.app-shell .rm-header-inner, .app-shell .rm-footer-inner { max-width: 90%; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #16273F; color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; }

.ec-wrap { max-width: 90%; width: 100%; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.ec-h { font-family: "Lexend", system-ui, sans-serif; }

/* Intro */
.ec-intro { padding-top: 28px; }
.ec-intro h1 { font-family: "Lexend", system-ui, sans-serif; font-weight: 800; font-size: 32px; letter-spacing: -0.6px; color: #16273F; margin: 0 0 4px; }
.ec-intro p { font-size: 15px; color: #5F6A79; margin: 0; }

/* Tabs */
.ec-tabs { background: #fff; border-top: 1px solid #EFF2F7; border-bottom: 1px solid #E7EBF1; margin-top: 20px; }
.ec-tablist { display: flex; flex-wrap: wrap; column-gap: 38px; }
.ec-tablist [role="tab"] { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer; padding: 18px 2px; font-family: "Lexend", system-ui, sans-serif; font-size: 16px; font-weight: 600; color: #5F6A79; white-space: nowrap; }
.ec-tablist [role="tab"][aria-selected="true"] { font-weight: 700; color: #16273F; border-bottom-color: #E8402A; }
.ec-tablist [role="tab"]:hover { color: #16273F; }

/* Period bar */
.ec-period { position: sticky; top: 77px; z-index: 30; background: #F3F5FA; border-bottom: 1px solid #E7EBF1; }
.ec-period[hidden] { display: none; }
.ec-period-inner { padding-top: 12px; padding-bottom: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ec-period-group { display: inline-flex; align-items: center; gap: 8px; }
.ec-period-label { font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 12.5px; color: #3B4757; }
.ec-seg { display: inline-flex; flex-wrap: wrap; background: #fff; border: 1px solid #E4E9F1; border-radius: 11px; padding: 3px; gap: 3px; }
.ec-seg--soft { background: #F7F9FC; }
.ec-seg button { background: transparent; border: none; border-radius: 8px; padding: 7px 13px; cursor: pointer; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 12.5px; color: #3B4757; min-height: 30px; white-space: nowrap; }
.ec-seg button[aria-pressed="true"] { background: #16273F; color: #fff; font-weight: 700; }

/* Main */
.ec-main { flex: 1; padding-top: 22px; padding-bottom: 56px; animation: ecFadeUp .3s ease both; }
.ec-main:focus { outline: none; }
.ec-loading { padding: 48px 0; text-align: center; color: #5F6A79; font-size: 14px; }
.ec-alert { background: #FCF3E8; border: 1px solid #EBD7B4; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; color: #5C3306; margin-bottom: 16px; line-height: 1.5; }

.ec-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ec-section-head > div { min-width: 0; }
.ec-h2 { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 20px; color: #16273F; margin: 0 0 3px; }
.ec-span { font-size: 13.5px; color: #5F6A79; margin: 0; }
.ec-btn-table { background: #fff; border: 1.5px solid #E4E9F1; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #3B4757; min-height: 34px; }
.ec-btn-table:hover { border-color: #C9D2DE; }

.ec-card { background: #fff; border: 1px solid #EAEDF3; border-radius: 16px; padding: 18px 20px; min-width: 0; }
.ec-gap { margin-top: 16px; }
.ec-h3 { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 16px; color: #16273F; margin: 0 0 4px; }
.ec-summary { font-size: 13.5px; color: #33404F; line-height: 1.55; margin: 0 0 14px; }
.ec-note { font-size: 13px; color: #5F6A79; margin: 0; }
.ec-empty { padding: 28px 14px; text-align: center; border: 1.5px dashed #E4E9F1; border-radius: 12px; font-size: 13.5px; color: #5F6A79; line-height: 1.55; }
.ec-empty strong { display: block; font-family: "Lexend", system-ui, sans-serif; color: #16273F; font-size: 14.5px; margin-bottom: 4px; }

/* AI summary */
.ec-ai { background: #F8F6FE; border: 1px solid #DCCFF7; border-radius: 16px; padding: 20px 22px; margin-bottom: 22px; }
.ec-ai-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ec-ai-badge { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #DCCFF7; border-radius: 999px; padding: 5px 11px; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: #5B3FD1; }
.ec-ai h2 { flex: 1; min-width: 200px; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 18px; color: #16273F; margin: 0; }
.ec-ai-body { display: flex; flex-direction: column; gap: 10px; }
.ec-ai-body p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #16273F; }
.ec-ai-body p.is-busy { color: #5F6A79; }
.ec-ai-focus { margin-top: 14px; padding-top: 14px; border-top: 1px solid #E4DBF7; }
.ec-ai-focus-h { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #5B3FD1; margin: 0 0 8px; }
.ec-ai-focus ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ec-ai-focus li { font-size: 14px; line-height: 1.55; color: #16273F; }
.ec-ai-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.ec-ai-btn { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid #CDBDF2; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #4A2FB8; min-height: 34px; }
.ec-ai-btn:disabled { cursor: default; opacity: 0.7; }
.ec-ai-note { font-size: 12.5px; color: #5F6A79; line-height: 1.5; }

/* Pills */
.ec-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 12px; padding: 4px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.ec-pill--sm { font-size: 11px; padding: 2px 8px; gap: 4px; }
.ec-pill--xs { font-size: 11.5px; padding: 3px 9px; }
.ec-tone-good { color: #14795A; background: #E7F7F1; border-color: #CDEDE1; }
.ec-tone-bad { color: #B3261E; background: #FCECEC; border-color: #F5D5D5; }
.ec-tone-warn { color: #7A4409; background: #FCF3E8; border-color: #EBD7B4; }
.ec-tone-neutral { color: #3B4757; background: #F1F4FA; border-color: #E4E9F1; }
.ec-tone-info { color: #1E56C0; background: #EAF1FC; border-color: #D6E4FB; }
.ec-tone-ai { color: #4A2FB8; background: #F2EFFC; border-color: #D7CDF3; }

/* Tiles */
.ec-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ec-tiles--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ec-tile { background: #fff; border: 1px solid #EAEDF3; border-radius: 14px; padding: 15px 17px; min-width: 0; }
.ec-tile-label { display: flex; align-items: center; gap: 8px; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #3B4757; }
.ec-tile-svc { font-family: "Mulish", system-ui, sans-serif; font-weight: 400; font-size: 12px; color: #5F6A79; }
.ec-tile-value { display: block; font-family: "Lexend", system-ui, sans-serif; font-weight: 800; font-size: 28px; line-height: 1.1; color: #16273F; margin: 8px 0 4px; }
.ec-tile-value--sm { font-size: 26px; }
.ec-tile-delta { font-size: 12.5px; color: #5F6A79; line-height: 1.45; }
.ec-sw { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Open-issues line chart */
.ec-open-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ec-open-item { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; background: #F7F9FC; border: 1px solid #EFF2F7; border-radius: 12px; padding: 10px 13px; }
.ec-open-name { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 13.5px; color: #16273F; }
.ec-open-range { font-size: 13px; color: #33404F; }
.ec-open-range strong { color: #16273F; }
.ec-line { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 8px; row-gap: 6px; }
.ec-yaxis { position: relative; height: 200px; }
.ec-yaxis span { position: absolute; right: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; color: #5F6A79; }
.ec-line svg { display: block; width: 100%; height: 200px; }

/* Bar lanes (small multiples) */
.ec-lane { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: end; padding: 12px 0; border-top: 1px solid #EFF2F7; }
.ec-lane-name { display: flex; align-items: center; gap: 7px; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 12.5px; color: #3B4757; }
.ec-lane-total { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 16px; color: #16273F; margin-top: 4px; }
.ec-lane-peak { font-size: 11.5px; color: #5F6A79; }
.ec-bars { display: flex; align-items: flex-end; gap: 2px; height: 64px; }
.ec-bars--tall { height: 72px; }
.ec-bar { flex: 1 1 0; min-width: 0; border-radius: 3px 3px 0 0; }
/* Labelled bars: the column holds the bar plus a value pinned just above its top. The extra top
   padding keeps the tallest bar's label inside the lane. Text ink, never the series colour. */
.ec-bars--vals { padding-top: 16px; }
.ec-col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.ec-col .ec-bar { flex: 1 1 auto; }
.ec-val { position: absolute; left: -2px; right: -2px; text-align: center; font-size: 10.5px; font-weight: 600; line-height: 1; color: #3B4757; white-space: nowrap; pointer-events: none; }
.ec-bars-empty { font-size: 12.5px; color: #5F6A79; align-self: center; }
.ec-xaxis { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding-top: 6px; }
.ec-xlabels { display: flex; gap: 2px; }
.ec-xlabels > span { flex: 1 1 0; min-width: 0; display: flex; }
.ec-xlabels > span > span { white-space: nowrap; font-size: 11px; color: #5F6A79; }
.ec-partial { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: #33404F; }
.ec-hatch { flex: 0 0 auto; width: 16px; height: 12px; border-radius: 3px; background: repeating-linear-gradient(45deg, #3B4757 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1.5px #3B4757; }

/* Tables */
.ec-scroll { overflow-x: auto; }
.ec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ec-table th[scope="col"] { text-align: left; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 11.5px; color: #3B4757; padding: 8px 6px; border-bottom: 1px solid #E4E9F1; }
.ec-table th[scope="row"] { text-align: left; font-weight: 600; color: #16273F; padding: 7px 6px; border-bottom: 1px solid #F1F4F8; white-space: nowrap; }
.ec-table td { color: #16273F; padding: 7px 6px; border-bottom: 1px solid #F1F4F8; }
.ec-table .num { text-align: right; }
.ec-table--docs { font-size: 13.5px; min-width: 680px; }
.ec-table--docs th[scope="col"] { padding: 9px 8px; }
.ec-table--docs th[scope="row"], .ec-table--docs td { padding: 10px 8px; white-space: normal; }
.ec-doc-name { display: block; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 13.5px; color: #16273F; overflow-wrap: anywhere; }
.ec-doc-id { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 400; font-size: 11.5px; color: #5F6A79; margin-top: 2px; }
.ec-fixbar { display: flex; align-items: center; gap: 10px; }
.ec-fixbar strong { flex: 0 0 38px; text-align: right; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; color: #16273F; }
.ec-fixbar-track { flex: 1; min-width: 40px; height: 8px; border-radius: 999px; background: #F3E3E0; overflow: hidden; }
.ec-fixbar-track span { display: block; height: 100%; border-radius: 999px; background: #C43624; }
.ec-search { display: flex; align-items: center; gap: 9px; background: #F7F9FC; border: 1.5px solid #E4E9F1; border-radius: 11px; padding: 8px 12px; min-width: 240px; }
.ec-search--sm { padding: 7px 11px; min-width: 200px; gap: 8px; }
.ec-search:focus-within { border-color: #1E56C0; }
.ec-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-family: "Mulish", system-ui, sans-serif; font-size: 13.5px; color: #16273F; }
.ec-more { margin-top: 14px; background: #fff; border: 1.5px solid #E4E9F1; border-radius: 11px; padding: 10px 18px; cursor: pointer; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #3B4757; }

/* Live services */
.ec-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ec-uptime { font-family: "Lexend", system-ui, sans-serif; font-weight: 800; font-size: 34px; line-height: 1.1; color: #16273F; margin: 14px 0 2px; }
.ec-uptime--none { font-size: 24px; color: #3B4757; }
.ec-uptime-sub { font-size: 12.5px; color: #5F6A79; margin-bottom: 12px; }
.ec-cells { display: flex; gap: 2px; margin-bottom: 6px; }
.ec-cell { flex: 1 1 0; min-width: 0; height: 28px; border-radius: 4px; }
.ec-cell--none { background: repeating-linear-gradient(45deg, #E4E9F1 0 3px, #F7F9FC 3px 6px); box-shadow: inset 0 0 0 1px #DCE3EC; }
.ec-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid #EFF2F7; margin-top: 14px; }
.ec-facts dt { font-size: 11.5px; color: #5F6A79; }
.ec-facts dd { margin: 2px 0 0; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 14px; color: #16273F; }
.ec-key { display: flex; gap: 16px; flex-wrap: wrap; margin: -4px 0 18px; font-size: 12.5px; color: #33404F; }
.ec-key > span { display: inline-flex; align-items: center; gap: 7px; }
.ec-key i { width: 14px; height: 12px; border-radius: 3px; display: inline-block; }
.ec-incident { display: grid; grid-template-columns: 110px 130px 90px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid #EFF2F7; font-size: 13.5px; }
.ec-incident-svc { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; color: #16273F; }
.ec-incident-dur { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; color: #B3261E; white-space: nowrap; }

/* Training */
.ec-target { border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; background: #fff; border: 1px solid #EAEDF3; }
.ec-target.is-met { background: #F2FBF7; border-color: #CDEDE1; }
.ec-target h3 { flex: 1; min-width: 220px; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 17px; color: #16273F; margin: 0; }
.ec-target-body { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: #33404F; }
.ec-progress { display: flex; align-items: center; gap: 12px; }
.ec-progress-track { position: relative; flex: 1; height: 14px; border-radius: 999px; background: #EDF0F5; }
.ec-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: #1E56C0; }
.is-met .ec-progress-fill { background: #14795A; }
.ec-progress-target { position: absolute; top: -4px; bottom: -4px; right: 0; width: 3px; border-radius: 2px; background: #16273F; }
.ec-progress-pct { flex: 0 0 auto; font-family: "Lexend", system-ui, sans-serif; font-weight: 800; font-size: 18px; color: #16273F; }
.ec-gaps { margin: 12px 0 0; font-size: 13px; color: #33404F; line-height: 1.55; }
.ec-gaps strong { color: #16273F; }
.ec-courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.ec-course { display: flex; align-items: flex-start; gap: 10px; background: #F7F9FC; border: 1px solid #EFF2F7; border-radius: 12px; padding: 11px 13px; min-width: 0; }
.ec-course > span:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ec-course-name { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 13.5px; color: #16273F; }
.ec-course-who { font-size: 12px; color: #5F6A79; }
.ec-course-n { font-size: 12.5px; color: #16273F; font-weight: 600; }
.ec-chip { flex: 0 0 auto; min-width: 28px; height: 22px; padding: 0 5px; border-radius: 6px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: "Lexend", system-ui, sans-serif; font-weight: 800; font-size: 10.5px; }
.ec-staff-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ec-staff-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; }
.ec-staff-axis { position: relative; height: 16px; }
.ec-staff-axis span { position: absolute; top: 0; font-size: 11px; color: #5F6A79; white-space: nowrap; }
.ec-staff-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: center; padding: 9px 0; border-top: 1px solid #EFF2F7; }
.ec-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ec-avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: #16273F; color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 11px; overflow: hidden; }
.ec-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ec-person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ec-person-name { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 13.5px; color: #16273F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-person-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ec-person-sub { font-size: 11.5px; color: #5F6A79; }
.ec-track { position: relative; height: 30px; }
.ec-track.is-two { height: 56px; }
.ec-track-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #EFF2F7; }
.ec-track-rail { position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: #EDF0F5; }
.ec-mark { position: absolute; transform: translateX(-50%); box-shadow: 0 0 0 2px #fff; cursor: default; }
.ec-staff-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #EFF2F7; font-size: 12.5px; color: #33404F; }
.ec-staff-key > span { display: inline-flex; align-items: center; gap: 7px; }

/* Governance */
.ec-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.ec-doc { display: flex; flex-direction: column; }
.ec-doc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ec-doc-icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; background: #EAF1FC; display: flex; align-items: center; justify-content: center; }
.ec-doc h3 { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; color: #16273F; margin: 14px 0 4px; }
.ec-doc-kind { font-size: 13px; color: #5F6A79; margin: 0; }
.ec-doc-meta { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding-top: 14px; border-top: 1px solid #EFF2F7; }
.ec-doc-meta dt { font-size: 11.5px; color: #5F6A79; }
.ec-doc-meta dd { margin: 2px 0 0; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 14px; color: #16273F; }
.ec-warn-note { margin: 14px 0 0; background: #FCF3E8; border: 1px solid #EBD7B4; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #5C3306; line-height: 1.5; }
.ec-doc-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.ec-btn { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1.5px solid #E4E9F1; border-radius: 11px; padding: 9px 15px; cursor: pointer; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #16273F; min-height: 38px; text-decoration: none; }
.ec-btn:hover { border-color: #C9D2DE; text-decoration: none; color: #16273F; }
.ec-btn--primary { background: #1E56C0; border-color: #1E56C0; color: #fff; }
.ec-btn--primary:hover { background: #16408F; border-color: #16408F; color: #fff; }
.ec-btn:disabled { opacity: 0.6; cursor: default; }

/* Dialogs */
.ec-dialog[hidden] { display: none; }
.ec-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(16, 26, 40, 0.5); }
.ec-dialog-panel { position: fixed; top: 4vh; left: 50%; transform: translateX(-50%); z-index: 91; width: min(820px, calc(100vw - 32px)); max-height: 92vh; display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(16, 26, 40, 0.35); }
.ec-dialog-panel.is-embed { top: 8vh; width: min(640px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; padding: 22px 24px; }
.ec-dialog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid #EFF2F7; }
.ec-dialog-head h2 { flex: 1; min-width: 200px; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 17px; color: #16273F; margin: 0; }
.ec-close { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid #E4E8EF; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ec-viewer { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 20px 20px; }
.ec-viewer-meta { margin: 0 0 10px; font-size: 13px; color: #3B4757; }
.ec-viewer iframe { flex: 1; width: 100%; min-height: 60vh; border: 1px solid #EFF2F7; border-radius: 10px; }
.ec-embed-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ec-embed-head h2 { flex: 1; min-width: 0; font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 18px; color: #16273F; margin: 0; }
.ec-embed-intro { margin: 0 0 16px; font-size: 13.5px; color: #33404F; line-height: 1.55; }
.ec-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ec-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; background: #fff; border: 1.5px solid #E4E9F1; border-radius: 12px; padding: 11px 13px; cursor: pointer; min-width: 0; }
.ec-mode[aria-pressed="true"] { background: #F5F8FE; border-color: #1E56C0; }
.ec-mode strong { font-family: "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 13px; color: #16273F; }
.ec-mode span { font-size: 12px; color: #5F6A79; line-height: 1.4; }
.ec-embed-label { display: block; font-family: "Lexend", system-ui, sans-serif; font-weight: 600; font-size: 12.5px; color: #3B4757; margin-bottom: 6px; }
.ec-embed-code { width: 100%; resize: vertical; background: #F6F8FC; border: 1px solid #E4E9F1; border-radius: 10px; padding: 12px 14px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; line-height: 1.55; color: #16273F; }
.ec-embed-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: #5F6A79; }
.ec-embed-foot code { font-family: "JetBrains Mono", ui-monospace, monospace; color: #16273F; overflow-wrap: anywhere; }
.ec-sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 720px) {
  .ec-wrap { padding-left: 18px; padding-right: 18px; }
  .ec-tablist { column-gap: 22px; flex-wrap: nowrap; overflow-x: auto; }
  .ec-lane, .ec-xaxis { grid-template-columns: 110px minmax(0, 1fr); }
  .ec-staff-grid, .ec-staff-row { grid-template-columns: 1fr; }
  .ec-staff-grid > span:first-child { display: none; }
  .ec-incident { grid-template-columns: 1fr 1fr; }
  .ec-docs { grid-template-columns: 1fr; }
  .ec-period { top: 0; position: static; }
}

@media (max-width: 480px) {
  /* Narrow screens: a 12-month lane has under 24px columns, too tight for labels. */
  .ec-bars--vals[data-n="8"] .ec-val, .ec-bars--vals[data-n="9"] .ec-val, .ec-bars--vals[data-n="10"] .ec-val, .ec-bars--vals[data-n="11"] .ec-val, .ec-bars--vals[data-n="12"] .ec-val, .ec-bars--vals[data-n="13"] .ec-val { display: none; }
}
