/* V2.9: fixed 1920x1080 canvas, independent asymmetric grid zones. */
html:has(body.tv-visual),body.tv-visual{width:100%;height:100%;overflow:hidden}
body.tv-visual{margin:0;background:#edf3fa;color:#132a45;font-family:Arial,Helvetica,sans-serif;display:flex;flex-direction:column}
body.tv-visual header{height:70px;flex:0 0 70px;box-sizing:border-box;padding:0 28px;background:#10376d;color:white;display:flex;justify-content:space-between;align-items:center}
body.tv-visual h1{font-size:25px;margin:0;letter-spacing:.03em}body.tv-visual h1 span{color:#bdd9fb}body.tv-visual header small{font-size:12px;color:#d5e6ff}body.tv-visual .tv-live{font-size:14px;font-weight:bold;color:#75f0c3}
body.tv-visual main{height:calc(100vh - 70px);flex:1;min-height:0;box-sizing:border-box;padding:12px 18px}body.tv-visual #content{height:100%;min-height:0}
.v29-shell{height:100%;min-height:0;display:grid;gap:12px;grid-template-columns:1.18fr 1.02fr .96fr;grid-template-rows:112px minmax(0,1.12fr) minmax(0,.86fr) minmax(0,.85fr) 33px;grid-template-areas:"metrics metrics metrics" "months codes patterns" "months codes patterns" "grades locations actions" "bottom bottom bottom"}
.v29-metrics{grid-area:metrics;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;min-height:0}
.v29-metric,.v29-panel{min-width:0;min-height:0;background:#fff;border:1px solid #d9e5f1;border-radius:13px;box-shadow:0 3px 10px #2145690c;box-sizing:border-box;overflow:hidden}
.v29-metric{padding:12px 17px;border-top:5px solid #2563eb;display:flex;flex-direction:column;justify-content:center;gap:3px}.v29-metric small{font-size:12px;font-weight:800;color:#50627c;letter-spacing:.06em}.v29-metric strong{font-size:43px;line-height:1.02;color:#1859ba;font-variant-numeric:tabular-nums}.v29-metric span{font-size:12px;color:#63738a}.v29-metric.primary{background:#10376d;border-top-color:#4da6ff}.v29-metric.primary small,.v29-metric.primary span{color:#d0e2f9}.v29-metric.primary strong{color:#fff}.v29-metric:nth-child(2){border-top-color:#14a58a}.v29-metric:nth-child(3){border-top-color:#8b5cf6}.v29-metric.change{border-top-color:#e99a23}.v29-metric.severe{border-top-color:#df4563}.v29-metric.severe strong{color:#c83d59}.v29-metric strong em{font-style:normal;color:#aab4c4;font-size:25px}
.v29-panel{padding:14px 17px;display:flex;flex-direction:column;gap:10px}.v29-panel h2{margin:0;flex:none;font-size:16px;letter-spacing:.025em;color:#163452;display:flex;align-items:baseline;gap:9px}.v29-panel h2 small{font-size:11px;color:#70839b;font-weight:500}
.v29-month-panel{grid-area:months}.v29-codes{grid-area:codes}.v29-patterns{grid-area:patterns}.v29-grades{grid-area:grades}.v29-locations{grid-area:locations}.v29-actions{grid-area:actions}
.v29-months{flex:1;min-height:0;display:flex;align-items:stretch;justify-content:center;gap:18px;padding:10px 14px 0}.v29-month{flex:1;max-width:110px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px}.v29-month-num{font-size:24px;font-weight:800;color:#1359ad}.v29-month-track{flex:1;width:75%;background:#eff4fb;border-radius:9px 9px 0 0;display:flex;align-items:flex-end;overflow:hidden}.v29-month-track i{display:block;width:100%;background:linear-gradient(#5eacff,#2168c7);border-radius:9px 9px 0 0}.v29-month span{font-size:14px;font-weight:bold;color:#53667f}.v29-sub{font-size:12px;color:#64748b;flex:none}.v29-sub span{display:inline-block;margin-left:8px;color:#b45b0b;font-weight:700}
.v29-bars{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:space-around;gap:7px}.v29-bar{display:grid;grid-template-columns:minmax(0,45%) minmax(0,1fr) 28px;align-items:center;gap:9px;font-size:13px}.v29-bar>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.v29-bar b{text-align:right;font-size:14px;color:#163452}.v29-track{height:11px;border-radius:20px;background:#e8eef7;overflow:hidden}.v29-track i{display:block;height:100%;background:linear-gradient(90deg,#3d90e8,#0f5bb7);border-radius:20px}.v29-locations .v29-track i{background:linear-gradient(90deg,#ffb766,#e87533)}.v29-actions .v29-track i{background:linear-gradient(90deg,#66c9b6,#128c7a)}.v29-none{font-size:14px;color:#7a8999}
.v29-grades-wrap{flex:1;min-height:0;display:flex;gap:15px;justify-content:space-around}.v29-grade{flex:1;max-width:95px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px}.v29-grade strong{font-size:19px;color:#175da9}.v29-grade-track{flex:1;min-height:0;width:60%;display:flex;align-items:flex-end;background:#f0f3f9;border-radius:7px 7px 0 0;overflow:hidden}.v29-grade-track i{display:block;width:100%;background:linear-gradient(#aa8bf8,#7550cf);border-radius:7px 7px 0 0}.v29-grade span{font-size:12px;color:#58677c;font-weight:800}
.v29-insights{flex:1;min-height:0;display:grid;grid-template-rows:repeat(5,minmax(0,1fr));gap:9px}.v29-insight{min-width:0;min-height:0;display:grid;grid-template-columns:73px minmax(0,1fr);align-items:center;gap:12px;padding:7px 12px;border-radius:10px;background:#eaf2ff;color:#1857a7}.v29-insight-num{font-size:37px;line-height:1;font-weight:900;text-align:center;font-variant-numeric:tabular-nums}.v29-insight-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.v29-insight-copy small{font-size:11px;letter-spacing:.08em;font-weight:800}.v29-insight-copy strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v29-insight.orange{background:#fff0e5;color:#aa541d}.v29-insight.purple{background:#f1eaff;color:#6c39b8}.v29-insight.teal{background:#e5f8f1;color:#117864}.v29-insight.rose{background:#fff0f3;color:#b63d56}
.v29-bottom{grid-area:bottom;display:flex;gap:12px;align-items:center;min-width:0;min-height:0}.v29-marquee{height:100%;min-width:0;flex:1;background:#10376d;color:white;border-radius:7px;display:flex;align-items:center;overflow:hidden}.v29-marquee>b{font-size:11px;letter-spacing:.08em;background:#2362b4;padding:0 12px;display:flex;align-items:center;height:100%;z-index:1}.v29-marquee-clip{flex:1;min-width:0;overflow:hidden;white-space:nowrap}.v29-marquee-track{display:flex;width:max-content;gap:40px;animation:v29crawl 55s linear infinite}.v29-marquee-track span{font-size:12px;font-weight:600;white-space:nowrap}.v29-source{flex:none;font-size:11px;color:#62718a}@keyframes v29crawl{to{transform:translateX(-50%)}}@media(prefers-reduced-motion:reduce){.v29-marquee-track{animation:none}}
@media(max-height:850px){body.tv-visual header{height:58px;flex-basis:58px}body.tv-visual main{height:calc(100vh - 58px)}.v29-shell{grid-template-rows:92px minmax(0,1.12fr) minmax(0,.86fr) minmax(0,.85fr) 30px;gap:8px}.v29-metric strong{font-size:34px}.v29-panel{padding:10px 13px;gap:6px}.v29-insights{gap:5px}.v29-insight-num{font-size:29px}}
