@import url('../fonts/fonts.css');

/* ---------------------------------------------------------------------------
   Strake Jesuit brand tokens — Brand Identity Guidelines (June 2022), pp. 17–22.
   Green is dominant; yellow, red and black are accents; secondary colors are
   used sparingly. Values below are the published RGB/HEX for digital use.
--------------------------------------------------------------------------- */
:root {
  --sj-green: #004730;        /* Primary — Pantone 3435 (HEX) */
  --sj-green-rgb: #005837;    /* Primary — Pantone 3435 (RGB 0/88/55) */
  --sj-yellow: #e8af10;       /* Accent — Pantone 131 */
  --sj-red: #e03a3e;          /* Accent — Pantone 186 */
  --sj-black: #231f20;
  --sj-yellow-2: #d8a945;     /* Secondary yellow */
  --sj-red-2: #913434;        /* Secondary red */
  --sj-gray-1: #8a8681;
  --sj-gray-2: #786b63;
  --sj-gray-3: #b9ae95;
  --sj-gray-4: #d7d0c8;

  /* ---- Hallway theme (default): a deep shade of SJ green, hairline cards,
          warm off-white type and the softer secondary yellow. Easy on the eye
          at 86" and still unmistakably Strake Jesuit. ---- */
  --bg: #0b2a20;
  --bg-2: #0e3025;                          /* rail / header */
  --card: rgba(236, 232, 226, 0.035);
  --card-line: rgba(215, 208, 200, 0.13);
  --line: rgba(215, 208, 200, 0.10);
  --ink: #ece8e2;
  --ink-2: rgba(236, 232, 226, 0.74);
  --ink-3: rgba(236, 232, 226, 0.52);
  --accent: var(--sj-yellow-2);

  /* Status — always paired with an icon and a word, never color alone */
  --ok: var(--sj-gray-3);
  --maint: var(--sj-gray-1);
  --warn: var(--sj-yellow-2);
  --bad: var(--sj-red);
  --unknown: var(--sj-gray-1);

  /* History bars */
  --day-ok: rgba(185, 174, 149, 0.42);
  --day-none: rgba(236, 232, 226, 0.07);

  --serif: 'Libre Caslon Text', 'Trajan Pro', Georgia, serif;          /* headlines & subheads */
  --sans: 'Montserrat', 'Gotham', 'Helvetica Neue', Arial, sans-serif;  /* body & figures */

  --gap: 1.25rem;
  --radius: 0.5rem;
}

/* The original, more saturated look: ?theme=vivid */
body[data-theme='vivid'] {
  --bg: var(--sj-green);
  --bg-2: var(--sj-green);
  --card: var(--sj-green-rgb);
  --card-line: transparent;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.78);
  --ink-3: rgba(255, 255, 255, 0.58);
  --accent: var(--sj-yellow);
  --ok: var(--sj-gray-4);
  --warn: var(--sj-yellow);
  --day-ok: rgba(215, 208, 200, 0.55);
}

/* 1rem = 16px on a 1920×1080 canvas; scales to the screen (720p → 4K). */
html { font-size: min(calc(100vw / 120), calc(100vh / 67.5)); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); font-size: 1.1rem; line-height: 1.35; -webkit-font-smoothing: antialiased; cursor: none; }
#app { position: relative; width: 120rem; height: 67.5rem; margin: 0 auto; transition: transform 2s ease; }

/* Splash until the first complete data arrives (see app.js). */
#splash { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; background: var(--bg); transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
#splash img { height: 7rem; }
#splash div { font-family: var(--serif); font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 1.2rem; color: var(--ink-3); }
#splash.gone { opacity: 0; visibility: hidden; }

/* The yellow edge from the brand guide pages — slimmer and softer for a large screen. */
.edge { position: absolute; left: 0; top: 0; bottom: 0; width: 0.5rem; background: var(--accent); opacity: 0.9; }

/* Brand heading: Libre Caslon caps, letter-spaced, short rule beneath. */
.h-caps { font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; font-size: 1.1rem; line-height: 1.2; color: var(--ink); }
.h-caps::after { content: ''; display: block; width: 2.5rem; height: 2px; margin-top: 0.65rem; background: var(--accent); }
.eyebrow { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }

.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 1.6rem 1.8rem; position: relative; min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.35rem; gap: 1rem; }

