:root{
  /* Light kiosk theme (high contrast, low-glare) */
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel2: rgba(255, 255, 255, 0.72);
  --stroke: rgba(15, 23, 42, 0.10);
  --stroke2: rgba(15, 23, 42, 0.07);
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.62);
  --muted2: rgba(15, 23, 42, 0.50);
  --good: #39d98a;
  --warn: #ffd166;
  --bad: #ff5c7a;

  --poppy: #e11d48;
  --arpah: #6d28d9;
  --daikin: #0284c7;

  --radius: 20px;
  --radius2: 14px;
  --shadow: 0 12px 30px rgba(15,23,42,0.12);

  /* Kiosk sizing (optimize for 16:9 large screens, no scroll) */
  --navW: 330px;
  --topH: 92px;

  /* Plot colors (used by JS via getComputedStyle) */
  --plotGrid: rgba(15,23,42,0.10);
  --plotAxis: rgba(15,23,42,0.62);
  --plotLine: rgba(2,132,199,0.95);
  --plotLineIdle: rgba(15,23,42,0.35);
  --plotGlow: rgba(2,132,199,0.16);
  --plotGlowIdle: rgba(2,132,199,0.06);

  /* Wireframe SVG + US map styling (CSS vars referenced from inline SVG) */
  --wireA: rgba(15,23,42,0.32);
  --wireB: rgba(15,23,42,0.18);
  --wireGrid: rgba(15,23,42,0.18);
  --wireLabel: rgba(15,23,42,0.72);

  --mapFillA: rgba(2,132,199,0.10);
  --mapFillB: rgba(2,132,199,0.03);
  --mapStrokeA: rgba(15,23,42,0.30);
  --mapStrokeB: rgba(15,23,42,0.18);
  --mapBorders: rgba(15,23,42,0.18);
  --mapLabel: rgba(15,23,42,0.62);
}

*{ box-sizing:border-box; }
html,body{ height:100%; overflow:hidden; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(109,40,217,0.10), transparent 55%),
    radial-gradient(1000px 620px at 85% 15%, rgba(2,132,199,0.10), transparent 55%),
    radial-gradient(900px 700px at 70% 90%, rgba(225,29,72,0.08), transparent 55%),
    linear-gradient(180deg, #ffffff, var(--bg) 35%, #eef3f9);
  overflow:hidden;
}

/* Kiosk/touch polish */
*{ -webkit-tap-highlight-color: transparent; }
button{ -webkit-appearance: none; appearance: none; }

.app{
  height:100%;
  display:flex;
  flex-direction:column;
}

.topbar{
  height:var(--topH);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 16px;
  border-bottom:1px solid var(--stroke2);
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.55));
  backdrop-filter: blur(10px);
}

.brand-row{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 720px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:1px solid var(--stroke2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.60);
}
.brand__mark{
  width:40px;height:40px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.08);
  overflow:hidden;
}
.brand__logo{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
}
.brand__text{ line-height:1.05; }
.brand__name{ font-weight:800; letter-spacing:0.2px; font-size:16px; }
.brand__sub{ font-size:12px; color:var(--muted); margin-top:2px; }

.brand--poppy{ color: var(--poppy); }
.brand--arpah{ color: var(--arpah); }
.brand--daikin{ color: var(--daikin); }

.topbar__right{
  display:flex;
  align-items:center;
  gap:12px;
}

.pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.60);
}
.pill--muted{
  background: rgba(255, 255, 255, 0.45);
}
.pill__label{ font-size:14px; color: rgba(15,23,42,0.78); }
.clock{
  font-variant-numeric: tabular-nums;
  font-size:16px;
  font-weight:700;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.60);
}

.dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(57,217,138,0.14);
}
.dot--good{ background: var(--good); box-shadow: 0 0 0 4px rgba(57,217,138,0.14); }
.dot--warn{ background: var(--warn); box-shadow: 0 0 0 4px rgba(255,209,102,0.14); }
.dot--bad{ background: var(--bad); box-shadow: 0 0 0 4px rgba(255,92,122,0.14); }

