/* companion — the Chief of Staff Companion dashboard. 2026.
   Shares the Love & Maneuver heart mark and design language (Inter, glass
   chrome) with tasks/pipeline; its OWN accent is a calm "command" deep indigo
   on a slate-night ground — quiet, legible, never alarming. Dark by design
   (this is a phone-native glance surface used at the start of the day).
   Status pills carry the only loud colour: green / amber / red. */

/* `hidden` must win over component `display` rules. */
[hidden] { display: none !important; }

:root {
  color-scheme: dark;

  --bg: #0d0f1a;
  --bg-grad:
    radial-gradient(120% 80% at 50% -10%, rgba(99, 102, 241, 0.10) 0%, rgba(13, 15, 26, 0) 44%),
    radial-gradient(90% 60% at 100% 0%, rgba(56, 70, 130, 0.08) 0%, rgba(13, 15, 26, 0) 50%);

  --surface: #15182a;
  --surface-2: #1b1f33;
  --surface-3: #232742;
  --surface-glass: rgba(18, 21, 38, 0.74);

  --ink: #eef0f7;
  --ink-soft: #a6abc4;
  --ink-faint: #6c7191;
  --line: #262b44;
  --line-strong: #353c5e;

  /* the command accent — deep indigo */
  --accent: #818cf8;
  --accent-2: #a5b0ff;
  --accent-strong: #6366f1;
  --accent-dim: rgba(129, 140, 248, 0.16);
  --accent-faint: rgba(129, 140, 248, 0.08);
  --accent-ink: #0c0e1f;
  --ring: rgba(129, 140, 248, 0.40);

  /* status pills — green / amber / red */
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.15);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.15);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.16);

  /* app badges (ref.app) */
  --app-tasks: #5fc795;
  --app-email: #f59e0b;
  --app-pipeline: #ffd60a;

  /* on-deck size chips */
  --size-s: #34d399;
  --size-m: #fbbf24;
  --size-l: #818cf8;

  --danger: #f8716b;

  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 36px -12px rgba(0, 0, 0, 0.72);
  --shadow-lg: 0 40px 90px -28px rgba(0, 0, 0, 0.86);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--ui);
  color: var(--ink);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.011em;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }
.mono { font-family: var(--mono); }
.empty-hint { padding: 3rem 1rem; line-height: 1.7; max-width: 52ch; margin: 0 auto; color: var(--ink-soft); text-align: center; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── header / chrome ── */
.chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem clamp(1rem, 4vw, 2.25rem);
  background: var(--surface-glass);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.mark { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--accent); }
.heart { width: 1.4rem; height: 1.4rem; filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.45)); }
.mark-word {
  font-family: var(--mono);
  font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink);
}
.chrome-nav { display: flex; align-items: center; gap: 1rem; }
.who { color: var(--ink-faint); font-size: 0.74rem; font-family: var(--mono); }

main { max-width: 720px; margin: 0 auto; padding: clamp(1rem, 3.5vw, 2rem) clamp(0.9rem, 4vw, 2rem) 5rem; }

/* ── buttons (shared language with tasks/pipeline) ── */
.btn {
  font-family: var(--ui);
  font-size: 0.82rem;
  font-weight: 550;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; box-shadow: 0 4px 16px -6px var(--ring); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-sm { font-size: 0.74rem; padding: 0.34rem 0.62rem; }
.btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }

.icon-btn {
  font-family: var(--ui);
  background: none; border: 1px solid var(--line); cursor: pointer;
  color: var(--ink-soft); font-size: 0.95rem; line-height: 1;
  width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); transition: background 0.12s, color 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { border-color: var(--accent); color: var(--ink); }
.icon-btn.spin { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── header card (Schwerpunkt) ── */
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.1rem;
}
.hero-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem;
}
.hero-label {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint);
}
.hero-text { font-size: 1.18rem; font-weight: 650; line-height: 1.32; margin: 0.35rem 0 0.6rem; letter-spacing: -0.02em; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; font-size: 0.78rem; color: var(--ink-soft); }
.hero-meta .dot { color: var(--ink-faint); }
.freshness { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); }
.mode-chip {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem; border-radius: 999px;
  background: var(--accent-faint); color: var(--accent-2); border: 1px solid var(--accent-dim);
}

/* status pills (Schwerpunkt + team) */
.pill {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.pill::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: currentColor; }
.pill-ok { color: var(--ok); background: var(--ok-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-bad { color: var(--bad); background: var(--bad-bg); }
.pill-neutral { color: var(--ink-soft); background: var(--surface-3); }

/* federation-errors banner — subtle, not alarming */
.fed-banner {
  margin-top: 0.7rem; padding: 0.5rem 0.7rem;
  font-size: 0.76rem; color: var(--warn);
  background: var(--warn-bg); border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--r-sm); line-height: 1.45;
}

/* ── sections ── */
.section { margin-bottom: 1.4rem; }
.section-head {
  display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.55rem;
}
.section-title {
  font-size: 0.92rem; font-weight: 700; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.section-count { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); }
.section-tools { margin-left: auto; display: inline-flex; gap: 0.35rem; align-items: center; }

/* generic card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.8rem 0.9rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.5rem;
}
.card-title { font-size: 0.96rem; font-weight: 600; line-height: 1.34; overflow-wrap: anywhere; }
.card-why { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.5; margin-top: 0.3rem; }
.card-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* fires get a quiet left-edge heat */
.fire { border-left: 3px solid var(--bad); }

/* ── ref link + app badge ── */
.ref-line { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.45rem; font-size: 0.8rem; }
.app-badge {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.12rem 0.4rem; border-radius: 999px;
  border: 1px solid currentColor; opacity: 0.95; flex: 0 0 auto;
}
.app-badge.app-tasks { color: var(--app-tasks); }
.app-badge.app-email { color: var(--app-email); }
.app-badge.app-pipeline { color: var(--app-pipeline); }
.app-badge.app-other { color: var(--ink-faint); }
.suggested-block {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent-2);
  background: var(--accent-faint); padding: 0.15rem 0.45rem; border-radius: var(--r-sm);
}

