/* ============================================================
   MENDEL'S HUB — 2026 design system
   Liquid Glass surfaces · Bento layouts · spring physics
   Dark-first · single-accent · Inter Variable · kinetic type
   Three themes via [data-theme]: amber (default) / indigo / coral
   ============================================================ */

@import url('https://fonts.bunny.net/css?family=inter:400,500,600,700,800&display=swap');

/* ---------- THEME: LIGHT OPERATOR (default, B2) ---------- */
:root,
:root[data-theme="light"] {
  --bg: #f7f7f4;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-hover: #f0f1ee;
  --surface-raised: #ffffff;

  --border: rgba(20, 24, 31, 0.1);
  --border-subtle: rgba(20, 24, 31, 0.06);
  --border-strong: rgba(20, 24, 31, 0.18);

  --text: #17191f;
  --text-dim: #3f4652;
  --text-muted: #747b86;
  --text-faint: #a3a8b1;

  --accent: #111827;
  --accent-soft: rgba(17, 24, 39, 0.06);
  --accent-strong: rgba(17, 24, 39, 0.14);
  --accent-glow: rgba(17, 24, 39, 0.12);
  --accent-ink: #ffffff;

  --success: #1f8a5b;
  --success-soft: rgba(31, 138, 91, 0.11);
  --warn: #c87921;
  --warn-soft: rgba(200, 121, 33, 0.12);
  --danger: #c84747;
  --danger-soft: rgba(200, 71, 71, 0.12);
  --info: #2e74b5;
  --info-soft: rgba(46, 116, 181, 0.11);

  --area-camp: #cb4b4b;
  --area-family: #d56f9e;
  --area-chabad: #4e80c5;
  --area-finance: #319567;
  --area-content: #8262c7;
  --area-daf: #b79b21;
  --area-fitness: #d06f3a;
  --area-guitar: #2f9d91;
  --area-hockey: #3987bd;
  --area-kids: #d96578;
  --area-health: #5da467;
  --area-sidehustle: #b7704c;
  --area-personal: #7c828b;
}

/* ---------- THEME: DARK / LEGACY ---------- */
:root[data-theme="dark"],
:root[data-theme="amber"] {
  --bg: #0a0a0b;
  --bg-elevated: #121214;
  --surface: rgba(28, 28, 32, 0.72);
  --surface-solid: #1c1c20;
  --surface-hover: rgba(38, 38, 44, 0.82);
  --surface-raised: rgba(42, 42, 48, 0.9);

  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #ededed;
  --text-dim: #b4b4bc;
  --text-muted: #7e7e88;
  --text-faint: #55555e;

  --accent: #e5b53f;
  --accent-soft: rgba(229, 181, 63, 0.14);
  --accent-strong: rgba(229, 181, 63, 0.26);
  --accent-glow: rgba(229, 181, 63, 0.35);
  --accent-ink: #0a0a0b;

  --success: #58c07d;
  --success-soft: rgba(88, 192, 125, 0.14);
  --warn: #e89a3b;
  --warn-soft: rgba(232, 154, 59, 0.14);
  --danger: #e85c5c;
  --danger-soft: rgba(232, 92, 92, 0.14);
  --info: #7bb3e0;
  --info-soft: rgba(123, 179, 224, 0.14);

  /* area colors — muted versions, used only for 3px left-edge indicators */
  --area-camp: #d85555;
  --area-family: #e48db8;
  --area-chabad: #7aa8e0;
  --area-finance: #5cb880;
  --area-content: #a57ed6;
  --area-daf: #d4c055;
  --area-fitness: #e8935a;
  --area-guitar: #4dbba9;
  --area-hockey: #5ab5df;
  --area-kids: #eb8596;
  --area-health: #82c68a;
  --area-sidehustle: #d18a66;
  --area-personal: #8a8a94;
}

:root[data-theme="indigo"] {
  --accent: #8b7ef5;
  --accent-soft: rgba(139, 126, 245, 0.14);
  --accent-strong: rgba(139, 126, 245, 0.26);
  --accent-glow: rgba(139, 126, 245, 0.35);
  --accent-ink: #ededed;
}

:root[data-theme="coral"] {
  --accent: #f28b7c;
  --accent-soft: rgba(242, 139, 124, 0.14);
  --accent-strong: rgba(242, 139, 124, 0.26);
  --accent-glow: rgba(242, 139, 124, 0.35);
  --accent-ink: #1a0e0b;
}