.main{
  flex:1;
  display:flex;
  min-height:0;
}

.nav{
  width:var(--navW);
  padding:14px;
  border-right:1px solid var(--stroke2);
  background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(255,255,255,0.55));
  backdrop-filter: blur(10px);
  display:flex;
  flex-direction:column;
  gap:14px;
}

.nav-btn{
  width:100%;
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 12px;
  border-radius: var(--radius);
  border:1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  cursor:pointer;
  text-align:left;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
  user-select:none;
  touch-action: manipulation;
  min-height: 78px;
  pointer-events:auto;
}
.nav-btn:hover{ transform: translateY(-1px); border-color: rgba(15,23,42,0.18); }
.nav-btn:active{ transform: translateY(0px) scale(0.99); }
.nav-btn.is-pressed{
  transform: translateY(0px) scale(0.99);
  border-color: rgba(15,23,42,0.18);
  background: rgba(255, 255, 255, 0.70);
}
.nav-btn.is-active{
  border-color: rgba(15,23,42,0.16);
  background: linear-gradient(180deg, rgba(109,40,217,0.08), rgba(255, 255, 255, 0.72));
  box-shadow: 0 12px 22px rgba(15,23,42,0.10);
}
.nav-btn__icon{
  width:48px;height:48px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.10);
  flex: 0 0 auto;
}
.nav-btn__icon svg{ width:28px;height:28px; opacity:0.95; }
.nav-btn__title{
  display:block;
  font-weight:900;
  font-size:17px;
  letter-spacing:0.2px;
}
.nav-btn__subtitle{
  display:block;
  margin-top:4px;
  font-size:13px;
  color: var(--muted);
}

.small{ font-size:12px; color: rgba(15,23,42,0.80); }
.muted{ color: var(--muted); }

.content{
  flex:1;
  padding:14px;
  min-width:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}

.content__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding: 4px 4px 10px 4px;
  flex: 0 0 auto;
}
.kicker{
  font-size:12px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color: rgba(15,23,42,0.66);
}
.title{
  font-size:22px;
  font-weight:900;
  margin-top:6px;
  letter-spacing:0.2px;
}
.content__actions{
  display:flex;
  align-items:center;
  gap:12px;
}
.ghost{
  border-radius: 999px;
  border:1px solid var(--stroke2);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15,23,42,0.90);
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
  transition: border-color 140ms ease, transform 140ms ease;
  min-height: 48px;
}
.ghost:hover{ border-color: rgba(15,23,42,0.18); transform: translateY(-1px); }
.ghost:active{ transform: translateY(0px) scale(0.99); }
.ghost.is-pressed{ transform: translateY(0px) scale(0.99); }

.view{ display:none; height: calc(100% - 0px); }
.view{
  display:none;
  flex: 1 1 auto;
  min-height:0;
}
.view.is-active{ display:block; }

.grid{
  display:grid;
  gap:16px;
  height: 100%;
  min-height: 0;
}
.grid--two{ grid-template-columns: minmax(560px, 1.35fr) minmax(420px, 0.75fr); }

.stack{ display:flex; flex-direction:column; gap:16px; min-height:0; }

.card{
  background: var(--panel);
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:14px;
}
.card--plot{ padding:14px 14px 10px 14px; }
.card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 12px;
}
.card__title{
  font-weight:900;
  font-size:18px;
  letter-spacing:0.2px;
}
.card__sub{
  margin-top:4px;
  font-size:13px;
  color: var(--muted);
}

.metric{
  text-align:right;
  min-width: 140px;
}
.metric__value{
  font-weight:950;
  font-size:26px;
  font-variant-numeric: tabular-nums;
}
.metric__label{
  font-size:12px;
  color: var(--muted);
  margin-top:2px;
}

canvas#plot{
  width:100%;
  height:auto;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  background:
    radial-gradient(900px 320px at 20% 0%, rgba(2,132,199,0.10), transparent 55%),
    radial-gradient(800px 280px at 90% 0%, rgba(109,40,217,0.08), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.80), rgba(255,255,255,0.50));
}