/* ── day plan timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 0.8rem; }
.tl-item {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.7rem;
  padding: 0.5rem 0; border-left: 2px solid var(--line); padding-left: 0.8rem;
  margin-left: 0.4rem; position: relative;
}
.tl-item::before {
  content: ""; position: absolute; left: -0.34rem; top: 0.7rem;
  width: 0.6rem; height: 0.6rem; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.tl-item.tl-meeting::before { background: var(--accent); border-color: var(--accent); }
.tl-item.tl-block::before { background: var(--surface); border-color: var(--ok); }
.tl-time { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); padding-top: 0.05rem; }
.tl-label { font-size: 0.88rem; line-height: 1.4; }
.tl-item.tl-meeting .tl-label { font-weight: 600; }
.tl-item.tl-block .tl-label { color: var(--ink-soft); }
.tl-kind {
  font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-faint); display: block; margin-top: 0.1rem;
}

.block-assign { display: flex; align-items: flex-start; gap: 0.6rem; }
.block-assign .ba-block {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent-2);
  flex: 0 0 auto; padding-top: 0.05rem;
}
.ba-body { flex: 1; min-width: 0; }
.ba-outcome { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.2rem; line-height: 1.45; }

/* ── on-deck ── */
.got-min { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.got-min button {
  font-family: var(--ui); font-size: 0.72rem; font-weight: 600;
  padding: 0.28rem 0.6rem; border: none; border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background 0.12s, color 0.12s;
}
.got-min button.active { background: var(--accent-dim); color: var(--accent-2); }
.size-chip {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700;
  width: 1.3rem; height: 1.3rem; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid currentColor;
}
.size-chip.size-S { color: var(--size-s); }
.size-chip.size-M { color: var(--size-m); }
.size-chip.size-L { color: var(--size-l); }
.whose-tag { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-faint); }

/* ── rituals ── */
.ritual { display: flex; align-items: flex-start; gap: 0.6rem; }
.ritual-bell { flex: 0 0 auto; font-size: 0.9rem; padding-top: 0.1rem; color: var(--ink-faint); }
.ritual.mode-gentle { opacity: 0.78; background: transparent; box-shadow: none; border-style: dashed; }
.ritual.mode-protected {
  border-color: var(--accent-dim); background: var(--accent-faint);
}
.ritual-skill { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-2); }
.ritual-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.2rem; line-height: 1.45; }
.ritual-mode-tag {
  font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--ink-faint);
}

/* ── team table ── */
.team-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.team-table th {
  text-align: left; font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint);
  padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line);
}
.team-table td { padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
.team-table tr:last-child td { border-bottom: none; }
.team-who { font-weight: 600; white-space: nowrap; }
.team-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── watch list ── */
.watch-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; font-size: 0.84rem; color: var(--ink-soft); }
.watch-item::before { content: "•"; color: var(--ink-faint); }

/* ── surfaces (collapsible markdown panels) ── */
.surface-panel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: 0.5rem; overflow: hidden; }
.surface-summary {
  list-style: none; cursor: pointer; padding: 0.7rem 0.9rem;
  font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}
.surface-summary::-webkit-details-marker { display: none; }
.surface-caret { font-size: 0.7rem; color: var(--ink-faint); transition: transform 0.15s; }
details[open] .surface-caret { transform: rotate(90deg); }
.surface-body { padding: 0 0.9rem 0.9rem; border-top: 1px solid var(--line); }

/* rendered markdown */
.md { font-size: 0.86rem; line-height: 1.6; color: var(--ink-soft); }
.md h1, .md h2, .md h3 { color: var(--ink); line-height: 1.3; margin: 0.9rem 0 0.4rem; letter-spacing: -0.01em; }
.md h1 { font-size: 1.05rem; }
.md h2 { font-size: 0.98rem; }
.md h3 { font-size: 0.9rem; }
.md p { margin: 0.5rem 0; }
.md ul, .md ol { margin: 0.5rem 0 0.5rem 1.2rem; }
.md li { margin: 0.2rem 0; }
.md strong { color: var(--ink); font-weight: 650; }
.md em { font-style: italic; }
.md a { color: var(--accent-2); }
.md code {
  font-family: var(--mono); font-size: 0.8em;
  background: var(--surface-3); padding: 0.1rem 0.35rem; border-radius: 5px;
}
.md pre { background: var(--surface-3); padding: 0.7rem 0.8rem; border-radius: var(--r-sm); overflow-x: auto; margin: 0.6rem 0; }
.md pre code { background: none; padding: 0; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 0.8rem 0; }

.email-cta { margin-top: 0.6rem; }

/* ── toast ── */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%) translateY(0.5rem);
  background: var(--surface-3); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.55rem 1rem; font-size: 0.82rem; font-weight: 550;
  box-shadow: var(--shadow-md); z-index: 50;
  opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* an item softly fading away after an optimistic reshape */
.card.is-resolving { opacity: 0.45; transition: opacity 0.25s; }

/* ── responsive ── */
@media (min-width: 640px) {
  .hero-text { font-size: 1.32rem; }
}