:root[data-theme="dark"] {
  --accent: #e5b53f;
  --accent-soft: rgba(229, 181, 63, 0.14);
  --accent-strong: rgba(229, 181, 63, 0.26);
  --accent-glow: rgba(229, 181, 63, 0.35);
  --accent-ink: #0a0a0b;
}

/* ---------- RESET + BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'ss01', 'cv01', 'cv11';
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  min-height: 100vh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  background-image: linear-gradient(180deg, rgba(255,255,255,0.72), transparent 160px);
  background-attachment: fixed;
}

:root[data-theme="dark"] body,
:root[data-theme="amber"] body,
:root[data-theme="indigo"] body,
:root[data-theme="coral"] body {
  background-image:
    radial-gradient(at 15% -10%, var(--accent-soft) 0%, transparent 45%),
    radial-gradient(at 100% 110%, var(--accent-soft) 0%, transparent 40%);
}

#app {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 24px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  margin: 0 0 12px 0;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.15;
}
h1 { font-size: 32px; letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: 22px; letter-spacing: -0.02em; }
h3 { font-size: 16px; letter-spacing: -0.015em; }

p { margin: 0 0 12px 0; color: var(--text-dim); }
p.muted, .muted { color: var(--text-muted); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.005em;
}

input, textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%237e7e88' stroke-width='1.5' stroke-linecap='round' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ---------- HEADER ---------- */
.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-top: 8px;
}
.header .greet {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0;
}
.header .settings-btn {
  font-size: 20px;
  padding: 10px;
  color: var(--text-muted);
  border-radius: 12px;
  transition: background 0.15s, color 0.15s;
}
.header .settings-btn:hover,
.header .settings-btn:active {
  background: var(--surface);
  color: var(--text);
}

/* ---------- LIQUID GLASS CARD ---------- */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card.dense { padding: 12px 14px; }
.card.flat {
  background: var(--bg-elevated);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card.glow {
  background:
    radial-gradient(at 0% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--surface);
  border-color: var(--accent-strong);
  box-shadow: 0 0 40px -10px var(--accent-glow);
}
.card .card-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  min-height: 44px;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(at center, rgba(255,255,255,0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 8px 24px -12px var(--accent-glow);
  font-weight: 700;
}
.btn.primary:hover { background: var(--accent); filter: brightness(1.1); }
.btn.accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-strong);
  font-weight: 700;
}
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-soft);
}
.btn.full { width: 100%; }
.btn.sm { padding: 7px 11px; font-size: 12.5px; min-height: 32px; border-radius: 8px; font-weight: 600; }
.btn.lg { padding: 16px 22px; font-size: 15.5px; min-height: 52px; border-radius: 14px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row.stack { flex-direction: column; }
.btn-row > * { flex: 1; }

/* ---------- TAB BAR (Liquid Glass floating) ---------- */
#tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-top: 1px solid var(--border);
  padding: 10px env(safe-area-inset-right) calc(10px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  z-index: 100;
}

:root[data-theme="dark"] #tabs,
:root[data-theme="amber"] #tabs,
:root[data-theme="indigo"] #tabs,
:root[data-theme="coral"] #tabs {
  background: rgba(14, 14, 16, 0.75);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  color: var(--text-muted);
  font-size: 10.5px;
  min-height: 54px;
  border-radius: 12px;
  transition: color 0.2s;
  font-weight: 500;
}
.tab span { font-size: 20px; transition: transform 0.2s ease; }
.tab small { font-size: 10.5px; font-weight: 500; letter-spacing: -0.01em; }
.tab.active { color: var(--accent); }
.tab.active span { transform: translateY(-1px); }
.tab.dump span {
  background: var(--accent);
  color: var(--accent-ink);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -14px;
  box-shadow:
    0 8px 20px -6px var(--accent-glow),
    0 0 0 4px var(--bg);
  font-size: 20px;
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.tab.dump:active span { transform: scale(0.92); }

/* ---------- TASK LIST ---------- */
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.task:hover, .task:active {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.task.done { opacity: 0.45; }
.task.done .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--text-faint);
  flex-shrink: 0;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.25, 1.3);
}
.task-check::after {
  content: '✓';
  font-size: 12px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s, transform 0.2s;
}
.task.done .task-check {
  background: var(--success);
  border-color: var(--success);
}
.task.done .task-check::after { opacity: 1; transform: scale(1); }
.task-body { flex: 1; min-width: 0; }
.task-title {
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 5px;
  word-wrap: break-word;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  align-items: center;
}

