/* Kachhua v8.4 surface — one colour language on every status element, and boxes that use their space.
Green = go / all right · Yellow = wait / watch · Red = stop / danger. */
:root{--c-green:var(--pass);--c-green-bg:var(--passT);--c-yellow:var(--gold);--c-yellow-bg:var(--goldT);--c-yellow-ink:var(--goldI);--c-red:var(--fail);--c-red-bg:var(--failT)}
.t-green{--tone:var(--c-green);--tone-bg:var(--c-green-bg);--tone-ink:var(--c-green)}.t-yellow{--tone:var(--c-yellow);--tone-bg:var(--c-yellow-bg);--tone-ink:var(--c-yellow-ink)}.t-red{--tone:var(--c-red);--tone-bg:var(--c-red-bg);--tone-ink:var(--c-red)}
.t-green,.t-yellow,.t-red{border-left:4px solid var(--tone);background:color-mix(in srgb,var(--tone-bg) 70%,var(--sunken,transparent))}.t-green b,.t-yellow b,.t-red b{color:var(--tone-ink)}
.word-green{color:var(--c-green);font-weight:600}.word-yellow{color:var(--c-yellow-ink);font-weight:600}.word-red{color:var(--c-red);font-weight:600}
.chk.s-waiting{border-left:4px solid var(--c-yellow);background:color-mix(in srgb,var(--c-yellow-bg) 55%,var(--sunken,transparent))}.chk.s-waiting .chip,.chip.grey{background:var(--c-yellow-bg);color:var(--c-yellow-ink)}.chk.s-triggered{border-left:4px solid var(--c-red);background:color-mix(in srgb,var(--c-red-bg) 60%,var(--sunken,transparent))}.chk.s-warning{border-left:4px solid var(--c-yellow)}.chk.s-clear{border-left:4px solid var(--c-green)}
.chip,.pill{display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.25;padding:6px 14px;white-space:normal;text-align:center;max-width:100%;box-sizing:border-box}
.advgrid{align-items:stretch;grid-auto-rows:auto;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),max-content))}.advgrid>div{display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:0;height:auto;max-width:100%;padding:14px 16px;border-radius:14px}.advgrid>div b{font-size:18px;line-height:1.3}
.teis-top{display:grid!important;grid-template-columns:auto minmax(0,1fr);gap:14px;align-items:center;flex-direction:initial!important}.teis-top>div:last-child{display:flex;flex-direction:column;gap:6px;align-items:flex-start;min-width:0}.teis-gauges{display:grid;grid-template-columns:repeat(2,minmax(88px,1fr));gap:8px}.teis-score{min-width:96px;min-height:96px}.confirm-score{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:96px;padding:8px 10px;border:1px solid var(--line);border-radius:14px}.confirm-score b{font-size:1.35rem}.lights{margin-bottom:12px}.light{align-items:center}.light .dot{margin-top:0}
table.advt tr{position:relative}table.advt tr.t-green,table.advt tr.t-yellow,table.advt tr.t-red{background:color-mix(in srgb,var(--tone-bg) 45%,var(--card,transparent))}
.q-leading{color:var(--c-green);font-weight:600}.q-improving{color:var(--c-green);opacity:.85}.q-weakening{color:var(--c-yellow-ink);font-weight:600}.q-lagging{color:var(--c-red);font-weight:600}.hi-new{color:var(--c-green)}.lo-new{color:var(--c-red)}
.side .chip.green{background:var(--c-green-bg);color:var(--c-green)}.side .chip.gold{background:var(--c-yellow-bg);color:var(--c-yellow-ink)}.side .chip.bad,.side .chip.ink{background:var(--c-red-bg);color:var(--c-red)}
@media(max-width:430px){.advgrid{grid-template-columns:1fr}.teis-top{grid-template-columns:1fr}.teis-gauges{grid-template-columns:repeat(2,minmax(0,1fr))}.lights{grid-template-columns:1fr}.card,.pad,.teis-card,.entry-map,.xl,.em-grid,.em-grid>div,.exit-detail{min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}}
