/* ============================================================
   WILL'S LIFEOS — Apple-minimal light theme, blue accent,
   with a quiet Jarvis undertone (mono micro-labels, precision
   rings, hairlines, tabular numerals). No emojis; SVG icons.
   Chart series --viz-1..6 validated on white (dataviz checks).
   ============================================================ */

:root {
  /* Surfaces — ops-console navy */
  --bg-0: #030b15;
  --bg-1: #04101c;
  --panel: #0a1a2c;
  --panel-solid: #0a1a2c;
  --panel-2: #10263c;
  --inset: #04101c;

  /* Lines & ink */
  --border: rgba(70, 170, 255, 0.22);
  --border-soft: rgba(70, 170, 255, 0.12);
  --border-bright: rgba(80, 210, 255, 0.5);
  --text: #d9edff;
  --text-dim: #8fb3cf;
  --muted: #587b99;

  /* Accent — console cyan */
  --accent: #38d6ff;
  --accent-strong: #18b6e6;
  --accent-soft: rgba(56, 214, 255, 0.1);
  --accent-ink: #032330;
  --cat: #38d6ff;

  /* Status */
  --danger: #ff5d73;
  --ok: #2fd08c;
  --warn: #ffba50;

  /* Chart series — validated for dark navy surfaces (six checks) */
  --viz-1: #14a4cf;
  --viz-2: #15ab73;
  --viz-3: #7f6ded;
  --viz-4: #bb8719;
  --viz-5: #d0538f;
  --viz-6: #3c78e0;
  --viz-track: rgba(90, 170, 240, 0.14);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 5, 14, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sidebar-w: 236px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-0);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14.5px;
  line-height: 1.5;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1000px 620px at 72% -8%, rgba(14, 60, 110, 0.5), transparent 62%),
    radial-gradient(760px 480px at -6% 106%, rgba(8, 46, 80, 0.42), transparent 60%),
    linear-gradient(180deg, #04101c, #030b15);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 180, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 180, 255, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.015em; }
.muted { color: var(--text-dim); font-size: 13px; }
.dim { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Inline SVG icons */
.ic { vertical-align: -0.18em; flex: 0 0 auto; }

/* HUD micro-label — the Jarvis whisper */
.hud-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.hud-label--bright { color: var(--accent); text-shadow: 0 0 12px rgba(56,214,255,.5); }

#app { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
#sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: rgba(4, 14, 26, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand__logo {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: linear-gradient(180deg, #2ec4f5, #0e9cd8);
  color: #03202e;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(46, 196, 245, 0.45);
}
.brand__name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand__name small { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .22em; color: var(--accent); font-weight: 600; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav__item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 500; font-size: 13.5px;
  transition: background .12s, color .12s;
}
.nav__item:hover { background: rgba(90, 190, 255, 0.08); color: var(--text); }
.nav__item.is-active { background: color-mix(in srgb, var(--cat) 13%, transparent); color: var(--cat); font-weight: 600; }
.nav__icon { width: 22px; display: grid; place-items: center; color: inherit; }
.nav__label { flex: 1; }
.sidebar__foot { padding: 12px 11px 2px; display: flex; align-items: center; gap: 7px; }
.sidebar__foot .dot { background: var(--ok); }

#sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }

/* ---- Main / topbar ---- */
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(3, 11, 21, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-soft);
  /* keep the title/subnav aligned with the centered content column */
  padding: 13px max(26px, calc((100% - 1480px) / 2 + 26px)) 0;
}
.topbar__title { display: flex; align-items: center; gap: 11px; }
.topbar__icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cat) 14%, transparent);
  color: var(--cat);
  border-radius: 9px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--cat) 25%, transparent);
}
.topbar__title h1 { font-size: 19px; }
#topbar .topbar__menu { display: none; }
.subnav { display: flex; gap: 18px; margin-top: 12px; overflow-x: auto; padding: 0 2px; }
.subnav__item {
  padding: 7px 1px; white-space: nowrap;
  color: var(--text-dim); font-size: 13px; font-weight: 550;
  border-bottom: 2px solid transparent;
}
.subnav__item:hover { color: var(--text); }
.subnav__item.is-active { color: var(--cat); border-bottom-color: var(--cat); font-weight: 600; }

/* Wide monitors: the content column grows a bit further (1480px) and CENTERS
   in the main area instead of hugging the left with dead space on the right. */
#view { padding: 22px 26px 44px; max-width: 1480px; width: 100%; margin-inline: auto; }

/* ---- Panels ---- */
.card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.card--pad-lg { padding: 24px; }

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 16px; }

/* ---- Stat tiles ---- */
.stat {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat__label { font-family: var(--mono); color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .13em; }
.stat__value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.stat__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat--accent { border-color: var(--border-bright); }

/* ---- Buttons ---- */
.btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px;
  padding: 8px 16px; border-radius: 980px;
  border: none;
  background: var(--panel-2); color: var(--text);
  transition: background .12s, transform .05s, box-shadow .12s;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
}
.btn:hover { background: #17324c; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #55ddff; box-shadow: 0 0 16px rgba(56,214,255,.45); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--danger { background: rgba(224,52,44,.08); color: var(--danger); }
.btn--danger:hover { background: rgba(224,52,44,.14); }
.btn--sm { padding: 5px 12px; font-size: 12px; }
.btn--block { width: 100%; display: flex; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { appearance: none; cursor: pointer; background: transparent; border: none; color: var(--muted); padding: 5px 6px; border-radius: 8px; line-height: 1; display: inline-flex; align-items: center; }
.icon-btn:hover { background: rgba(90,190,255,.12); color: var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 10px; border-radius: 980px;
  font-size: 11px; font-weight: 600; font-family: var(--mono); letter-spacing: .04em;
  background: var(--panel-2); color: var(--text-dim);
}
.chip--accent { background: var(--accent-soft); color: var(--accent); }
.chip--ok { color: var(--ok); background: rgba(29,157,95,.1); }
.chip--warn { color: var(--warn); background: rgba(180,122,0,.1); }
.chip--danger { color: var(--danger); background: rgba(224,52,44,.09); }
.cat-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text-dim); }

.tag {
  display: inline-block; padding: 1.5px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600;
  background: var(--panel-2); color: var(--text-dim); font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase;
}

/* ---- Lists ---- */
.list { display: flex; flex-direction: column; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-soft); }
.list__item:last-child { border-bottom: none; }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 600; font-size: 13.5px; }
.list__sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
/* Always visible (dimmed) — hover-only hid edit/delete entirely on touch
   devices, making action items look uneditable outside the dashboard. */
.list__actions { display: flex; gap: 2px; opacity: .55; transition: opacity .12s; }
.list__item:hover .list__actions, .ai-item:hover .list__actions,
.list__actions:focus-within { opacity: 1; }
a.list__item:hover { background: rgba(90,190,255,.06); border-radius: 8px; }

.ai-item.is-done .list__title { text-decoration: line-through; opacity: .4; }
.action-panel { margin-bottom: 18px; }
.action-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field__label { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .11em; }
.field__hint { font-size: 11.5px; color: var(--muted); }
input, textarea, select {
  font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--inset); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 8px 12px; width: 100%;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
input:focus, textarea:focus, select:focus {
  outline: none; background: #061524; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 214, 255, 0.15);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex: 0 0 auto; }
::placeholder { color: var(--muted); }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); backdrop-filter: blur(10px);
  display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; z-index: 100;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--border-soft); border-radius: 18px;
  width: 100%; max-width: 460px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  animation: pop .16s ease-out;
  max-height: 86vh; display: flex; flex-direction: column;
}
.modal--wide { max-width: 720px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.modal__head h3 { font-size: 15px; font-weight: 650; }
.modal__body { padding: 18px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--border-soft); }

/* ---- Toasts ---- */
#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #0c2033; color: #d9edff; border: 1px solid var(--border-bright);
  backdrop-filter: blur(10px);
  padding: 9px 18px; border-radius: 980px; font-size: 13px; font-weight: 550;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s;
  border: none;
}
.toast--in { opacity: 1; transform: translateY(0); }
.toast--ok { background: rgba(29, 29, 31, 0.92); }
.toast--err { background: rgba(190, 30, 25, 0.94); }
.toast--warn { background: rgba(140, 96, 0, 0.94); }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.empty__icon { margin-bottom: 12px; color: var(--muted); }
.empty__icon .ic { width: 34px; height: 34px; }
.empty__title { font-size: 15px; font-weight: 650; color: var(--text); margin-bottom: 4px; }

/* ---- Progress ---- */
.progress { height: 6px; background: var(--viz-track); border-radius: 999px; overflow: hidden; }
.progress__bar {
  height: 100%; border-radius: 999px; transition: width .4s cubic-bezier(.2,.8,.2,1);
  background: var(--accent);
}

/* ---- Viz bits ---- */
.viz-tile { display: flex; flex-direction: column; gap: 8px; }
.viz-tile svg { display: block; }
.viz-row { display: flex; align-items: center; gap: 14px; }
.big-num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.delta-up { color: var(--ok); font-size: 12px; font-weight: 600; }
.delta-down { color: var(--danger); font-size: 12px; font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.legend__swatch { width: 9px; height: 9px; border-radius: 3px; }

#viz-tip {
  position: fixed; z-index: 300; pointer-events: none;
  background: rgba(29, 29, 31, 0.94); color: #fff;
  padding: 6px 10px; border-radius: 8px; font-size: 12px;
  font-family: var(--mono);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0; transition: opacity .1s;
}
#viz-tip.on { opacity: 1; }
#viz-tip .tl { color: rgba(255,255,255,.55); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }

/* ============================================================
   OPS CONSOLE — black-ops tactical world map. A dark screen
   embedded in the light app: departure-board ticker, city-light
   dot texture, radar sweep, click-to-zoom targeting.
   ============================================================ */