/* ---------- BADGES — monochrome, subtle ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.area {
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.priority-p1 { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.badge.priority-p2 { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.badge.priority-p3 { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.badge.priority-p4 { background: rgba(255,255,255,0.03); color: var(--text-faint); }
.badge.time { background: var(--success-soft); color: var(--success); }
.badge.agent { background: rgba(139, 126, 245, 0.12); color: #aea0ff; }

/* ---------- BENTO GRID (home dashboard) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.bento .tile {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.bento .tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.bento .tile.span-2 { grid-column: span 2; }
.bento .tile.tall { min-height: 160px; }
.bento .tile .tile-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.bento .tile .tile-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}
.bento .tile .tile-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.bento .tile.accent {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 80%);
  border-color: var(--accent-strong);
}
.bento .tile.accent .tile-value { color: var(--accent); }

/* ---------- AREA GRID ---------- */
.area-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.area-tile {
  padding: 14px 14px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.area-tile:hover, .area-tile:active {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.area-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.8;
}
.area-tile .area-emoji { font-size: 20px; margin-bottom: 6px; }
.area-tile .area-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; letter-spacing: -0.01em; }
.area-tile .area-count { font-size: 11.5px; color: var(--text-muted); }

/* ---------- HERO INPUT (conversational on Today) ---------- */
.hero-input {
  padding: 20px;
  background:
    radial-gradient(at 0% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--surface);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 14px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.hero-input:focus-within {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.hero-input .hero-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hero-input .hero-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero-input input,
.hero-input textarea {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 17px;
  font-weight: 500;
  min-height: 24px;
  color: var(--text);
  letter-spacing: -0.015em;
  box-shadow: none;
}
.hero-input input:focus, .hero-input textarea:focus {
  background: transparent;
  box-shadow: none;
}

/* ---------- MIC (Glass Orb, no waveform) ---------- */
.mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
}
.mic-btn {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background:
    radial-gradient(at 30% 30%, rgba(255,255,255,0.2), transparent 50%),
    var(--accent);
  color: var(--accent-ink);
  font-size: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 12px 40px -8px var(--accent-glow),
    inset 0 -2px 4px rgba(0,0,0,0.15),
    inset 0 2px 4px rgba(255,255,255,0.2);
  position: relative;
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  border: none;
  cursor: pointer;
}
.mic-btn:active { transform: scale(0.94); }
.mic-btn.recording {
  background:
    radial-gradient(at 30% 30%, rgba(255,255,255,0.3), transparent 50%),
    var(--danger);
  animation: orb-pulse 1.8s ease-in-out infinite;
}
@keyframes orb-pulse {
  0%, 100% {
    box-shadow:
      0 12px 40px -8px rgba(232, 92, 92, 0.4),
      0 0 0 0 rgba(232, 92, 92, 0.3);
  }
  50% {
    box-shadow:
      0 12px 40px -8px rgba(232, 92, 92, 0.6),
      0 0 0 18px rgba(232, 92, 92, 0);
  }
}

.mic-hint {
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
  font-weight: 500;
}

/* ---------- RITUAL / STEPS ---------- */
.ritual {
  counter-reset: step;
}
.ritual .step {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  counter-increment: step;
}
.ritual .step::before {
  content: counter(step);
  display: inline-flex;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-right: 10px;
  vertical-align: middle;
}
.ritual .step h3 { display: inline; font-size: 15px; }

/* ---------- EMPTY STATES ---------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty .emoji {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
  opacity: 0.8;
}

/* ---------- MODAL / SHEET ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: backdrop-in 0.25s ease-out;
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sheet {
  background: var(--bg-elevated);
  border-radius: 22px 22px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  animation: sheet-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet .sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.sheet h2 { margin-bottom: 18px; }

/* ---------- TRIAGE ---------- */
.triage-row {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}
.triage-row .tr-text { font-size: 14.5px; margin-bottom: 10px; font-weight: 500; }
.triage-row .tr-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.triage-row select {
  padding: 7px 10px;
  font-size: 12.5px;
  flex: 1;
  min-width: 100px;
}

/* ---------- AGENT CARDS ---------- */
.agent-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  transition: all 0.2s;
}
.agent-card:hover { border-color: var(--border-strong); }
.agent-card .agent-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.agent-card .agent-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.agent-card .agent-role { font-size: 11.5px; color: var(--text-muted); }
.agent-card .agent-cost {
  margin-left: auto;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-weight: 600;
}
.agent-card .agent-desc { font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; line-height: 1.4; }

