/* J.A.R.V.I.S. Command Centre v3 (10 Nov 2026). Blue hologram theme, chosen by Celine from her reference screenshots.
   The core (canvas, a particle brain with the agents on orbit) is the spectacle and the only way to talk;
   everything else is real data: her day, her rhythm, the money, Jarvis's briefings and events. No invented system stats.
   Phone (<1100px): vitals strip, core, then one view at a time (Today, Money, Feed). Desktop: Today | Core | Feed, Money below,
   System as a drawer. */
:root {
  --void: #01050d;
  --field: #041024;
  --line: rgba(64, 156, 255, .18);
  --line-2: rgba(64, 156, 255, .5);
  --ink: #e4f1ff;
  --ink-2: #9db8d6;
  --ink-3: #6a86a6;
  --cyan: #4aa8ff;
  --cyan-2: #1d5fae;
  --cyan-ink: #a9d4ff;
  --gold: #ffc35c;
  --gold-ink: #ffdc99;
  --red: #ff6b6b;
  --green: #4ff0a8;
  --core: 70 160 255;   /* current core colour, set by hud.js with the core's state */
  --glow: .5;           /* 0..1, how much the core lights the ground */
  --core-x: 50%;
  --core-y: 26%;
  --display: "Rajdhani", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t: 180ms;
  --header: 64px;
  --tabs: 58px;
  color-scheme: dark;
}
@media (min-width: 1100px) { :root { --tabs: 0px; --core-y: 34%; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* keep: without it the gate never closes */
html { background: var(--void); scrollbar-color: var(--cyan-2) transparent; scrollbar-width: thin; }
html, body { margin: 0; min-height: 100%; }
/* body keeps no background of its own: it would paint over .field (z-index -1), hiding the core's light */
body {
  color: var(--ink);
  font: 15px/1.5 var(--body);
  padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom, 0px));
  caret-color: var(--cyan);
  -webkit-tap-highlight-color: transparent;
}
::selection { background: rgba(74, 168, 255, .35); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--cyan-2); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* the room: a faint blueprint grid, lit by the core */
.field {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at var(--core-x) var(--core-y), rgb(var(--core) / calc(var(--glow) * .32)), transparent 62%),
    radial-gradient(120vmax 80vmax at 50% 120%, rgba(16, 60, 140, .35), transparent 60%),
    linear-gradient(rgba(64, 156, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(64, 156, 255, .045) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--void);
  transition: background 500ms linear;
}

