/* ==========================================================================
   STORYBOARD: MASTER APP (2026-11-09)
   Page-specific layer on top of storyboard.css (the sb3 system from the
   Clinic storyboard, APPLE-STANDARD.md grammar). Loaded after
   storyboard.css on master-app-story.html only. Prefix: sma.
   The office views on this page are DESIGNED views in our own branding
   (Deep Navy #0A1826, Health Teal #12B8B0, Clinical Blue #0284C7).
   They are not screenshots: the office redesign is in progress and
   real screens follow when it lands. The page says so in small print.
   ========================================================================== */

/* Pinned sequence: the designed command view ------------------------------ */
.sma-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: min(880px, calc(100vw - 48px));
  max-height: 88vh;
  overflow: hidden;
  background: rgba(10, 24, 38, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px 26px 22px;
  opacity: 0;
}
.sma-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sma-panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}
.sma-panel-note {
  font-size: 12px;
  color: #12B8B0;
  margin: 0;
}
.sma-offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sma-office {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 16px 14px;
  opacity: 0;
}
.sma-office .o-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  margin: 0 0 4px;
}
.sma-office .o-sub {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
}
.sma-room {
  position: relative;
  height: 64px;
  border-radius: 10px;
  background: #0A1826;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 12px;
  overflow: hidden;
}
.sma-room::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.sma-room i {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #12B8B0;
}
.sma-room i:nth-child(1) { left: 18%; top: 22%; }
.sma-room i:nth-child(2) { left: 46%; top: 58%; background: #0284C7; }
.sma-room i:nth-child(3) { left: 72%; top: 26%; }
.sma-office .o-state {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}
.sma-office .o-state b { color: #fff; font-weight: 600; }
.sma-panel-foot {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
}
.sma-panel-foot b { color: rgba(255, 255, 255, 0.9); font-weight: 600; }

/* Static designed view (chapters and fallback reuse the same rooms) ------- */
.sma-view {
  margin: 48px 0 8px;
  max-width: 980px;
  background: #0A1826;
  border: 1px solid rgba(186, 230, 253, 0.2);
  border-radius: 16px;
  padding: 26px 26px 22px;
}
.sma-view .sma-office { opacity: 1; }
.sma-view .sma-panel-foot { opacity: 1; }
.sma-view .sma-panel-head { margin-bottom: 16px; }

/* Guided-journey exit (same pattern as the Automation storyboard) --------- */
.sb3-exit { padding: 40px 0 10px; }
.sb3-exit-link {
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
}
.sb3-exit-link:hover { text-decoration: underline; text-underline-offset: 6px; }
.sb3-exit .sb3-support { margin-top: 12px; }

@media (max-width: 820px) {
  .sma-offices { grid-template-columns: 1fr; }
  .sma-panel { padding: 20px 18px 18px; }
  .sma-view { padding: 20px 18px 18px; }
}