.ops {
  position: relative;
  background:
    radial-gradient(900px 420px at 68% 18%, rgba(14, 60, 110, 0.55), transparent 62%),
    radial-gradient(700px 380px at 18% 85%, rgba(8, 46, 80, 0.5), transparent 60%),
    #04101c;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(70, 170, 255, 0.28);
  box-shadow: inset 0 0 60px rgba(0, 30, 60, 0.6), 0 10px 34px rgba(2, 20, 40, 0.25);
}
.ops::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(rgba(80, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 180, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
}
.ops__corner { position: absolute; width: 16px; height: 16px; z-index: 6; pointer-events: none; border-color: rgba(90, 210, 255, .9); border-style: solid; }
.ops__corner--tl { top: 6px; left: 6px; border-width: 1.5px 0 0 1.5px; }
.ops__corner--tr { top: 6px; right: 6px; border-width: 1.5px 1.5px 0 0; }
.ops__corner--bl { bottom: 6px; left: 6px; border-width: 0 0 1.5px 1.5px; }
.ops__corner--br { bottom: 6px; right: 6px; border-width: 0 1.5px 1.5px 0; }

/* departure-board ticker */
.ops__ticker {
  position: relative; overflow: hidden; z-index: 2;
  background: #020c16;
  border-bottom: 1px solid rgba(70, 170, 255, 0.3);
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent);
}
.ops__ticker-inner {
  display: inline-block; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: #5fe3ff;
  text-shadow: 0 0 12px rgba(64, 220, 255, 0.75), 0 0 2px rgba(64, 220, 255, 0.9);
  animation: tickerscroll 30s linear infinite;
}
@keyframes tickerscroll { to { transform: translateX(-50%); } }

.ops__maparea { position: relative; z-index: 2; }
.ops__sweep {
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(64, 200, 255, 0.06) 35%, rgba(110, 225, 255, 0.22) 50%, rgba(64, 200, 255, 0.06) 65%, transparent);
  transform: translateX(-110%);
  animation: opsweep 8.5s linear infinite;
}
@keyframes opsweep { to { transform: translateX(290%); } }