.video-mock{
  position:relative;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  height: 210px;
  overflow:hidden;
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(57,217,138,0.08), transparent 50%),
    radial-gradient(900px 420px at 80% 10%, rgba(2,132,199,0.10), transparent 55%),
    linear-gradient(120deg, rgba(255,255,255,0.85), rgba(15,23,42,0.06));
}
.video-mock::before{
  content:"";
  position:absolute; inset:-40% -50%;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(15,23,42,0.00) 0px,
      rgba(15,23,42,0.00) 6px,
      rgba(15,23,42,0.05) 7px,
      rgba(15,23,42,0.00) 10px
    );
  opacity:0.65;
  transform: rotate(2deg);
  animation: scan 2.8s linear infinite;
  mix-blend-mode: overlay;
}
.video-mock::after{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(700px 280px at 50% 40%, rgba(255,255,255,0.05), transparent 55%);
  pointer-events:none;
}
@keyframes scan{
  0%{ transform: translateY(-6%) rotate(2deg); }
  100%{ transform: translateY(6%) rotate(2deg); }
}
.video-mock__overlay{
  position:absolute; inset:0;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:12px;
}
.video-mock__label{
  font-weight:950;
  letter-spacing:0.14em;
  font-size:12px;
  text-transform:uppercase;
  color: rgba(15,23,42,0.85);
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.10);
  padding:8px 10px;
  border-radius: 999px;
}
.video-mock__time{
  font-variant-numeric: tabular-nums;
  font-weight:900;
  font-size:12px;
  color: rgba(15,23,42,0.85);
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.10);
  padding:8px 10px;
  border-radius: 999px;
}

.status-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
.status-item{
  padding:12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(15,23,42,0.10);
}
.status-item__label{
  font-size:12px;
  color: var(--muted);
}
.status-item__value{
  margin-top:6px;
  font-weight:950;
  font-size:16px;
}
.badge{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius: 999px;
  font-weight:900;
  font-size:12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.55);
}
.badge.good{ border-color: rgba(57,217,138,0.25); background: rgba(57,217,138,0.10); }
.badge.warn{ border-color: rgba(255,209,102,0.25); background: rgba(255,209,102,0.12); }
.badge.bad{ border-color: rgba(255,92,122,0.25); background: rgba(255,92,122,0.10); }

.toggles{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
.toggle{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 14px;
  border-radius: 18px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.55);
  cursor:pointer;
  color: var(--text);
  user-select:none;
  min-height: 58px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.toggle:hover{ transform: translateY(-1px); border-color: rgba(15,23,42,0.18); }
.toggle:active{ transform: translateY(0px) scale(0.99); }
.toggle.is-pressed{ transform: translateY(0px) scale(0.99); }
.toggle__label{
  font-weight:950;
  font-size:16px;
}
.toggle__state{
  font-weight:950;
  font-variant-numeric: tabular-nums;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.55);
  min-width: 80px;
  text-align:center;
}
.toggle.is-on{
  border-color: rgba(57,217,138,0.26);
  background: rgba(57,217,138,0.10);
}
.toggle.is-on .toggle__state{
  border-color: rgba(57,217,138,0.30);
  background: rgba(57,217,138,0.12);
}
.toggle--primary{
  border-color: rgba(2,132,199,0.24);
}
.toggle--primary.is-on{
  border-color: rgba(2,132,199,0.34);
  background: rgba(2,132,199,0.10);
}
.toggle--primary.is-on .toggle__state{
  border-color: rgba(2,132,199,0.34);
  background: rgba(2,132,199,0.12);
}

.hint{
  margin-top:12px;
  font-size:12px;
  color: var(--muted);
  line-height:1.45;
}

.building{
  position:relative;
  margin-top:8px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.50);
  overflow:hidden;
  height: 460px;
}
.building__svg{
  width:100%;
  height:100%;
  display:block;
}

.usmap{
  position:relative;
  margin-top:8px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.50);
  overflow:hidden;
  height: 460px;
}
.usmap__svg{
  position: relative;
  z-index: 1;
}
.usmap__pins{
  position: absolute;
  inset: 0;
  z-index: 2;
}
.segmented{
  position:absolute;
  left: 14px;
  top: 14px;
  z-index: 3;
  display:flex;
  gap:8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}