/* ---------- SCHEDULE / DAY BLOCK ---------- */
.day-block {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.day-block .day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.day-block .day-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.day-block .day-date { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

.time-slot {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
}
.time-slot:last-child { border-bottom: none; }
.time-slot .ts-time {
  flex: 0 0 56px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 500;
}
.time-slot .ts-title { flex: 1; color: var(--text-dim); }
.time-slot.habit .ts-title::before {
  content: '🔒';
  margin-right: 4px;
  font-size: 10px;
}

/* ---------- SETTINGS ---------- */
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-row:last-child { border-bottom: none; }
.settings-row label { font-size: 13.5px; font-weight: 500; }
.settings-row .val { color: var(--text-muted); font-size: 12.5px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(32, 32, 36, 0.95);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.35s cubic-bezier(0.2, 0.8, 0.25, 1.3);
  max-width: 85vw;
  letter-spacing: -0.005em;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 16px) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ---------- LOADER ---------- */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- COMMAND PALETTE ---------- */
.cmdk-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 400;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(15vh, 120px);
  animation: backdrop-in 0.18s ease-out;
}
.cmdk {
  background: rgba(22, 22, 26, 0.92);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  width: min(560px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  animation: cmdk-in 0.2s cubic-bezier(0.2, 0.8, 0.25, 1);
}
@keyframes cmdk-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cmdk-input {
  padding: 16px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
}
.cmdk-input:focus {
  background: transparent;
  box-shadow: none;
}
.cmdk-list {
  overflow-y: auto;
  padding: 6px;
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 14px;
}
.cmdk-item.active, .cmdk-item:hover {
  background: var(--surface-hover);
}
.cmdk-item .cmdk-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.cmdk-item .cmdk-meta { color: var(--text-muted); font-size: 11.5px; margin-left: auto; flex-shrink: 0; }

/* ---------- AREA LEFT-STRIPE COLORS (monochrome task rows, tiny color only) ---------- */
.task[data-area="camp"] { border-left: 2px solid var(--area-camp); }
.task[data-area="family"] { border-left: 2px solid var(--area-family); }
.task[data-area="chabad"] { border-left: 2px solid var(--area-chabad); }
.task[data-area="finance"] { border-left: 2px solid var(--area-finance); }
.task[data-area="content"] { border-left: 2px solid var(--area-content); }
.task[data-area="daf"] { border-left: 2px solid var(--area-daf); }
.task[data-area="fitness"] { border-left: 2px solid var(--area-fitness); }
.task[data-area="guitar"] { border-left: 2px solid var(--area-guitar); }
.task[data-area="hockey"] { border-left: 2px solid var(--area-hockey); }
.task[data-area="kids"] { border-left: 2px solid var(--area-kids); }
.task[data-area="health"] { border-left: 2px solid var(--area-health); }
.task[data-area="sidehustle"] { border-left: 2px solid var(--area-sidehustle); }
.task[data-area="personal"] { border-left: 2px solid var(--area-personal); }

.area-tile[data-area="camp"]::before { background: var(--area-camp); }
.area-tile[data-area="family"]::before { background: var(--area-family); }
.area-tile[data-area="chabad"]::before { background: var(--area-chabad); }
.area-tile[data-area="finance"]::before { background: var(--area-finance); }
.area-tile[data-area="content"]::before { background: var(--area-content); }
.area-tile[data-area="daf"]::before { background: var(--area-daf); }
.area-tile[data-area="fitness"]::before { background: var(--area-fitness); }
.area-tile[data-area="guitar"]::before { background: var(--area-guitar); }
.area-tile[data-area="hockey"]::before { background: var(--area-hockey); }
.area-tile[data-area="kids"]::before { background: var(--area-kids); }
.area-tile[data-area="health"]::before { background: var(--area-health); }
.area-tile[data-area="sidehustle"]::before { background: var(--area-sidehustle); }
.area-tile[data-area="personal"]::before { background: var(--area-personal); }

/* ---------- JEWISH BANNER ---------- */
.jewish-banner {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ---------- THEME PICKER ---------- */
.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-swatch {
  border-radius: 14px;
  padding: 14px;
  border: 2px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  min-height: 100px;
}
.theme-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.theme-swatch .swatch-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 auto 8px;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.2);
}
.theme-swatch .swatch-name {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.theme-swatch .swatch-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- B2 OPERATOR HOME ---------- */
.ops-home {
  padding-top: 8px;
  padding-left: 12px;
  padding-right: 12px;
  max-width: 430px;
}
.ops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin: -2px -12px 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.ops-header h1 {
  font-size: 14px;
  margin: 0;
  letter-spacing: 0;
  text-align: left;
}
.ops-eyebrow,
.ops-panel-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ops-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ops-header .ops-eyebrow {
  display: none;
}
.ops-menu-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 18px;
}
.ops-date-chip {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ops-stat {
  min-width: 42px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}
.ops-stat strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
}
.ops-stat span {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
}
.ops-stat.warn strong { color: var(--warn); }
.ops-theme-toggle,
.ops-icon-btn,
.ops-link {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}
.ops-icon-btn {
  width: 30px;
  padding: 0;
}
.ops-link {
  color: var(--text);
}
.ops-capture {
  width: 100%;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--surface) 0%, var(--surface-hover) 100%);
  box-shadow: 0 14px 44px -30px rgba(17, 24, 39, 0.34);
  text-align: left;
}
.ops-capture-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 0 0 7px rgba(255,255,255,0.13),
    0 16px 34px -22px var(--accent);
}
.ops-capture-ring span {
  font-size: 34px;
}
.ops-capture-copy h2 {
  margin: 2px 0 5px;
  font-size: 23px;
  letter-spacing: 0;
}
.ops-capture-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}
.b2-hero {
  display: grid;
  grid-template-columns: minmax(116px, 0.64fr) minmax(158px, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 44px -34px rgba(17, 24, 39, 0.35);
}
.b2-capture {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 224px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 35%, var(--success-soft), transparent 46%),
    var(--surface-hover);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
.b2-focus-ring {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    0 0 0 8px var(--success-soft),
    0 0 0 12px rgba(31, 138, 91, 0.08),
    0 16px 40px -24px var(--accent);
}
.b2-focus-ring span {
  font-size: 48px;
}
.b2-capture strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.b2-capture small {
  display: block;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}
.b2-mini-rail {
  position: relative;
  display: grid;
  gap: 7px;
  padding-left: 0;
}
.b2-mini-rail::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--border-strong);
}
.b2-mini-slot {
  display: grid;
  grid-template-columns: 29px 10px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  text-align: left;
  min-width: 0;
}
.b2-mini-time {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.b2-mini-dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--text-faint);
}
.b2-mini-slot.protected .b2-mini-dot { border-color: var(--success); }
.b2-mini-slot.event .b2-mini-dot { border-color: var(--warn); }
.b2-mini-slot.task .b2-mini-dot { border-color: var(--info); }
.b2-mini-card {
  display: block;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 9px;
  background: var(--surface-hover);
  border: 1px solid var(--border-subtle);
}
.b2-mini-card strong,
.b2-mini-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b2-mini-card strong {
  color: var(--text);
  font-size: 11.5px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.b2-mini-card small {
  color: var(--text-muted);
  font-size: 10px;
  margin-top: 2px;
  white-space: nowrap;
}
.b2-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 54%) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  width: calc(100vw - 24px);
  max-width: 406px;
  overflow: hidden;
}
.b2-left-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.b2-today-block {
  min-height: 42px;
}
.b2-today-block h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}
.b2-today-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
}
.b2-main-capture {
  display: grid;
  justify-items: center;
  min-height: 154px;
  padding: 12px 9px 10px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(31, 138, 91, 0.09), transparent 50%),
    var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px -28px rgba(17, 24, 39, 0.45);
  text-align: center;
}
.b2-main-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  background: var(--surface);
  border: 3px solid rgba(123, 229, 151, 0.72);
  box-shadow:
    inset 0 0 0 6px rgba(31, 138, 91, 0.08),
    0 10px 28px -24px rgba(17, 24, 39, 0.8);
}
.b2-main-ring span {
  font-size: 42px;
  line-height: 1;
  filter: grayscale(1) contrast(1.1);
}
.b2-main-capture strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.b2-main-capture small {
  color: var(--success);
  font-size: 10.5px;
  font-weight: 800;
}
.b2-card {
  min-width: 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 8px 24px -24px rgba(17, 24, 39, 0.42);
}
.b2-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px 4px;
}
.b2-section-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}
.b2-section-head h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 10px;
}
.b2-section-head button {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.b2-area-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 0 7px 8px;
}
.b2-area-tile {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 30px;
  padding: 3px 2px 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 7.6px;
  font-weight: 720;
  text-align: center;
  overflow: hidden;
}
.b2-area-icon {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: color-mix(in srgb, var(--area-color) 13%, white);
  color: var(--area-color);
  font-size: 9px;
  line-height: 1;
}
.b2-area-tile b {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--area-color);
  color: white;
  font-size: 7px;
  line-height: 12px;
}
.b2-compact-list {
  display: grid;
}
.b2-task-line,
.b2-agent-line {
  min-width: 0;
  width: 100%;
  min-height: 25px;
  padding: 4px 8px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}