/* ---------- header ---------- */
.top {
  display: grid; align-items: center; gap: 8px 10px;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "brand status clock btns" "vitals vitals vitals vitals";
  padding: 8px max(14px, env(safe-area-inset-right, 0px)) 6px max(14px, env(safe-area-inset-left, 0px));
  padding-top: max(8px, env(safe-area-inset-top, 0px));
}
.brand { grid-area: brand; display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1; }
.mark { font: 700 19px/1 var(--display); letter-spacing: .28em; color: var(--cyan); text-shadow: 0 0 16px rgba(74, 168, 255, .55); }
.sub { margin-top: 4px; font: 500 11px/1 var(--body); color: var(--ink-3); letter-spacing: .02em; }
.status { grid-area: status; display: flex; gap: 6px; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 2px; font: 600 12px var(--display); letter-spacing: .06em; color: var(--ink-2); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.chip.on { color: var(--cyan-ink); border-color: var(--line-2); }
.chip.on .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.chip.off { color: var(--red); border-color: rgba(255, 107, 107, .45); }
.chip.off .dot { background: var(--red); }
.chip.note { color: var(--ink-2); border-style: dashed; }
.clock { grid-area: clock; font: 600 18px var(--display); color: var(--cyan); letter-spacing: .04em; }
.topbtns { grid-area: btns; display: flex; gap: 2px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 4px; color: var(--ink-2); transition: color var(--t), background var(--t); }
.icon-btn:hover { color: var(--cyan); background: rgba(74, 168, 255, .08); }
.icon-btn[aria-expanded="true"] { color: var(--cyan); }

/* vitals: when she woke, the Jarvis day, the Dubai counter */
.vitals { grid-area: vitals; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.vital {
  position: relative; min-width: 0; padding: 7px 10px 6px;
  border: 1px solid var(--line); border-radius: 3px;
  background: linear-gradient(180deg, rgba(8, 28, 60, .55), rgba(4, 14, 32, .45));
}
.vital::before { content: ""; position: absolute; top: -1px; left: 8px; width: 18px; height: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.vital dt { font: 600 10.5px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.vital dd { margin: 4px 0 0; font: 700 21px/1 var(--display); color: var(--cyan-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vital small { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.25; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vital.gold::before { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.vital.gold dd { color: var(--gold); text-shadow: 0 0 14px rgba(255, 195, 92, .3); }
.vital.wait dd { color: var(--ink-3); }

@media (max-width: 479px) {
  .mark { font-size: 17px; letter-spacing: .22em; }
  .sub, .chip.side, .chip.note { display: none; }
  .chip { position: relative; padding: 8px; }
  .chip span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .clock { font-size: 16px; }
  .icon-btn { width: 40px; }
  .vital { padding: 6px 8px 5px; }
  .vital dd { font-size: 18px; }
}
@media (min-width: 1100px) {
  .top {
    position: sticky; top: 0; z-index: 5; height: var(--header);
    grid-template-columns: auto 1fr auto auto auto; grid-template-areas: "brand vitals status clock btns";
    gap: 18px; padding: 0 20px;
    background: linear-gradient(180deg, rgba(1, 5, 13, .94), rgba(1, 5, 13, .72));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .vitals { justify-self: center; grid-template-columns: repeat(3, minmax(150px, 210px)); }
  .vital { padding: 5px 12px 4px; }
  .vital dd { display: inline; font-size: 20px; }
  .vital small { display: inline; margin-left: 8px; }
}

/* ---------- layout ---------- */
.hud {
  position: relative;
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "core" "view";
  max-width: 1720px; margin: 0 auto;
  padding: 4px max(14px, env(safe-area-inset-right, 0px)) 16px max(14px, env(safe-area-inset-left, 0px));
}
.view { grid-area: view; display: none; flex-direction: column; gap: 14px; min-width: 0; }
body[data-view="today"] .view.today,
body[data-view="money"] .view.money,
body[data-view="feed"] .view.feed,
body[data-view="system"] .view.system { display: flex; }

@media (min-width: 1100px) {
  .hud {
    grid-template-columns: minmax(300px, 1fr) minmax(0, 1.3fr) minmax(300px, 1fr);
    grid-template-areas: "today core feed" "money money money";
    align-items: start; gap: 18px; padding: 18px 20px 24px;
  }
  .view.today, .view.feed, .view.money { display: flex; }
  .view.today { grid-area: today; }
  .view.feed { grid-area: feed; }
  .view.money { grid-area: money; display: grid; grid-template-columns: 1.25fr 1fr 1fr; align-items: stretch; }
  .view.system {
    display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 9;
    width: min(440px, 100%); padding: 16px; overflow: auto;
    background: rgba(3, 10, 24, .97); border-left: 1px solid var(--line);
    box-shadow: -24px 0 60px rgba(0, 0, 0, .55);
    transform: translateX(105%); transition: transform 280ms var(--ease);
  }
  .view.system.open { transform: none; }
}
@media (min-width: 600px) and (max-width: 1099px) { .hud, .top { max-width: 760px; margin-left: auto; margin-right: auto; } }
.scrim { position: fixed; inset: 0; z-index: 8; background: rgba(1, 4, 10, .55); opacity: 0; pointer-events: none; transition: opacity 220ms; }
.scrim.on { opacity: 1; pointer-events: auto; }

/* ---------- regions: one frame language, HUD brackets ---------- */
.region {
  position: relative; min-width: 0;
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(6, 22, 48, .62), rgba(3, 12, 28, .62));
  border: 1px solid var(--line); border-radius: 3px;
  box-shadow: inset 0 0 40px rgba(30, 100, 220, .05);
}
.region::before { content: ""; position: absolute; top: -1px; left: 12px; width: 36px; height: 2px; background: var(--cyan); box-shadow: 0 0 10px rgba(74, 168, 255, .7); }
.region::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-right: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); }
.region h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 12px; font: 600 15px/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-ink); }
.region h2 .meta, .region h2 time, .region h3 .meta { font: 500 12.5px/1.3 var(--body); color: var(--ink-3); letter-spacing: 0; text-transform: none; text-align: right; }
.region h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 18px 0 8px; font: 600 13px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.empty { color: var(--ink-3); padding: 6px 4px; font-size: 14px; line-height: 1.45; list-style: none; }
.fine { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }

/* ---------- today: priorities + non-negotiables ---------- */
.prio, .ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.prio { counter-reset: p; }
.prio li { counter-increment: p; }
.tick {
  display: grid; grid-template-columns: 22px 24px 1fr; gap: 10px; align-items: start;
  width: 100%; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 3px; background: none;
  color: inherit; text-align: left; transition: background var(--t);
}
.ticks .tick { grid-template-columns: 24px 1fr; }
.tick:hover { background: rgba(74, 168, 255, .06); }
.tick:disabled { opacity: .6; cursor: progress; }
.prio .tick::before { content: counter(p); font: 700 15px/24px var(--display); color: var(--cyan); text-align: center; }
.prio li:first-child .tick::before { color: var(--cyan-ink); text-shadow: 0 0 10px rgba(74, 168, 255, .6); }
.prio li:nth-child(-n+3) .tick .txt { font-size: 18px; font-weight: 500; line-height: 1.3; }
.tick .box { width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; border: 1.5px solid var(--line-2); border-radius: 3px; color: var(--void); transition: background var(--t), border-color var(--t); }
.tick .box svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity var(--t), transform var(--t) var(--ease); }
.tick[aria-checked="true"] .box { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(79, 240, 168, .45); }
.tick[aria-checked="true"] .box svg { opacity: 1; transform: none; }
.tick .txt { min-width: 0; padding-top: 2px; overflow-wrap: anywhere; }
.tick[aria-checked="true"] .txt { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(157, 184, 214, .6); }
.tick .proj { display: block; font: 500 12px/1.3 var(--body); color: var(--ink-3); text-decoration: none; }
.addrow { display: flex; gap: 8px; margin-top: 10px; }
.addrow input, .ask input, .gate input[type="password"] {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 16px;
  background: rgba(1, 6, 16, .75); border: 1px solid var(--line); border-radius: 3px; color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
}
.addrow input::placeholder, .ask input::placeholder, .gate input::placeholder { color: var(--ink-3); }
.addrow input:focus, .ask input:focus, .gate input:focus { outline: none; border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(74, 168, 255, .14); }
.addrow button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); border-radius: 3px; color: var(--cyan); transition: background var(--t); }
.addrow button:hover { background: rgba(74, 168, 255, .1); }

/* ---------- agenda + reminders ---------- */
.agenda, .reminders, .leads, .notes, .events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.agenda li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 8px 4px; border-top: 1px solid rgba(74, 168, 255, .08); }
.agenda li:first-child, .reminders li:first-child, .leads li:first-child, .notes li:first-child, .events li:first-child { border-top: 0; }
.agenda li.sep { display: block; padding: 10px 4px 2px; font: 600 12px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.agenda .when { font: 600 15px/1.3 var(--display); color: var(--cyan-ink); font-variant-numeric: tabular-nums; }
.agenda .when small { display: block; font: 500 11px/1.3 var(--body); color: var(--ink-3); }
.agenda li.now .when { color: #fff; text-shadow: 0 0 10px rgba(74, 168, 255, .7); }
.agenda .what { min-width: 0; overflow-wrap: anywhere; }
.agenda .what small { display: block; color: var(--ink-3); font-size: 12.5px; }
.reminders li { display: flex; gap: 10px; align-items: center; padding: 7px 4px; border-top: 1px solid rgba(74, 168, 255, .08); }
.reminders .rdot, .leads .ldot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--cyan-2); }
.reminders li.synced .rdot { background: var(--green); }
.reminders .rtxt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reminders .rdue { font: 600 13px var(--display); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.reminders .tag { display: inline-flex; gap: 4px; align-items: center; padding: 1px 6px; border: 1px solid var(--line); border-radius: 2px; font: 600 11px var(--display); letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; }
.reminders .tag svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* ---------- money ---------- */
.counter { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.counter b { font: 700 44px/1 var(--display); letter-spacing: -.01em; color: var(--gold); text-shadow: 0 0 22px rgba(255, 195, 92, .35); font-variant-numeric: tabular-nums; }
.counter.small b { font-size: 34px; color: var(--cyan-ink); text-shadow: 0 0 18px rgba(74, 168, 255, .35); }
.counter .goal { font: 500 14px var(--body); color: var(--ink-2); }
.track { position: relative; height: 10px; margin: 8px 0 22px; background: rgba(255, 195, 92, .12); border-radius: 2px; }
.track i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-ink)); border-radius: 2px; box-shadow: 0 0 14px rgba(255, 195, 92, .5); transition: width 800ms var(--ease); }
.track em { display: none; position: absolute; top: -4px; bottom: -4px; left: 0; width: 2px; background: var(--ink); transition: left 800ms var(--ease); }
.track em::after { content: "pace"; position: absolute; top: 16px; left: 50%; transform: translateX(-50%); font: 600 10px var(--display); letter-spacing: .08em; color: var(--ink-2); }
.track.has-pace em { display: block; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts dt { font: 500 12px var(--body); color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font: 600 19px/1.2 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.facts dd.alert { color: var(--red); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar { display: grid; grid-template-columns: 88px 1fr 60px; gap: 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.bar .t { position: relative; height: 6px; overflow: hidden; background: rgba(74, 168, 255, .12); border-radius: 2px; }
.bar .t i { position: absolute; inset: 0 auto 0 0; background: var(--cyan); box-shadow: 0 0 8px rgba(74, 168, 255, .7); transition: width 600ms var(--ease); }
.bar.hit .t i { background: var(--green); box-shadow: 0 0 8px rgba(79, 240, 168, .6); }
.bar .v { text-align: right; font: 600 14px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.bar.hit .v { color: var(--green); }
.leads li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 8px 4px; border-top: 1px solid rgba(74, 168, 255, .08); }
.leads .ldot { margin-top: 7px; }
.leads li.late .ldot { background: var(--red); box-shadow: 0 0 8px rgba(255, 107, 107, .6); }
.leads b { font-weight: 500; overflow-wrap: anywhere; }
.leads small { display: block; color: var(--ink-3); font-size: 12.5px; }
.leads .ltag { font: 600 12px var(--display); letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; }
.leads li.late .ltag { color: var(--red); }

/* ---------- the core: tap it to talk ---------- */
.core-wrap { grid-area: core; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.core-stage {
  position: relative; width: min(78vw, 300px); aspect-ratio: 1; padding: 0;
  border: 0; border-radius: 50%; background: none; color: inherit;
}
.core-stage:focus-visible { outline-offset: -8%; }
#core { position: absolute; inset: -12%; width: 124%; height: 124%; display: block; pointer-events: none; }
.core-foot { display: flex; align-items: center; gap: 4px; width: min(100%, 560px); }
.caption { flex: 1; min-width: 0; margin: 0; padding: 6px 8px; background: none; border: 0; border-radius: 4px; text-align: center; color: inherit; }
.caption .state { display: block; font: 600 13px/1.4 var(--display); letter-spacing: .2em; text-transform: uppercase; color: rgb(var(--core)); transition: color 300ms; }
.caption .line { margin-top: 2px; font-size: 14.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kbd { flex: none; }
.core-foot::before { content: ""; width: 44px; flex: none; } /* balances the keyboard button so the caption stays centred */
.ask { display: flex; gap: 8px; width: min(100%, 560px); margin-top: 4px; }
.ask button { width: 48px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 3px; background: var(--cyan); color: var(--void); transition: filter var(--t); }
.ask button:hover { filter: brightness(1.1); }
.ask button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1100px) {
  .core-wrap { position: sticky; top: calc(var(--header) + 12px); }
  .core-stage { width: min(88%, 500px); }
  .caption .line { -webkit-line-clamp: 2; }
  .caption { cursor: default; }
}

/* ---------- feed: conversation, briefings, events ---------- */
.convo { display: flex; flex-direction: column; min-height: 0; }
.log { display: flex; flex-direction: column; gap: 10px; max-height: 50dvh; overflow-y: auto; padding: 2px 6px 2px 2px; scroll-behavior: smooth; }
@media (min-width: 1100px) { .log { max-height: min(40vh, 400px); } }
.msg { max-width: 92%; padding: 9px 12px; border-radius: 4px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.j { align-self: flex-start; background: rgba(74, 168, 255, .08); border: 1px solid rgba(74, 168, 255, .16); }
.msg.me { align-self: flex-end; background: rgba(228, 241, 255, .07); border: 1px solid rgba(228, 241, 255, .16); }
.msg.sys { align-self: center; padding: 2px 8px; background: none; border: 0; color: var(--ink-3); font-size: 13px; }
.msg.pending { color: var(--ink-3); }
.msg .act { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 12px; min-height: 36px; border: 1px solid var(--line-2); border-radius: 3px; background: none; color: var(--cyan); text-decoration: none; font: 600 13px var(--display); letter-spacing: .04em; }
.msg .act svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.quick button { min-height: 44px; padding: 8px 12px; background: none; border: 1px solid var(--line); border-radius: 3px; font-size: 13.5px; color: var(--ink-2); transition: color var(--t), border-color var(--t); }
.quick button:hover { color: var(--cyan); border-color: var(--line-2); }
@media (min-width: 1100px) { .quick button { min-height: 34px; padding: 5px 11px; font-size: 13px; } }
.notes li { border-top: 1px solid rgba(74, 168, 255, .08); }
.note { display: block; width: 100%; padding: 9px 4px; background: none; border: 0; text-align: left; color: inherit; }
.note .nh { display: flex; gap: 10px; align-items: baseline; font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.note .nh time { color: var(--ink-3); letter-spacing: .04em; }
.note .nt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.note[aria-expanded="true"] .nt { display: block; color: var(--ink); }
.events li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 6px 4px; border-top: 1px dashed rgba(74, 168, 255, .1); font-size: 13.5px; }
.events time { font: 600 13px var(--display); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.events .who { font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); margin-right: 6px; }
.events .who.fail { color: var(--red); }
.events .what { min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- system ---------- */
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { margin: 0; font: 600 18px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-ink); }
@media (max-width: 1099px) { .drawer-head { display: none; } }
.agents, .jobs, .mem { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.agents li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-2); }
.led.live { background: var(--cyan-ink); box-shadow: 0 0 8px var(--cyan); animation: pulse 1.2s infinite; }
.led.recent { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.agents b { font: 600 15px var(--display); letter-spacing: .03em; }
.agents small { display: block; color: var(--ink-3); font-size: 12.5px; }
.agents time { font: 500 12px var(--body); color: var(--ink-3); white-space: nowrap; }
.jobs li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.jobs b { font: 600 14px var(--display); letter-spacing: .03em; color: var(--ink-2); }
.memkinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.memkinds span { padding: 2px 8px; border: 1px solid var(--line); border-radius: 2px; font: 600 12px var(--display); letter-spacing: .03em; color: var(--cyan-ink); }
.mem li { font-size: 13.5px; }
.mem li small { display: block; color: var(--ink-3); font-size: 12px; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- tabs (phone) ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabs) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(1, 5, 13, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabs button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; background: none; border: 0; color: var(--ink-3); font: 600 11.5px var(--display); letter-spacing: .1em; text-transform: uppercase; transition: color var(--t); }
.tabs button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-selected="true"] { color: var(--cyan); }
.tabs button[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
@media (min-width: 1100px) { .tabs { display: none; } }

/* ---------- settings sheet ---------- */
.sheet { width: min(440px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--field); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.sheet::backdrop { background: rgba(1, 4, 10, .6); backdrop-filter: blur(4px); }
.sheet form { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 20px; }
.sheet h2 { margin: 0; font: 600 18px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan-ink); }
.opt { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; cursor: pointer; }
.opt b { display: block; font-weight: 500; }
.opt small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.switch { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 26px; margin: 0; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(74, 168, 255, .15); cursor: pointer; transition: background var(--t); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-2); transition: transform var(--t) var(--ease), background var(--t); }
.switch:checked { background: rgba(74, 168, 255, .45); }
.switch:checked::after { transform: translateX(20px); background: #fff; }
.switch:disabled { opacity: .4; cursor: not-allowed; }
.sheet .row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.btn { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: transparent; color: var(--cyan); font: 600 13px var(--display); letter-spacing: .1em; text-transform: uppercase; transition: background var(--t), filter var(--t); }
.btn:hover { background: rgba(74, 168, 255, .1); }
.btn.primary { background: var(--cyan); color: var(--void); border-color: var(--cyan); }
.btn.primary:hover { filter: brightness(1.1); background: var(--cyan); }
.btn.danger { color: var(--red); border-color: rgba(255, 107, 107, .45); }
.btn.danger:hover { background: rgba(255, 107, 107, .1); }

/* ---------- gate ---------- */
.gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(1, 5, 13, .97); }
.gate-box { width: min(100%, 360px); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.gate-core { width: 96px; height: 96px; margin: 0 auto 6px; border-radius: 50%; border: 1.5px solid var(--cyan); box-shadow: 0 0 30px rgba(74, 168, 255, .6), inset 0 0 30px rgba(74, 168, 255, .35); animation: breathe 3s ease-in-out infinite; }
.gate h1 { margin: 0; font: 700 28px var(--display); letter-spacing: .3em; color: var(--cyan); }
.gate p { margin: 0; color: var(--ink-2); }
.gate input[type="password"] { text-align: center; letter-spacing: .2em; }
.remember { display: flex; gap: 10px; align-items: center; justify-content: center; min-height: 44px; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.remember input { width: 20px; height: 20px; accent-color: var(--cyan); margin: 0; }
.gate-err { color: var(--red); min-height: 1.3em; font-size: 13px; }
@keyframes breathe { 50% { transform: scale(.96); opacity: .8; } }

/* ---------- the one boot moment ---------- */
.boot .core-wrap, .boot .region, .boot .vital { animation: rise 560ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.boot .region:nth-child(1) { --i: 1; } .boot .region:nth-child(2) { --i: 2; } .boot .region:nth-child(3) { --i: 3; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