/* status bar */
.ops__bar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 6px 14px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #3f7ea6;
  border-top: 1px solid rgba(70, 170, 255, 0.2);
  background: #020c16;
}
.ops__bar b { color: #5fe3ff; font-weight: 600; }

/* the map itself (dark) */
.ops .map-svg { width: 100%; height: auto; display: block; position: relative; }
.ops .map-country {
  fill: #14283f;
  stroke: rgba(110, 195, 255, 0.7);
  stroke-width: .55;
  vector-effect: non-scaling-stroke;
  cursor: crosshair;
  transition: fill .15s;
}
.ops .map-country:hover { fill: #1e3a5c; stroke: rgba(150, 220, 255, .95); }
.ops .map-country.is-visited { fill: rgba(38, 190, 255, 0.34); stroke: #45d8ff; }
.ops .map-country.is-visited:hover { fill: rgba(38, 190, 255, 0.5); }
.ops .map-country.is-wish { fill: rgba(255, 176, 64, 0.2); stroke: rgba(255, 186, 80, 0.8); }
.ops .map-country.is-wish:hover { fill: rgba(255, 176, 64, 0.34); }
.map-dots { pointer-events: none; }
.map-pin { pointer-events: none; }

/* targeting reticle */
.ops-reticle line { stroke: rgba(120, 220, 255, .5); stroke-width: .6; vector-effect: non-scaling-stroke; }
.ops-reticle .ret-ring { fill: none; stroke: #6fe6ff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.ops-reticle .ret-box { fill: none; stroke: rgba(120, 220, 255, .85); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ops-reticle { animation: retIn .4s ease-out; }
@keyframes retIn { from { opacity: 0; } }

/* intel panel */
.ops__intel {
  position: absolute; top: 52px; right: 12px; z-index: 6;
  min-width: 200px; max-width: 250px;
  background: rgba(2, 14, 26, 0.94);
  border: 1px solid rgba(90, 210, 255, 0.5);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono); color: #cfeeff;
  box-shadow: 0 0 28px rgba(0, 140, 255, 0.3);
  animation: retIn .3s ease-out;
}
.ops__intel h4 { margin: 0 0 2px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.ops__intel .status { font-size: 9.5px; letter-spacing: .2em; color: #5fe3ff; margin-bottom: 10px; }
.ops__intel .status.wish { color: #ffba50; }
.ops-btn {
  appearance: none; cursor: pointer; font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  background: rgba(64, 200, 255, 0.1); color: #5fe3ff;
  border: 1px solid rgba(90, 210, 255, 0.45); border-radius: 7px;
  padding: 5px 9px; margin: 2px 3px 2px 0;
  transition: background .12s;
}
.ops-btn:hover { background: rgba(64, 200, 255, 0.25); }
.ops-btn--amber { color: #ffba50; border-color: rgba(255, 186, 80, 0.5); background: rgba(255, 176, 64, 0.08); }
.ops-btn--amber:hover { background: rgba(255, 176, 64, 0.2); }
.ops-btn--ghost { color: #6d9cbf; border-color: rgba(110, 160, 200, 0.35); background: transparent; }

/* legend chips on dark */
.ops__legend { position: absolute; left: 12px; top: 52px; z-index: 5; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.ops__legend span { font-family: var(--mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: #7fb7d9; display: inline-flex; align-items: center; gap: 6px; }
.ops__legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .ops__sweep, .ops__ticker-inner { animation: none; }
}

/* legacy hooks */
.map-wrap { position: relative; }
.map-svg { width: 100%; height: auto; display: block; }
.map-arc { display: none; }

/* ---- Table ---- */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: rgba(90,190,255,.05); }

/* ---- Misc ---- */
.divider { height: 1px; background: var(--border-soft); margin: 4px 0; }
.kbd { font-family: var(--mono); font-size: 11px; background: var(--panel-2); padding: 1px 6px; border-radius: 5px; }
.clickable { cursor: pointer; }
.text-accent { color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.glow-text { }
.pw-dots { letter-spacing: .1em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(110,190,255,.25); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(110,190,255,.4); }
::-webkit-scrollbar-track { background: transparent; }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-dow { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 600; padding: 4px; text-transform: uppercase; letter-spacing: .1em; }
.cal-cell { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 10px; min-height: 74px; padding: 6px; }
.cal-cell--empty { background: transparent; border: none; }
.cal-cell--today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cal-day { font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.cal-event { font-size: 10px; background: var(--accent-soft); color: var(--accent); border-radius: 5px; padding: 2px 5px; margin-bottom: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.cal-plan { font-size: 10px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ============================================================
   LED CARDS — a light that travels around each section's border.
   GPU-cheap: a rotating conic disc clipped by the card, with an
   inner panel covering the middle. No per-frame repaints.
   ============================================================ */
.led {
  position: relative;
  overflow: hidden;
  border: none !important;
  background: rgba(70, 190, 255, 0.28); /* static ring tint behind the inner panel */
}
.led::before {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 260%; aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(0deg);
  background: conic-gradient(
    transparent 0deg, transparent 240deg,
    rgba(64, 156, 255, 0.25) 285deg,
    rgba(90, 180, 255, 0.95) 320deg,
    rgba(64, 156, 255, 0.25) 352deg,
    transparent 360deg);
  animation: ledspin 7s linear infinite;
  animation-delay: var(--led-delay, 0s);
}
.led::after {
  content: '';
  position: absolute; inset: 1.6px;
  background: var(--panel);
  border-radius: calc(var(--radius) - 1.6px);
}
.led > * { position: relative; z-index: 1; }
@keyframes ledspin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .led::before { animation: none; } }

/* ---- OPEN buttons: bordered "barrier" nav buttons on dashboard cards ---- */
.btn--open {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--cat) 50%, transparent);
  color: var(--cat);
  padding: 4px 13px;
  font-size: 10.5px;
  border-radius: 8px;
  letter-spacing: .12em;
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--cat) 8%, transparent);
  transition: background .12s, box-shadow .12s;
}
.btn--open:hover {
  background: color-mix(in srgb, var(--cat) 12%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--cat) 30%, transparent);
}

/* ---- Dashboard header: free-floating script-glow masthead (no bubble) ---- */
.dash-head { padding: 6px 8px 2px; position: relative; }
/* Three-column lockup: greeting/date left · Jarvis truly centered · clock right */
.dash-masthead {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; column-gap: 20px; row-gap: 14px;
}
.dash-masthead__left { min-width: 0; }
.dash-masthead > .jarvis-dock { justify-self: center; }
.dash-masthead > .chrono__clock { justify-self: end; margin-left: 0; }
@media (max-width: 780px) {
  .dash-masthead { grid-template-columns: 1fr auto; }
  .dash-masthead__left { grid-column: 1 / -1; }
  .dash-masthead > .jarvis-dock { justify-self: start; }
  .dash-masthead > .chrono__clock { justify-self: end; }
}
/* Phone: greeting + date + JARVIS carry the masthead; the LOCAL TIME clock
   block is desktop-only (per Will — hidden on any phone-width viewport). */
@media (max-width: 600px) {
  .dash-masthead > .chrono__clock { display: none; }
}
@media (max-width: 480px) {
  .dash-masthead { grid-template-columns: 1fr; row-gap: 6px; }
  .dash-masthead__left { grid-column: auto; }
  .dash-masthead > .jarvis-dock { justify-self: center; margin-top: 2px; }
}
.dash-script {
  font-family: "Snell Roundhand", "Apple Chancery", "Savoye LET", "Brush Script MT", cursive;
  font-size: 44px; line-height: 1.15; font-weight: 400;
  background: linear-gradient(100deg, #eaf6ff 10%, #38d6ff 45%, #8fd8ff 70%, #eaf6ff 95%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(56, 214, 255, 0.35));
  animation: scriptShimmer 7s ease-in-out infinite;
  cursor: default;
  transition: filter .25s;
}
.dash-script:hover { filter: drop-shadow(0 0 26px rgba(56, 214, 255, 0.65)); }
@keyframes scriptShimmer {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
.dash-strip {
  position: relative; height: 2px; margin: 14px 2px 18px;
  background: rgba(70, 170, 255, 0.12); border-radius: 2px; overflow: hidden;
}
.dash-strip::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 26%;
  background: linear-gradient(90deg, transparent, #38d6ff 50%, transparent);
  box-shadow: 0 0 12px rgba(56, 214, 255, 0.8);
  transform: translateX(-110%);
  animation: stripSweep 5.5s cubic-bezier(.4,.0,.4,1) infinite;
}
@keyframes stripSweep { to { transform: translateX(500%); } }
@media (prefers-reduced-motion: reduce) { .dash-script, .dash-strip::before { animation: none; } }

/* ---- Chrono hero: date lockup + live clock with seconds ring ---- */
.chrono { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.chrono__date { display: flex; align-items: center; gap: 14px; }
.chrono__day {
  font-size: 58px; font-weight: 780; letter-spacing: -0.04em; line-height: 1;
  background: linear-gradient(180deg, #e8f5ff 25%, #38d6ff 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chrono__stack { display: flex; flex-direction: column; line-height: 1.25; }
.chrono__dow { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--accent); text-transform: uppercase; }
.chrono__mon { font-size: 17px; font-weight: 650; color: var(--text); }
.chrono__yr { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .12em; }
.chrono__clock { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.chrono__time { font-family: var(--mono); font-size: 40px; font-weight: 650; letter-spacing: .01em; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.chrono__ampm { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .14em; }
.chrono__ring { position: relative; width: 58px; height: 58px; }
.chrono__ring svg { transform: rotate(-90deg); display: block; }
.chrono__ring circle { fill: none; stroke-width: 4; }
.chrono__ring .rtrack { stroke: var(--viz-track); }
.chrono__ring .rprog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.chrono__sec {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 15px; font-weight: 650; color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---- Collapsible sidebar (desktop) ---- */
@media (min-width: 901px) {
  #sidebar { transition: margin-left .28s cubic-bezier(.2,.8,.2,1); }
  body.sidebar-collapsed #sidebar { margin-left: calc(-1 * var(--sidebar-w)); }
}
#sidebar-expand {
  position: fixed; left: 12px; top: 14px; z-index: 45;
  width: 38px; height: 38px; border-radius: 12px; border: none; cursor: pointer;
  display: none; place-items: center;
  background: linear-gradient(180deg, #2ec4f5, #0e9cd8); color: #03202e;
  box-shadow: 0 2px 14px rgba(46, 196, 245, 0.5);
  animation: brandGlow 2.6s ease-in-out infinite;
}
body.sidebar-collapsed #sidebar-expand { display: grid; }
@media (max-width: 900px) { #sidebar-expand { display: none !important; } }
.sidebar-collapse-btn { margin-left: auto; }

/* ---- Brand button: glowing, replays the landing ---- */
button.brand {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
  display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px;
  width: 100%;
}
button.brand .brand__logo {
  position: relative; overflow: hidden;
  animation: brandGlow 2.6s ease-in-out infinite;
}
button.brand .brand__logo::after {
  content: ''; position: absolute; inset: -60%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.65) 50%, transparent 58%);
  transform: translateX(-70%);
  animation: brandSweep 3.4s ease-in-out infinite;
}
button.brand:hover .brand__name { color: var(--accent); }
button.brand:active { transform: scale(.985); }
@keyframes brandGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(46,196,245,.4); }
  50% { box-shadow: 0 2px 20px rgba(46,196,245,.8), 0 0 30px rgba(46,196,245,.3); }
}
@keyframes brandSweep {
  0%, 55% { transform: translateX(-70%); }
  85%, 100% { transform: translateX(70%); }
}

/* ---- Dashboard day calendar ---- */
.dash-cal { position: relative; height: 470px; margin-top: 6px; }
.dash-cal__hour {
  position: absolute; left: 52px; right: 0; border-top: 1px solid var(--border-soft);
}
.dash-cal__hlabel {
  position: absolute; left: 0; width: 46px; text-align: right; transform: translateY(-55%);
  font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: .04em;
}
.dash-cal__block {
  position: absolute; left: 58px; right: 6px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 3px 8px; overflow: hidden;
}
.dash-cal__block b { font-size: 12px; font-weight: 650; display: block; line-height: 1.25; }
.dash-cal__block span { font-family: var(--mono); font-size: 9.5px; color: var(--text-dim); }
.dash-cal__now {
  position: absolute; left: 52px; right: 0; z-index: 2;
  border-top: 2px solid var(--danger); pointer-events: none;
}
.dash-cal__now::before {
  content: ''; position: absolute; left: -5px; top: -5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px rgba(224,52,44,.7);
}

/* ============================================================
   FITNESS PLAN BOARDS — 7-day plan builders (workout/diet),
   plan cards with mini week-strips, today's focus strip.
   ============================================================ */
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.fp-card__strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0 4px; }
.fp-card__col { display: flex; flex-direction: column; gap: 3px; align-items: center; min-height: 30px; padding-top: 5px; border-top: 2px solid var(--viz-track); }
.fp-card__col small { font-family: var(--mono); font-size: 8px; color: var(--muted); letter-spacing: .08em; }
.fp-dot { width: 6px; height: 6px; border-radius: 2px; }
.fp-new {
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  display: grid; place-items: center; min-height: 170px; cursor: pointer;
  color: var(--muted); background: transparent; font: inherit;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.fp-new:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 18px rgba(56,214,255,.12); }

.fp-boardwrap { overflow-x: auto; padding-bottom: 4px; }
.fp-board { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; min-width: 840px; }
.fp-day {
  background: rgba(4, 16, 28, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 10px; padding: 8px;
  display: flex; flex-direction: column; gap: 6px; min-height: 160px;
}
.fp-day--today { border-color: var(--accent); box-shadow: 0 0 14px rgba(56, 214, 255, 0.16); }
.fp-day__head { display: flex; justify-content: space-between; align-items: baseline; }
.fp-item {
  border-left: 3px solid var(--tcol, var(--accent));
  background: rgba(90, 180, 255, 0.07);
  border-radius: 7px; padding: 5px 8px; cursor: pointer;
  transition: background .12s, transform .05s;
}
.fp-item:hover { background: rgba(90, 180, 255, 0.16); }
.fp-item:active { transform: scale(.985); }
.fp-item b { display: block; font-size: 12px; font-weight: 600; line-height: 1.3; }
.fp-item span { font-size: 10px; color: var(--text-dim); font-family: var(--mono); letter-spacing: .04em; }
.fp-add {
  border: 1px dashed var(--border); background: transparent; color: var(--muted);
  border-radius: 7px; padding: 4px; cursor: pointer;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  margin-top: auto;
}
.fp-add:hover { color: var(--accent); border-color: var(--accent); }
.fp-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.fp-legend span { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }

/* today's focus strip (current plan / fitness dashboard) */
.fp-today { display: flex; flex-direction: column; gap: 4px; }
.fp-today__item {
  display: flex; align-items: center; gap: 10px;
  border-left: 3px solid var(--tcol, var(--accent));
  background: rgba(90, 180, 255, 0.06);
  border-radius: 8px; padding: 7px 10px;
}
.fp-today__item.is-done { opacity: .45; }
.fp-today__item.is-done b { text-decoration: line-through; }
.fp-today__item b { font-size: 13px; font-weight: 600; }
.fp-today__item small { font-family: var(--mono); font-size: 9.5px; color: var(--text-dim); letter-spacing: .08em; display: block; }

/* ============================================================
   SPLASH — LED bolt boot screen. Dark stage so the neon reads,
   then dissolves into the white app.
   ============================================================ */
#splash {
  position: fixed; inset: 0; z-index: 500;
  display: grid; place-items: center;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(10, 40, 96, 0.55), transparent 62%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 60, 140, 0.25), transparent 55%),
    #04070e;
  cursor: pointer;
  overflow: hidden;
  transition: opacity .5s ease, transform .5s ease;
}
#splash.splash--out { opacity: 0; transform: scale(1.045); pointer-events: none; }

.splash__stage { position: relative; width: 460px; height: 540px; display: grid; place-items: center; }

/* pulsing energy halo behind the bolt */
.splash__halo {
  /* no blur() — the radial gradient is already soft, and a filter layer
     rasterizes as a faint BOX on some GPUs. min() keeps it inside phones. */
  position: absolute; width: min(460px, 94vw); height: min(460px, 94vw); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 113, 227, 0.4), rgba(0, 113, 227, 0.08) 55%, transparent 72%);
  animation: splashHalo 2.8s ease-in-out infinite;
  opacity: 0;
  animation-delay: .9s;
  animation-fill-mode: forwards;
}
@keyframes splashHalo {
  0% { opacity: .55; transform: scale(1); }
  50% { opacity: .95; transform: scale(1.12); }
  100% { opacity: .55; transform: scale(1); }
}

/* the bolt */
.splash__bolt { position: absolute; width: 330px; height: 440px; overflow: visible; }
.splash__bolt path {
  stroke-linejoin: round; stroke-linecap: round; fill: none;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: splashDraw 1.15s cubic-bezier(.65,.05,.36,1) forwards;
}
/* Glow = stacked wider strokes drawn in LOCKSTEP — no blur() filters and no
   per-layer delays. Blur on an animating SVG path rasterizes its filter
   region as a visible BOX on phone GPUs, and staggered delays let the fat
   glow strokes paint AHEAD of the white core as a blue blob. The boltwrap
   drop-shadows supply the soft bloom. */
.bolt-aura2      { stroke: #0060c0; stroke-width: 9; opacity: .06; }
.bolt-aura       { stroke: #0071e3; stroke-width: 6; opacity: .11; }
.bolt-glow-outer { stroke: #0071e3; stroke-width: 3.6; opacity: .24; }
.bolt-glow-mid   { stroke: #2f9bff; stroke-width: 2.1; opacity: .5; }
.bolt-core       { stroke: #eaf6ff; stroke-width: .8; }
.bolt-fill {
  fill: rgba(0, 140, 255, 0.20); stroke: none;
  stroke-dasharray: none !important; stroke-dashoffset: 0 !important;
  animation: splashFillIn .7s ease forwards 1.15s !important;
  opacity: 0;
}
@keyframes splashDraw { to { stroke-dashoffset: 0; } }
@keyframes splashFillIn { to { opacity: 1; } }

/* neon tube flicker as it powers on, then a continuous breathing glow */
.splash__boltwrap {
  /* NO filter/drop-shadow — those rasterize a visible layer BOX mid-draw on
     some GPUs. The bloom comes from the stacked aura strokes + the halo. */
  position: absolute; display: grid; place-items: center; inset: 0;
  animation: splashFlicker .55s steps(1, end) 1.05s, splashBreathe 2.8s ease-in-out 1.7s infinite;
}
@keyframes splashFlicker {
  0% { opacity: 1; } 18% { opacity: .28; } 30% { opacity: 1; }
  48% { opacity: .45; } 60% { opacity: 1; } 76% { opacity: .75; } 88% { opacity: 1; }
}
@keyframes splashBreathe {
  0%, 100% { opacity: .86; }
  50% { opacity: 1; }
}

/* energy sparks drifting off the bolt */
.splash__spark {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #6fc4ff; box-shadow: 0 0 8px 2px rgba(60, 160, 255, .8);
  opacity: 0;
  animation: splashSpark 2.4s ease-out infinite;
}
@keyframes splashSpark {
  0% { opacity: 0; transform: translateY(6px) scale(.6); }
  18% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-46px) scale(1.15); }
}

/* wordmark OVER the bolt */
.splash__word {
  position: relative; z-index: 2; text-align: center;
  opacity: 0; animation: splashWordIn .9s cubic-bezier(.2,.8,.2,1) forwards 1.35s;
}
.splash__word h1 {
  font-size: 54px; font-weight: 760; color: #f4f9ff; letter-spacing: -0.015em;
  text-shadow: 0 0 26px rgba(0, 130, 255, 0.65), 0 2px 18px rgba(0, 0, 0, 0.6);
  margin: 0;
}
.splash__word .splash__sub {
  display: block; margin-top: 10px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .5em; text-transform: uppercase; color: #7fb2e8;
  text-shadow: 0 0 14px rgba(0, 113, 227, .6);
}
@keyframes splashWordIn {
  from { opacity: 0; letter-spacing: .12em; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash__hint {
  position: absolute; bottom: 34px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: #8fd8ff; opacity: 0;
  text-shadow: 0 0 14px rgba(56, 214, 255, 0.5);
  animation: splashHint 1.8s ease infinite 1.2s;
}
@keyframes splashHint { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .splash__bolt path, .splash__boltwrap, .splash__halo, .splash__word, .splash__spark, .splash__hint { animation: none !important; }
  .splash__bolt path { stroke-dashoffset: 0; }
  .bolt-fill { opacity: 1; }
  .splash__word, .splash__halo { opacity: 1; }
  .splash__hint { opacity: .7; } /* keyframe removed above — restore visibility */
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  #sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow);
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }
  body.sidebar-open #sidebar { transform: translateX(0); }
  body.sidebar-open #sidebar-scrim { display: block; }
  #topbar .topbar__menu { display: inline-flex; }
  /* clear the Dynamic Island / status bar (black-translucent standalone) */
  #topbar {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  #view {
    padding-top: 16px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(44px, calc(env(safe-area-inset-bottom) + 28px));
  }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cal-cell { min-height: 54px; }
  /* toasts + modals clear the home indicator */
  #toast-root { bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px)); }
  .modal-backdrop { padding-bottom: env(safe-area-inset-bottom); }
}
/* Standalone (installed) PWA: the floating menu button also clears the island */
@media (display-mode: standalone) and (max-width: 900px) {
  #topbar { padding-top: max(16px, env(safe-area-inset-top)); }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   CURSOR ORB — glowing red tracer replacing the native pointer.
   Position rides on #cursor-orb's transform (set from mousemove);
   all visual states live on the inner span so they never fight
   the positioning transform. No per-frame gradient animation —
   the breathe lives on the ::after halo's opacity only.
   ============================================================ */
html.orb-cursor, html.orb-cursor * { cursor: none !important; }

#cursor-orb {
  position: fixed; left: 0; top: 0; z-index: 1000;
  pointer-events: none; will-change: transform;
}
#cursor-orb span {
  display: block; position: relative;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffd9de 0%, var(--danger) 45%, #e3243f 100%);
  box-shadow:
    0 0 6px 1px rgba(255, 93, 115, .95),
    0 0 18px 5px rgba(255, 60, 84, .45),
    0 0 42px 14px rgba(255, 40, 70, .16);
  transition: width .16s ease, height .16s ease, margin .16s ease,
    transform .16s ease, background .16s ease, border-color .16s ease,
    box-shadow .16s ease, opacity .18s ease;
}
#cursor-orb span::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 70, 95, .3) 0%, rgba(255, 70, 95, 0) 68%);
  animation: orb-cursor-breathe 2.4s ease-in-out infinite;
}
@keyframes orb-cursor-breathe {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
#cursor-orb.is-hidden span { opacity: 0; }
#cursor-orb.is-hot:not(.is-ops) span { transform: scale(1.4); }
#cursor-orb.is-down span { transform: scale(.68); }

/* Over .ops map consoles the orb snaps into a hollow targeting ring. */
#cursor-orb.is-ops span {
  width: 19px; height: 19px; margin: -9.5px 0 0 -9.5px;
  background: transparent;
  border: 1.5px solid var(--danger);
  box-shadow:
    0 0 8px 1px rgba(255, 70, 95, .55),
    inset 0 0 8px rgba(255, 70, 95, .4);
}
#cursor-orb.is-ops span::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 5px 1px rgba(255, 93, 115, .9);
}

/* ============================================================
   JARVIS 3D CORE — the canvas centerpiece orb (js/jorb.js). The
   canvas is drawn larger than --d so its aura isn't clipped; it's
   centered and non-interactive (hover is read off the button).
   ============================================================ */
.jorb3d {
  position: relative; width: var(--d); height: var(--d);
  flex: 0 0 auto; display: grid; place-items: center;
}
.jorb3d__c {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ============================================================
   JARVIS — spinning gyroscope orb, masthead dock + drop console,
   the full console page, and the report executive brief.
   All motion is transform/opacity only (GPU-cheap, no per-frame
   gradient or box-shadow animation).
   ============================================================ */
.jorb {
  position: relative;
  width: var(--jorb-size, 96px); height: var(--jorb-size, 96px);
  flex: 0 0 auto;
  transition: transform .25s cubic-bezier(.3,.9,.3,1.2), filter .25s ease;
  filter: drop-shadow(0 0 14px rgba(80, 220, 255, 0.35));
}
.jorb__core {
  position: absolute; inset: 27%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0%, #bdefff 22%, #38d6ff 55%, #0a5f86 100%);
  box-shadow:
    0 0 12px 2px rgba(120, 226, 255, 0.75),
    0 0 34px 10px rgba(56, 214, 255, 0.3),
    inset -3px -4px 10px rgba(3, 30, 50, 0.55);
}
.jorb__core::after {
  content: ''; position: absolute; inset: -46%; border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 225, 255, 0.35) 0%, rgba(110, 225, 255, 0) 66%);
  animation: jorbBreathe 3s ease-in-out infinite;
}
.jorb__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.4px solid rgba(120, 220, 255, 0.55);
  border-top-color: rgba(233, 250, 255, 0.95);
}
.jorb__ring--a { animation: jorbSpinA 7s linear infinite; }
.jorb__ring--b { inset: 6%; border-color: rgba(120, 220, 255, 0.35); border-top-color: rgba(255, 93, 115, 0.75); animation: jorbSpinB 5.2s linear infinite; }
.jorb__ring--c { inset: 12%; border-color: rgba(120, 220, 255, 0.28); border-top-color: rgba(139, 233, 255, 0.9); animation: jorbSpinC 9.5s linear infinite; }
@keyframes jorbSpinA { from { transform: rotate3d(1, 0.15, 0, 72deg) rotateZ(0deg); } to { transform: rotate3d(1, 0.15, 0, 72deg) rotateZ(360deg); } }
@keyframes jorbSpinB { from { transform: rotate3d(0.2, 1, 0.1, 68deg) rotateZ(360deg); } to { transform: rotate3d(0.2, 1, 0.1, 68deg) rotateZ(0deg); } }
@keyframes jorbSpinC { from { transform: rotate3d(0.6, -0.8, 0.2, 58deg) rotateZ(0deg); } to { transform: rotate3d(0.6, -0.8, 0.2, 58deg) rotateZ(360deg); } }
@keyframes jorbBreathe { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* hover: bloom + lift; the dock button forwards its hover to the orb */
.jorb:hover, .jarvis-dock__btn:hover .jorb {
  transform: scale(1.1);
  filter: drop-shadow(0 0 30px rgba(110, 228, 255, 0.85));
}
.jarvis-dock__btn:hover .jorb__ring, .jorb:hover .jorb__ring { border-top-color: #ffffff; }
.jarvis-dock__btn:active .jorb { transform: scale(.94); }

/* busy = thinking: hot core, fast breathe */
.jorb--busy .jorb__core { background: radial-gradient(circle at 34% 30%, #ffffff 0%, #eafaff 30%, #6ee0ff 60%, #0a5f86 100%); }
.jorb--busy .jorb__core::after { animation-duration: 1.1s; }
.jorb--live { filter: drop-shadow(0 0 26px rgba(110, 228, 255, 0.7)); }
.jorb--mini { filter: drop-shadow(0 0 6px rgba(80, 220, 255, 0.4)); }
.jorb--mini .jorb__ring { border-width: 1px; }
@media (prefers-reduced-motion: reduce) {
  .jorb__ring, .jorb__core::after { animation: none; }
}

/* ---- masthead dock ---- */
.jarvis-dock { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: -6px; }
.jarvis-dock__btn {
  appearance: none; border: none; background: transparent; padding: 0;
  cursor: pointer; line-height: 0;
  transition: transform .2s cubic-bezier(.3,.9,.3,1.2);
}
.jarvis-dock__btn:active { transform: scale(.95); }
.jarvis-dock__label {
  letter-spacing: .38em; color: var(--accent); font-size: 9px;
  text-shadow: 0 0 12px rgba(56, 214, 255, 0.6);
  transition: color .2s, text-shadow .2s;
}
.jarvis-dock.is-open .jarvis-dock__label { color: #eafaff; text-shadow: 0 0 16px rgba(120, 230, 255, 0.9); }

/* ---- masthead drop console ---- */
.jarvis-console { max-height: 560px; opacity: 1; overflow: hidden; transition: max-height .3s ease, opacity .22s ease; }
.jarvis-console.is-gone { max-height: 0; opacity: 0; pointer-events: none; }
.jarvis-console__inner {
  margin-top: 14px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: inset 0 0 26px rgba(8, 60, 100, 0.25), 0 6px 22px rgba(2, 16, 32, 0.35);
}
.jarvis-console__answer {
  max-height: 300px; overflow-y: auto;
  padding: 10px 12px; margin-bottom: 10px;
  background: var(--inset); border: 1px solid var(--border-soft); border-radius: 10px;
}

/* ---- shared Jarvis bits ---- */
.jv-ask { display: flex; gap: 8px; }
.jv-ask input { flex: 1; }
.jv-banner {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 12px;
}
.jv-banner--warn { border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.jv-banner--err { border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.jv-answer { font-size: 12.5px; line-height: 1.65; color: var(--text); }
.jv-answer p, .jv-bubble p { margin: 0 0 8px; }
.jv-answer p:last-child, .jv-bubble p:last-child { margin-bottom: 0; }
.jv-list { margin: 0 0 8px; padding-left: 17px; }
.jv-list:last-child { margin-bottom: 0; }
.jv-list li { margin: 3px 0; line-height: 1.55; }
.jv-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.jv-dots { display: inline-flex; gap: 5px; padding: 4px 2px; }
.jv-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: jvDot 1.1s ease-in-out infinite;
}
.jv-dots i:nth-child(2) { animation-delay: .18s; }
.jv-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes jvDot { 0%, 100% { opacity: .25; transform: translateY(0); } 45% { opacity: 1; transform: translateY(-3px); } }

/* ---- Jarvis page ---- */
.jv-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 20px; }
.jv-hero__title {
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  letter-spacing: .5em; margin-left: .5em; color: var(--text);
  text-shadow: 0 0 22px rgba(56, 214, 255, 0.55);
}
.jv-thread { display: flex; flex-direction: column; gap: 12px; max-height: 480px; overflow-y: auto; margin-bottom: 14px; padding-right: 4px; }
.jv-msg { display: flex; gap: 10px; align-items: flex-start; }
.jv-msg--user { justify-content: flex-end; }
.jv-avatar { flex: 0 0 auto; margin-top: 2px; }
.jv-bubble {
  background: var(--panel-2); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 9px 13px;
  font-size: 12.5px; line-height: 1.6; max-width: 82%;
}
.jv-bubble--user { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.jv-bubble--pending { padding: 10px 14px; }
.jv-sug { font-size: 10.5px; border: 1px solid var(--border); background: transparent; }
.jv-sug:hover { border-color: var(--accent); color: var(--accent); }

/* ---- report executive brief ---- */
.jv-reportbrief {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
  border-radius: 12px; padding: 12px 14px;
  box-shadow: inset 0 0 22px rgba(8, 60, 100, 0.18);
}
.jv-reportbrief__head { color: var(--accent); margin-bottom: 7px; }

/* ============================================================
   GLOBAL EVENT MONITOR — pulsing event zones on the dashboard map
   ============================================================ */
.ops--monitor .map-svg { cursor: default; }
.ev-marker { cursor: pointer; pointer-events: all; }
.ev-marker circle { transform-box: fill-box; transform-origin: center; }
.ev-core { fill: var(--evc); }
.ev-ring { fill: none; stroke: var(--evc); stroke-width: 1.1; opacity: .9; transition: stroke-width .15s, opacity .15s; }
.ev-pulse { fill: none; stroke: var(--evc); stroke-width: 1.4; opacity: 0; animation: evPulse 3s ease-out infinite; }
.ev-pulse--2 { stroke-width: 1; }
.ev-hit { fill: rgb(255 255 255 / 0); stroke: none; }
.ev-marker:hover .ev-ring { stroke-width: 2.2; opacity: 1; }
.ev-marker:hover .ev-core { filter: drop-shadow(0 0 5px var(--evc)); }
@keyframes evPulse {
  0% { transform: scale(.22); opacity: .95; }
  70% { opacity: .25; }
  100% { transform: scale(2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .ev-pulse { animation: none; opacity: .35; } }

/* HOME BASE — steady green beacon on the Bay Area */
.home-marker { pointer-events: none; }
.home-marker circle { transform-box: fill-box; transform-origin: center; }
.home-core { fill: #3ce07f; filter: drop-shadow(0 0 4px rgba(60, 224, 127, .75)); }
.home-ring { fill: none; stroke: #3ce07f; stroke-width: 1.1; opacity: .9; }
.home-pulse { fill: none; stroke: #3ce07f; stroke-width: 1.2; opacity: 0; animation: evPulse 3.8s ease-out infinite; }
.home-label {
  font-family: var(--mono); font-size: 6.6px; font-weight: 700; letter-spacing: .16em;
  fill: #7dffb8; opacity: .85; text-anchor: middle;
}
@media (prefers-reduced-motion: reduce) { .home-pulse { animation: none; opacity: .3; } }

/* WIRE TICKER — one-line slow crawl of zone reports along the map's foot */
.ops__ticker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  overflow: hidden; pointer-events: none;
  border-top: 1px solid var(--border-soft);
  background: rgba(3, 11, 21, 0.82);
  padding: 4px 0 5px;
}
.ops__ticker-track {
  display: inline-flex; align-items: baseline; white-space: nowrap;
  will-change: transform;
  animation: tkScroll 120s linear infinite;
}
.tk-item { display: inline-flex; align-items: baseline; gap: 7px; }
.tk-sev {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .16em;
}
.tk-title { font-size: 10.5px; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.tk-body { font-family: var(--mono); font-size: 9.5px; color: var(--text-dim); letter-spacing: .03em; }
.tk-sep { font-family: var(--mono); font-size: 9px; color: rgba(56, 214, 255, .4); padding: 0 16px; }
@keyframes tkScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ops__ticker-track { animation: none; } }

.ops__evtip {
  position: absolute; z-index: 9; pointer-events: none;
  width: 240px;
  background: rgba(4, 14, 24, 0.96);
  border: 1px solid var(--border-bright);
  border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0, 10, 20, 0.55), 0 0 18px rgba(56, 214, 255, 0.12);
}
.ops__evtip-title { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.ops__awaiting {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 7; padding: 9px 16px; border-radius: 9px;
  background: rgba(3, 11, 21, 0.7); border: 1px solid var(--border);
  letter-spacing: .22em; color: var(--text-dim);
}

/* ============================================================
   SETTINGS HUB — two glowing wing bubbles (General / API Command)
   ============================================================ */
.set-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; max-width: 760px; }
.set-bubble {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 34px 22px 30px; border-radius: var(--radius);
  color: var(--text); cursor: pointer;
  transition: transform .2s cubic-bezier(.3,.9,.3,1.2), box-shadow .2s;
}
.set-bubble:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(2, 16, 32, .5), 0 0 26px rgba(56, 214, 255, .18); }
.set-bubble:active { transform: translateY(-1px) scale(.99); }
.set-bubble__icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  box-shadow: 0 0 20px rgba(56, 214, 255, .28); margin-bottom: 6px;
}
.set-bubble__title { font-family: var(--mono); font-weight: 700; letter-spacing: .3em; margin-left: .3em; font-size: 13px; }
.set-bubble__sub { color: var(--text-dim); font-size: 12.5px; }
.set-bubble__go { margin-top: 10px; color: var(--accent); opacity: .85; }

/* ============================================================
   API COMMAND BOARD — live status lights per external link.
   Exactly one of the three dots is "live"; it breathes and emits
   ping rings so the board reads as a real-time view. Motion is
   opacity/transform only (GPU-cheap).
   ============================================================ */
.api-lights {
  display: inline-flex; gap: 8px; align-items: center;
  appearance: none; background: transparent; cursor: pointer;
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 8px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.api-lights:hover { border-color: var(--border-bright); box-shadow: 0 0 12px rgba(56, 214, 255, .18); }
.api-dot {
  width: 11px; height: 11px; border-radius: 50%; position: relative;
  background: #132538; border: 1px solid rgba(120, 170, 220, .25); opacity: .4;
  transition: opacity .2s, box-shadow .2s, background .2s;
}
.api-dot--mini { width: 9px; height: 9px; }
.api-dot--green.is-live { background: var(--ok); border-color: transparent; opacity: 1; box-shadow: 0 0 9px 2px rgba(47, 208, 140, .65); animation: apiBreathe 1.8s ease-in-out infinite; }
.api-dot--grey.is-live { background: #93a7c4; border-color: transparent; opacity: 1; box-shadow: 0 0 8px 1px rgba(147, 167, 196, .5); animation: apiBreathe 3.2s ease-in-out infinite; }
.api-dot--red.is-live { background: var(--danger); border-color: transparent; opacity: 1; box-shadow: 0 0 10px 2px rgba(255, 93, 115, .7); animation: apiBreathe 1s ease-in-out infinite; }
.api-dot.is-live::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid currentColor; opacity: 0;
  animation: apiPing 2.2s ease-out infinite;
}
.api-dot--green.is-live::after { color: var(--ok); }
.api-dot--grey.is-live::after { color: #93a7c4; animation-duration: 4s; }
.api-dot--red.is-live::after { color: var(--danger); animation-duration: 1.4s; }
@keyframes apiBreathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes apiPing { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }

.api-row__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.api-row__name { font-weight: 700; font-size: 14px; }
.api-row__status { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.api-row__label--green { color: var(--ok); }
.api-row__label--grey { color: #93a7c4; }
.api-row__label--red { color: var(--danger); }
.api-row--red { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.api-row--green { border-color: color-mix(in srgb, var(--ok) 22%, var(--border)); }
.api-liveflag { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); }
.api-livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px 2px rgba(56, 214, 255, .6); animation: apiBreathe 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .api-dot.is-live, .api-livedot { animation: none; }
  .api-dot.is-live::after { display: none; }
}

/* ============================================================
   CALENDAR — day/week/month views. Blocks wear their calendar's
   color via --evcal; done occurrences dim with a green check.
   ============================================================ */
.cv-day { position: relative; height: 640px; margin-top: 6px; }
.cv-hline { position: absolute; left: 56px; right: 0; border-top: 1px solid var(--border-soft); }
.cv-hlabel {
  position: absolute; left: 0; width: 50px; text-align: right; transform: translateY(-55%);
  font-family: var(--mono); font-size: 9.5px; color: var(--muted); letter-spacing: .04em;
}
.cv-now { position: absolute; left: 56px; right: 0; z-index: 3; border-top: 2px solid var(--danger); pointer-events: none; }
.cv-day > .cv-block { left: 62px; right: 6px; }

.cv-block {
  position: absolute; z-index: 2; cursor: pointer; overflow: hidden;
  display: flex; gap: 7px; align-items: flex-start;
  background: color-mix(in srgb, var(--evcal) 14%, transparent);
  border-left: 3px solid var(--evcal);
  border-radius: 8px; padding: 3px 7px;
  transition: filter .12s;
}
.cv-block:hover { filter: brightness(1.2); }
.cv-block__body { min-width: 0; }
.cv-block__body b { display: block; font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-block__body span { font-family: var(--mono); font-size: 9.5px; color: var(--text-dim); }
.cv-block.is-done { opacity: .5; }
.cv-block.is-done .cv-block__body b { text-decoration: line-through; }

.cv-check {
  appearance: none; flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px;
  border-radius: 5px; border: 1px solid color-mix(in srgb, var(--evcal, var(--accent)) 60%, transparent);
  background: transparent; color: var(--ok); cursor: pointer;
  display: inline-grid; place-items: center; padding: 0; line-height: 0;
}
.is-done > .cv-check, .cv-chip.is-done .cv-check { background: color-mix(in srgb, var(--ok) 22%, transparent); border-color: var(--ok); }

/* direct delete on day-view events (always visible — touch friendly) */
.cv-del {
  appearance: none; flex: 0 0 auto; margin-left: auto; margin-top: 1px;
  background: transparent; border: none; cursor: pointer; color: var(--muted);
  padding: 0 2px; line-height: 0; border-radius: 5px; opacity: .6;
  transition: color .12s, opacity .12s, background .12s;
}
.cv-del:hover { color: var(--danger); opacity: 1; background: color-mix(in srgb, var(--danger) 16%, transparent); }
.cv-chip .cv-del { margin-left: 4px; }

.cv-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  padding: 4px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--evcal) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--evcal) 40%, transparent);
}
.cv-chip.is-done { opacity: .55; text-decoration: line-through; }

/* week grid: gutter + 7 columns */
.cv-week {
  display: grid; grid-template-columns: 56px repeat(7, 1fr);
  grid-template-rows: auto 560px; min-width: 720px;
}
.cv-corner { grid-row: 1; }
.cv-dayhead {
  appearance: none; background: transparent; border: none; cursor: pointer;
  color: var(--text); padding: 4px 2px 8px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--border-soft);
}
.cv-dayhead b { font-size: 15px; }
.cv-dayhead:hover b { color: var(--accent); }
.cv-dayhead.is-today b {
  background: var(--accent); color: var(--accent-ink);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
}
.cv-gutter { position: relative; grid-row: 2; }
.cv-gutter .cv-hline { display: none; }
.cv-col { position: relative; grid-row: 2; border-left: 1px solid var(--border-soft); }
.cv-col.is-today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cv-col .cv-block { left: 3px; right: 3px; padding: 2px 5px; }
.cv-col .cv-check { width: 13px; height: 13px; margin-top: 1px; }
.cv-col .cv-hline-bg { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border-soft); }
.cv-allday { position: absolute; top: 2px; left: 3px; right: 3px; z-index: 4; display: flex; flex-direction: column; gap: 3px; }
.cv-allday .cv-chip { font-size: 10px; padding: 2px 7px; }

/* month cells */
.cv-mcell { cursor: pointer; transition: border-color .12s; }
.cv-mcell:hover { border-color: var(--border-bright); }
.cv-mev.is-done { opacity: .5; text-decoration: line-through; }

/* calendar-manager color swatches */
.cv-swatch {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; padding: 0;
}
.cv-swatch.is-sel { border-color: #eafaff; box-shadow: 0 0 8px rgba(234, 250, 255, .5); }

/* ---- Today's Directives completion donut ---- */
.dir-donut { flex: 0 0 auto; transition: filter .3s; }
.dir-donut.is-all { filter: drop-shadow(0 0 12px rgba(47, 208, 140, .55)); }

/* ---- Net worth vitals: EKG runner + live badge ---- */
.nw-vitals {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.nw-ekg { width: 120px; height: 18px; flex: 0 0 auto; }
.nw-ekg path {
  fill: none; stroke: var(--ok); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 34 226;
  animation: nwEkg 2.4s linear infinite;
  filter: drop-shadow(0 0 4px rgba(47, 208, 140, .7));
}
@keyframes nwEkg { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .nw-ekg path { animation: none; stroke-dasharray: none; } }

/* ============================================================
   SIDEBAR NAV ORB — a glowing dot that rides beside the active
   page and shoots to the next one you click. Position lives on
   the wrapper's translateY (set from app.js); the inner dot
   stretches while travelling for a comet feel.
   ============================================================ */
.nav-orb {
  position: absolute; left: 2px; top: 0; width: 10px; height: 10px;
  z-index: 6; pointer-events: none;
  transition: transform .42s cubic-bezier(.5, 1.35, .35, 1);
}
.nav-orb__dot {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: var(--orb-cat, var(--accent));
  box-shadow:
    0 0 10px 2px color-mix(in srgb, var(--orb-cat, var(--accent)) 85%, transparent),
    0 0 22px 7px color-mix(in srgb, var(--orb-cat, var(--accent)) 40%, transparent);
  transition: transform .42s cubic-bezier(.5, 1.35, .35, 1), background .3s;
  animation: navOrbPulse 2.4s ease-in-out infinite;
}
@keyframes navOrbPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.5); } }
/* while shooting to a new page: stretch vertically into a comet */
.nav-orb.is-moving .nav-orb__dot { transform: scaleY(2.4) scaleX(.6); animation: none; }
@media (prefers-reduced-motion: reduce) {
  .nav-orb, .nav-orb__dot { transition: none; }
  .nav-orb__dot { animation: none; }
  .nav-orb.is-moving .nav-orb__dot { transform: none; }
}

/* ============================================================
   PROCUREMENT — supply inventory. Big glowing "bubble" sections,
   each item a colored storage-count circle flanked by minus/plus.
   ============================================================ */
.proc-intro { display: block; margin: -4px 0 16px; opacity: .8; }
.proc-stack { display: flex; flex-direction: column; gap: 18px; }

.proc-bubble {
  --sec: #38d6ff;
  position: relative;
  border-radius: 22px;
  padding: 18px 20px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sec) 8%, var(--panel)), var(--panel));
  border: 1px solid color-mix(in srgb, var(--sec) 34%, var(--border-soft));
  box-shadow: 0 12px 34px rgba(2, 10, 22, .5), inset 0 0 34px color-mix(in srgb, var(--sec) 6%, transparent);
  overflow: hidden;
}
.proc-bubble::before { /* top edge glow bar */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--sec), transparent); opacity: .85;
}
.proc-bubble::after { /* soft corner aura */
  content: ''; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--sec) 20%, transparent), transparent 70%);
  pointer-events: none;
}
.proc-bubble > * { position: relative; z-index: 1; }