.b2-task-line {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
}
.b2-check-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1.3px solid var(--text-faint);
}
.b2-task-line strong,
.b2-agent-line small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 650;
}
.b2-task-line em,
.b2-agent-line em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 9px;
  font-style: normal;
  text-align: right;
}
.b2-agent-line {
  display: grid;
  grid-template-columns: 20px 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 7px;
}
.b2-agent-avatar {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--success);
  color: white;
  font-size: 9px;
}
.b2-agent-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
}
.b2-empty-line {
  border-top: 1px solid var(--border-subtle);
  padding: 8px 10px;
  color: var(--text-muted);
  font-size: 10.5px;
}
.b2-day-rail {
  position: sticky;
  top: 8px;
  min-width: 0;
  min-height: 566px;
}
.b2-rail-axis {
  position: relative;
  min-height: 566px;
  padding-left: 34px;
  min-width: 0;
}
.b2-rail-axis::before,
.b2-rail-axis::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
}
.b2-rail-axis::before { left: 30px; }
.b2-rail-axis::after { left: 48px; }
.b2-hour-mark {
  position: absolute;
  left: 0;
  width: 28px;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 7px;
  font-weight: 760;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.b2-rail-event {
  --rail-color: var(--text-faint);
  position: absolute;
  left: 40px;
  right: 0;
  transform: translateY(-12px);
  min-height: 54px;
  padding: 7px 7px 6px;
  border: 1px solid color-mix(in srgb, var(--rail-color) 32%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--rail-color) 10%, white);
  text-align: left;
  box-shadow: 0 8px 22px -22px rgba(17, 24, 39, 0.4);
}
.b2-rail-event i {
  position: absolute;
  left: -14px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--rail-color);
  box-shadow: 0 0 0 3px var(--surface);
}
.b2-rail-event strong,
.b2-rail-event span,
.b2-rail-event small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b2-rail-event strong {
  color: var(--rail-color);
  font-size: 9.5px;
  font-weight: 850;
  white-space: nowrap;
}
.b2-rail-event span {
  color: var(--text);
  font-size: 10.2px;
  font-weight: 740;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.b2-rail-event small {
  color: var(--text-muted);
  font-size: 8.8px;
  margin-top: 2px;
  white-space: nowrap;
}
.b2-rail-event.protected { --rail-color: #2f9e44; }
.b2-rail-event.event { --rail-color: #f97316; }
.b2-rail-event.task { --rail-color: #2563eb; }
.b2-rail-event.reminder { --rail-color: #d97706; }
.b2-rail-event.target { --rail-color: #6b7280; }
.b2-rail-event.target:first-of-type { --rail-color: #2f9e44; }
.ops-area-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 0 0 12px;
  margin: 0;
}
.ops-area-chip {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 4px;
  min-height: 47px;
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
}
.ops-area-chip .dot {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--accent);
}
.ops-area-chip b {
  display: none;
}
.ops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.ops-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 12px 34px -30px rgba(17, 24, 39, 0.28);
}
.ops-panel h3 {
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: 0;
}
.ops-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ops-rail {
  position: relative;
  display: grid;
  gap: 2px;
}
.ops-rail::before {
  content: '';
  position: absolute;
  left: 57px;
  top: 11px;
  bottom: 11px;
  width: 1px;
  background: var(--border-strong);
}
.ops-rail-row {
  display: grid;
  grid-template-columns: 48px 18px 1fr;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 48px;
  padding: 5px 0;
  text-align: left;
}
.rail-time {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rail-line {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 2px solid var(--text-faint);
}
.ops-rail-row.protected .rail-line {
  border-color: var(--success);
  background: var(--success-soft);
}
.ops-rail-row.event .rail-line {
  border-color: var(--warn);
  background: var(--warn-soft);
}
.ops-rail-row.task .rail-line {
  border-color: var(--info);
  background: var(--info-soft);
}
.rail-body {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-hover);
}
.rail-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}
.rail-meta {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.3;
  margin-top: 2px;
}
.ops-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.ops-task-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface-hover);
  cursor: pointer;
}
.ops-check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid var(--text-faint);
  background: var(--surface);
}
.ops-task-title {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}
.ops-task-meta {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
  margin-top: 3px;
}
.ops-route-pill,
.ops-status {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-dim);
  border: 1px solid var(--accent-strong);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.ops-empty {
  display: grid;
  gap: 2px;
  color: var(--text-muted);
  font-size: 13px;
}
.ops-empty strong {
  color: var(--text);
}
.ops-agent-list {
  display: grid;
  gap: 7px;
}
.ops-agent-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  padding: 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface-hover);
}
.ops-agent-avatar,
.ops-agent-mini span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ops-agent-copy {
  min-width: 0;
}
.ops-agent-copy strong,
.ops-agent-copy small {
  display: block;
}
.ops-agent-copy strong {
  color: var(--text);
  font-size: 13px;
}
.ops-agent-copy small {
  color: var(--text-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}
.ops-agent-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface-hover);
  font-size: 12px;
}
.ops-agent-mini strong {
  font-size: 12px;
}
.jewish-banner {
  border-radius: 10px;
  background: var(--surface);
}
.ops-home .jewish-banner {
  display: none;
}