/* ---------- status badge (icon + label) ---------- */
.st { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; white-space: nowrap; }
.st-icon { width: 1.35em; height: 1.35em; flex: none; display: block; }
.st-operational { color: var(--ok); }
.st-maintenance { color: var(--maint); }
.st-degraded, .st-partial { color: var(--warn); }
.st-major { color: var(--bad); }
.st-unknown { color: var(--unknown); }
.st-label { color: var(--ink-2); font-weight: 600; }

/* ---------- 30-day history bars (one bar per day) ---------- */
.days { display: flex; gap: 3px; align-items: stretch; height: 2.2rem; }
.days i { flex: 1; border-radius: 2px; background: var(--day-ok); }
.days i.lv-none { background: var(--day-none); }
.days i.lv-maintenance { background: rgba(138, 134, 129, 0.6); }
.days i.lv-degraded, .days i.lv-partial { background: var(--warn); }
.days i.lv-major { background: var(--bad); }
.days.sm { height: 1.6rem; gap: 2px; }
.days-legend { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--ink-3); margin-top: 0.45rem; }

.spark { width: 100%; height: 2.6rem; display: block; }

/* ---------- stat figures ---------- */
.stat .value { font-size: 2.8rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
.stat .label { font-size: 1.05rem; color: var(--ink-2); margin-top: 0.4rem; }
.stat .note { font-size: 0.92rem; color: var(--ink-3); margin-top: 0.2rem; }
.sample { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.45rem; border: 1px solid var(--accent); color: var(--accent); border-radius: 0.25rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; vertical-align: middle; }

/* KPI strip: one container, figures split by hairlines. */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.kpis > .stat { padding: 0 1.75rem; border-left: 1px solid var(--line); }
.kpis > .stat:first-child { padding-left: 0; border-left: 0; }

/* ---------- column chart ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid { stroke: rgba(236, 232, 226, 0.09); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 12px; font-family: var(--sans); }
.chart .val { fill: var(--ink); font-size: 13px; font-weight: 700; font-family: var(--sans); }
.chart .bar { fill: var(--sj-gray-3); opacity: 0.8; }
.chart .bar.now { fill: var(--accent); opacity: 1; }

/* ---------- horizontal bars (open tickets by status) ---------- */
.hbars { display: grid; gap: 1rem; }
.hbar { display: grid; grid-template-columns: 1fr 3.5rem; gap: 0.35rem 1rem; align-items: center; }
.hbar .k { font-size: 1.05rem; color: var(--ink-2); grid-column: 1 / -1; }
.hbar .track { height: 0.7rem; border-radius: 0.35rem; background: rgba(236, 232, 226, 0.06); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 0.35rem; background: var(--sj-gray-3); opacity: 0.8; }
.hbar .v { text-align: right; font-weight: 700; font-size: 1.15rem; }

.motto { font-size: 0.82rem; letter-spacing: 0.22em; color: var(--ink-3); text-transform: uppercase; white-space: nowrap; }
.stale { color: var(--warn); }
.setup { border: 1px dashed var(--card-line); border-radius: var(--radius); padding: 1.1rem 1.3rem; color: var(--ink-2); font-size: 1rem; }
.setup code { font-family: ui-monospace, Menlo, monospace; color: var(--accent); font-size: 0.9em; }

.alert-card { background: rgba(216, 169, 69, 0.10); border-left: 0.3rem solid var(--warn); padding: 0.85rem 1.1rem; border-radius: 0.3rem; margin-bottom: 0.7rem; }
.alert-card.lv-major, .alert-card.lv-partial { background: rgba(224, 58, 62, 0.14); border-left-color: var(--bad); }
.alert-card .t { font-weight: 700; }
.alert-card .d { color: var(--ink-2); font-size: 0.95rem; margin-top: 0.2rem; }

/* =========================================================================
   COMMAND CENTER — everything at a glance.
========================================================================= */
.cmd { display: grid; grid-template-columns: 23rem 1fr; height: 100%; padding-left: 0.5rem; }
.cmd-rail { padding: 3rem 2.25rem 2.5rem; display: flex; flex-direction: column; gap: 1.75rem; background: var(--bg-2); border-right: 1px solid var(--line); }
.cmd-rail .logo { width: 10.5rem; margin: 0.25rem 0 0.75rem; } /* ≥ one "S" height of clear space */
.cmd-rail .clock { font-size: 5.4rem; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.cmd-rail .clock small { font-size: 1.6rem; font-weight: 600; margin-left: 0.4rem; color: var(--ink-2); letter-spacing: 0; }
.cmd-rail .date { font-size: 1.35rem; color: var(--ink-2); margin-top: 0.7rem; }
.cmd-rail .wx { font-size: 1.15rem; color: var(--ink-3); margin-top: 0.35rem; }
.cmd-rail .wx-alert { margin-top: 1rem; }
.cmd-rail .spacer { flex: 1; }
.rail-events .eyebrow { margin-bottom: 0.4rem; }
.rail-events .ev { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.rail-events .ev:first-of-type { border-top: 0; }
.rail-events .w { color: var(--accent); font-weight: 600; font-size: 1rem; }
.rail-events .t { font-weight: 600; font-size: 1.15rem; margin-top: 0.2rem; line-height: 1.3; }

.cmd-main { padding: 2.25rem 2.5rem 2.25rem; display: flex; flex-direction: column; gap: 1.6rem; min-height: 0; }
.cmd-banner { display: flex; align-items: center; gap: 1.25rem; }
.cmd-banner .st-icon { width: 3rem; height: 3rem; }
.cmd-banner .big { font-family: var(--serif); font-size: 2.4rem; line-height: 1.1; }
.cmd-banner .sub { color: var(--ink-3); font-size: 1.05rem; margin-top: 0.35rem; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.85rem; }

.bb-grid { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: var(--gap); }
.feature { padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.75rem; }
.feature .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.feature .name { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.feature .aud { font-size: 0.98rem; color: var(--ink-3); margin-top: 0.3rem; }
.feature .figs { display: flex; gap: 2rem; align-items: baseline; }
.feature .figs .big { font-size: 2.3rem; font-weight: 700; line-height: 1; }
.feature .figs .unit { font-size: 1rem; color: var(--ink-3); font-weight: 600; margin-left: 0.3rem; }
.feature .spark { height: 3.2rem; }
.feature .summary { color: var(--ink-3); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature.lv-degraded, .feature.lv-partial { border-color: rgba(216, 169, 69, 0.55); }
.feature.lv-major { border-color: rgba(224, 58, 62, 0.7); }
.feature.lv-degraded .summary, .feature.lv-partial .summary, .feature.lv-major .summary { color: var(--ink); }

.svc-list { padding: 0.6rem 1.5rem; }
.svc-row { display: grid; grid-template-columns: 1fr 9.5rem 1.8rem; align-items: center; gap: 1.1rem; padding: 0.62rem 0; border-top: 1px solid var(--line); }
.svc-row:first-child { border-top: 0; }
.svc-row .n { font-weight: 600; font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-row .st-icon { width: 1.6rem; height: 1.6rem; }
.svc-row.issue .n { color: var(--warn); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem var(--gap); }
.tile { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.tile .st-icon { width: 2rem; height: 2rem; }
.tile .txt { min-width: 0; flex: 1; }
.tile .name { font-weight: 700; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .summary { color: var(--ink-3); font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.lv-degraded, .tile.lv-partial { border-color: rgba(216, 169, 69, 0.55); }
.tile.lv-major { border-color: rgba(224, 58, 62, 0.7); }
.tile.lv-degraded .summary, .tile.lv-partial .summary, .tile.lv-major .summary { color: var(--ink); }

.cmd-desk { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; padding: 1.5rem 1.9rem; }
.cmd-desk .kpis .value { font-size: 3rem; }
.cmd-desk .kpis > .stat { padding: 0 1.4rem; }
.cmd-desk .kpis > .stat:first-child { padding-left: 0; }

/* =========================================================================
   FRAMED SCREENS — one topic per screen, for Rise Vision playlists
   (also used by the self-rotating Showcase).
========================================================================= */
.frame { display: grid; grid-template-rows: 7rem auto 1fr 4.75rem; height: 100%; padding-left: 0.5rem; }
.frame-head { display: flex; align-items: center; gap: 1.5rem; padding: 0 3.5rem; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.frame-head .shield { height: 3.6rem; }
.frame-head .title { font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; font-size: 1.6rem; }
.frame-head .dept { color: var(--ink-3); font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 0.3rem; }
.frame-head .clock { margin-left: auto; text-align: right; }
.frame-head .clock .t { font-size: 2.5rem; font-weight: 600; line-height: 1; }
.frame-head .clock .t small { font-size: 1.2rem; color: var(--ink-2); margin-left: 0.3rem; }
.frame-head .clock .d { color: var(--ink-3); font-size: 1rem; margin-top: 0.35rem; }
.frame-alert { display: flex; align-items: center; gap: 1rem; padding: 0.95rem 3.5rem; background: rgba(216, 169, 69, 0.12); border-bottom: 1px solid rgba(216, 169, 69, 0.35); font-size: 1.2rem; }
.frame-alert.lv-major, .frame-alert.lv-partial { background: rgba(224, 58, 62, 0.16); border-bottom-color: rgba(224, 58, 62, 0.45); }
.frame-alert .st-icon { width: 1.8rem; height: 1.8rem; }
.frame-alert b { white-space: nowrap; }
.frame-alert .msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.frame-alert:empty { display: none; }
.frame-body { position: relative; min-height: 0; }
.frame-foot { display: flex; align-items: center; gap: 2.5rem; padding: 0 3.5rem; border-top: 1px solid var(--line); font-size: 1.05rem; }
.frame-foot .grp { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.frame-foot .grp .st-icon { width: 1.35rem; height: 1.35rem; }
.frame-foot .grp .c { color: var(--ink-3); font-weight: 500; }
.frame-foot .right { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.pager { display: flex; gap: 0.5rem; }
.pager i { width: 2.2rem; height: 0.28rem; background: rgba(236, 232, 226, 0.15); border-radius: 0.2rem; overflow: hidden; position: relative; }
.pager i.on::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: fill var(--dur, 20s) linear forwards; }
.pager i.done { background: rgba(216, 169, 69, 0.5); }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.screen { position: absolute; inset: 2.5rem 3.5rem; display: flex; flex-direction: column; gap: 1.9rem; }
.slide { opacity: 0; transform: translateX(2rem); transition: opacity 0.9s ease, transform 0.9s ease; }
.slide.on { opacity: 1; transform: none; }
.headline { font-family: var(--serif); font-size: 2.9rem; line-height: 1.1; }
.headline em { font-style: normal; color: var(--accent); }
.headline + .muted { margin-top: -1.2rem; font-size: 1.15rem; }

/* Blackbaud screen */
.bb-screen { display: grid; grid-template-columns: 1fr 30rem; gap: 2rem; flex: 1; min-height: 0; }
.bb-cards { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: var(--gap); }
.bb-card { padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bb-card .top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.bb-card .name { font-weight: 700; font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-card .top .st-icon { width: 1.8rem; height: 1.8rem; }
.bb-card .aud { color: var(--ink-3); font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-card .foot { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--ink-3); margin-top: 0.3rem; }
.bb-card .days { margin-top: auto; height: 2rem; }
.bb-card.lv-degraded, .bb-card.lv-partial { border-color: rgba(216, 169, 69, 0.55); }
.bb-card.lv-major { border-color: rgba(224, 58, 62, 0.7); }
.recent-list .item { padding: 0.95rem 0; border-top: 1px solid var(--line); }
.recent-list .item:first-of-type { border-top: 0; padding-top: 0; }
.recent-list .t { font-weight: 600; font-size: 1.08rem; }
.recent-list .m { color: var(--ink-3); font-size: 0.95rem; margin-top: 0.25rem; }
.recent-empty { color: var(--ink-2); font-size: 1.15rem; }

/* Reliability screen */
.rel-row { display: grid; grid-template-columns: 17rem 1fr 11rem; gap: 2rem; align-items: center; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.rel-row:first-child { border-top: 0; }
.rel-row .n { font-weight: 700; font-size: 1.25rem; }
.rel-row .g { color: var(--ink-3); font-size: 0.9rem; margin-top: 0.15rem; }
.rel-row .v { text-align: right; font-weight: 700; font-size: 1.3rem; }
.rel-row .v small { display: block; font-weight: 500; font-size: 0.88rem; color: var(--ink-3); }
.rel-legend { display: flex; gap: 2rem; color: var(--ink-3); font-size: 0.95rem; align-items: center; }
.rel-legend i { display: inline-block; width: 0.8rem; height: 1.1rem; border-radius: 2px; margin-right: 0.5rem; vertical-align: -0.15rem; }

/* Help desk screen */
.desk-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; flex: 1; min-height: 0; }
.desk-grid .panel { display: flex; flex-direction: column; }
.queue { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.queue th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0 0.75rem 0.6rem; }
.queue td { padding: 0.7rem 0.75rem; border-top: 1px solid var(--line); white-space: nowrap; }
.queue td.id { font-weight: 700; font-variant-numeric: tabular-nums; }
.queue td.age, .queue th.age { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 0.12rem 0.65rem; border-radius: 1rem; font-size: 0.9rem; font-weight: 600; background: rgba(236,232,226,0.08); color: var(--ink-2); }

/* Numbers screen */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4.5rem 2.75rem; flex: 1; align-content: center; padding-bottom: 2rem; }
.numbers .stat { border-top: 2px solid var(--accent); padding-top: 1.25rem; }
.numbers .stat .value { font-size: 4.2rem; }
.numbers .stat .label { font-size: 1.2rem; }

/* Status screen */
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; align-items: start; }
.status-grid .svc-row { grid-template-columns: 1fr 1.8rem; padding: 0.85rem 0; }
.incident-feature { padding: 1.6rem 2rem; border-left: 0.4rem solid var(--warn); }
.incident-feature.lv-major, .incident-feature.lv-partial { border-left-color: var(--bad); }
.incident-feature .t { font-size: 1.7rem; font-weight: 700; margin: 0.5rem 0; }
.incident-feature .u { color: var(--ink-2); font-size: 1.15rem; max-width: 90rem; }

/* Houston screen */
.local-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; flex: 1; min-height: 0; }
.local-grid .panel { display: flex; flex-direction: column; }
.probe-row { display: grid; grid-template-columns: 1fr 18rem 8rem; align-items: center; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.probe-row:first-of-type { border-top: 0; }
.probe-row .k { font-weight: 700; font-size: 1.2rem; }
.probe-row .v { text-align: right; font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.probe-row .spark { height: 3rem; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 0; border-top: 1px solid var(--line); font-size: 1.15rem; }
.kv-row:first-of-type { border-top: 0; }
.kv-row .k { font-weight: 600; }
.kv-row .v { color: var(--ink-2); }
.forecast { margin-top: auto; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.forecast .fc { font-size: 1.35rem; line-height: 1.45; margin-top: 0.6rem; }

/* =========================================================================
   CYCLE — several screens on one link, cross-fading.
========================================================================= */
.cycle-pane {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  /* Hidden panes stop painting once faded out; each pane fades on its own GPU layer. */
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
  will-change: opacity;
  contain: layout paint style;
}
.cycle-pane.on { opacity: 1; visibility: visible; transition: opacity 1.2s ease, visibility 0s; }

/* =========================================================================
   CALM — ambient by default, exception-first when something breaks.
========================================================================= */
.calm { height: 100%; padding-left: 0.5rem; display: grid; grid-template-rows: 1fr auto auto; }
.calm-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.5rem; padding: 3rem 6rem 1rem; }
.calm-center .logo { width: 9.5rem; margin-bottom: 1.75rem; }
.calm-center .headline { font-size: 4.4rem; }
.calm-center .clock { font-size: 1.7rem; color: var(--ink-2); font-weight: 500; }
.calm-center .groups { display: flex; gap: 3.5rem; margin-top: 2rem; }
.calm-center .groups .grp { display: flex; align-items: center; gap: 0.75rem; font-size: 1.35rem; font-weight: 600; color: var(--ink-2); }
.calm-center .groups .grp .st-icon { width: 1.8rem; height: 1.8rem; }
.calm-center .groups .grp .c { color: var(--ink-3); font-weight: 500; }
.calm-alert { width: 100%; max-width: 100rem; text-align: left; padding: 2.25rem 2.75rem; border-left: 0.5rem solid var(--warn); }
.calm-alert.lv-major, .calm-alert.lv-partial { border-left-color: var(--bad); }
.calm-alert .svc { font-size: 1.35rem; }
.calm-alert .svc .st-icon { width: 2.2rem; height: 2.2rem; }
.calm-alert .t { font-size: 2.7rem; font-weight: 700; line-height: 1.15; margin: 1rem 0 0.75rem; }
.calm-alert .u { font-size: 1.4rem; color: var(--ink-2); line-height: 1.45; }
.calm-alert .meta { margin-top: 1.25rem; color: var(--ink-3); font-size: 1.1rem; }
/* "Coming up" ticker: one event at a time, calm fade between them. */
.calm-ticker { display: flex; align-items: baseline; gap: 1.5rem; margin: 0 4.5rem 2rem; padding: 1.35rem 2rem; border: 1px solid var(--card-line); border-left: 0.35rem solid var(--accent); border-radius: var(--radius); background: var(--card); min-width: 0; }
.calm-ticker[hidden] { display: none; }
.calm-ticker .tag { font-family: var(--serif); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 1rem; color: var(--accent); white-space: nowrap; }
.calm-ticker .when { font-size: 1.35rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.calm-ticker .msg { font-size: 1.6rem; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: fadein 0.8s ease; }
.calm-ticker .where { font-weight: 500; color: var(--ink-3); font-size: 1.3rem; margin-left: 0.5rem; }
.calm-ticker .count { color: var(--ink-3); font-size: 1rem; white-space: nowrap; }
@keyframes fadein { from { opacity: 0; transform: translateY(0.3rem); } to { opacity: 1; transform: none; } }
.calm-foot { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: start; gap: 3rem; padding: 2.25rem 4.5rem 2.75rem; border-top: 1px solid var(--line); }
.calm-foot .stat { border-left: 2px solid var(--accent); padding-left: 1.25rem; }
.calm-foot .stat .value { font-size: 3.1rem; }
.calm-foot .motto { align-self: end; }

/* Door Security screen: full-bleed campus map with a dark veil masked away from finished buildings */
.screen.bleed { inset: 0; }
.sec-map { position: absolute; inset: 0; overflow: hidden; }
.sec-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sec-veil { fill: var(--bg); opacity: 0.78; }
.sec-shape polygon { fill: none; stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.sec-shape.sec-complete polygon { stroke: var(--accent); fill: rgba(216, 169, 69, 0.14); stroke-width: 3px; }
.sec-shape.sec-cutover polygon { stroke: rgba(236, 232, 226, 0.9); stroke-width: 2.5px; }
.sec-shape.sec-progress polygon { stroke: var(--accent); stroke-dasharray: 7 5; }
.sec-shape.sec-planned polygon { stroke: rgba(236, 232, 226, 0.5); stroke-dasharray: 5 5; }
/* Labels live inside the SVG, so they're sized in map units (px here), not rem. */
.sec-fo { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.sec-pin { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 7px; border-radius: 16px; white-space: nowrap; font-size: 16px; font-weight: 700; background: rgba(11, 42, 32, 0.88); border: 1px solid rgba(236, 232, 226, 0.25); color: var(--ink-2); }
.sec-pin .st-icon { width: 18px; height: 18px; color: var(--ink-3); }
.sec-pin.sec-complete { border-color: var(--accent); color: var(--ink); }
.sec-pin.sec-cutover { border-color: rgba(236, 232, 226, 0.75); color: var(--ink); }
.sec-pin.sec-cutover .st-icon { color: var(--ink); }
.sec-pin.sec-complete .st-icon, .sec-pin.sec-progress .st-icon { color: var(--accent); }
.sec-legend { position: absolute; left: 3.5rem; bottom: 1.5rem; display: flex; align-items: center; gap: 1.75rem; padding: 0.7rem 1.3rem; border-radius: var(--radius); background: rgba(11, 42, 32, 0.88); border: 1px solid var(--card-line); font-size: 1.05rem; font-weight: 600; color: var(--ink-2); }
.sec-legend span { display: inline-flex; align-items: center; gap: 0.5rem; }
.sec-legend .st-icon { width: 1.3rem; height: 1.3rem; color: var(--ink-3); }
.sec-legend .sec-complete .st-icon, .sec-legend .sec-progress .st-icon { color: var(--accent); }
.sec-legend .sec-cutover .st-icon { color: var(--ink); }
.sec-empty { padding: 2.5rem 3.5rem; }