.proc-bubble__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.proc-bubble__id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proc-bubble__id h3 { font-size: 16px; letter-spacing: .01em; }
.proc-bubble__dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--sec);
  box-shadow: 0 0 10px var(--sec), 0 0 3px var(--sec); flex: none;
}

/* location switcher (Toiletries: Los Altos / LA / Kauai) */
.proc-locs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 4px; border-radius: 12px;
  background: rgba(3, 11, 21, .5); border: 1px solid var(--border-soft);
}
.proc-loc {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--text-dim);
  font-family: var(--mono); letter-spacing: .04em; transition: background .12s, color .12s, border-color .12s;
}
.proc-loc:hover { color: var(--text); background: rgba(90, 190, 255, .08); }
.proc-loc.is-active {
  color: var(--sec); background: color-mix(in srgb, var(--sec) 15%, transparent);
  border-color: color-mix(in srgb, var(--sec) 45%, transparent);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--sec) 12%, transparent);
}

.proc-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.proc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 12px; border-radius: 14px;
  background: rgba(3, 11, 21, .42); border: 1px solid var(--border-soft);
}
.proc-item__name { flex: 1; font-size: 14.5px; font-weight: 600; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.proc-item__desc { display: block; font-size: 11px; font-weight: 400; color: var(--text-dim); margin-top: 1px; }
.proc-item__ctl { display: flex; align-items: center; gap: 8px; flex: none; }

/* the minus / plus steppers — small, flanking the circle */
.proc-step {
  appearance: none; cursor: pointer; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--border-soft); color: var(--text-dim);
  transition: background .12s, color .12s, transform .05s, box-shadow .12s;
}
.proc-step:hover { color: var(--text); background: #17324c; }
.proc-step:active { transform: scale(.9); }
.proc-step--minus:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); box-shadow: 0 0 10px rgba(255, 93, 115, .25); }
.proc-step--plus:hover  { color: var(--ok);     border-color: color-mix(in srgb, var(--ok) 50%, transparent);     box-shadow: 0 0 10px rgba(47, 208, 140, .25); }