.segmented__btn{
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(15,23,42,0.90);
  padding: 10px 12px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
  user-select: none;
  touch-action: manipulation;
}
.segmented__btn.is-active{
  border-color: rgba(2,132,199,0.30);
  background: rgba(2,132,199,0.10);
}
.usmap__svg{
  width:100%;
  height:100%;
  display:block;
}
.team-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.team-item{
  padding:12px;
  border-radius: 16px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.55);
  cursor:pointer;
  user-select:none;
  touch-action: manipulation;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}
.team-item:hover{ transform: translateY(-1px); border-color: rgba(15,23,42,0.18); }
.team-item:active{ transform: translateY(0px) scale(0.99); }
.team-item.is-selected{
  border-color: rgba(2,132,199,0.30);
  background: rgba(2,132,199,0.08);
}
.team-item__k{
  font-weight:950;
  font-size:14px;
}
.team-item__v{
  margin-top:4px;
  font-size:12px;
  color: rgba(15,23,42,0.72);
}
.team-item__meta{
  margin-top:8px;
  font-size:12px;
  color: rgba(15,23,42,0.72);
  line-height:1.45;
  display:none;
}
.team-item.is-expanded .team-item__meta{ display:block; }

.pin{
  position:absolute;
  transform: translate(-50%, -50%);
  cursor:pointer;
  user-select:none;
  touch-action: manipulation;
}
.pin__dot{
  width:18px;height:18px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 8px rgba(57,217,138,0.12);
  border: 1px solid rgba(255,255,255,0.18);
}
.pin[data-partner-type="dev"] .pin__dot{
  background: var(--good);
  box-shadow: 0 0 0 8px rgba(57,217,138,0.12);
}
.pin[data-partner-type="school"] .pin__dot{
  background: var(--daikin);
  box-shadow: 0 0 0 8px rgba(2,132,199,0.12);
}
.pin.is-selected .pin__dot{
  transform: scale(1.08);
  box-shadow: 0 0 0 10px rgba(2,132,199,0.14);
  background: var(--daikin);
}

.summary{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.summary__row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px;
  border-radius: 16px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.55);
}
.summary__k{ color: var(--muted); font-size:12px; }
.summary__v{ font-weight:950; font-size:14px; font-variant-numeric: tabular-nums; }

.detail{
  padding:14px;
  border-radius: 16px;
  border:1px solid rgba(15,23,42,0.10);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15,23,42,0.86);
  line-height:1.45;
  min-height: 128px;
}

.video-wrap{
  margin-top:10px;
  border-radius: 18px;
  border:1px solid rgba(15,23,42,0.10);
  overflow:hidden;
  background: rgba(255, 255, 255, 0.50);
}
.video-wrap video{
  width:100%;
  height: calc(100vh - var(--topH) - 220px);
  min-height: 420px;
  background: #ffffff;
  display:block;
}

/* Touchscreen + kiosk polish */
button:focus-visible{
  outline: 3px solid rgba(2,132,199,0.55);
  outline-offset: 3px;
}

/* Prevent pinch zoom + unwanted gestures in kiosk contexts */
html, body{ touch-action: manipulation; }

/* Avoid showing un-positioned US map pins (we position them from projected coords at runtime) */
.usmap .pin{ opacity: 0; }
.usmap .pin.is-positioned{ opacity: 1; }

/* Inline SVG styling (map + wireframe) */
.building__svg .wireframe__grid{ stroke: var(--wireGrid); }
.building__svg .wireframe__label{ fill: var(--wireLabel); }

.usmap__svg .us-borders{ stroke: var(--mapBorders); }
.usmap__svg .us-label{ fill: var(--mapLabel); }

@media (max-width: 1200px){
  :root{ --navW: 320px; }
  .grid--two{ grid-template-columns: 1fr; height: auto; }
  .video-wrap video{ height: 420px; min-height: 420px; }
}