@media (min-width: 620px) {
  .ops-grid {
    grid-template-columns: 0.95fr 1.05fr;
  }
  .ops-agents {
    grid-column: span 2;
  }
}

@media (max-width: 390px) {
  .ops-header {
    display: block;
  }
  .ops-header-actions {
    margin-top: 8px;
  }
  .ops-capture {
    grid-template-columns: 76px 1fr;
    padding: 13px;
  }
  .ops-capture-ring {
    width: 72px;
    height: 72px;
  }
  .ops-capture-copy h2 {
    font-size: 20px;
  }
  .b2-hero {
    grid-template-columns: minmax(106px, 0.62fr) minmax(146px, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .b2-capture {
    min-height: 216px;
  }
  .b2-focus-ring {
    width: 96px;
    height: 96px;
    box-shadow:
      0 0 0 6px var(--success-soft),
      0 0 0 10px rgba(31, 138, 91, 0.08),
      0 14px 34px -24px var(--accent);
  }
  .b2-focus-ring span {
    font-size: 40px;
  }
  .b2-capture strong {
    font-size: 12px;
  }
  .b2-capture small {
    font-size: 10.5px;
  }
  .ops-rail-row {
    grid-template-columns: 44px 16px 1fr;
  }
  .ops-rail::before {
    left: 52px;
  }
}

/* ---------- PRINT ---------- */
@media print {
  body { background: white; color: black; padding: 0; }
  #app { max-width: 100%; padding: 20px; }
  #tabs, .settings-btn, .btn-row, .header .settings-btn, .jewish-banner, .card.glow, .hero-input, .bento .tile { display: none; }
  .card { background: white; border: 1px solid #999; box-shadow: none; page-break-inside: avoid; backdrop-filter: none; }
  #shabbos-printable { border: 2px solid black; page-break-inside: avoid; }
  #shabbos-printable h2 { color: black; }
  #shabbos-printable h3 { color: black; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
  h1, h2, h3, p, div { color: black; }
  .muted { color: #666; }
}

/* ---------- MOTION (View Transitions API) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- LEGACY COMPAT (map old var names used inline in views.js) ---------- */
:root {
  --bg-2: var(--bg-elevated);
  --card: var(--surface);
  --card-2: var(--surface-hover);
  --primary: var(--accent);
  --primary-2: var(--accent);
  --muted: var(--text-muted);
  --dim: var(--text-faint);
}