/* the storage-count circle: number in the middle, color by stock level */
.proc-count {
  --c: var(--muted);
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 26%, transparent), color-mix(in srgb, var(--c) 8%, transparent));
  border: 2px solid var(--c); color: var(--c);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 32%, transparent), inset 0 0 10px color-mix(in srgb, var(--c) 14%, transparent);
  line-height: 1;
}
.proc-count__n { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.proc-count__lbl { font-family: var(--mono); font-size: 7.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-top: 1px; }
.proc-count.is-out { --c: var(--muted); opacity: .8; }
.proc-count.is-low { --c: var(--danger); }
.proc-count.is-mid { --c: var(--warn); }
.proc-count.is-ok  { --c: var(--ok); }
.proc-count.is-low { animation: procPulse 2s ease-in-out infinite; }
@keyframes procPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 93, 115, .28), inset 0 0 10px rgba(255, 93, 115, .14); }
  50%      { box-shadow: 0 0 20px rgba(255, 93, 115, .6),  inset 0 0 12px rgba(255, 93, 115, .22); }
}
@media (prefers-reduced-motion: reduce) { .proc-count.is-low { animation: none; } }

.proc-item__edit { color: var(--muted); }
.proc-item__edit:hover { color: var(--text); }
.proc-empty { padding: 6px 0 2px; }
.proc-empty .empty { padding: 18px 0; }
.proc-add-item { color: var(--sec); }

