/* =====================================================================
   JARVIS — design system
   Calm, dark, low-noise. One accent. Generous spacing. Motion is optional.
   ===================================================================== */
:root {
  --bg: #0b0d10;
  --bg-2: #0f1216;
  --surface: #13171c;
  --surface-2: #181d23;
  --line: #222932;
  --line-2: #2c3540;
  --text: #e8ecef;
  --text-2: #a9b3bd;
  --text-3: #6f7b87;
  --accent: #8fd3c7;
  --accent-ink: #062520;
  --accent-soft: rgba(143, 211, 199, 0.12);
  --warn: #f0b36a;
  --danger: #ef8a80;
  --ok: #8fd3a0;

  --p-urgent: #ef8a80;
  --p-high: #f0b36a;
  --p-medium: #8fd3c7;
  --p-low: #5d6873;

  --font: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r: 14px;
  --r-sm: 9px;
  --sidebar: 248px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 180ms;
  color-scheme: dark;
}

.reduce-motion { --t: 0ms; }
@media (prefers-reduced-motion: reduce) { :root { --t: 0ms; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
small, .small { font-size: 12.5px; }
.muted { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.view:focus { outline: none; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0 3px, transparent 4px),
              conic-gradient(from 210deg, transparent 0 25%, var(--accent) 25% 26%, transparent 26% 60%, rgba(143,211,199,.5) 60% 61%, transparent 61%);
  box-shadow: inset 0 0 0 1px rgba(143, 211, 199, 0.45), 0 0 18px rgba(143, 211, 199, 0.18);
}
.brand-name { font-family: var(--mono); font-size: 13px; letter-spacing: 0.32em; color: var(--text); }
.brand-lg .brand-mark { width: 30px; height: 30px; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot-mark { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); border-top-color: var(--accent); animation: spin 1.1s linear infinite; }
.boot-text { color: var(--text-3); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }
.boot-error { max-width: 460px; padding: 24px; text-align: center; display: grid; gap: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.reduce-motion .boot-mark, .reduce-motion .spinner { animation-duration: 3s; }

/* ---------- auth ---------- */
.auth { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 28px; padding: 32px 18px;
  background: radial-gradient(900px 500px at 50% -10%, rgba(143, 211, 199, 0.07), transparent 70%); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; display: grid; gap: 14px; }
.auth-card h1 { font-family: var(--serif); font-size: 32px; font-weight: 400; margin-top: 14px; }
.auth-sub { color: var(--text-2); margin-bottom: 6px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-top: 4px; }
.auth-tagline { font-family: var(--serif); font-style: italic; color: var(--text-3); font-size: 17px; text-align: center; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span, legend, .field-static > span { font-size: 13px; color: var(--text-2); }
.field small { color: var(--text-3); }
.field-static { display: grid; gap: 4px; color: var(--text); }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; width: 100%;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
textarea { resize: vertical; min-height: 44px; }
input:hover, select:hover, textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
::placeholder { color: var(--text-3); }
.form-error { color: var(--danger); font-size: 13.5px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---------- buttons ---------- */
.btn {
  font: 500 14px/1 var(--font); border-radius: 999px; padding: 11px 18px; border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #a6ddd3; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #2a0a07; }
.btn-sm { padding: 8px 14px; min-height: 34px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; color: var(--text-2); padding: 8px; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-3); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--danger); }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block; }
.spinner-sm { width: 14px; height: 14px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px;
  padding: 22px 14px; border-right: 1px solid var(--line); background: var(--bg-2);
}
.sidebar .brand { padding: 4px 10px; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-size: 14px; text-decoration: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active .ico { color: var(--accent); }
.nav .soon { margin-left: auto; font: normal 10px var(--mono); color: var(--text-3); letter-spacing: 0.06em; }
.sidebar-foot { margin-top: auto; padding: 0 10px; }
.presence { display: inline-flex; align-items: center; gap: 8px; font: 11px var(--mono); color: var(--text-3); letter-spacing: 0.04em; }
.presence i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(143, 211, 160, 0.6); }
.presence.offline i { background: var(--warn); box-shadow: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 16px clamp(18px, 4vw, 44px); background: rgba(11, 13, 16, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: 15px; color: var(--text-2); font-weight: 500; }
.topbar-right { margin-left: auto; }
.menu-btn { display: none; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--accent); }
.view { padding: clamp(20px, 4vw, 44px); max-width: 1240px; width: 100%; }

/* ---------- cards & grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; align-content: start; }
.card-quiet { background: transparent; border-style: dashed; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h3 { font-size: 14px; color: var(--text); font-weight: 600; letter-spacing: 0; }
.card-head.sub { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.tag { font: 10.5px var(--mono); color: var(--text-3); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 999px; }
.eyebrow { font: 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }

/* ---------- today ---------- */
.today { display: grid; gap: 24px; }
.hero { display: grid; gap: 8px; padding: 6px 0 4px; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.hero-title em { color: var(--accent); }
.hero-sub { color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); gap: 1px; }
.stat { background: var(--surface); padding: 16px 18px; display: grid; gap: 2px; position: relative; }
.stat-n { font-family: var(--mono); font-size: 26px; color: var(--text); }
.stat-n small { font-size: 14px; color: var(--text-3); margin-left: 2px; }
.stat-l { font-size: 12.5px; color: var(--text-3); }
.stat-warn .stat-n { color: var(--warn); }
.bar { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p); background: var(--accent); transition: width 600ms var(--ease); }

.list { list-style: none; margin: 0; padding: 0; display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.list .row:first-child { border-top: 0; padding-top: 0; }
.row-stack { flex-direction: column; align-items: flex-start; gap: 3px; }
.row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-meta { color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.row-stack .row-meta { white-space: normal; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-tight .row { padding: 8px 0; }
.warn { color: var(--warn); font-weight: 500; }
.pri { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pri-urgent { background: var(--p-urgent); } .pri-high { background: var(--p-high); }
.pri-medium { background: var(--p-medium); } .pri-low { background: var(--p-low); }
.dot { width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }

.dump { display: grid; gap: 10px; }
.dump-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dump-list:empty { display: none; }

/* ---------- states ---------- */
.state { display: grid; gap: 6px; padding: 14px 0; color: var(--text-3); }
.state-title { color: var(--text-2); }
.state-hint { font-size: 13px; }
.state-loading { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
.state-error .state-title { color: var(--danger); }
.state-error .btn { justify-self: start; margin-top: 6px; }
.skeleton { display: grid; gap: 10px; padding: 6px 0; }
.skeleton span { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton span:nth-child(2n) { width: 70%; }
.stats .skeleton { grid-column: 1 / -1; padding: 22px; background: var(--surface); }
@keyframes shimmer { to { background-position: -200% 0; } }
.reduce-motion .skeleton span { animation: none; }

/* ---------- coming soon ---------- */
.coming { max-width: 620px; display: grid; gap: 14px; padding: 12px 0; }
.coming h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; }
.coming .lead { color: var(--text-2); font-size: 16.5px; }
.meta { display: grid; gap: 0; margin: 8px 0; border-top: 1px solid var(--line); }
.meta div { display: grid; grid-template-columns: 120px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta dt { color: var(--text-3); font-size: 13px; } .meta dd { margin: 0; }

/* ---------- settings ---------- */
.settings { display: grid; gap: 16px; max-width: 760px; }
.segmented { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented legend { margin-bottom: 8px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; height: 100%; transition: border-color var(--t), background var(--t); }
.seg small { color: var(--text-3); }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggles { display: grid; border-top: 1px solid var(--line); }
.toggle { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.toggle > span { flex: 1; display: grid; gap: 2px; }
.toggle small { color: var(--text-3); }
.toggle input { position: absolute; opacity: 0; right: 0; width: 40px; height: 24px; margin: 0; }
.toggle i { width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background var(--t); }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform var(--t) var(--ease); }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(16px); background: var(--accent-ink); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- toasts & dialog ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; transform: translateY(6px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast-error { border-left-color: var(--danger); } .toast-warn { border-left-color: var(--warn); } .toast-success { border-left-color: var(--ok); }
.dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 16px; padding: 0; width: min(420px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.dialog-body { padding: 24px; display: grid; gap: 12px; }
.dialog-body h2 { font-size: 18px; }
.dialog-body p { color: var(--text-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- low cognitive load ---------- */
.low-load .card-quiet, .low-load .hero-sub { display: none; }
.low-load .grid { grid-template-columns: 1fr; }
.low-load .span-2 { grid-column: auto; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(280px, 84vw); z-index: 30; transform: translateX(-100%); transition: transform var(--t) var(--ease); }
  .menu-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 20; }
  .menu-btn { display: inline-flex; margin-left: -8px; }
  .user-name { display: none; }
  .grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:last-child { grid-column: span 2; }
  .segmented { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- shared bits ---------- */
.row-link { color: var(--text); text-decoration: none; }
.row-link:hover { color: var(--accent); text-decoration: none; }
.chip { font-size: 11.5px; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.chip-accent { color: var(--accent); border-color: rgba(143, 211, 199, 0.4); }
.chip-warn { color: var(--warn); border-color: rgba(240, 179, 106, 0.4); }
.danger-text { color: var(--danger); }
.form-actions.start { justify-content: flex-start; align-items: center; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-actions.spread { justify-content: space-between; align-items: center; }
.dialog-actions.spread > div { display: flex; gap: 10px; }
.dialog:has(.task-editor) { width: min(640px, calc(100vw - 24px)); }
.more-note { padding-top: 10px; }

/* ---------- tasks ---------- */
.tasks { display: grid; gap: 16px; max-width: 900px; }
.quick-add { gap: 10px; }
.quick-add #qa-title { font-size: 16px; padding: 12px 14px; }
.qa-row { display: flex; gap: 8px; flex-wrap: wrap; }
.qa-row select, .qa-row input { width: auto; flex: 1 1 140px; padding: 8px 10px; font-size: 13.5px; }
.qa-row .btn { flex: 0 0 auto; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 8px; align-items: center; }
.toolbar-right select { width: auto; padding: 7px 10px; font-size: 13px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { background: none; border: 1px solid transparent; color: var(--text-2); font: 500 13.5px var(--font); padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.tab:hover { color: var(--text); background: var(--surface); }
.tab[aria-selected="true"] { color: var(--text); background: var(--accent-soft); border-color: rgba(143, 211, 199, 0.3); }
.tab .count { color: var(--text-3); font-family: var(--mono); font-size: 11.5px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; padding-top: 2px; }
.check { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--line-2); background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.check:hover { border-color: var(--accent); }
.check i { width: 10px; height: 6px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.is-done .check { background: var(--accent); border-color: var(--accent); }
.is-done .check i { opacity: 1; }
.task-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; display: grid; gap: 4px; }
.task-title { overflow-wrap: anywhere; }
.task-main:hover .task-title { color: var(--accent); }
.is-done .task-title { color: var(--text-3); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.task-meta:empty { display: none; }
.next { border-color: rgba(143, 211, 199, 0.35); background: linear-gradient(180deg, rgba(143, 211, 199, 0.06), transparent); }
.next-title { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; }
.steps { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.steps legend { padding: 0 6px; }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.subs li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.subs label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.subs input { width: 18px; height: 18px; accent-color: var(--accent); }
.subs .is-done span { color: var(--text-3); text-decoration: line-through; }
.sub-add { display: flex; gap: 8px; }
@media (max-width: 820px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { justify-content: space-between; }
  .dialog-body .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
}

/* ---------- projects ---------- */
.projects { display: grid; gap: 16px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.project-grid > .state, .project-grid > .skeleton { grid-column: 1 / -1; }
.project-card { color: var(--text); text-decoration: none; border-top: 3px solid var(--c); transition: border-color var(--t), transform var(--t) var(--ease); }
.project-card:hover { text-decoration: none; border-color: var(--line-2); border-top-color: var(--c); transform: translateY(-1px); }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-head h3 { font-size: 16px; font-weight: 600; }
.pc-desc { color: var(--text-2); font-size: 13.5px; }
.pc-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.pc-next { color: var(--text-2); }
.project-card .dot, .pd-title .dot { background: var(--c); }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: inherit; transition: width 500ms var(--ease); }
.progress-lg { height: 10px; }
.project-detail { display: grid; gap: 18px; max-width: 1040px; }
.back { color: var(--text-3); }
.pd-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.pd-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 42px); line-height: 1.1; display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.pd-title .dot { width: 12px; height: 12px; border-radius: 4px; }
.pd-desc { color: var(--text-2); margin-top: 8px; max-width: 70ch; white-space: pre-wrap; }
.pd-summary { gap: 10px; }
.pd-summary-row { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.mono { font-family: var(--mono); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ms-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ms-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.ms-list li:first-child { border-top: 0; padding-top: 0; }
.ms-list label { flex: 1; display: flex; gap: 10px; align-items: center; cursor: pointer; min-width: 0; }
.ms-list input { width: 18px; height: 18px; accent-color: var(--c, var(--accent)); flex: none; }
.ms-list .is-done span { color: var(--text-3); text-decoration: line-through; }
.inline-add { display: flex; gap: 8px; padding-top: 4px; }
.inline-add input[name=title] { flex: 1; }
.inline-add input[type=date] { width: auto; }
.row .check { margin-top: 0; }
.row.is-done .row-main { color: var(--text-3); text-decoration: line-through; }
.done-tasks summary { cursor: pointer; padding: 4px 0; }
.danger-zone { padding-top: 8px; border-top: 1px solid var(--line); }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.swatches legend { margin-bottom: 8px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch i { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 2px var(--surface); }
.swatch input:checked + i { border-color: var(--text); }
.swatch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .pd-head { flex-direction: column; }
  .inline-add { flex-wrap: wrap; }
}

/* ---------- mind map ---------- */
.mindmap { max-width: 100%; min-width: 0; overflow: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 12px; }
.mindmap svg { display: block; max-width: none; }
.mm-links path { fill: none; stroke: var(--c); stroke-width: 1.6; opacity: 0.55; }
.mm-node { cursor: pointer; outline: none; }
.mm-node rect { fill: var(--surface-2); stroke: var(--c, var(--line-2)); stroke-width: 1.2; }
.mm-node.depth-0 rect { fill: var(--accent); stroke: none; }
.mm-node.depth-0 text { fill: var(--accent-ink); font: 600 17px var(--font); }
.mm-node.depth-1 rect { fill: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.mm-node text { fill: var(--text); font: 15px var(--font); }
.mm-node:focus-visible rect { stroke: var(--text); stroke-width: 2; }
.mm-node:hover rect { filter: brightness(1.15); }
.mm-more { fill: var(--text-3) !important; font: 12px var(--mono) !important; }
/* Any element that hosts a mind map must be allowed to shrink so the map scrolls inside it. */
:has(> .mindmap) { min-width: 0; max-width: 100%; }

/* =====================================================================
   Simple shell (v2): no sidebar. Brand · title · Everything.
   ===================================================================== */
.shell { display: block; min-height: 100%; }
.topbar { gap: 16px; padding: 14px clamp(16px, 4vw, 40px); }
.topbar .brand { text-decoration: none; }
.page-title:empty { display: none; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.view { margin: 0 auto; }
body[data-route="home"] .topbar { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }

.menu { position: fixed; inset: 0; z-index: 40; background: rgba(6, 8, 10, 0.82); backdrop-filter: blur(8px); display: grid; align-items: start; justify-items: center; padding: clamp(12px, 6vh, 64px) 16px; overflow-y: auto; }
.menu-inner { width: min(760px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; padding: 18px; display: grid; gap: 16px; }
.menu-head { display: flex; justify-content: space-between; align-items: center; }
.menu-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-grid a { display: grid; gap: 10px; justify-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; background: var(--bg-2); position: relative; min-height: 96px; }
.menu-grid a:hover { border-color: var(--line-2); background: var(--surface-2); text-decoration: none; }
.menu-grid a.active { border-color: rgba(143, 211, 199, 0.45); }
.menu-grid .ico { color: var(--accent); }
.menu-grid .soon { position: absolute; top: 12px; right: 12px; font: normal 10px var(--mono); color: var(--text-3); }
@media (max-width: 640px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- home ---------- */
.home { max-width: 760px; margin: 0 auto; padding: 4vh 0 48px; display: grid; gap: 22px; }
.home > * { min-width: 0; }
.home-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 6vw, 54px); line-height: 1.05; text-align: center; }
.ask { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 10px 10px 10px 18px; }
.ask:focus-within { border-color: var(--accent); }
.ask input { border: 0; background: none; font-size: 18px; padding: 8px 0; }
.ask input:focus { background: none; }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 10px; color: var(--text); font: 500 14.5px var(--font); display: grid; gap: 10px; justify-items: center; cursor: pointer; transition: border-color var(--t), background var(--t); }
.tool:hover { border-color: var(--line-2); background: var(--surface-2); }
.tool[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tool .ico { color: var(--accent); }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 12px; }
.answer > * { min-width: 0; }
.a-q { color: var(--text-3); font-size: 13.5px; }
.tool-form { display: grid; gap: 14px; }
.bd-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.bd-steps:empty { display: none; }
.one-thing { display: grid; gap: 10px; }
.one-title { font-family: var(--serif); font-size: clamp(28px, 5vw, 38px); line-height: 1.15; }
.focus-tool { display: grid; gap: 14px; justify-items: center; text-align: center; }
.field-inline { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.field-inline input { width: 90px; }
.timer { font-family: var(--mono); font-size: clamp(56px, 14vw, 96px); letter-spacing: -0.02em; line-height: 1; }
.focus-tool .form-actions { justify-content: center; }
@media (max-width: 640px) { .tools { grid-template-columns: repeat(2, 1fr); } .home { padding-top: 2vh; } }

/* ---------- view toggle (map / list) ---------- */
.view-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.view-toggle button { background: none; border: 0; color: var(--text-2); font: 500 13px var(--font); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); }
.mm-link rect { stroke-dasharray: none; }
.mm-link:hover text { fill: var(--accent); }
.pd-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- voice ---------- */
.mic { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 999px; padding: 9px 14px; font: 500 14px var(--font); cursor: pointer; min-height: 40px; }
.mic svg { color: var(--accent); flex: none; }
.mic:hover { border-color: var(--accent); }
.mic.listening { background: rgba(239, 138, 128, 0.14); border-color: var(--danger); }
.mic.listening svg { color: var(--danger); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.reduce-motion .mic.listening svg { animation: none; }
.ask .mic { padding: 9px; border-radius: 12px; }
.ask .mic .mic-label { display: none; }
.ask .mic.listening .mic-label { display: inline; font-size: 13px; }
.dump-actions { display: inline-flex; gap: 8px; align-items: center; }
.dump-actions .mic { padding: 7px 12px; min-height: 34px; font-size: 13px; }
#dump .form-actions .mic { order: -1; }

/* ---------- my brain ---------- */
.brain { display: grid; gap: 16px; max-width: 900px; }
.brain > * { min-width: 0; }
.capture { gap: 10px; }
.capture textarea { font-size: 15.5px; }
.capture-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.capture-row select { width: auto; padding: 8px 10px; font-size: 13.5px; }
.capture-row .btn { margin-left: auto; }
.search input { padding: 10px 14px; border-radius: 999px; }
.text-btn { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.text-btn:hover { color: var(--accent); }
.pin { color: var(--warn); }
.dump-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.dump-item { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.dump-item:first-child { border-top: 0; padding-top: 2px; }
.dump-text { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.dump-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.dump-acts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.dump-acts .link-btn { color: var(--text-2); }
.dump-acts .link-btn:hover { color: var(--accent); }
.dump-acts [data-del-dump]:hover { color: var(--danger); }
.check-field { display: flex; align-items: center; gap: 10px; align-self: end; padding-bottom: 10px; }
.check-field input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- focus room ---------- */
.focus-room { max-width: 620px; margin: 0 auto; display: grid; gap: 22px; justify-items: center; text-align: center; padding-top: 2vh; }
.focus-room > * { min-width: 0; max-width: 100%; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--text-2); font: 500 14px var(--font); padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button:disabled { cursor: not-allowed; opacity: 0.55; }
.seg button[aria-checked="true"]:disabled { opacity: 0.85; }
.fr-setup { display: grid; gap: 12px; justify-items: center; }
.fr-setup select { max-width: min(420px, 80vw); }
.fr-phase { color: var(--text-2); min-height: 1.5em; }
.fr-timer { font-size: clamp(76px, 22vw, 150px); color: var(--text); transition: color var(--t); }
.focus-room[data-phase="break"] .fr-timer { color: var(--ok); }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 16px; }
.fr-controls { justify-content: center; }
.fr-buddy { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); }
.breath { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(143, 211, 199, 0.5); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.8); box-shadow: 0 0 0 0 rgba(143, 211, 199, 0.35); } 50% { transform: scale(1.15); box-shadow: 0 0 0 14px rgba(143, 211, 199, 0); } }
.reduce-motion .breath { animation: none; }
.fr-checkin { justify-items: center; border-color: rgba(143, 211, 199, 0.4); }
.fr-checkin .form-actions { justify-content: center; }
.fr-history { width: 100%; display: grid; gap: 14px; text-align: left; padding-top: 18px; border-top: 1px solid var(--line); }
.fr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fr-stats > div { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fr-stats .stat-n { font-size: 22px; }
.fr-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-3); flex: none; }
.fr-dot.ok { background: var(--ok); border-color: var(--ok); }
@media (max-width: 560px) { .page-title { display: none; } }

/* ---------- life admin ---------- */
.life { display: grid; gap: 16px; max-width: 900px; }
.life > * { min-width: 0; }
#life-body > div { display: grid; gap: 16px; }
.reminders, .routines, .decide, .feelings { display: grid; gap: 16px; }
.reminders > *, .routines > *, .decide > *, .feelings > * { min-width: 0; }
.ra-top { display: flex; gap: 8px; }
.ra-top input { font-size: 16px; padding: 12px 14px; }
.r-group { font-size: 12px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 4px; font-weight: 500; }
.r-group:first-child { margin-top: 0; }
.r-group.warn { color: var(--warn); }
.r-ul { list-style: none; margin: 0; padding: 0; }
.r-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.r-ul .r-row:first-child { border-top: 0; }
.r-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.r-title { overflow-wrap: anywhere; }
.r-row.is-due .r-title { color: var(--warn); }
.r-acts { display: flex; gap: 12px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
.r-acts .link-btn { color: var(--text-2); text-decoration: none; }
.r-acts .link-btn:hover { color: var(--accent); }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.rt-card.is-off { opacity: 0.6; }
.rt-run { display: grid; gap: 16px; justify-items: start; padding: 10px 0; }
.rt-run .progress { width: 100%; }
.dc-one { display: grid; gap: 16px; }
.dc-options { display: grid; gap: 14px; }
.dc-opt .card-head span { display: inline-flex; gap: 10px; align-items: center; }
.dc-part { display: grid; gap: 6px; }
.dc-part-l { font-size: 12px; font-family: var(--mono); color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }
.dc-part ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.dc-part ul:empty { display: none; }
.dc-decided { border-color: rgba(143, 211, 160, 0.45); }
.feelings .tools { grid-template-columns: repeat(4, 1fr); }
.slider { display: grid; gap: 6px; }
.slider input { padding: 0; accent-color: var(--accent); height: 28px; }
.slider-ends { display: flex; justify-content: space-between; color: var(--text-3); align-items: center; }
.slider output { font-family: var(--mono); color: var(--text); font-size: 18px; }
.ground-n { font-family: var(--mono); color: var(--accent); }
.rf-prompt { font-size: clamp(22px, 4vw, 30px); }
.fl-svg, .in-svg { width: 100%; height: auto; display: block; }
.fl-grid { stroke: var(--line); stroke-width: 1; }
.fl-axis { fill: var(--text-3); font: 11px var(--mono); }
.in-val { fill: var(--text-2); font: 11px var(--mono); }
.fl-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); align-items: center; }
.fl-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.fl-help summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.fl-help ul { margin: 12px 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); }
@media (max-width: 640px) { .feelings .tools { grid-template-columns: repeat(2, 1fr); } .r-row { flex-wrap: wrap; } .r-acts { width: 100%; justify-content: flex-start; padding-left: 34px; } }

/* ---------- vault ---------- */
.vault, .insights { display: grid; gap: 16px; max-width: 1000px; }
.vault > *, .insights > * { min-width: 0; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-row { align-items: center; }
.doc-ico { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font: 10px var(--mono); color: var(--accent); }
.note-editor textarea { font-size: 15px; line-height: 1.6; }
.dialog:has(.note-editor) { width: min(720px, calc(100vw - 24px)); }
.link-btn.back { justify-self: start; text-decoration: none; color: var(--text-3); font-size: 13px; }
.link-btn.back:hover { color: var(--accent); }

/* =====================================================================
   JARVIS v2 — "neon glass" theme (blue → violet).
   Calm is the default; Vivid adds glow and depth. Reduce motion stops animation.
   ===================================================================== */
:root {
  --bg: #070913;
  --bg-2: #0b0e1d;
  --surface: rgba(18, 22, 44, 0.78);
  --surface-2: rgba(28, 33, 64, 0.85);
  --line: rgba(130, 145, 255, 0.13);
  --line-2: rgba(150, 160, 255, 0.24);
  --text: #e7eaf7;
  --text-2: #aeb5d4;
  --text-3: #8189ad;
  --accent: #7c9bff;
  --accent-2: #a77bff;
  --accent-ink: #0a0b1d;
  --accent-soft: rgba(124, 155, 255, 0.14);
  --grad: linear-gradient(135deg, #5b8cff 0%, #8f74ff 55%, #b072ff 100%);
  --glow: 0 0 0 1px rgba(124, 155, 255, 0.10), 0 8px 30px rgba(20, 20, 60, 0.35);
  --glow-strong: 0 0 24px rgba(124, 155, 255, 0.35), 0 0 60px rgba(167, 123, 255, 0.18);
  --ok: #7fe0b0;
  --warn: #ffc46b;
  --danger: #ff8a9a;
  --p-medium: #7c9bff;
  --dock-h: 76px;
}
body {
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(91, 140, 255, 0.10), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(167, 123, 255, 0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.vivid body {
  background:
    radial-gradient(900px 600px at 50% 0%, rgba(91, 140, 255, 0.22), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(167, 123, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at 100% 60%, rgba(64, 200, 255, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.vivid body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff8, transparent 60%), radial-gradient(1px 1px at 72% 18%, #fff6, transparent 60%),
    radial-gradient(1px 1px at 38% 74%, #fff5, transparent 60%), radial-gradient(1px 1px at 86% 66%, #fff7, transparent 60%),
    radial-gradient(1px 1px at 22% 52%, #fff4, transparent 60%), radial-gradient(1px 1px at 58% 42%, #fff5, transparent 60%);
}

/* glass surfaces */
.card, .answer, .tool, .menu-inner, .dialog, .auth-card, .ask, .fr-stats > div, .seg, .project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--glow);
}
.card { border-radius: 18px; }
.vivid .card, .vivid .answer { box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.btn-primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 20px rgba(110, 120, 255, 0.28); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); }
.vivid .btn-primary { box-shadow: var(--glow-strong); }
.btn-ghost { border-color: var(--line-2); }
input, select, textarea { background: rgba(10, 13, 30, 0.7); border-color: var(--line-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: rgba(14, 18, 40, 0.9); box-shadow: 0 0 0 3px rgba(124, 155, 255, 0.15); }
.tab[aria-selected="true"], .view-toggle button[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(124, 155, 255, 0.35); color: var(--text); }
.seg button[aria-checked="true"] { background: var(--grad); color: #fff; }
.eyebrow, .r-group, .dc-part-l { color: var(--accent); opacity: 0.85; }
.brand-name { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 500; }
.brand-mark { background: radial-gradient(circle at 40% 35%, #cfe0ff 0 2px, #7c9bff 3px, #8f74ff 7px, transparent 8px), radial-gradient(circle, rgba(124,155,255,.25), transparent 70%); box-shadow: 0 0 14px rgba(124, 155, 255, 0.45); }
.mm-node.depth-0 rect { fill: url(#mm-grad); }
.mm-node.depth-0 text { fill: #fff; }
.toast { background: rgba(22, 26, 52, 0.95); border-color: var(--line-2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* ---------- top bar (slim) ---------- */
.topbar { background: rgba(7, 9, 19, 0.55); border-bottom: 1px solid var(--line); }
body[data-route="home"] .topbar { background: transparent; border-color: transparent; }
#menu-btn { display: none; }
.view { padding-bottom: calc(var(--dock-h) + 40px + env(safe-area-inset-bottom)); }

/* ---------- dock ---------- */
.dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 35;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end;
  width: min(520px, calc(100vw - 16px)); height: var(--dock-h); padding: 0 10px 8px;
  background: rgba(14, 17, 36, 0.82); border: 1px solid var(--line-2); border-radius: 26px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 155, 255, 0.06);
}
.dock a, .dock button { display: grid; justify-items: center; gap: 4px; color: var(--text-3); text-decoration: none; font: 500 11.5px var(--font); background: none; border: 0; cursor: pointer; padding: 8px 0 0; }
.dock a:hover, .dock button:hover { color: var(--text); text-decoration: none; }
.dock a.active, .dock button.active { color: var(--text); }
.dock a.active .ico, .dock button.active .ico { color: var(--accent); filter: drop-shadow(0 0 6px rgba(124, 155, 255, 0.6)); }
.dock .dock-mic { position: relative; align-self: start; margin-top: -26px; }
.dock .dock-mic .mic-core {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--grad); box-shadow: 0 0 0 5px rgba(7, 9, 19, 0.9), 0 0 0 6px rgba(124, 155, 255, 0.35), 0 8px 28px rgba(110, 120, 255, 0.45);
}
.vivid .dock .dock-mic .mic-core { box-shadow: 0 0 0 5px rgba(7, 9, 19, 0.9), 0 0 0 6px rgba(124, 155, 255, 0.5), var(--glow-strong); }
.dock .dock-mic.listening .mic-core { animation: micPulse 1.1s ease-in-out infinite; }
@keyframes micPulse { 50% { box-shadow: 0 0 0 5px rgba(7, 9, 19, 0.9), 0 0 0 12px rgba(167, 123, 255, 0.35), 0 8px 34px rgba(167, 123, 255, 0.6); } }

/* ---------- More sheet ---------- */
.menu { align-items: end; padding: 0 10px calc(var(--dock-h) + 26px); background: rgba(4, 5, 12, 0.6); }
.menu-inner { border-radius: 24px; width: min(560px, 100%); }
.menu-grid a { background: rgba(10, 13, 30, 0.6); border-color: var(--line); min-height: 88px; }
.menu-grid a:hover { border-color: rgba(124, 155, 255, 0.4); }

/* ---------- orb ---------- */
.orb { --size: min(46vw, 230px); position: relative; width: var(--size); height: var(--size); border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.orb:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }
.orb .o-core {
  position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #e3ecff 0%, #8fb0ff 14%, #6d7dff 38%, #7a4dff 68%, #2a1a6b 100%);
  box-shadow: 0 0 30px rgba(124, 155, 255, 0.55), 0 0 80px rgba(143, 116, 255, 0.30), inset 0 0 30px rgba(255, 255, 255, 0.18);
  animation: orbBreath 6s ease-in-out infinite;
}
.orb .o-ring { position: absolute; inset: 8%; border-radius: 50%; border: 1px solid rgba(124, 155, 255, 0.28); }
.orb .o-ring.r2 { inset: 0; border-color: rgba(167, 123, 255, 0.16); }
.orb .o-arc { position: absolute; inset: 3%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(124, 155, 255, 0.9) 85%, transparent 100%); -webkit-mask: radial-gradient(circle, transparent 66%, #000 67%, #000 69%, transparent 70%); mask: radial-gradient(circle, transparent 66%, #000 67%, #000 69%, transparent 70%); opacity: 0; }
.orb .o-wave { position: absolute; inset: 22%; display: flex; align-items: center; justify-content: center; gap: 5%; opacity: 0; }
.orb .o-wave i { width: 5%; height: 20%; border-radius: 4px; background: rgba(255, 255, 255, 0.9); }
.vivid .orb .o-core { box-shadow: 0 0 40px rgba(124, 155, 255, 0.75), 0 0 120px rgba(143, 116, 255, 0.45), inset 0 0 30px rgba(255, 255, 255, 0.2); }
@keyframes orbBreath { 50% { transform: scale(1.04); filter: brightness(1.08); } }
.orb[data-state="listening"] .o-core { animation: orbListen 1.2s ease-in-out infinite; }
.orb[data-state="listening"] .o-ring { animation: ringOut 1.6s ease-out infinite; }
@keyframes orbListen { 50% { transform: scale(1.08); filter: brightness(1.2); } }
@keyframes ringOut { from { transform: scale(0.9); opacity: 0.9; } to { transform: scale(1.15); opacity: 0; } }
.orb[data-state="thinking"] .o-arc { opacity: 1; animation: spin 1.4s linear infinite; }
.orb[data-state="speaking"] .o-wave { opacity: 1; }
.orb[data-state="speaking"] .o-wave i { animation: wave 0.9s ease-in-out infinite; }
.orb[data-state="speaking"] .o-wave i:nth-child(2) { animation-delay: 0.15s; } .orb[data-state="speaking"] .o-wave i:nth-child(3) { animation-delay: 0.3s; }
.orb[data-state="speaking"] .o-wave i:nth-child(4) { animation-delay: 0.45s; } .orb[data-state="speaking"] .o-wave i:nth-child(5) { animation-delay: 0.6s; }
@keyframes wave { 50% { height: 46%; } }
.reduce-motion .orb *, .reduce-motion .dock .mic-core { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .orb *, .dock .mic-core { animation: none !important; } }

/* ---------- assistant block ---------- */
.assistant { display: grid; justify-items: center; gap: 14px; text-align: center; }
.a-status { color: var(--text-2); font-size: 14px; min-height: 1.4em; }
.a-status b { color: var(--accent); font-weight: 500; }
.a-row { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.a-chip { background: rgba(10, 13, 30, 0.6); border: 1px solid var(--line-2); color: var(--text-2); border-radius: 999px; padding: 7px 14px; font: 500 13px var(--font); cursor: pointer; }
.a-chip:hover { color: var(--text); border-color: var(--accent); }
.a-chip[aria-pressed="true"] { color: var(--warn); border-color: rgba(255, 196, 107, 0.5); }
.a-type { display: flex; gap: 8px; width: min(560px, 100%); }
.a-answer { width: min(640px, 100%); text-align: left; display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.a-answer:empty { display: none; }
.a-you { color: var(--text-3); font-size: 13.5px; }
.a-say { font-size: 17px; line-height: 1.5; }
.a-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- home v2 ---------- */
.home2 { display: grid; gap: 20px; max-width: 1240px; margin: 0 auto; padding-top: 1vh; }
.home2 > * { min-width: 0; }
.h-greet { text-align: center; display: grid; gap: 4px; }
.h-greet h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5.5vw, 46px); line-height: 1.05; }
.h-greet h2 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-greet p { color: var(--text-2); }
.h-col { display: grid; gap: 14px; align-content: start; }
.h-card { display: grid; gap: 10px; }
.h-card .card-head h3 { font-size: 12px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.h-next-title { font-size: 19px; line-height: 1.35; }
.h-sched { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.h-sched li { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10, 13, 30, 0.5); }
.h-sched time { font-family: var(--mono); font-size: 13px; color: var(--accent); min-width: 48px; }
.h-sched .h-s-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.h-sched .is-past time { color: var(--warn); }
.h-prayer { text-align: left; }
.h-p-name { font-size: 26px; font-family: var(--serif); }
.h-p-time { color: var(--text-2); }
.h-p-left { font-family: var(--mono); font-size: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-p-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 4px; }
.h-p-list span { display: grid; gap: 2px; text-align: center; font-size: 11.5px; color: var(--text-3); padding: 6px 0; border-radius: 10px; border: 1px solid transparent; }
.h-p-list span b { font: 500 12.5px var(--mono); color: var(--text-2); }
.h-p-list span.is-next { border-color: rgba(124, 155, 255, 0.4); background: var(--accent-soft); color: var(--text); }
.h-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-shortcuts a { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 13, 30, 0.5); color: var(--text); text-decoration: none; font-size: 14px; }
.h-shortcuts a:hover { border-color: rgba(124, 155, 255, 0.4); text-decoration: none; }
.h-shortcuts .ico { color: var(--accent); }
.h-desktop-only { display: none; }
@media (min-width: 1100px) {
  .home2 { grid-template-columns: minmax(260px, 1fr) minmax(380px, 1.35fr) minmax(260px, 1fr); align-items: start; gap: 22px; }
  .home2 .h-greet { grid-column: 1 / -1; }
  .home2 .h-center { grid-column: 2; grid-row: 2; }
  .home2 .h-left { grid-column: 1; grid-row: 2; }
  .home2 .h-right { grid-column: 3; grid-row: 2; }
  .h-desktop-only { display: grid; }
  .orb { --size: 260px; }
}

/* ---------- alarm ---------- */
.alarm { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(5, 6, 15, 0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 20px; }
.alarm-box { display: grid; gap: 18px; justify-items: center; text-align: center; }
.alarm-box h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 12vw, 84px); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.alarm-box p { color: var(--text-2); font-size: 18px; }
.alarm-box .btn { min-width: 200px; min-height: 60px; font-size: 20px; }
.alarm-ring { width: 120px; height: 120px; border-radius: 50%; background: var(--grad); box-shadow: var(--glow-strong); animation: orbListen 1s ease-in-out infinite; }

/* ---------- TV mode: big screen in landscape, or switched on in Settings ---------- */
@media (min-width: 1600px) and (orientation: landscape) { html:not(.tv-off) { font-size: 125%; } html:not(.tv-off) body { font-size: 18px; } html:not(.tv-off) .orb { --size: 340px; } }
html.tv-on body { font-size: 20px; }
html.tv-on .orb { --size: min(60vw, 360px); }
html.tv-on .h-greet h2 { font-size: clamp(44px, 7vw, 72px); }
html.tv-on .card, html.tv-on .a-answer { padding: 24px; }
html.tv-on .a-say { font-size: 24px; }
html.tv-on .h-p-left { font-size: 44px; }

/* ---------- Scan notes ---------- */
.scan { display: grid; gap: 14px; }
.scan-start h2 { margin: 0 0 4px; font-size: 1.15rem; }
.scan-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.scan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scan-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: inherit; font: inherit; cursor: pointer; }
.scan-item:hover, .scan-item:focus-visible { border-color: var(--accent); }
.scan-item small { color: var(--muted, #9aa3c7); }
.scan-title input { width: 100%; font: inherit; font-size: 1.25rem; font-weight: 600; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: inherit; padding: 6px 2px; }
.scan-title input:focus { outline: none; border-bottom-color: var(--accent); }
.scan-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .scan-grid { grid-template-columns: minmax(220px, 1fr) 2fr; align-items: start; } }
.scan-photo img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; display: block; }
.scan-read { padding: 12px 14px; border-radius: 14px; background: rgba(124,155,255,.08); border: 1px solid rgba(124,155,255,.25); margin-bottom: 12px; }
.scan-read p { margin: 0; }
.scan-text { margin: 0 0 12px; padding-left: 1.4em; display: grid; gap: 8px; font-size: 1.05rem; line-height: 1.45; }
.scan-text ul { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 4px; color: var(--muted, #b9c0e0); }
.scan-text [data-ref] { cursor: pointer; border-radius: 8px; }
.scan-text li.is-selected, .scan-text [data-ref].is-selected { outline: 2px solid var(--accent); outline-offset: 3px; }
.mm-node.is-selected rect { stroke: #fff; stroke-width: 2.5; }
.scan-edit { display: flex; align-items: center; gap: 14px; position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; backdrop-filter: blur(14px); }
.scan-edit-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.scan-reply { margin: 0; font-size: 1.02rem; }
.scan-cmd { display: flex; gap: 8px; }
.scan-cmd input { flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit; }
.mic-big { flex: none; width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 1.6rem; cursor: pointer; background: var(--grad); color: #fff; box-shadow: 0 0 24px rgba(124,155,255,.45); }
.mic-big.is-listening { animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 10px rgba(167,123,255,.25), 0 0 32px rgba(167,123,255,.6); } }
.reduce-motion .mic-big.is-listening { animation: none; outline: 3px solid #fff; }
.scan-foot { display: flex; justify-content: flex-end; }
.mic-big { display: grid; place-items: center; }
@media (max-width: 560px) {
  .scan-edit { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; }
  .scan-edit-main { display: contents; }
  .scan-reply { grid-column: 2; }
  .scan-cmd { grid-column: 1 / -1; }
  .mic-big { width: 56px; height: 56px; }
}
.share-panel h3 { margin: 0 0 4px; font-size: 1.05rem; }
.wa-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.wa-list li { display: flex; gap: 8px; align-items: center; }
.wa-send { flex: 1; justify-content: flex-start; gap: 8px; text-align: left; }
.wa-send small { color: var(--muted, #9aa3c7); margin-left: auto; }
.wa-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-top: 8px; }
.wa-form input { min-width: 0; font: inherit; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: inherit; }
@media (max-width: 560px) { .wa-form { grid-template-columns: 1fr; } }
.wa-send { background: rgba(37,211,102,.10); border: 1px solid rgba(37,211,102,.35); color: var(--text); box-shadow: none; }
.wa-send:hover, .wa-send:focus-visible { background: rgba(37,211,102,.18); border-color: rgba(37,211,102,.6); }



/* ---------- AI answers (mind map / drawing / sources) ---------- */
.ai-map { min-height: 260px; }
.ai-drawing { display: grid; place-items: center; padding: 12px; }
.ai-drawing svg { width: min(100%, 420px); height: auto; max-height: 60vh; }
.ai-sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #1e293b); font-size: 13px; }
.ai-sources-title { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3, #94a3b8); }
.ai-sources ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.ai-sources a { color: var(--accent, #7c9bff); word-break: break-word; }
.ai-sources span { color: var(--text-3, #94a3b8); font-size: 12px; }
#jarvis-home .ai-sources ol { list-style: decimal; }



/* ---------- Jarvis Chat page ---------- */
.chat { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.chat-head-left { display: flex; gap: 8px; }
.chat-thread { display: grid; gap: 10px; align-content: start; min-height: 40vh; }
.chat-empty { text-align: center; padding: 48px 12px; display: grid; gap: 6px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble.from-you { justify-self: end; background: rgba(124, 155, 255, 0.16); border: 1px solid rgba(124, 155, 255, 0.35); }
.bubble.from-jarvis { justify-self: start; background: var(--surface); border: 1px solid var(--line); width: auto; }
.bubble.from-jarvis:has(.bubble-rich) { width: 100%; max-width: 100%; }
.bubble.is-pending p { opacity: 0.6; animation: pulse-soft 1.2s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: 0.25; } }
.bubble-rich { margin-top: 10px; }
.chat-bar { position: sticky; bottom: calc(var(--dock-h) + 22px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 20px; background: rgba(10, 13, 30, 0.88); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); z-index: 5; }
.chat-bar .orb { --size: 64px; flex: none; }
.chat-form { flex: 1; display: flex; gap: 8px; min-width: 0; }
.chat-form input { flex: 1; min-width: 0; }
.chat-status { text-align: center; margin-top: -4px; }
.chat-past-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chat-past-item { width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.chat-past-item:hover, .chat-past-item.is-current { border-color: var(--accent); }
.chat-past-item small { color: var(--text-3); flex: none; }

/* ---------- JARVIS proposed changes (confirm / cancel) ---------- */
.act-card, #jarvis-home .act-card { margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(124, 155, 255, 0.35); background: rgba(124, 155, 255, 0.07); font-size: 13px; }
.act-list, #jarvis-home .act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.act-list li, #jarvis-home .act-list li { display: flex; gap: 8px; align-items: baseline; }
.act-list em, #jarvis-home .act-list em { margin-left: auto; font-style: normal; font-size: 11px; color: #94a3b8; white-space: nowrap; }
.act-dot, #jarvis-home .act-dot { width: 7px; height: 7px; border-radius: 50%; background: #7c9bff; flex: none; transform: translateY(-1px); }
.act-done .act-dot, #jarvis-home .act-done .act-dot { background: #34d399; }
.act-cancelled, #jarvis-home .act-cancelled { opacity: 0.5; text-decoration: line-through; }
.act-failed .act-dot, #jarvis-home .act-failed .act-dot { background: #f87171; }
.act-btns, #jarvis-home .act-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.act-yes, #jarvis-home .act-yes, .act-no, #jarvis-home .act-no { font: 600 12px/1 var(--font, system-ui); padding: 9px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.act-yes, #jarvis-home .act-yes { background: linear-gradient(135deg, #22d3ee, #7c9bff); color: #04070f; border: 0; }
.act-no, #jarvis-home .act-no { background: transparent; color: #cbd5e1; border: 1px solid #334155; }
.act-head, #jarvis-home .act-head { margin: 0 0 6px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #7c9bff; }
.act-body, #jarvis-home .act-body { margin: 0; white-space: pre-wrap; color: #e2e8f0; }
.act-note, #jarvis-home .act-note { margin: 6px 0 0; font-size: 11px; color: #94a3b8; }


/* =====================================================================
   Home — neural brain + brief + chat (plain CSS, no frameworks)
   ===================================================================== */
body[data-route="home"] { overflow: hidden; background: #04070f; }
body[data-route="home"] .topbar { display: none; }
body[data-route="home"] .view { max-width: none; width: 100%; margin: 0; padding: 0;
  height: calc(100vh - var(--dock-h) - 22px - env(safe-area-inset-bottom));
  height: calc(100dvh - var(--dock-h) - 22px - env(safe-area-inset-bottom)); }

#jarvis-home { position: relative; height: 100%; overflow: hidden; background: radial-gradient(120% 80% at 50% 40%, #0a1230 0%, #04070f 60%); color: #e2e8f0; font-family: Inter, var(--font, system-ui), sans-serif; }
#jarvis-home #canvas-container { position: absolute; inset: 0; outline: none; touch-action: none; }
#jarvis-home #canvas-container canvas { display: block; }
#jarvis-home #hotspots-layer { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#jarvis-home [hidden] { display: none !important; }

/* hotspots on the brain */
#jarvis-home .hs { position: absolute; left: 0; top: 0; will-change: transform; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; z-index: 11; }
#jarvis-home .hs-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(2, 6, 23, 0.9); border: 1px solid #22d3ee; color: #22d3ee; box-shadow: 0 0 14px rgba(34, 211, 238, 0.35); transition: transform .15s, background .15s, color .15s; }
#jarvis-home .hs-dot svg { width: 15px; height: 15px; }
#jarvis-home .hs-ring { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1px solid rgba(34, 211, 238, 0.4); animation: pulse-ring 2s infinite ease-in-out; pointer-events: none; }
#jarvis-home .hs-label { position: absolute; left: 38px; top: 50%; transform: translateY(-50%); white-space: nowrap; font: 500 11px/1 "JetBrains Mono", monospace; padding: 6px 9px; border-radius: 8px; background: rgba(15, 23, 42, 0.92); border: 1px solid #1e293b; border-left: 2px solid #22d3ee; color: #f1f5f9; opacity: 0; transition: opacity .15s; pointer-events: none; }
#jarvis-home .hs:hover .hs-dot, #jarvis-home .hs:focus-visible .hs-dot { transform: scale(1.1); background: #22d3ee; color: #020617; }
#jarvis-home .hs:hover .hs-label, #jarvis-home .hs:focus-visible .hs-label { opacity: 1; }
@keyframes pulse-ring { 0%, 100% { transform: scale(0.9); opacity: 0.8; } 50% { transform: scale(1.25); opacity: 0.3; } }
.reduce-motion #jarvis-home .hs-ring { animation: none; }

/* foreground layout */
#jarvis-home .jh-fg { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; pointer-events: none; }
#jarvis-home .jh-top, #jarvis-home .jh-bottom { width: 100%; max-width: 36rem; margin: 0 auto; pointer-events: auto; }
#jarvis-home .jh-top { padding: 16px 16px 0; }
#jarvis-home .jh-bottom { padding: 0 12px 8px; }
#jarvis-home .jh-space { flex: 1; min-height: 24px; }
@media (min-width: 640px) { #jarvis-home .jh-top { padding-top: 32px; } }

#jarvis-home .jh-date { margin: 0; font: 500 11px/1.4 "JetBrains Mono", monospace; letter-spacing: .2em; text-transform: uppercase; color: rgba(34, 211, 238, 0.85); }
#jarvis-home .jh-greet { margin: 4px 0 0; font-size: clamp(24px, 5vw, 30px); font-weight: 600; color: #fff; letter-spacing: -0.01em; }

/* brief card */
#jarvis-home .jh-brief { margin-top: 12px; border-radius: 18px; overflow: hidden; background: rgba(2, 6, 23, 0.72); border: 1px solid rgba(51, 65, 85, 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
#jarvis-home .jh-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: transparent; border: 0; border-top: 1px solid rgba(51, 65, 85, 0.6); color: inherit; font: inherit; text-align: left; cursor: pointer; }
#jarvis-home .jh-row:first-child { border-top: 0; }
#jarvis-home .jh-row:hover { background: rgba(30, 41, 59, 0.45); }
#jarvis-home .jh-ico { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(15, 23, 42, 0.9); border: 1px solid #1e293b; color: #22d3ee; }
#jarvis-home .jh-ico svg { width: 16px; height: 16px; }
#jarvis-home .jh-text { flex: 1; min-width: 0; display: grid; }
#jarvis-home .jh-label { font: 500 10px/1.3 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #64748b; }
#jarvis-home .jh-main { font-size: 15px; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jarvis-home .jh-sub { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jarvis-home .jh-sub:empty { display: none; }
#jarvis-home .jh-act { flex: none; }
#jarvis-home .jh-done { display: inline-block; padding: 6px 10px; border-radius: 9px; font: 700 11px/1 "JetBrains Mono", monospace; background: #22d3ee; color: #020617; }

#jarvis-home .jh-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
#jarvis-home .jh-chip { max-width: 72%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 13px; border-radius: 999px; font: 600 11px/1 "JetBrains Mono", monospace; letter-spacing: .04em; cursor: pointer; background: rgba(15, 23, 42, 0.85); border: 1px solid #334155; color: #e2e8f0; }
#jarvis-home .jh-chip:hover { border-color: #22d3ee; }
#jarvis-home .jh-chip.is-primary { background: #22d3ee; border-color: #22d3ee; color: #020617; }

/* chat */
#jarvis-home .jh-chat { margin-bottom: 8px; border-radius: 18px; background: rgba(2, 6, 23, 0.78); border: 1px solid rgba(51, 65, 85, 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#jarvis-home .jh-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0; font: 600 10px/1 "JetBrains Mono", monospace; letter-spacing: .1em; color: #22d3ee; }
#jarvis-home .jh-chat-tools { display: flex; gap: 4px; }
#jarvis-home .jh-chat-tools button, #jarvis-home .jh-chat-tools a { font: 500 10px/1 "JetBrains Mono", monospace; padding: 4px 7px; border-radius: 6px; background: transparent; border: 0; color: #94a3b8; text-decoration: none; cursor: pointer; }
#jarvis-home .jh-chat-tools button:hover, #jarvis-home .jh-chat-tools a:hover { color: #22d3ee; }
#jarvis-home .jh-chat-body { max-height: 30vh; overflow-y: auto; padding: 8px 12px 12px; display: grid; gap: 8px; font-size: 13px; }
#jarvis-home .jh-msg { display: flex; }
#jarvis-home .jh-msg.is-you { justify-content: flex-end; }
#jarvis-home .jh-bubble { max-width: 90%; padding: 7px 11px; border-radius: 13px; line-height: 1.45; background: rgba(15, 23, 42, 0.95); border: 1px solid #1e293b; color: #e2e8f0; }
#jarvis-home .is-you .jh-bubble { background: rgba(8, 145, 178, 0.2); border-color: rgba(14, 116, 144, 0.6); color: #f1f5f9; }
#jarvis-home .jh-bubble a { color: #22d3ee; }
#jarvis-home .jh-pending { animation: pulse-soft 1.2s ease-in-out infinite; }
#jarvis-home .jh-expand { margin-left: 4px; padding: 0; background: none; border: 0; color: #22d3ee; font: 600 10px "JetBrains Mono", monospace; cursor: pointer; }

/* talk row */
#jarvis-home .jh-talk { display: flex; align-items: center; gap: 12px; }
#jarvis-home .jh-orb { flex: none; display: flex; flex-direction: column; align-items: center; }
#jarvis-home .jh-orb .orb { --size: clamp(70px, 11vh, 96px); }
#jarvis-home .jh-orb #h-orb-status { margin-top: 2px; font: 600 9px/1 "JetBrains Mono", monospace; letter-spacing: .1em; color: #67e8f9; text-shadow: 0 0 8px rgba(0, 240, 255, 0.5); }
#jarvis-home .jh-form { flex: 1; min-width: 0; display: flex; gap: 8px; }
#jarvis-home .jh-form input { flex: 1; min-width: 0; margin: 0; padding: 11px 13px; border-radius: 13px; font-size: 14px; background: rgba(15, 23, 42, 0.92); border: 1px solid #1e293b; color: #f1f5f9; box-shadow: none; }
#jarvis-home .jh-form input:focus { outline: none; border-color: #22d3ee; }
#jarvis-home .jh-form button { flex: none; padding: 0 14px; border-radius: 13px; border: 0; background: #22d3ee; color: #020617; font: 700 11px/1 "JetBrains Mono", monospace; cursor: pointer; }

/* big answer panel */
#jarvis-home .jh-panel { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; padding: 16px; background: rgba(4, 7, 15, 0.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#jarvis-home .jh-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; font: 500 12px "JetBrains Mono", monospace; color: #22d3ee; }
#jarvis-home .jh-panel-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#jarvis-home .jh-panel-head button { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid #334155; background: transparent; color: #cbd5e1; cursor: pointer; }
#jarvis-home .jh-panel-body { flex: 1; overflow-y: auto; }
/* the router wraps each page in .view-host: give it the full height on Home */
body[data-route="home"] .view > .view-host { height: 100%; }
.ai-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ai-badge:empty { display: none; }
.ai-ready { color: #34d399; border: 1px solid rgba(52, 211, 153, 0.4); }
.ai-indexing { color: #7c9bff; border: 1px solid rgba(124, 155, 255, 0.4); }
.ai-failed, .ai-unsupported { color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); }
.ai-refs { margin-top: 12px; font-size: 13px; }
.ai-refs ul { margin: 4px 0 0; padding-left: 1.2em; }

/* ---------- Workflows ---------- */
.wf-card { display: grid; gap: 10px; }
.wf-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wf-head h3 { margin: 0; }
.wf-last { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.wf-out .ai-map { min-height: 200px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.days { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.days legend { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; cursor: pointer; }
.chip-check input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); }
.conn-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-where { display: grid; gap: 8px; }
.pd-where .ai-map { min-height: 240px; }

/* ---------- Team (Company Context) ---------- */
.team .t-ask { display: flex; gap: 8px; align-items: center; }
.team .t-ask input { flex: 1; min-width: 0; }
.team .t-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.team .t-head h3 { margin: 0; }
.team .t-chan { white-space: nowrap; opacity: .8; }
.team .t-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.team .t-private { opacity: .75; font-style: italic; }
.team .t-off { opacity: .55; }
.team #t-chart-box { margin-top: 12px; }

/* ---------- Delegation (approval preview + Delegated page) ---------- */
.act-msg { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.18); }
.act-msg b { display: block; margin-bottom: 4px; }
.act-msg-body { display: block; white-space: pre-wrap; line-height: 1.5; }
.act-msg .act-note { display: block; }
.act-send { display: inline-block; margin-top: 8px; text-decoration: none; }
.dlg .d-obj { margin: 4px 0 8px; }
.dlg .d-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dlg .d-row h3 { margin: 0; font-size: 15px; }
.dlg .d-status { white-space: nowrap; font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); }
.dlg .d-late { color: #f5a97f; border-color: rgba(245, 169, 127, 0.5); }
.dlg .d-done { opacity: .6; }
.dlg .d-msg { white-space: pre-wrap; margin: 8px 0 0; }
.dlg .d-tabs { display: flex; gap: 8px; }
.dlg .d-needs { border-color: rgba(124, 155, 255, 0.45); }
.dlg .d-needs h3 { margin: 0 0 8px; }
.dlg .d-need { padding: 10px 0; border-top: 1px solid var(--line-2); }
.dlg .d-need:first-of-type { border-top: 0; }
.dlg .d-reply { margin: 8px 0 0; }
.dlg .d-goal { margin: 14px 0 6px; }
.dlg .d-report { margin-top: 8px; }
.dlg .d-map { overflow-x: auto; margin: 8px 0; }

/* ---------- Tools (goblin-style helpers) ---------- */
.tl .tl-form textarea { width: 100%; }
.tl .tl-spice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.tl .tl-chip { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 6px 10px; font: 500 13px var(--font); cursor: pointer; min-height: 36px; }
.tl .tl-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.tl .tl-steps, .tl .tl-sub { list-style: none; margin: 8px 0; padding: 0; }
.tl .tl-sub { margin: 4px 0 0 28px; }
.tl .tl-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.tl .tl-sub .tl-step { border-top: 0; padding: 4px 0; }
.tl .tl-step > .tl-sub { flex-basis: 100%; }
.tl .tl-check { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.tl .tl-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.tl .tl-step.done > .tl-check span { text-decoration: line-through; opacity: .55; }
.tl .tl-min { font-size: 12px; opacity: .7; white-space: nowrap; }
.tl .tl-result { white-space: pre-wrap; line-height: 1.55; }
.tl .tl-big { font-size: 26px; font-weight: 600; margin: 0 0 6px; }
.tl .tl-pc { margin: 4px 0 8px; padding-left: 4px; list-style: none; }
.tl .tl-pc li { margin: 4px 0; }
.tl .tl-master { text-align: center; padding: 24px 16px; }
.tl .tl-now { font-size: 24px; line-height: 1.3; margin: 8px 0 12px; }
.tl .tl-clock { font-size: 44px; font-variant-numeric: tabular-nums; margin: 6px 0 16px; }
.tl .tl-clock.over { color: #f5a97f; }
.tl .tl-master-btns { justify-content: center; }

/* ---------- Phones: no live blur (it was recomputed every frame over the moving brain) ---------- */
@media (pointer: coarse), (max-width: 760px) {
  *, *::before, *::after, .dialog::backdrop { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  #jarvis-home .jh-brief { background: rgba(2, 6, 23, 0.9); box-shadow: none; }
  #jarvis-home .jh-chat { background: rgba(2, 6, 23, 0.92); }
  .chat-bar, .topbar { background: rgba(10, 13, 30, 0.97); }
  .a-answer, .scan-edit { background: rgba(12, 16, 34, 0.97); }
  #jarvis-home .hs-ring { animation: none; }
}

@media (max-width: 420px) { .dock { padding: 0 4px 8px; } .dock a, .dock button { font-size: 10.5px; } .dock .dock-mic .mic-core { width: 56px; height: 56px; } }
#jarvis-home .jh-row.jh-warn .jh-main { color: #f5a97f; }
.voice-diag { white-space: pre-wrap; font: 12px/1.5 ui-monospace, monospace; margin: 8px 0 0; }
/* line icons (replace emoji) */
.ico { display: inline-block; vertical-align: -0.18em; flex: none; }
.btn .ico, .link-btn .ico, .jh-chip .ico { margin-right: 2px; }
.icon-btn .ico { vertical-align: middle; }
.tl-chip .ico { margin: 0 -1px; }
/* Guide */
.guide-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 999px; color: var(--text-2, #c9c9d6); font-size: 12px; text-decoration: none; }
.guide-btn:hover, .guide-btn:focus-visible { color: var(--text, #fff); border-color: currentColor; }
.jh-chips a.jh-chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.guide { display: grid; gap: 12px; padding-bottom: 24px; }
.guide-search input { width: 100%; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-toc a { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, rgba(255,255,255,.12)); color: var(--text-2, #c9c9d6); text-decoration: none; }
.guide-sec { padding: 0; scroll-margin-top: 70px; }
.guide-sec summary { list-style: none; display: flex; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; }
.guide-sec summary::-webkit-details-marker { display: none; }
.guide-sec summary small { display: block; margin-top: 2px; font-size: 12px; }
.guide-sec[open] summary { border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.guide-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(140,120,255,.14); color: var(--accent, #a99bff); }
.guide-steps { margin: 12px 16px 8px 36px; padding: 0; display: grid; gap: 8px; line-height: 1.5; }
.guide-tip { margin: 4px 16px 12px; padding: 8px 10px; border-radius: 10px; background: rgba(140,120,255,.08); }
.guide-sec > .btn { margin: 0 16px 14px; }
.topbar a.guide-btn, .topbar a.guide-btn:hover { text-decoration: none; }
/* Tools answers as mind maps */
.tl-map-card { display: grid; gap: 10px; }
.tl-map { min-height: 120px; overflow-x: auto; }
.tl-pick { padding: 10px 12px; border-radius: 12px; background: rgba(140,120,255,.08); display: grid; gap: 8px; }

/* ===== Hologram answers (mind map + infographic) ===== */
.holo { position: relative; border-radius: 18px; padding: 18px 14px; overflow: hidden; color: #dff6ff;
  background: radial-gradient(ellipse at 50% 40%, rgba(56,225,255,.14), transparent 60%), linear-gradient(180deg, #071426, #050b17);
  border: 1px solid rgba(56,225,255,.35); box-shadow: 0 0 0 1px rgba(56,225,255,.08) inset, 0 0 24px rgba(56,225,255,.12); }
.holo::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(56,225,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(56,225,255,.07) 1px, transparent 1px); background-size: 22px 22px; }
.holo > * { position: relative; }
.hl-link { cursor: pointer; }
.hl-link:focus-visible { outline: 2px solid #38e1ff; outline-offset: 3px; border-radius: 8px; }
/* core */
.hl-core { margin: 4px auto 18px; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 14px;
  border: 2px solid #38e1ff; background: radial-gradient(circle, rgba(56,225,255,.28), rgba(10,30,60,.9) 70%);
  box-shadow: 0 0 18px rgba(56,225,255,.7), 0 0 42px rgba(56,225,255,.35), inset 0 0 18px rgba(56,225,255,.5); animation: hl-pulse 3.2s ease-in-out infinite; }
.hl-core::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(56,225,255,.45); animation: hl-spin 18s linear infinite; }
.hl-core { position: relative; }
.hl-core-text { font: 700 13px/1.25 var(--sans, system-ui); letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 0 8px #38e1ff; }
@keyframes hl-pulse { 50% { box-shadow: 0 0 26px rgba(56,225,255,.9), 0 0 60px rgba(56,225,255,.45), inset 0 0 22px rgba(56,225,255,.6); } }
@keyframes hl-spin { to { transform: rotate(360deg); } }
/* phone: spine */
.hl-spine { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 14px; position: relative; }
.hl-spine::before { content: ''; position: absolute; left: 21px; top: -18px; bottom: 10px; width: 2px; background: linear-gradient(#38e1ff, #a970ff, transparent); box-shadow: 0 0 8px #38e1ff; }
.hl-branch { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.hl-ring { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--mono, monospace); color: var(--c);
  border: 2px solid var(--c); background: #06111f; box-shadow: 0 0 10px var(--c), inset 0 0 8px color-mix(in srgb, var(--c) 50%, transparent); }
.hl-head { margin: 6px 0 4px; font: 700 15px/1.35 var(--sans, system-ui); letter-spacing: .01em; color: var(--c); text-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }
.hl-kids { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 1px solid color-mix(in srgb, var(--c) 45%, transparent); display: grid; gap: 4px; }
.hl-kids li { font-size: 15px; line-height: 1.45; color: #e2f4fb; position: relative; }
.hl-kids li::before { content: ''; position: absolute; left: -14px; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.hl-more { color: #8fb4c6 !important; font-style: italic; }
/* wide: radial */
.holo-map.is-radial { padding: 0; }
.hl-lines { position: absolute; inset: 0; }
.is-radial .hl-core { position: absolute; margin: 0; transform: translate(-50%, -50%); width: 150px; height: 150px; z-index: 2; }
.hl-node { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.hl-ring.big { width: 96px; height: 96px; padding: 8px; text-align: center; font: 600 11px/1.25 var(--sans, system-ui); color: #e8f9ff; text-transform: uppercase; letter-spacing: .04em; }
.hl-ring-text { display: block; overflow: visible; }
.hl-node .hl-kids { position: absolute; width: 170px; top: 50%; transform: translateY(-50%); border: 0; padding: 0; }
.hl-node .hl-kids li { font-size: 12px; }
.hl-node .hl-kids li::before { width: 5px; height: 5px; left: -10px; }
.hl-node .hl-right { left: 112px; } .hl-node .hl-left { right: 112px; text-align: right; }
.hl-node .hl-left li::before { left: auto; right: -10px; }
.hl-node .hl-kids { width: min(170px, 22vw); }
/* infographic */
.holo-info { display: grid; gap: 18px; }
.hi-title { margin: 0; text-align: center; font: 300 15px var(--sans, system-ui); letter-spacing: .5em; text-transform: uppercase; color: #e8f9ff; text-shadow: 0 0 10px #38e1ff; }
.hi-label { margin: 4px 0 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #9ccbe0; text-align: center; }
.hi-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.hi-gauge svg { width: 100%; max-width: 110px; display: block; margin: 0 auto; filter: drop-shadow(0 0 6px var(--c)); }
.hi-gauge-num { fill: #e8f9ff; font: 700 17px var(--mono, monospace); }
.hi-arc { animation: hi-draw 1.1s ease-out both; }
@keyframes hi-draw { from { stroke-dasharray: 0 999; } }
.hi-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.hi-stat { padding: 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: rgba(6,17,31,.7); text-align: center; box-shadow: inset 0 0 14px color-mix(in srgb, var(--c) 25%, transparent); }
.hi-stat-val { margin: 0; font: 700 22px var(--mono, monospace); color: var(--c); text-shadow: 0 0 10px var(--c); }
.hi-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hi-bars li { display: grid; grid-template-columns: 24px minmax(70px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hi-bar-tag { width: 24px; height: 24px; border: 1px solid var(--c); display: grid; place-items: center; font: 600 11px var(--mono, monospace); color: var(--c); }
.hi-bar-label { color: #cfe9f5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-track { position: relative; height: 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: rgba(255,255,255,.04); }
.hi-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, transparent, var(--c)); box-shadow: 0 0 10px var(--c); animation: hi-grow 1s ease-out both; }
.hi-fill::after { content: ''; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); border-radius: 50%; border: 2px solid var(--c); background: #06111f; box-shadow: 0 0 10px var(--c); }
@keyframes hi-grow { from { width: 0; } }
.hi-bar-val { font: 600 12px var(--mono, monospace); color: var(--c); }
.hi-trend svg { width: 100%; height: 110px; display: block; }
.hi-line { filter: drop-shadow(0 0 6px #38e1ff); }
.hi-dot { filter: drop-shadow(0 0 6px #a970ff); }
.hi-trend-x { display: flex; justify-content: space-between; font-size: 11px; color: #8fb4c6; }
.hi-trend-v { margin: 2px 0 0; text-align: right; font: 600 12px var(--mono, monospace); color: #38e1ff; }
@media (prefers-reduced-motion: reduce) { .hl-core, .hl-core::after, .hi-arc, .hi-fill { animation: none; } }

.hl-core.long { width: auto; height: auto; min-height: 64px; max-width: 92%; border-radius: 22px; padding: 14px 20px; }
.hl-core.long .hl-core-text { text-transform: none; letter-spacing: .01em; font-size: 15px; }
.hl-core-text { overflow-wrap: anywhere; }
.hl-spine { gap: 18px; }
.hl-branch { grid-template-columns: 36px minmax(0, 1fr); }
.hl-kids li, .hl-head { overflow-wrap: anywhere; }
/* Tools: saved answers + rewritten text */
.tl-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl-rec { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-asked { margin: 8px 2px 0; }
.tl-text-card { display: grid; gap: 12px; }
.tl-rewrite { margin: 0; font-size: 16px; line-height: 1.6; white-space: pre-wrap; color: #e8f9ff; }
.tl-map-card { padding: 10px; }
.tl-map-card .holo { padding: 16px 12px; }

/* Jarvis Chat: the conversation scrolls inside the page; the box grows and scrolls */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 150px - var(--dock-h) - env(safe-area-inset-bottom)); min-height: 420px; }
.chat-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 4px 12px; scroll-padding-bottom: 12px; }
.chat-bar { position: static; flex: none; }
.chat-form { align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 160px; overflow-y: auto; line-height: 1.45; padding: 10px 12px; }
.chat-thread .bubble, .chat-thread p { overflow-wrap: anywhere; }
#view:has(.chat) { padding-bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); }

/* ===== Home: big clock (time-blind friendly) + solat ===== */
#jarvis-home .jh-greet { text-align: center; font-size: clamp(18px, 4vw, 22px); font-weight: 500; color: #bfeaff; letter-spacing: .02em; }
#jarvis-home .jh-clock { text-align: center; margin: 4px auto 12px; display: grid; justify-items: center; gap: 2px; }
#jarvis-home .jh-time { margin: 0; font: 700 clamp(64px, 19vw, 120px)/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: -.02em; color: #eafcff;
  text-shadow: 0 0 18px rgba(56,225,255,.75), 0 0 48px rgba(56,225,255,.35); font-variant-numeric: tabular-nums; }
#jarvis-home .jh-date { font: 600 clamp(15px, 4.2vw, 22px)/1.3 var(--sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: #7fe7ff; }
#jarvis-home .jh-say { margin-top: 8px; }
.jh-solat { max-width: 560px; margin: 0 auto 14px; }
.jh-solat-card { position: relative; padding: 14px 16px; border-radius: 18px; text-align: center; display: grid; gap: 6px;
  background: linear-gradient(180deg, rgba(8,24,44,.88), rgba(6,14,30,.88)); border: 1px solid rgba(56,225,255,.45);
  box-shadow: 0 0 22px rgba(56,225,255,.18), inset 0 0 18px rgba(56,225,255,.08); }
.jh-solat-card.urgent { border-color: #ffb84d; box-shadow: 0 0 26px rgba(255,184,77,.45), inset 0 0 18px rgba(255,184,77,.15); animation: hl-pulse-warn 1.6s ease-in-out infinite; }
.jh-solat-card.done { border-color: rgba(60,240,197,.6); box-shadow: 0 0 22px rgba(60,240,197,.25); }
@keyframes hl-pulse-warn { 50% { box-shadow: 0 0 40px rgba(255,184,77,.7), inset 0 0 22px rgba(255,184,77,.25); } }
.jh-solat-label { margin: 0; font: 700 12px "JetBrains Mono", monospace; letter-spacing: .25em; color: #7fe7ff; }
.jh-solat-left { margin: 0; font: 700 clamp(30px, 9vw, 44px)/1.05 "JetBrains Mono", monospace; color: #fff; text-shadow: 0 0 14px rgba(56,225,255,.6); }
.urgent .jh-solat-left { color: #ffd38a; text-shadow: 0 0 14px rgba(255,184,77,.8); }
.done .jh-solat-left { color: #8ff5d9; text-shadow: 0 0 14px rgba(60,240,197,.7); }
.jh-solat-sub { margin: 0; color: #bfdcea; font-size: 14px; }
.jh-solat-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(56,225,255,.3); overflow: hidden; }
.jh-solat-bar span { display: block; height: 100%; background: linear-gradient(90deg, #38e1ff, #a970ff); box-shadow: 0 0 10px #38e1ff; }
.urgent .jh-solat-bar span { background: linear-gradient(90deg, #ffb84d, #ff6b9a); }
.jh-solat-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.jh-solat-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 2px; }
.jh-sc { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; font: 600 12px var(--sans, system-ui); color: #9cc7da; background: transparent; border: 1px solid rgba(156,199,218,.35); cursor: pointer; }
.jh-sc.now { border-color: #38e1ff; color: #e8f9ff; box-shadow: 0 0 10px rgba(56,225,255,.45); }
.jh-sc.done { color: #8ff5d9; border-color: rgba(60,240,197,.7); background: rgba(60,240,197,.1); }
.jh-solat-set { width: 100%; padding: 12px; border-radius: 14px; border: 1px dashed rgba(56,225,255,.5); background: transparent; color: #bfeaff; font: inherit; cursor: pointer; }
.tk-opts { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; }
.tk-opts legend { padding: 0 6px; font-size: 13px; color: var(--text-2); }
.tk-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; cursor: pointer; }
.tk-row input { width: 20px; height: 20px; flex: none; accent-color: #38e1ff; margin-top: 1px; }

/* =====================================================================
   HOLO THEME — futuristic layer over every page (keep last in the file)
   ===================================================================== */
:root {
  --bg: #030915; --bg-2: #061226;
  --surface: linear-gradient(180deg, rgba(9, 26, 50, 0.78), rgba(5, 14, 32, 0.82));
  --surface-2: rgba(10, 30, 58, 0.7);
  --line: rgba(56, 225, 255, 0.20); --line-2: rgba(56, 225, 255, 0.38);
  --text: #e6f7ff; --text-2: #a9d4e6; --text-3: #7ea6ba;
  --accent: #38e1ff; --accent-2: #a970ff; --accent-ink: #021018;
  --accent-soft: rgba(56, 225, 255, 0.12);
  --grad: linear-gradient(135deg, #22d3ee 0%, #5b8cff 50%, #a970ff 100%);
  --glow: 0 0 0 1px rgba(56, 225, 255, 0.10), 0 0 24px rgba(56, 225, 255, 0.10), 0 10px 30px rgba(0, 0, 0, 0.45);
  --glow-strong: 0 0 18px rgba(56, 225, 255, 0.55), 0 0 44px rgba(169, 112, 255, 0.25);
  --p-medium: #38e1ff;
}
body {
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(760px 560px at 105% 100%, rgba(169, 112, 255, 0.14), transparent 60%),
    radial-gradient(640px 480px at -10% 70%, rgba(91, 140, 255, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::after {   /* faint hologram grid */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .45;
  background-image: linear-gradient(rgba(56, 225, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 225, 255, .06) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}
::selection { background: rgba(56, 225, 255, .35); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(56, 225, 255, .45) transparent; }
a { color: var(--accent); }

/* panels with neon edge + corner brackets */
.card, .answer, .tool, .menu-inner, .dialog, .auth-card, .ask, .fr-stats > div, .seg, .project-card {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--glow);
}
.card { position: relative; border-radius: 16px; }
.card::before, .card::after { content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none; border-color: rgba(56, 225, 255, .85); border-style: solid; filter: drop-shadow(0 0 4px rgba(56, 225, 255, .8)); }
.card::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 16px; }
.card::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 16px; border-color: rgba(169, 112, 255, .85); filter: drop-shadow(0 0 4px rgba(169, 112, 255, .8)); }
.card-quiet { background: rgba(5, 14, 32, .45); border-style: dashed; }
.card-quiet::before, .card-quiet::after { display: none; }

/* headings: neon, spaced */
.page-title { font: 700 13px var(--mono); letter-spacing: .28em; text-transform: uppercase; color: #bff3ff; text-shadow: 0 0 10px rgba(56, 225, 255, .7); }
.card-head h3, .card > h3:first-child, .card > h2:first-child, .eyebrow { font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #7fe7ff; text-shadow: 0 0 8px rgba(56, 225, 255, .55); }
h1 { text-shadow: 0 0 14px rgba(56, 225, 255, .35); }

/* buttons */
.btn { border: 1px solid var(--line-2); background: rgba(8, 24, 46, .6); color: var(--text); font-weight: 600; letter-spacing: .02em; transition: box-shadow var(--t), border-color var(--t), transform var(--t); }
.btn:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(56, 225, 255, .35); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: #fff; border: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: 0 0 18px rgba(56, 225, 255, .45), 0 0 36px rgba(169, 112, 255, .2); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: var(--glow-strong); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-danger, .btn.danger { border-color: rgba(255, 107, 154, .6); color: #ffb3c8; }

/* fields */
input, select, textarea { background: rgba(3, 12, 28, .78); border: 1px solid var(--line-2); color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: rgba(5, 18, 40, .95); box-shadow: 0 0 0 3px rgba(56, 225, 255, .16), 0 0 18px rgba(56, 225, 255, .25); }
::placeholder { color: #6f97ab; }

/* tabs, chips, segmented controls */
.tab { color: var(--text-2); border-color: transparent; }
.tab:hover { color: var(--text); border-color: var(--line); }
.tab[aria-selected="true"], .view-toggle button[aria-pressed="true"] { background: rgba(56, 225, 255, .12); border-color: rgba(56, 225, 255, .6); color: #fff; box-shadow: 0 0 12px rgba(56, 225, 255, .35); text-shadow: 0 0 8px rgba(56, 225, 255, .6); }
.seg button[aria-checked="true"], .tl-chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 0 12px rgba(56, 225, 255, .45); }
.tl-chip { border-color: var(--line-2); }
.chip { border-color: rgba(56, 225, 255, .35); color: #bfeaff; background: rgba(56, 225, 255, .06); }

/* top bar + dock */
.topbar { background: linear-gradient(180deg, rgba(3, 10, 22, .92), rgba(3, 10, 22, .7)); border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, transparent, rgba(56, 225, 255, .7), rgba(169, 112, 255, .7), transparent) 1; }
body[data-route="home"] .topbar { border-image: none; }
.dock { background: linear-gradient(180deg, rgba(6, 18, 38, .94), rgba(3, 10, 24, .96)); border: 1px solid rgba(56, 225, 255, .4); box-shadow: 0 0 24px rgba(56, 225, 255, .18), 0 12px 40px rgba(0, 0, 0, .55); }
.dock a, .dock > button:not(.dock-mic) { color: #87aec2; }
.dock a.active, .dock a[aria-current="page"], .dock > button.active { color: #eafcff; text-shadow: 0 0 8px rgba(56, 225, 255, .9); }
.dock a.active svg, .dock a[aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(56, 225, 255, .9)); }
.dock .dock-mic .mic-core { background: radial-gradient(circle at 40% 35%, #7ff0ff, #3aa0ff 45%, #8b5cff 100%); box-shadow: 0 0 22px rgba(56, 225, 255, .75), 0 0 50px rgba(139, 92, 255, .45), inset 0 0 12px rgba(255, 255, 255, .35); }

/* lists, rows, menus, dialogs, toasts */
.menu-inner, .dialog { border-color: rgba(56, 225, 255, .45); box-shadow: 0 0 30px rgba(56, 225, 255, .2), 0 20px 60px rgba(0, 0, 0, .6); }
.toast { background: linear-gradient(180deg, rgba(8, 26, 50, .96), rgba(5, 14, 32, .96)); border: 1px solid rgba(56, 225, 255, .5); box-shadow: 0 0 22px rgba(56, 225, 255, .3); color: #e6f7ff; }
.jh-row, .chat-past-item, .task-row, .list-row { border-color: var(--line); }
.jh-row:hover, .chat-past-item:hover { border-color: rgba(56, 225, 255, .55); box-shadow: 0 0 14px rgba(56, 225, 255, .2); }
.bubble { border: 1px solid var(--line); }
.bubble.you, .msg.you .bubble { background: linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(169, 112, 255, .22)); border-color: rgba(56, 225, 255, .45); }
.chat-bar { background: linear-gradient(180deg, rgba(6, 18, 38, .95), rgba(3, 10, 24, .95)); border: 1px solid rgba(56, 225, 255, .4); box-shadow: 0 0 20px rgba(56, 225, 255, .18); }
progress, .progress { accent-color: #38e1ff; }
.spinner { border-color: rgba(56, 225, 255, .25); border-top-color: #38e1ff; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
/* Profile me */
.pf-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 16, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overflow-y: auto; }
.pf-panel { position: relative; width: min(620px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 22px 20px; border-radius: 20px; display: grid; gap: 12px;
  background: linear-gradient(180deg, rgba(9, 26, 50, .97), rgba(4, 12, 28, .97)); border: 1px solid rgba(56, 225, 255, .55); box-shadow: 0 0 36px rgba(56, 225, 255, .25), 0 20px 60px rgba(0, 0, 0, .6); }
.pf-x { position: absolute; top: 12px; right: 12px; background: transparent; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 10px; padding: 6px; cursor: pointer; display: grid; place-items: center; }
.pf-kicker { margin: 0; font: 700 12px var(--mono); letter-spacing: .25em; color: #7fe7ff; text-shadow: 0 0 8px rgba(56, 225, 255, .6); }
.pf-title { margin: 0; font-size: clamp(19px, 4.6vw, 24px); font-weight: 650; color: #fff; padding-right: 36px; }
.pf-facts { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; line-height: 1.5; color: #d6eef8; }
.pf-agree { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid rgba(56, 225, 255, .45); background: rgba(56, 225, 255, .06); font-weight: 600; cursor: pointer; }
.pf-agree input { width: 22px; height: 22px; accent-color: #38e1ff; flex: none; }
.pf-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.pf-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.pf-bar span { display: block; height: 100%; background: var(--grad); box-shadow: 0 0 10px #38e1ff; }
.pf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-opt { padding: 10px 14px; border-radius: 14px; font: 600 15px var(--font); color: #cfe9f5; background: rgba(8, 24, 46, .7); border: 1px solid var(--line-2); cursor: pointer; text-align: left; }
.pf-opt.on { color: #fff; background: linear-gradient(135deg, rgba(34, 211, 238, .35), rgba(169, 112, 255, .35)); border-color: #38e1ff; box-shadow: 0 0 14px rgba(56, 225, 255, .45); }
.pf-own { display: grid; gap: 6px; }
.pf-own-row { display: flex; gap: 8px; align-items: flex-end; }
.pf-own-row textarea { flex: 1; min-width: 0; }
.pf-review { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pf-review label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8, 24, 46, .5); line-height: 1.45; cursor: pointer; }
.pf-review input { width: 20px; height: 20px; accent-color: #38e1ff; flex: none; margin-top: 2px; }
/* settings: response-length choices are cards, not the pill control */
label.seg { display: block; background: none; border: 0; padding: 0; box-shadow: none; border-radius: 0; }
label.seg span { background: rgba(8, 24, 46, .55); border-color: var(--line-2); border-radius: 12px; }
label.seg input:checked + span { border-color: #38e1ff; background: rgba(56, 225, 255, .12); box-shadow: 0 0 14px rgba(56, 225, 255, .35); }
@media (max-width: 520px) { .segmented { grid-template-columns: 1fr; } }
/* Home scrolls (big clock + solat made it taller than the screen) */
#jarvis-home .jh-fg { pointer-events: auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
#jarvis-home .jh-top, #jarvis-home .jh-bottom { flex: none; }
#jarvis-home .jh-bottom { padding-bottom: 16px; }
/* ===== Voice bar: Listening / Thinking / Speaking + controls ===== */
.vbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--dock-h) + 26px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 999px; max-width: calc(100vw - 20px);
  background: linear-gradient(180deg, rgba(8, 26, 50, .96), rgba(4, 12, 28, .96)); border: 1px solid rgba(56, 225, 255, .55);
  box-shadow: 0 0 24px rgba(56, 225, 255, .3), 0 10px 30px rgba(0, 0, 0, .5); color: #e6f7ff; font: 600 13px var(--font); }
.vb-label { white-space: nowrap; letter-spacing: .04em; }
.vb-btns { display: flex; gap: 4px; }
.vb-btns button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; border: 1px solid rgba(56, 225, 255, .35); background: rgba(56, 225, 255, .08); color: #e6f7ff; display: grid; place-items: center; cursor: pointer; font: 700 12px var(--mono); }
.vb-btns button:hover { border-color: #38e1ff; box-shadow: 0 0 10px rgba(56, 225, 255, .4); }
.vb-viz { display: flex; gap: 3px; align-items: center; height: 22px; }
.vb-viz i { width: 3px; height: 6px; border-radius: 3px; background: #38e1ff; box-shadow: 0 0 6px #38e1ff; }
.vbar[data-state="speaking"] .vb-viz i { animation: vb-wave 0.9s ease-in-out infinite; }
.vbar[data-state="speaking"] .vb-viz i:nth-child(2) { animation-delay: .12s; } .vbar[data-state="speaking"] .vb-viz i:nth-child(3) { animation-delay: .24s; }
.vbar[data-state="speaking"] .vb-viz i:nth-child(4) { animation-delay: .36s; } .vbar[data-state="speaking"] .vb-viz i:nth-child(5) { animation-delay: .48s; }
@keyframes vb-wave { 0%, 100% { height: 5px; } 50% { height: 20px; } }
.vbar[data-state="listening"] { border-color: rgba(255, 107, 154, .7); box-shadow: 0 0 26px rgba(255, 107, 154, .35); }
.vbar[data-state="listening"] .vb-viz i { background: #ff6b9a; box-shadow: 0 0 6px #ff6b9a; animation: vb-pulse 1.2s ease-in-out infinite; }
.vbar[data-state="listening"] .vb-viz i:nth-child(odd) { animation-delay: .3s; }
@keyframes vb-pulse { 0%, 100% { height: 6px; opacity: .6; } 50% { height: 14px; opacity: 1; } }
.vbar[data-state="thinking"] .vb-viz i { width: 6px; height: 6px; border-radius: 50%; background: #a970ff; box-shadow: 0 0 6px #a970ff; animation: vb-dots 1.2s ease-in-out infinite; }
.vbar[data-state="thinking"] .vb-viz i:nth-child(n+4) { display: none; }
.vbar[data-state="thinking"] .vb-viz i:nth-child(2) { animation-delay: .2s; } .vbar[data-state="thinking"] .vb-viz i:nth-child(3) { animation-delay: .4s; }
@keyframes vb-dots { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.vbar[data-state="paused"] .vb-viz i, .vbar[data-state="done"] .vb-viz i { height: 4px; opacity: .5; }
@media (prefers-reduced-motion: reduce) { .vb-viz i { animation: none !important; } }
/* ===== Orbit mind map (scattered, futuristic) ===== */
.holo.orbit { padding: 10px 6px 14px; background:
  radial-gradient(ellipse at 50% 50%, rgba(56, 225, 255, .14), transparent 60%),
  linear-gradient(180deg, #04101f, #020814); border: 1px solid rgba(56, 225, 255, .35);
  box-shadow: inset 0 0 40px rgba(56, 225, 255, .08), 0 0 24px rgba(56, 225, 255, .12); }
.holo.orbit::after { content: ''; position: absolute; inset: 8px; pointer-events: none; border-radius: 12px;
  background:
    linear-gradient(#38e1ff, #38e1ff) left top / 22px 2px no-repeat, linear-gradient(#38e1ff, #38e1ff) left top / 2px 22px no-repeat,
    linear-gradient(#38e1ff, #38e1ff) right top / 22px 2px no-repeat, linear-gradient(#38e1ff, #38e1ff) right top / 2px 22px no-repeat,
    linear-gradient(#38e1ff, #38e1ff) left bottom / 22px 2px no-repeat, linear-gradient(#38e1ff, #38e1ff) left bottom / 2px 22px no-repeat,
    linear-gradient(#38e1ff, #38e1ff) right bottom / 22px 2px no-repeat, linear-gradient(#38e1ff, #38e1ff) right bottom / 2px 22px no-repeat;
  opacity: .8; filter: drop-shadow(0 0 4px #38e1ff); }
.ob-stage { position: relative; width: 100%; }
.ob-svg { position: absolute; inset: 0; overflow: visible; }
.ob-orbit { stroke: rgba(56, 225, 255, .22); stroke-width: 1; stroke-dasharray: 2 7; transform-box: fill-box; transform-origin: center; animation: ob-spin 90s linear infinite; }
.ob-orbit.o1 { stroke-dasharray: 1 12; animation-duration: 140s; animation-direction: reverse; stroke: rgba(169, 112, 255, .25); }
.ob-orbit.o2 { stroke: rgba(56, 225, 255, .1); stroke-dasharray: none; animation: none; }
.ob-beam { animation: ob-beam 3.2s ease-in-out infinite; }
.ob-flow { stroke-dasharray: 3 16; stroke-linecap: round; filter: drop-shadow(0 0 3px currentColor); animation: ob-flow 1.6s linear infinite; }
@keyframes ob-flow { to { stroke-dashoffset: -38; } }
@keyframes ob-spin { to { transform: rotate(360deg); } }
@keyframes ob-beam { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.ob-core { position: absolute; width: 156px; height: 156px; margin: -78px 0 0 -78px; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 18px; z-index: 3;
  background: radial-gradient(circle, rgba(56, 225, 255, .35), rgba(8, 30, 58, .95) 62%); border: 2px solid #7ff0ff;
  box-shadow: 0 0 22px #38e1ff, 0 0 60px rgba(56, 225, 255, .45), inset 0 0 26px rgba(56, 225, 255, .5); }
.ob-core::before, .ob-core::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.ob-core::before { inset: -14px; border: 2px solid transparent; border-top-color: #38e1ff; border-right-color: rgba(56, 225, 255, .35); animation: ob-spin 6s linear infinite; filter: drop-shadow(0 0 4px #38e1ff); }
.ob-core::after { inset: -26px; border: 1px dashed rgba(169, 112, 255, .6); animation: ob-spin 18s linear infinite reverse; }
.ob-core-text { color: #fff; font: 800 18px/1.15 var(--font); letter-spacing: .06em; text-transform: uppercase; text-shadow: 0 0 10px #38e1ff, 0 0 2px #fff;
  overflow-wrap: break-word; max-width: 100%; }
.ob-core-text.long { font-size: 14px; }

.ob-node { position: absolute; width: 0; height: 0; z-index: 2; }
.ob-ring { position: absolute; width: 112px; height: 112px; left: -56px; top: -56px; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 14px;
  border: 2px solid var(--c); background: radial-gradient(circle, rgba(4, 16, 32, .92) 58%, color-mix(in srgb, var(--c) 30%, transparent));
  box-shadow: 0 0 14px var(--c), inset 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.ob-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--c) 70%, transparent); animation: ob-spin 20s linear infinite; pointer-events: none; }
.ob-ring::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid transparent; border-left-color: var(--c); border-bottom-color: var(--c); opacity: .7; animation: ob-spin 9s linear infinite reverse; pointer-events: none; }
.ob-ring-text { position: relative; color: #eafcff; font: 700 12px/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 0 8px var(--c);
  max-width: 100%; word-break: normal; overflow-wrap: break-word; }
.ob-scroll { max-height: 74%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.ob-ring.hl-link:hover, .ob-ring:focus-visible { box-shadow: 0 0 24px var(--c), inset 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); }
.ob-num { position: absolute; top: -6px; right: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #021; font: 800 11px var(--mono); box-shadow: 0 0 8px var(--c); }

.ob-kids { position: absolute; list-style: none; margin: 0; padding: 6px 0 6px 12px; display: grid; gap: 5px; color: #cfefff; font: 500 12.5px/1.3 var(--font); border-left: 1px solid var(--c); }
.ob-kids li { position: relative; text-transform: uppercase; letter-spacing: .03em; font-size: 11.5px; }
.ob-kids li::before { content: ''; position: absolute; left: -16px; top: .6em; width: 8px; height: 1px; background: var(--c); box-shadow: 0 0 4px var(--c); }
.ob-right { left: 74px; top: 0; transform: translateY(-50%); }
.ob-left { right: 74px; top: 0; transform: translateY(-50%); text-align: right; border-left: 0; border-right: 1px solid var(--c); padding: 6px 12px 6px 0; }
.ob-left li::before { left: auto; right: -16px; }
.ob-below { top: 70px; left: 0; transform: translateX(-50%); }
.ob-above { bottom: 70px; left: 0; transform: translateX(-50%); }
.ob-more { opacity: .7; font-style: italic; }

.ob-legend { list-style: none; margin: 4px 6px 0; padding: 0; display: grid; gap: 8px; }
.ob-card { border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-left: 3px solid var(--c); border-radius: 12px; padding: 10px 12px; background: rgba(4, 18, 36, .75); transition: box-shadow .3s; }
.ob-card.on { box-shadow: 0 0 16px var(--c); }
.ob-card-head { display: flex; gap: 8px; align-items: center; margin: 0; color: #fff; font: 700 14px var(--font); text-transform: uppercase; letter-spacing: .04em; }
.ob-card-num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #021; font: 800 12px var(--mono); }
.ob-card-kids { margin: 6px 0 0 30px; padding: 0; list-style: none; display: grid; gap: 4px; color: #cfefff; font-size: 14px; }
.ob-card-kids li::before { content: '›'; color: var(--c); margin-right: 6px; }
.ob-expand { display: block; margin: 12px auto 2px; padding: 9px 16px; border-radius: 999px; border: 1px solid #38e1ff; background: rgba(56, 225, 255, .1); color: #e6f7ff; font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 0 12px rgba(56, 225, 255, .35); cursor: pointer; }

/* phone-size orbit */
  .orbit.is-compact .ob-core { width: 104px; height: 104px; margin: -52px 0 0 -52px; padding: 12px; }
  .orbit.is-compact .ob-core::before { inset: -9px; } .orbit.is-compact .ob-core::after { inset: -17px; }
  .orbit.is-compact .ob-core-text { font-size: 12.5px; } .orbit.is-compact .ob-core-text.long { font-size: 10.5px; }
  .orbit.is-compact .ob-ring { width: 84px; height: 84px; left: -42px; top: -42px; padding: 7px; }
  .orbit.is-compact .ob-ring::after { inset: -6px; }
  .orbit.is-compact .ob-ring-text { font-size: 9.5px; letter-spacing: .01em; }
.ob-full { position: fixed; inset: 0; z-index: 200; background: #01060f; display: flex; flex-direction: column; }
.ob-full-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 2; padding: 9px 16px; border-radius: 999px; border: 1px solid #38e1ff; background: rgba(4, 18, 36, .9); color: #fff; font: 700 13px var(--font); box-shadow: 0 0 12px rgba(56, 225, 255, .4); }
.ob-full-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 54px 10px 20px; }
.ob-full-host { margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .ob-orbit, .ob-flow, .ob-beam, .ob-core::before, .ob-core::after, .ob-ring::before, .ob-ring::after { animation: none !important; } }
/* ===== PDF Mind Map page ===== */
.pdfmap { display: grid; gap: 16px; }
.pm-drop { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 16px; border-radius: 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed rgba(56, 225, 255, .6); background: radial-gradient(ellipse at 50% 0%, rgba(56, 225, 255, .18), transparent 70%), rgba(4, 16, 32, .7);
  box-shadow: inset 0 0 30px rgba(56, 225, 255, .08); transition: box-shadow .2s, border-color .2s; }
.pm-drop:hover, .pm-drop.over { border-color: #38e1ff; box-shadow: 0 0 24px rgba(56, 225, 255, .35), inset 0 0 30px rgba(56, 225, 255, .15); }
.pm-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pm-drop-icon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #38e1ff; border: 2px solid #38e1ff; box-shadow: 0 0 18px rgba(56, 225, 255, .5); }
.pm-drop-title { font: 800 18px var(--font); letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 0 10px #38e1ff; }
.pm-drop-sub { color: var(--text-2); font-size: 14px; max-width: 34ch; }
.pm-steps { display: grid; gap: 10px; }
.pm-step { display: flex; align-items: center; gap: 10px; font-weight: 600; opacity: .5; }
.pm-step.done { opacity: .85; } .pm-step.now { opacity: 1; color: #fff; }
.pm-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #38e1ff; font: 700 12px var(--mono); color: #38e1ff; }
.pm-step.done .pm-dot { background: #38e1ff; color: #021; }
.pm-step.now .pm-dot { box-shadow: 0 0 14px #38e1ff; animation: vb-pulse-dot 1.2s ease-in-out infinite; }
@keyframes vb-pulse-dot { 50% { box-shadow: 0 0 2px #38e1ff; } }
.pm-note { margin: 0; color: var(--text-2); font-size: 13px; }
.pm-card { display: grid; gap: 10px; }
.pm-kicker { margin: 0; display: flex; gap: 6px; align-items: center; color: var(--text-2); font-size: 12.5px; }
.pm-title { margin: 0; font-size: 22px; letter-spacing: .02em; }
.pm-summary { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15.5px; line-height: 1.45; }
.pm-summary li::marker { color: #38e1ff; font-weight: 700; }
.pm-map { margin-top: 12px; }
.pm-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pm-doc { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface, rgba(255,255,255,.03)); color: inherit; cursor: pointer; }
.pm-doc.on, .pm-doc:hover { border-color: #38e1ff; box-shadow: 0 0 12px rgba(56, 225, 255, .25); }
.pm-doc-ico { color: #38e1ff; }
.pm-doc-main { flex: 1; min-width: 0; display: grid; }
.pm-doc-main b, .pm-doc-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-doc-main small { color: var(--text-2); }
/* keep focused / scrolled-to things clear of the dock and sticky bars (e.g. Scan's "Say a change" bar) */
html:has(.scan-edit) { scroll-padding-bottom: 240px; }
/* ===== Save / upload confirm + "Saved ✓" pop-up ===== */
#dialog .dialog-body p { white-space: pre-line; overflow-wrap: anywhere; }
.done-pop { position: fixed; left: 50%; top: 42%; z-index: 300; transform: translate(-50%, -50%) scale(.85); opacity: 0; pointer-events: none;
  display: grid; justify-items: center; gap: 10px; padding: 22px 34px; border-radius: 22px; transition: opacity .25s, transform .25s;
  background: rgba(4, 16, 32, .95); border: 1px solid rgba(60, 240, 197, .7); box-shadow: 0 0 30px rgba(60, 240, 197, .35), 0 20px 50px rgba(0, 0, 0, .55); }
.done-pop.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.done-pop-ring { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; color: #3cf0c5; border: 2px solid #3cf0c5; box-shadow: 0 0 20px rgba(60, 240, 197, .6), inset 0 0 14px rgba(60, 240, 197, .35); }
.done-pop-ring svg { stroke-dasharray: 24; stroke-dashoffset: 24; animation: done-tick .45s .1s ease-out forwards; }
@keyframes done-tick { to { stroke-dashoffset: 0; } }
.done-pop-text { color: #fff; font: 800 18px var(--font); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 0 10px #3cf0c5; }
@media (prefers-reduced-motion: reduce) { .done-pop, .done-pop-ring svg { transition: none; animation: none; stroke-dashoffset: 0; } }

/* orbit map: scroll when labels go past the edge (never cut off) */
.holo.orbit { overflow: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.holo.orbit.is-scroll { scrollbar-width: thin; scrollbar-color: rgba(56, 225, 255, .55) transparent; }
.holo.orbit.is-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.holo.orbit.is-scroll::-webkit-scrollbar-thumb { background: rgba(56, 225, 255, .5); border-radius: 6px; }
.holo.orbit.is-expanded { overflow: visible; }
.ob-stage { min-width: 100%; }
.ob-inner { position: absolute; left: 0; top: 0; }
.ob-kids li { overflow-wrap: break-word; }
.holo.orbit { width: 100%; max-width: 100%; min-width: 0; contain: inline-size; }
.pdfmap { grid-template-columns: minmax(0, 1fr); }
.pm-docs li { display: flex; gap: 6px; align-items: stretch; }
.pm-docs li .pm-doc { flex: 1; min-width: 0; }
.pm-del { flex: none; width: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: #ff8aa8; display: grid; place-items: center; cursor: pointer; }
.pm-del:hover, .pm-del:focus-visible { border-color: #ff6b9a; box-shadow: 0 0 12px rgba(255, 107, 154, .35); }
.pm-card .row { flex-wrap: wrap; gap: 8px; }

/* =====================================================================
   Wide layouts: desktop and phones held sideways (landscape).
   • The bottom dock becomes a side rail on the left, full height — content gets the whole screen.
   • Pages use the full width; Home and Settings go two columns.
   ===================================================================== */
@media (min-width: 1024px), (orientation: landscape) and (max-height: 560px) {
  :root { --rail-w: 88px; --dock-h: 0px; }
  .shell { padding-left: calc(var(--rail-w) + 18px); }
  .dock {
    left: 12px; top: 50%; bottom: auto; transform: translateY(-50%);
    width: var(--rail-w); height: auto; max-height: calc(100dvh - 24px); overflow-y: auto; scrollbar-width: none;
    grid-template-columns: 1fr; grid-auto-rows: auto; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 24px;
  }
  .dock::-webkit-scrollbar { display: none; }
  .dock a, .dock button { padding: 8px 0; border-radius: 14px; }
  .dock a:hover, .dock > button:not(.dock-mic):hover { background: rgba(56, 225, 255, .08); }
  .dock .dock-mic { margin: 6px 0; align-self: center; justify-self: center; }
  .menu { align-items: center; padding: 24px 16px 24px calc(var(--rail-w) + 30px); }
  .vbar { left: calc(50% + (var(--rail-w) + 18px) / 2); }

  /* pages: use the width */
  .view { max-width: 1500px; }
  .tasks, .brain, .life, .vault, .insights, .project-detail { max-width: none; }
  .chat { max-width: 1120px; }
  .home { max-width: 1100px; }
  .settings { max-width: none; display: block; columns: 2 460px; column-gap: 18px; }
  .settings > * { break-inside: avoid; margin: 0 0 18px; width: 100%; display: grid; }

  /* Home: clock + solat on the left, brief + buttons on the right */
  #jarvis-home .jh-top, #jarvis-home .jh-bottom { max-width: 1180px; }
  #jarvis-home .jh-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  #jarvis-home .jh-top > * { grid-column: 1; }
  #jarvis-home .jh-top > .jh-brief { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin-top: 0; }
  #jarvis-home .jh-top > .jh-chips { grid-column: 2; grid-row: 4; }
  #jarvis-home .jh-bottom { padding-left: 16px; padding-right: 16px; }
}

/* phone sideways: short screen — icons only on the rail, smaller clock, tighter spacing */
@media (orientation: landscape) and (max-height: 560px) {
  :root { --rail-w: 64px; }
  .shell { padding-left: calc(var(--rail-w) + 10px + env(safe-area-inset-left)); }
  .dock { left: calc(6px + env(safe-area-inset-left)); padding: 8px 4px; gap: 0; }
  .dock a, .dock button { padding: 6px 0; }
  .dock a span, .dock > button:not(.dock-mic) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .dock .dock-mic { margin: 2px 0; }
  .dock .dock-mic .mic-core { width: 48px; height: 48px; }
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .view { padding: 14px 18px 24px; }
  #jarvis-home .jh-top { padding-top: 8px; }
  #jarvis-home .jh-time { font-size: min(8.6vw, 22vh); white-space: nowrap; }
  #jarvis-home .jh-date { font-size: 13px; white-space: nowrap; }
  #jarvis-home .jh-greet { font-size: 16px; }
  #jarvis-home .jh-clock { margin-bottom: 6px; }
  .chat { height: calc(100dvh - 110px); min-height: 0; }
  .settings { columns: 2 300px; }
}

@media (min-width: 1024px) { #jarvis-home .jh-time { white-space: nowrap; font-size: clamp(64px, 7.5vw, 132px); } }
/* Home: allow pinch-zoom in / out (was blocked by touch-action: pan-y) */
#jarvis-home .jh-fg { touch-action: pan-x pan-y pinch-zoom; }
/* Jarvis Chat: toolbar on one line (labels hide on narrow phones, icons stay) */
.toolbar.chat-toolbar, .chat-toolbar { display: flex; flex-direction: row; justify-content: flex-start; flex-wrap: nowrap; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.chat-toolbar::-webkit-scrollbar { display: none; }
.chat-toolbar .btn { flex: none; white-space: nowrap; }
.chat-toolbar #c-mute { margin-left: auto; }
@media (max-width: 520px) { .chat-toolbar .btn span[data-short] { font-size: 0; } .chat-toolbar .btn span[data-short]::after { content: attr(data-short); font-size: 13px; } .chat-toolbar .btn { padding: 8px 9px; min-width: 40px; justify-content: center; gap: 4px; } }
#c-wake[aria-pressed="true"] { border-color: #38e1ff; color: #e6f7ff; box-shadow: 0 0 10px rgba(56, 225, 255, .35); }
/* suggestions after an answer */
.chat-next { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2px 0 10px; }
.chat-next-label { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); font-size: 12.5px; width: 100%; }
.chat-next-chip { cursor: pointer; border: 1px solid rgba(56, 225, 255, .45); background: rgba(56, 225, 255, .08); color: #e6f7ff; padding: 8px 12px; border-radius: 999px; font-size: 14px; text-align: left; }
.chat-next-chip:hover, .chat-next-chip:focus-visible { box-shadow: 0 0 12px rgba(56, 225, 255, .4); }
/* dock: 10 places (Home, Tasks, Chat, Tools, mic, Team, Delegated, Routines, Brain, More) */
.dock { grid-template-columns: repeat(4, minmax(0, 1fr)) auto repeat(5, minmax(0, 1fr)); column-gap: 0; }
.dock a span, .dock > button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.menu-phone { display: none; }
@media (max-width: 480px) {
  /* phones: 8 big targets. Routines lives in Home's Today box; Routines + Brain also in More */
  .dock { padding-left: 2px; padding-right: 2px; grid-template-columns: repeat(4, minmax(0, 1fr)) auto repeat(3, minmax(0, 1fr)); }
  .dock a.dock-wide { display: none; }
  .menu-phone { display: list-item; }
  .dock a, .dock > button:not(.dock-mic) { font-size: 9.5px; letter-spacing: 0; gap: 2px; padding-left: 0; padding-right: 0; min-width: 0; }
  .dock a svg, .dock > button:not(.dock-mic) svg { width: 20px; height: 20px; }
  .dock .dock-mic .mic-core { width: 50px; height: 50px; }
  .dock .dock-mic { padding: 0 2px; }
  .dock span[data-short] { font-size: 0; }
  .dock span[data-short]::after { content: attr(data-short); font-size: 9.5px; }
}
@media (min-width: 1024px), (orientation: landscape) and (max-height: 560px) { .dock { grid-template-columns: 1fr; } }
/* ===== Focus mode (full screen) ===== */
.fm-overlay { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 30%, rgba(56, 225, 255, .14), transparent 60%), rgba(2, 6, 16, .97); }
.fm-box { width: min(680px, 100%); display: grid; gap: 18px; padding: 22px; border-radius: 22px; border: 1px solid rgba(56, 225, 255, .45); background: rgba(4, 16, 32, .9); box-shadow: 0 0 40px rgba(56, 225, 255, .18); }
.fm-kicker { margin: 0; display: flex; gap: 8px; align-items: center; color: #38e1ff; font: 700 12px var(--mono); letter-spacing: .14em; }
.fm-title { margin: 0; font-size: clamp(22px, 4vw, 32px); line-height: 1.2; color: #fff; }
.fm-next { display: grid; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid rgba(60, 240, 197, .5); background: rgba(60, 240, 197, .06); }
.fm-label { margin: 0; color: #3cf0c5; font: 800 12px var(--mono); letter-spacing: .16em; }
.fm-next-text { margin: 0; font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; color: #fff; line-height: 1.3; }
.fm-edit { display: flex; gap: 8px; } .fm-edit input { flex: 1; min-width: 0; }
.fm-timer { display: grid; gap: 8px; justify-items: center; }
.fm-time { margin: 0; font: 800 clamp(48px, 10vw, 76px) var(--mono); color: #e6f7ff; text-shadow: 0 0 14px #38e1ff; letter-spacing: .04em; }
.fm-detail pre { white-space: pre-wrap; font: 14px/1.5 var(--font); color: var(--text-2); margin: 8px 0 0; }
.fm-foot { flex-wrap: wrap; gap: 8px; }
.fm-step-row, .fm-timer .row { flex-wrap: wrap; gap: 8px; justify-content: center; }
/* ===== Return To Focus floating button ===== */
.rtf { position: fixed; right: 12px; bottom: calc(var(--dock-h) + 30px + env(safe-area-inset-bottom)); z-index: 58;
  display: flex; align-items: center; gap: 8px; max-width: min(260px, 60vw); padding: 7px 14px 7px 7px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(60, 240, 197, .6); background: rgba(4, 18, 32, .95); color: #e6fff8; text-align: left; box-shadow: 0 0 16px rgba(60, 240, 197, .3), 0 8px 24px rgba(0, 0, 0, .5); }
.rtf-ring { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #3cf0c5; border: 2px solid #3cf0c5; }
.rtf-text { display: grid; min-width: 0; line-height: 1.15; } .rtf-text b { font-size: 13px; }
.rtf-task { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rtf.rtf-active .rtf-ring { background: rgba(60, 240, 197, .15); }
.rtf.rtf-alert { border-color: #ffb547; box-shadow: 0 0 0 0 rgba(255, 181, 71, .7); animation: rtf-pulse 1.4s ease-out infinite; }
.rtf.rtf-alert .rtf-ring { color: #ffb547; border-color: #ffb547; }
@keyframes rtf-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, .7); } 100% { box-shadow: 0 0 0 18px rgba(255, 181, 71, 0); } }
@media (max-width: 480px) { .rtf { padding: 5px; max-width: none; } .rtf-text { display: none; } .rtf-ring { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .rtf.rtf-alert { animation: none; } }
body[data-route="chat"] .rtf { bottom: calc(var(--dock-h) + 96px + env(safe-area-inset-bottom)); }
/* ===== Mind map editor ===== */
.me-overlay { position: fixed; inset: 0; z-index: 240; background: rgba(2, 6, 16, .97); display: flex; padding: 12px; }
.me-box { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; max-width: 1400px; margin: 0 auto; width: 100%; }
.me-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.me-head h2 { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 20px; }
.me-help { margin: 0; }
.me-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, 1.25fr); gap: 14px; }
.me-outline, .me-preview { min-height: 0; overflow: auto; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(4, 16, 32, .7); padding: 12px; }
.me-preview .holo.orbit { min-height: 100%; }
.me-tree, .me-tree ul { list-style: none; margin: 0; padding: 0; }
.me-tree ul { padding-left: 18px; border-left: 1px dashed rgba(56, 225, 255, .35); margin-left: 10px; }
.me-line { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.me-in { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: #fff; font-size: 15px; }
.me-row.d0 > .me-line .me-in { font-weight: 800; font-size: 17px; border-color: rgba(56, 225, 255, .6); }
.me-row.d1 > .me-line .me-in { font-weight: 700; border-left: 3px solid #38e1ff; }
.me-ctl { display: flex; gap: 2px; flex: none; }
.me-ctl button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; color: #cfefff; font-size: 16px; cursor: pointer; }
.me-ctl button:hover, .me-ctl button:focus-visible { border-color: #38e1ff; }
.me-ctl button[data-me="del"] { color: #ff8aa8; }
.me-tabs { display: none; gap: 6px; }
.map-files { flex-wrap: wrap; gap: 6px; align-items: center; }
.pm-files { margin-top: 8px; }
@media (max-width: 820px) {
  .me-tabs { display: flex; }
  .me-body { grid-template-columns: 1fr; }
  .me-overlay[data-tab="edit"] .me-preview, .me-overlay[data-tab="view"] .me-outline { display: none; }
}
/* Home: today's routines with ticks */
.jh-routines { margin: 4px 0 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(60, 240, 197, .35); background: rgba(4, 18, 32, .72); display: grid; gap: 6px; }
.jh-rt-head { margin: 0; display: flex; gap: 6px; align-items: center; color: #3cf0c5; font: 700 11.5px var(--mono); letter-spacing: .12em; }
.jh-rt-head span { margin-left: auto; color: var(--text-2); letter-spacing: .04em; }
.jh-rt summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 6px 0; }
.jh-rt summary::-webkit-details-marker { display: none; }
.jh-rt-name { flex: 1; color: #fff; font-weight: 600; font-size: 15px; }
.jh-rt-meta { color: var(--text-2); font-size: 12.5px; }
.jh-rt.is-done .jh-rt-name { text-decoration: line-through; opacity: .65; }
.jh-rt ul { list-style: none; margin: 0 0 6px 34px; padding: 0; display: grid; gap: 4px; }
.jh-rt li label { display: flex; gap: 10px; align-items: center; font-size: 14.5px; color: #dff6ff; cursor: pointer; }
.jh-routines input[type="checkbox"] { width: 22px; height: 22px; accent-color: #3cf0c5; flex: none; }
/* Consultant modes + Conflict resolver */
.tl-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cf-card { display: grid; gap: 10px; }
.cf-head { justify-content: space-between; align-items: flex-start; gap: 8px; }
.cf-head p { margin: 0; flex: 1; min-width: 0; }
.cf-thread { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 4px; }
.cf-who { margin: 0 0 2px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.cf-them { border-color: rgba(255, 181, 71, .5) !important; }
/* saved answers: each with its own delete */
.tl-rec-wrap { display: inline-flex; align-items: center; }
.tl-rec-wrap .tl-rec { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.tl-rec-del { min-width: 34px; min-height: 36px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 999px 999px 0; background: var(--surface-2); color: var(--text-3); font: 600 16px var(--font); cursor: pointer; }
.tl-rec-del:hover, .tl-rec-del:focus-visible { color: #ff8a9a; }
.tl-rec-del.armed, .tl-del.armed, [data-recent-clear].armed, #cf-delete.armed { color: #ff8a9a !important; border-color: #ff8a9a !important; font-size: 12px; }
.tl-asked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl-asked .tl-del { margin-left: auto; }
/* Delegated → Drafts */
.d-drafts summary { cursor: pointer; list-style: none; }
.d-drafts summary h2 { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.d-draft { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; display: grid; gap: 8px; }
/* Home: standing order (STOP THINKING & JUST DO) */
.jh-nudge { margin: 10px 0 4px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255, 90, 110, .55);
  background: linear-gradient(160deg, rgba(60, 8, 20, .75), rgba(18, 6, 20, .85)); box-shadow: 0 0 18px rgba(255, 70, 100, .25); text-align: left; }
.jh-nudge-k { margin: 0 0 6px; font: 700 11px var(--font); letter-spacing: .12em; color: #ff9aa8; display: flex; gap: 6px; align-items: center; }
.jh-nudge-q { margin: 0; font: 700 15px/1.45 var(--font); color: #fff2f4; text-shadow: 0 0 8px rgba(255, 80, 110, .45); }
.jh-nudge-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.jh-nudge-next { font-size: 12px; color: #ffb3bd; letter-spacing: .04em; }
/* Brain dump → mind map */
.dump-map { margin-top: 10px; }
.dm-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(6, 18, 38, .5); }
.dm-sum { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
/* Home: darker brain so the clock, day and date stand out; no buttons on the brain */
#jarvis-home #canvas-container { filter: brightness(.42) saturate(.85); }
#jarvis-home #hotspots-layer { display: none; }
#jarvis-home .jh-date { color: #ffffff; font-weight: 700; letter-spacing: .1em; text-shadow: 0 1px 2px #000, 0 0 10px rgba(0, 0, 0, .9), 0 0 16px rgba(56, 225, 255, .55);
  background: rgba(2, 8, 20, .72); padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(127, 231, 255, .35); }
#jarvis-home .jh-greet { color: #e9f8ff; text-shadow: 0 1px 2px #000, 0 0 10px rgba(0, 0, 0, .8); }
/* voice bar: big STOP (ends everything) + Send */
.vbar .vb-halt { background: #e5364f !important; color: #fff !important; border: 0; border-radius: 999px; padding: 0 16px !important; min-width: 84px; height: 40px; font: 800 14px var(--font); letter-spacing: .08em; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 0 14px rgba(229, 54, 79, .6); }
.vbar .vb-send { border-radius: 999px; padding: 0 14px !important; height: 40px; font: 700 13px var(--font); display: inline-flex; align-items: center; gap: 6px; background: rgba(56, 225, 255, .18) !important; color: #eafcff !important; border: 1px solid rgba(56, 225, 255, .6) !important; }
.vbar { z-index: 400 !important; pointer-events: auto; }
/* voice bar always fits the screen: the label shrinks, STOP never gets cut off */
.vbar { max-width: calc(100vw - 16px) !important; box-sizing: border-box; }
.vbar .vb-label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbar .vb-btns { flex: none; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 480px) {
  .vbar .vb-viz { display: none; }
  .vbar .vb-label { font-size: 12px; }
  .vbar .vb-send { padding: 0 10px !important; }
  .vbar .vb-halt { min-width: 76px; }
}