/* dashed "add section" bubble at the foot of the stack */
.proc-add-card {
  appearance: none; cursor: pointer; font: inherit;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 20px; border-radius: 22px;
  border: 1.5px dashed var(--border); background: rgba(3, 11, 21, .3);
  color: var(--text-dim); font-weight: 600; letter-spacing: .04em;
  transition: border-color .14s, color .14s, background .14s;
}
.proc-add-card:hover { border-color: var(--border-bright); color: var(--accent); background: rgba(56, 214, 255, .05); }
.proc-add-card__plus { display: inline-flex; }

/* checkbox row in the new-section modal */
.proc-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text-dim); cursor: pointer; margin-bottom: 4px; }
.proc-check input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

/* ============================================================
   JOURNAL — reflection guide inside the entry modal
   ============================================================ */
.jrn-guide {
  margin: 0 0 13px; padding: 12px 13px; border-radius: 12px;
  background: rgba(56, 214, 255, .05); border: 1px solid var(--border-soft);
}
.jrn-guide__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.jrn-guide__hint { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.jrn-prompts { display: flex; flex-wrap: wrap; gap: 7px; }
.jrn-prompt {
  appearance: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 980px;
  background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border-soft);
  transition: background .12s, color .12s, border-color .12s, transform .05s;
}
.jrn-prompt:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--border-bright); }
.jrn-prompt:active { transform: scale(.96); }

/* ============================================================
   JARVIS FULL SYNC — masthead controls + rise-and-shockwave sweep
   ============================================================ */
/* header slightly larger (orb bumped 132 -> 150 in markup) */
.dash-head { padding: 12px 8px 4px; }
.dash-script { font-size: 47px; }
.dash-masthead { row-gap: 16px; }

/* two very small control buttons under the orb */
.jv-ctl { display: flex; gap: 6px; margin-top: 5px; }
.jv-ctl__btn {
  appearance: none; cursor: pointer; font-family: var(--mono);
  font-size: 8.5px; font-weight: 700; letter-spacing: .14em;
  color: color-mix(in srgb, var(--accent) 80%, #fff);
  background: transparent; padding: 3px 9px; border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--accent) 7%, transparent);
  transition: background .12s, box-shadow .12s, color .12s;
}
.jv-ctl__btn:hover {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
  color: #eafaff;
}
.jv-ctl__btn:active { transform: scale(.96); }

/* the deliberately-easy-to-miss countdown */
.jv-count {
  display: block; height: 11px; margin-top: 3px; text-align: center;
  font-family: var(--mono); font-size: 8.5px; font-weight: 600;
  letter-spacing: .22em; color: var(--accent); opacity: .45;
}

/* while the overlay orb is airborne, the docked orb stands empty */
.jarvis-dock.is-sync-away .jarvis-dock__btn { opacity: 0; pointer-events: none; }

/* ---- the sweep overlay ---- */
#dash-sync { position: fixed; inset: 0; z-index: 90; pointer-events: none; transition: opacity .28s; }
#dash-sync.is-fading { opacity: 0; }
.dsync-orb {
  position: fixed; will-change: transform;
  transition: transform .95s cubic-bezier(.22, .9, .24, 1);
  filter: drop-shadow(0 0 30px rgba(56, 214, 255, .55));
}
.dsync-orb.is-hover .dsync-orb__bob { animation: dsyncBob 2.4s ease-in-out infinite; }
@keyframes dsyncBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.dsync-waves { position: fixed; width: 0; height: 0; }
.dsync-ring {
  position: absolute; left: 0; top: 0; width: 920px; height: 920px;
  margin: -460px 0 0 -460px; border-radius: 50%;
  border: 1.5px solid rgba(56, 214, 255, .6);
  box-shadow: 0 0 34px rgba(56, 214, 255, .3), inset 0 0 34px rgba(56, 214, 255, .16);
  transform: scale(.06); opacity: 0;
  animation: dsyncRing 1.9s cubic-bezier(.16, .6, .4, 1) forwards;
}
@keyframes dsyncRing {
  0% { transform: scale(.06); opacity: .9; }
  70% { opacity: .32; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---- card wave states ---- */
.card.is-scanning {
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 30px rgba(56, 214, 255, .3), var(--shadow);
}
.dsync-scanline {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent); opacity: .85; pointer-events: none;
  animation: dsyncScan .65s linear forwards;
}
@keyframes dsyncScan { to { top: calc(100% - 2px); } }
.card.is-updated { animation: dsyncDone 1s ease-out; }
@keyframes dsyncDone {
  0% { box-shadow: 0 0 0 1.6px var(--ok), 0 0 28px rgba(47, 208, 140, .38), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}

@media (prefers-reduced-motion: reduce) {
  .dsync-orb { transition: none; }
  .dsync-orb.is-hover .dsync-orb__bob, .dsync-ring, .dsync-scanline { animation: none; }
}

/* ============================================================
   LINKED DEVICES — every synced device, atop the API board
   ============================================================ */
.dev-strip {
  border-radius: var(--radius);
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(56, 214, 255, .06), var(--panel));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}
.dev-strip__row { display: flex; flex-wrap: wrap; gap: 8px; }
.dev-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-radius: 12px;
  background: rgba(3, 11, 21, .45); border: 1px solid var(--border-soft);
  min-width: 0;
}
.dev-chip--self { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: inset 0 0 12px rgba(56, 214, 255, .07); }
.dev-chip__icon { color: var(--accent); display: inline-flex; flex: none; }
.dev-chip__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dev-chip__name { font-size: 12.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; }
.dev-chip__meta { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dev-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--muted); opacity: .5;
}
.dev-dot.is-on {
  background: var(--ok); opacity: 1;
  box-shadow: 0 0 8px var(--ok);
  animation: devPulse 2.2s ease-in-out infinite;
}
@keyframes devPulse { 0%, 100% { box-shadow: 0 0 5px var(--ok); } 50% { box-shadow: 0 0 12px var(--ok); } }
@media (prefers-reduced-motion: reduce) { .dev-dot.is-on { animation: none; } }

/* ============================================================
   PHONE POLISH — splash truly centered + one-row topbar
   ============================================================ */
@media (max-width: 900px) {
  /* The 460px splash stage used to overflow narrow screens pinned-left,
     shoving the bolt + wordmark visibly right of center. Fit to viewport. */
  .splash__stage { width: min(460px, 100vw); }
  .splash__bolt { width: min(330px, 86vw); }
  .splash__word h1 { font-size: clamp(34px, 12vw, 54px); white-space: nowrap; }

  /* Menu button left · page title dead-center · subnav full row below.
     The empty right column mirrors the button so "center" is optical center. */
  #topbar {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    column-gap: 6px;
  }
  #topbar .topbar__menu { grid-column: 1; justify-self: start; }
  #topbar .topbar__title { grid-column: 2; justify-content: center; min-width: 0; }
  #topbar .topbar__title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #topbar .subnav { grid-column: 1 / -1; }
}

/* ============================================================
   SYNC SOUNDTRACK BADGE — equalizer pod popping out of Jarvis,
   bars driven live by the audio analyser while music plays
   ============================================================ */
#sync-audio-badge {
  position: fixed; z-index: 95; pointer-events: none;
  display: flex; align-items: flex-end; gap: 2.5px;
  height: 24px; padding: 5px 8px;
  background: rgba(3, 11, 21, .8);
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(56, 214, 255, .35), inset 0 0 8px rgba(56, 214, 255, .1);
  opacity: 0; transform: translateY(8px) scale(.5);
  transform-origin: left bottom;
  transition: opacity .22s, transform .26s cubic-bezier(.3, .9, .3, 1.35);
}
#sync-audio-badge.is-on { opacity: 1; transform: translateY(0) scale(1); }
.sab-bar {
  width: 3px; height: 25%; border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(56, 214, 255, .8);
  transition: height .07s linear;
}
@media (prefers-reduced-motion: reduce) {
  #sync-audio-badge { transition: opacity .22s; transform: none; }
  .sab-bar { transition: none; }
}

/* ============================================================
   SOUNDTRACK — Full Sync theme switcher tiles
   ============================================================ */
.trk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.trk-tile {
  appearance: none; font: inherit; text-align: left; cursor: pointer;
  position: relative; display: flex; flex-direction: column; gap: 3px;
  padding: 14px 14px 12px; border-radius: 14px;
  background: rgba(3, 11, 21, .45); color: var(--text);
  border: 1px solid var(--border-soft);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.trk-tile:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.trk-tile:active { transform: translateY(0) scale(.99); }
.trk-tile.is-armed {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 20px rgba(56, 214, 255, .22), inset 0 0 16px rgba(56, 214, 255, .06);
}
.trk-tile__icon { color: var(--accent); display: inline-flex; margin-bottom: 4px; }
.trk-tile__name { font-size: 14px; font-weight: 700; }
.trk-tile__sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.trk-tile__armed { position: absolute; top: 10px; right: 10px; font-size: 8.5px; }
.trk-tile__prev { margin-top: 10px; align-self: flex-start; }

/* Desktop: page title + tabs sit dead-center of the board (mobile already
   centers via the topbar grid). `safe center` degrades to start on overflow. */
@media (min-width: 901px) {
  .topbar__title { justify-content: center; }
  .subnav { justify-content: center; justify-content: safe center; }
}

/* ============================================================
   SYNC CHECKS — glowing green confirmations floated out of the
   orb onto each card; they pulse while the music holds, then
   fade as the whole animation melts away
   ============================================================ */
/* Bare glyph — no circle. Pure glowing check, breathing bigger + brighter. */
.dsync-check {
  position: fixed; z-index: 93; width: 22px; height: 22px;
  display: grid; place-items: center; color: #5dffb0;
  filter: drop-shadow(0 0 5px rgba(47, 208, 140, .95)) drop-shadow(0 0 14px rgba(47, 208, 140, .6));
  transition: transform .75s cubic-bezier(.2, .85, .3, 1.08), opacity .35s;
  will-change: transform, filter;
  pointer-events: none;
}
.dsync-check .ic { stroke-width: 2.7; }
.dsync-check.is-landed { animation: dsyncCheckPulse 1.6s ease-in-out infinite; }
@keyframes dsyncCheckPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(47, 208, 140, .8)) drop-shadow(0 0 11px rgba(47, 208, 140, .45)); }
  50% { transform: scale(1.22); filter: drop-shadow(0 0 9px rgba(47, 208, 140, 1)) drop-shadow(0 0 24px rgba(47, 208, 140, .85)); }
}
.dsync-check.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .dsync-check { transition: opacity .35s; } .dsync-check.is-landed { animation: none; } }

/* ============================================================
   SYNC FINALE — for the last stretch of the soundtrack every
   card's traveling border glow flips GREEN and the cards bump:
   all systems checked, good to go.
   ============================================================ */
.card.is-good { background: rgba(47, 208, 140, 0.34); transition: background .6s; animation: dsyncGoodBump 1.4s ease-in-out infinite; }
.card.is-good::before {
  background: conic-gradient(
    transparent 0deg, transparent 240deg,
    rgba(47, 208, 140, 0.28) 285deg,
    rgba(94, 255, 176, 0.95) 320deg,
    rgba(47, 208, 140, 0.28) 352deg,
    transparent 360deg);
}
@keyframes dsyncGoodBump {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 208, 140, 0), var(--shadow); }
  50% { box-shadow: 0 0 0 1.5px rgba(94, 255, 176, .6), 0 0 30px rgba(47, 208, 140, .38), var(--shadow); }
}
@media (prefers-reduced-motion: reduce) { .card.is-good { animation: none; } }

/* ============================================================
   SURVEILLANCE SATELLITES — orbital assets over the event map:
   dashed ground-tracks, tracer trails, sensor footprints, and a
   severity-colored TRACKING flare when passing over a hotspot
   ============================================================ */
.sat-label {
  font-family: var(--mono); font-size: 7.2px; font-weight: 600; letter-spacing: .12em;
  fill: #a8dcff; opacity: .9; text-anchor: middle; pointer-events: none;
}

/* ============================================================
   SLIM MASTHEAD — the dashboard top is a HEADER, not a hero:
   tighter type, smaller orb (112px in markup), less padding
   ============================================================ */
.dash-head { padding: 4px 8px 0; }
.dash-masthead { row-gap: 4px; }
.dash-script { font-size: 40px; }
.chrono__day { font-size: 54px; }
.chrono__dow { font-size: 11px; }
.chrono__mon { font-size: 16px; }
.chrono__yr { font-size: 10.5px; }
.chrono__ampm { font-size: 12px; }
.chrono__clock { gap: 12px; }
.jarvis-dock { gap: 1px; margin-top: -4px; }
.dash-strip { margin-top: 6px; }

/* ---- carrier strike groups: tiny hull silhouettes, sonar ping, ALERT ---- */
.ship-body { fill: rgba(159, 208, 232, .9); stroke: rgba(56, 214, 255, .55); stroke-width: .3; }
.ship-island { fill: #cfeaff; }
.ship-deckline { stroke: rgba(56, 214, 255, .8); stroke-width: .35; }
.ship-ping {
  fill: none; stroke: #8fe0ff; stroke-width: .55; opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: shipPing 5.5s ease-out infinite;
}
@keyframes shipPing {
  0% { opacity: .55; transform: scale(.5); }
  55% { opacity: 0; transform: scale(3.4); }
  100% { opacity: 0; transform: scale(3.4); }
}
@media (prefers-reduced-motion: reduce) { .ship-ping { animation: none; } }

/* ============================================================
   API HOLOGRAMS + SYNC THEATER — rotating brand marks (green =
   locked in, red = down) and the Mac-cloud-iPhone data beam
   ============================================================ */
.holo { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 74px; }
.holo--green { --holo: #3ce07f; }
.holo--red { --holo: #ff5d73; }
.holo__stage { position: relative; height: 56px; width: 56px; display: grid; place-items: center; perspective: 300px; }
.holo__stage::after {
  /* faint scanlines over the figure — projector feel */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 6px;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(3, 11, 21, .22) 2px 3px);
}
.holo__spin {
  width: 34px; height: 40px; display: grid; place-items: center;
  transform-style: preserve-3d;
  animation: holoSpin 5.5s linear infinite;
}
.holo__spin svg {
  width: 100%; height: 100%; color: var(--holo); opacity: .92;
  filter: drop-shadow(0 0 5px var(--holo)) drop-shadow(0 0 16px color-mix(in srgb, var(--holo) 55%, transparent));
}
.holo__base {
  position: absolute; bottom: 1px; left: 50%; width: 44px; height: 9px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--holo) 55%, transparent) 0%, transparent 70%);
  animation: holoPad 2.6s ease-in-out infinite;
}
.holo__label {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--text); white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis;
}
.holo__sub {
  font-family: var(--mono); font-size: 7.5px; font-weight: 600; letter-spacing: .12em;
  color: var(--holo); white-space: nowrap;
}
@keyframes holoSpin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes holoPad { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

.sync-theater {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin: 14px 0 4px; padding: 14px 10px 10px;
  border: 1px solid var(--border-soft); border-radius: 12px;
  background: radial-gradient(ellipse at 50% 0%, rgba(56, 214, 255, .06) 0%, transparent 65%);
}
.sync-cloud { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px; }
.sync-cloud__icon { color: var(--holo); filter: drop-shadow(0 0 7px var(--holo)); animation: holoPad 2.6s ease-in-out infinite; }
.sync-lane { position: relative; flex: 1 1 40px; height: 22px; min-width: 26px; }
.sync-lane::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--border-soft);
}
.sync-lane--flip { transform: scaleX(-1); }
.pkt { position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; opacity: 0; }
.pkt--push { background: #3ce07f; box-shadow: 0 0 6px #3ce07f; animation: pktToCloud 2.8s linear infinite; }
.pkt--pull { background: #38d6ff; box-shadow: 0 0 6px #38d6ff; animation: pktFromCloud 2.8s linear infinite; animation-delay: 1.4s; }
@keyframes pktToCloud {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 5px); opacity: 0; }
}
@keyframes pktFromCloud {
  0% { left: calc(100% - 5px); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 0; opacity: 0; }
}
.sync-plain { font-size: 11.5px; line-height: 1.75; color: var(--text-dim); margin: 10px 0 0; }
.sync-plain b { color: var(--text); }
.pkt-demo { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin: 0 4px 1px 8px; }
.pkt-demo--push { background: #3ce07f; box-shadow: 0 0 5px #3ce07f; }
.pkt-demo--pull { background: #38d6ff; box-shadow: 0 0 5px #38d6ff; }
.sync-plain .pkt-demo:first-child { margin-left: 0; }
@media (max-width: 560px) {
  .sync-theater { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
  .sync-lane { min-width: 100%; order: 5; display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .holo__spin, .holo__base, .sync-cloud__icon { animation: none; }
  .pkt { display: none; }
}

/* ============================================================
   MAP THEATER — phone-only fullscreen forced-landscape view of
   the Global Event Monitor (tap the map to open)
   ============================================================ */
.map-theater { position: fixed; inset: 0; z-index: 200; background: #030b15; isolation: isolate; }
/* While the theater is up, the app shell underneath is fully hidden — no
   header chips, LED borders, or glows can composite through the overlay. */
.theater-open #view, .theater-open #topbar, .theater-open #sidebar { visibility: hidden; }
.map-theater__stage {
  position: absolute; top: 50%; left: 50%;
  width: 100vh; height: 100vw;
  transform: translate(-50%, -50%) rotate(90deg);
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.map-theater__stage .ops { width: 100%; max-height: 100%; }
.map-theater__back { position: absolute; top: 12px; right: 12px; z-index: 3; }
@media (max-width: 900px) { .ops--monitor .ops__maparea { cursor: pointer; } }

/* Desktop map theater: flat (no rotation) — map + ticker banner fill the screen */
.map-theater__stage--flat {
  top: 0; left: 0; width: 100%; height: 100%;
  transform: none; padding: 22px;
}

/* Device identity tags under the sync-theater's self hologram */
.holo-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.holo-tag__lbl {
  font-family: var(--mono); font-size: 6.8px; font-weight: 700; letter-spacing: .16em;
  color: var(--text-dim); margin-top: 3px;
}
.holo-tag { display: flex; gap: 5px; }
.holo-tag__btn {
  font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .1em;
  padding: 4px 8px; border-radius: 7px; cursor: pointer;
  color: var(--text-dim); background: transparent;
  border: 1px solid var(--border-soft);
  transition: color .15s, border-color .15s, box-shadow .15s;
}
.holo-tag__btn:hover { color: var(--text); border-color: var(--border-bright); }
.holo-tag__btn.is-active {
  color: #3ce07f; border-color: color-mix(in srgb, #3ce07f 55%, transparent);
  box-shadow: 0 0 9px rgba(60, 224, 127, .25);
}

/* In-theater intel report panel (opens when a zone dot is tapped) */
.map-theater__brief {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  width: min(340px, 42%);
  max-height: calc(100% - 24px); overflow-y: auto;
  background: rgba(4, 14, 24, 0.96);
  border: 1px solid var(--border-bright);
  border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 10, 20, 0.55), 0 0 18px rgba(56, 214, 255, 0.12);
}
.map-theater__brief-x { position: absolute; top: 8px; right: 8px; }
.map-theater__brief-title { font-size: 14px; font-weight: 700; line-height: 1.35; margin-top: 6px; padding-right: 22px; }
.map-theater__brief-body { font-size: 12px; line-height: 1.6; margin: 8px 0 0; color: var(--text); }
.map-theater__brief-body--dim { color: var(--text-dim); }
