/* ---------- reset / tokens ----------
   Benefi light-indigo design language (the standard for EG tools).
   Light is the default (:root); dark-indigo rides the data-theme switch and
   OS-dark auto mode. The --bg-side / --row-* / --nav-active-text / --badge-bg /
   --text-faint tokens are the Command Center sidebar aliases, pointed at the
   Benefi palette so the existing sidebar CSS renders indigo unchanged. */
:root {
  --bg: #fafbfc;
  --bg-alt: #ffffff;
  --bg-raised: #f3f4f6;
  --border: #e8eaed;
  --border-soft: #eef0f2;
  --text: #1c1f23;
  --text-muted: #5f6571;
  --text-dim: #646b77;
  --accent: #6366f1;
  --accent-dim: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-on: #4338ca;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --sidebar-w: 232px;
  --sidebar-bg: #ffffff;
  --section-label: #646b77;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --bg-side: var(--sidebar-bg);
  --row-hover: var(--bg-raised);
  --row-active: var(--accent-soft);
  --nav-active-text: var(--accent-on);
  --badge-bg: var(--bg-raised);
  --text-faint: var(--section-label);
  /* Solid accent buttons with white text (+ New note, Suggest, primary CTAs).
     Separate from --accent because dark mode's --accent (#818cf8) is light
     enough to read as link text on a dark page, which also makes white text
     on top of it too faint (~3:1). Light mode: same as --accent. */
  --accent-fill: #6366f1;
  --accent-fill-hover: #4f46e5;
  /* ---- Button hierarchy (UI audit 2026-10-13). One --btn-primary per view; Accept = success;
     Remove = danger; everything else is secondary/tertiary. Contrast = WCAG 2.x ratios, white label on fill. ---- */
  --btn-primary-bg: #4f46e5;        /* white 6.29:1 */
  --btn-primary-bg-hover: #4338ca;  /* white 7.90:1 */
  --btn-primary-fg: #ffffff;
  --btn-success-bg: #047857;        /* white 5.48:1 */
  --btn-success-bg-hover: #065f46;  /* white 7.68:1 */
  --btn-success-fg: #ffffff;
  --btn-danger-bg: #b91c1c;         /* white 6.47:1 */
  --btn-danger-bg-hover: #991b1b;   /* white 8.31:1 */
  --btn-danger-fg: #ffffff;
  --btn-secondary-bg: var(--bg-alt);
  --btn-secondary-bg-hover: var(--bg-raised);
  --btn-secondary-fg: var(--text);
  --btn-secondary-border: #c9ced8;
  --link: #4338ca;                  /* 7.90:1 on white */
  --link-hover: #3730a3;
  --chip-bg: var(--bg-raised); --chip-fg: var(--text-muted); --chip-border: var(--border);
  --avatar-bg: var(--bg-raised); --avatar-fg: var(--text-muted);
  /* status colours as TEXT (--success/--warn/--danger stay for fills, borders, icons) */
  --success-text: #047857;          /* 5.48:1 on white */
  --warn-text: #b45309;             /* 5.02:1 */
  --danger-text: #b91c1c;           /* 6.47:1 */
  color-scheme: light;
}

/* Auto mode (no data-theme attr) on an OS set to dark → dark-indigo. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #1e1e1e;
    --bg-alt: #262626;
    --bg-raised: #2c2c2e;
    --border: #333336;
    --border-soft: #2a2a2c;
    --text: #e9eaed;
    --text-muted: #9aa0aa;
    --text-dim: #9298a3;
    --accent: #818cf8;
    --accent-dim: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.16);
    --accent-on: #c7ccff;
    --sidebar-bg: #1e1e1e;
    --section-label: #9298a3;
    --bg-side: #1e1e1e;
    --row-hover: #2c2c2e;
    --row-active: rgba(99, 102, 241, 0.16);
    --nav-active-text: #c7ccff;
    --badge-bg: #2c2c2e;
    --text-faint: #9298a3;
    --accent-fill: #4f46e5;
    --accent-fill-hover: #4338ca;
    /* ---- Button hierarchy (UI audit 2026-10-13), dark values; see the light block for the rules. ---- */
    --btn-primary-bg: #5659f0;        /* white 5.14:1; 3.21:1 on the card */
    --btn-primary-bg-hover: #5b5df1;  /* white 4.91:1 */
    --btn-primary-fg: #ffffff;
    --btn-success-bg: #048157;        /* white 4.90:1 */
    --btn-success-bg-hover: #04865a;  /* white 4.60:1 */
    --btn-success-fg: #ffffff;
    --btn-danger-bg: #dc2626;         /* white 4.83:1 */
    --btn-danger-bg-hover: #d62222;   /* white 5.11:1 */
    --btn-danger-fg: #ffffff;
    --btn-secondary-bg: var(--bg-alt);
    --btn-secondary-bg-hover: var(--bg-raised);
    --btn-secondary-fg: var(--text);
    --btn-secondary-border: #4a4f5a;  /* 2.01:1 on the card */
    --link: #a5b4fc;                  /* 8.27:1 on the card */
    --link-hover: #c7ccff;
    --chip-bg: var(--bg-raised); --chip-fg: var(--text-muted); --chip-border: var(--border);
    --avatar-bg: var(--bg-raised); --avatar-fg: var(--text-muted);
    --success-text: #34d399;          /* 8.58:1 on the card */
    --warn-text: #fbbf24;             /* 9.88:1 */
    --danger-text: #f87171;           /* 5.96:1 */
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { overflow: hidden; height: 100vh; }

#app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

a { color: inherit; text-decoration: none; }
input, button, textarea { font: inherit; color: inherit; }
input:focus-visible, button:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.context-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.context-header p { margin: 0; }
.context-draft { border: 1px solid var(--border); border-radius: 8px; background: var(--bg-alt); padding: 16px; margin-bottom: 16px; overflow-wrap: anywhere; }
.context-draft h3 { margin-top: 0; }
.context-draft-actions { display: flex; gap: 8px; margin-top: 16px; }
#ppanel-context .context-header { margin-bottom: 12px; }
#ppanel-context .context-toolbar {
  justify-content: flex-end; flex-direction: row; align-items: center;
  padding: 0; border: 0; margin-bottom: 12px;
}
#ppanel-context :is(button, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#context-view { min-width: 0; }
.context-content {
  width: 100%; min-width: 0; background: var(--bg-alt); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 20px 24px;
  font-size: 14px; line-height: 1.65; overflow-wrap: anywhere;
}
.context-content .context-document-header { margin-bottom: 18px; }
.context-content h1 { margin: 0 0 2px; font-size: 16px; line-height: 1.5; font-weight: 600; }
.context-content p { margin: 0 0 12px; }
.context-content .context-source-meta { font-size: 12px; margin: 0; color: var(--text-muted); }
.context-content .context-section + .context-section { margin-top: 18px; }
.context-content h2 {
  margin: 0 0 6px; font-size: 11px; font-weight: 600; line-height: 1.5;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.context-content h2.context-growth-label { color: var(--warn-text); }
.context-content ul { list-style-type: disc; margin: 0; padding: 3px 0 0 19px; }
.context-content li { padding-left: 3px; margin: 0 0 10px; }
.context-content li:last-child { margin-bottom: 0; }
.context-content li::marker { color: var(--text-muted); font-size: .75em; }
.context-content strong { font-weight: 600; color: inherit; }
.context-content ul ul { margin: 6px 0 0 18px; padding: 0 0 0 17px; color: var(--text-muted); }
.context-content ul ul > li { padding-left: 2px; }
.context-content .context-date, .context-content .context-citation { color: var(--text-muted); font-size: 12px; }
.context-content .context-date { white-space: nowrap; }
@media (max-width: 700px) {
  .context-content { padding: 17px 16px; }
  #ppanel-context .context-header { gap: 10px; }
  #ppanel-context .context-header p { font-size: 13px; }
  #ppanel-context .context-header .btn { margin-left: auto; }
}
.pa-agenda, .pa-prep { display: inline-block; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-raised); color: var(--text-muted); font-size: 11px; padding: 1px 7px; margin-top: 4px; }

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-header {
  padding: 14px 16px 12px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.brand-kicker {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.brand-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.whoami-block { position: relative; }
.whoami-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--avatar-bg); color: var(--avatar-fg);
  border: 1px solid var(--border); cursor: pointer; font-weight: 600; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.whoami-btn:hover { opacity: 0.85; }
.signin-link {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--accent-fill);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.signin-link:hover { opacity: 0.9; }
.signin-link[hidden] { display: none; }

/* ---------- sign-in gate (Option 3: app-backdrop overlay) ---------- */
.signin-overlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(20, 23, 25, 0.62);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
@media (prefers-color-scheme: light) {
  .signin-overlay { background: rgba(250, 250, 250, 0.66); }
}
.signin-overlay[hidden] { display: none; }
.signin-card {
  width: 100%; max-width: 392px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 18px; padding: 46px 40px 34px;
  text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}
.signin-logo {
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--accent-fill); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  margin-bottom: 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
}
.signin-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--text); }
.signin-sub { font-size: 14.5px; color: var(--text-muted); line-height: 1.5; margin: 0 0 30px; }
.signin-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; background: #fff; color: #1f1f1f;
  border: 1px solid #dadce0; border-radius: 10px;
  padding: 13px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s, background 0.15s;
}
.signin-google:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18); background: #f8f9fa; }
.signin-google svg { width: 18px; height: 18px; flex: none; }
.signin-email { background: var(--accent-fill); color: #fff; border-color: transparent; margin-bottom: 12px; }
.signin-email:hover { background: var(--accent-fill); opacity: 0.92; }
.signin-foot { margin-top: 26px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.signin-foot b { color: var(--text-muted); font-weight: 600; }
@media (max-width: 600px) {
  .signin-card { padding: 36px 24px 26px; border-radius: 16px; }
  .signin-title { font-size: 19px; }
}
.whoami-menu {
  /* position:fixed (coords set in JS from the button rect) so the sidebar's
     overflow:hidden can't clip it — Brian: "popup doesn't fully show / is
     covered". z-index above the FAB (200) and feature modal. */
  position: fixed; z-index: 1000;
  background: var(--bg, white); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  min-width: 220px; padding: 8px 0;
}
.whoami-email {
  padding: 6px 14px; font-size: 12px; color: var(--muted, #666);
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.whoami-logout {
  display: block; padding: 8px 14px; text-decoration: none;
  font-size: 13px; color: var(--text, #222);
}
.whoami-logout:hover { background: var(--bg-hover, #f5f5f5); }

/* One primary per view: "+ New note" is the main action only on Home / All Notes / a note; elsewhere it is secondary. */
.main:not(:has(#home-view:not(.hidden), #list-view:not(.hidden), #detail-view:not(.hidden))) #new-note-btn {
  background: var(--btn-secondary-bg); color: var(--btn-secondary-fg); border-color: var(--btn-secondary-border);
}
.main:not(:has(#home-view:not(.hidden), #list-view:not(.hidden), #detail-view:not(.hidden))) #new-note-btn:hover { background: var(--btn-secondary-bg-hover); }

/* Floating action button for the Feature Request modal */
.feature-request-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: var(--btn-secondary-bg); color: var(--btn-secondary-fg);
  border: 1px solid var(--btn-secondary-border); border-radius: 24px; padding: 10px 18px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: inline-flex; align-items: center; gap: 6px;
}
.feature-request-fab:hover { background: var(--btn-secondary-bg-hover); box-shadow: 0 6px 18px rgba(0,0,0,0.2); }

/* Suggest modal: tabs, bug/idea toggle, inline error, My requests list */
.fr-tabs { display: flex; gap: 4px; margin: 0 0 14px 0; border-bottom: 1px solid var(--border); padding-right: 28px; }
.fr-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 12px; margin-bottom: -1px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted, #666); cursor: pointer; }
.fr-tab-on { color: var(--accent); border-bottom-color: var(--accent); }
.fr-kind { display: flex; gap: 6px; margin-bottom: 14px; }
.fr-kbtn { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg, #fff);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text, #222); }
.fr-kbtn[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.fr-err { margin: 0 0 10px 0; padding: 8px 10px; border-radius: 6px; background: var(--dm-danger-tint); color: var(--dm-danger-text); font-size: 13px; }
.fr-draftnote { margin-top: 8px; font-size: 12px; color: var(--text-muted, #666); }
.fr-mine-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.fr-mine-row { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.fr-mine-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.fr-mine-meta { font-size: 12px; color: var(--text-muted, #666); }
.fr-stage { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600;
  background: var(--row-active, #eef3f8); color: var(--text, #222); }
.fr-stage-shipped { background: var(--dm-ok-tint); color: var(--dm-ok-text); }
.fr-stage-ready_to_test { background: rgba(245, 158, 11, 0.14); color: var(--dm-warn-text); }
.fr-stage-blocked, .fr-stage-needs_answer { background: var(--dm-danger-tint); color: var(--dm-danger-text); }
.fr-uat { margin-top: 8px; display: flex; gap: 8px; align-items: center; font-size: 12.5px; }
.fr-result h3 { margin: 0 0 8px 0; }

/* Feature-request screenshot dropzone */
.fr-dropzone {
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.fr-dropzone.fr-dz-over { border-color: var(--accent); background: var(--row-active); }
.fr-dz-hint { font-size: 12.5px; color: var(--text-muted); }
.fr-linkbtn {
  background: none; border: 0; padding: 0; color: var(--accent);
  font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline;
}
.fr-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fr-previews:empty { margin-top: 0; }
.fr-thumb { position: relative; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.fr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fr-thumb-del {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.fr-thumb-del:hover { background: var(--danger); }

/* EG Flow / EG Notetaker section titles in the web sidebar. (The dimmed
   "Mac app" rows were removed 2026-10-13, UI audit F23.) */
.nav-section-desktop .nav-title { display: flex; align-items: center; gap: 6px; }

.sidebar-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-search input {
  width: 100%;
  padding: 7px 11px;
  background: var(--bg-raised);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
}
.sidebar-search input:focus {
  border-color: var(--accent);
  outline: none;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.nav-section {
  padding: 8px 8px 12px;
}
.nav-title {
  padding: 4px 12px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-item, .nav-list > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: 1px 4px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.nav-item:hover, .nav-list > a:hover {
  background: var(--row-hover);
}
.nav-item.active, .nav-list > a.active {
  background: var(--row-active);
  color: var(--nav-active-text);
}
.nav-item.active .count, .nav-list > a.active .count {
  color: var(--nav-active-text);
}
.count {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--badge-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.count:empty { display: none; }
.nav-list { max-height: 360px; overflow-y: auto; }

/* ---------- main ---------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.breadcrumb {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-right {
  display: flex;
  gap: 8px;
}

/* ---------- buttons ---------- */
.btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--bg-raised);
  color: var(--text);
  transition: background 0.1s;
}
.btn:hover { background: var(--border); }
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-primary:hover { background: var(--btn-primary-bg-hover); }
/* Accept / Confirm (Brian 2026-10-13: Accept is green and stands apart from the indigo primary). */
.btn-success {
  background: var(--btn-success-bg);
  border-color: var(--btn-success-bg);
  color: var(--btn-success-fg);
}
.btn-success:hover { background: var(--btn-success-bg-hover); border-color: var(--btn-success-bg-hover); }
/* Destructive confirm (objective Remove). .btn-danger below stays the text-only red for inline links. */
.btn-danger-solid {
  background: var(--btn-danger-bg);
  border-color: var(--btn-danger-bg);
  color: var(--btn-danger-fg);
}
.btn-danger-solid:hover { background: var(--btn-danger-bg-hover); border-color: var(--btn-danger-bg-hover); }
.btn-secondary {
  background: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-fg);
}
.btn-secondary:hover { background: var(--btn-secondary-bg-hover); }
.btn:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-raised); color: var(--text); }
.btn-danger { color: var(--danger-text); }
.btn-danger:hover { background: rgba(229,90,90,0.12); }
.icon-btn {
  padding: 6px 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
}
.icon-btn:hover { background: var(--bg-raised); color: var(--text); }
.icon-btn.active { color: var(--accent); }

/* ---------- list view ---------- */
.list-view {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 40px;
}
.list-view:not(.active) { display: none; }
.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 12px;
}
.toolbar-right { display: flex; gap: 2px; }

/* All Notes: person + time filters (Jose, 2026-10-21). Two quiet dropdowns,
   EG Hub's own colours, nothing else. Logic in app.js "All Notes filters". */
.notes-filters { display: flex; align-items: center; gap: 8px; padding: 2px 0 10px; }
.notes-filters.hidden { display: none; }
.nf-person { position: relative; }
.nf-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-alt);
  color: var(--text); font: inherit; font-size: 13px; cursor: pointer;
}
.nf-btn:hover { border-color: #c9ccd3; }
.nf-btn:focus-within, .nf-btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
.nf-btn.nf-on { background: var(--accent-soft); border-color: #c7cbfb; color: var(--accent-on); font-weight: 500; }
.nf-icon, .nf-chev { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nf-icon { color: var(--text-muted); }
.nf-on .nf-icon { color: var(--accent-on); }
.nf-chev { width: 13px; height: 13px; color: var(--text-dim); }
#nf-person-label { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-time { position: relative; padding-right: 10px; }
.nf-time select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit;
  font: inherit; padding: 0 18px 0 0; margin-right: -18px; cursor: pointer; outline: none; height: 34px;
}
.nf-time .nf-chev { pointer-events: none; }
.nf-pop {
  position: absolute; top: 42px; left: 0; z-index: 40; width: 290px; padding: 8px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20, 20, 40, .14);
}
.nf-pop.hidden { display: none; }
.nf-pop input {
  width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px; margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px;
  background: var(--bg); color: var(--text);
}
.nf-pop input:focus { outline: none; border-color: var(--accent); }
.nf-list { max-height: 320px; overflow-y: auto; }
.nf-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0;
  border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
}
.nf-opt:hover, .nf-opt:focus-visible { background: var(--bg-raised); outline: none; }
.nf-opt-on { background: var(--accent-soft); color: var(--accent-on); font-weight: 500; }
.nf-opt-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-opt-count { color: var(--text-dim); font-size: 12px; }
.nf-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.nf-empty { padding: 8px; margin: 0; }
.nf-clear {
  margin-left: auto; border: 0; background: none; color: var(--accent-dim); font: inherit;
  font-size: 13px; cursor: pointer; padding: 6px 4px;
}
.nf-clear:hover { text-decoration: underline; }
.nf-clear.hidden { display: none; }

/* Find a meeting: small (about one dropdown wide) until used, then grows to
   fit the sentence, up to 3 lines, with the topics he said as chips inside. */
.notes-filters { align-items: flex-start; flex-wrap: wrap; }
.nf-find {
  display: flex; align-items: flex-start; gap: 8px; width: 300px; min-height: 36px; box-sizing: border-box;
  padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-alt);
  transition: width .18s ease, border-color .15s ease;
}
.nf-find:hover { border-color: #c9ccd3; }
.nf-find.nf-find-open { width: min(640px, 100%); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nf-find .nf-spark { color: var(--accent); margin-top: 9px; fill: none; }
.nf-find-body { flex: 1; min-width: 0; padding: 7px 0; }
#nf-find-input {
  display: block; width: 100%; border: 0; outline: none; resize: none; background: transparent;
  color: var(--text); font: inherit; font-size: 13px; line-height: 20px; height: 20px; padding: 0; overflow: hidden;
}
#nf-find-input::placeholder { color: var(--text-muted); }
.nf-find-x { border: 0; background: none; color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; padding: 8px 0 0; }
.nf-find-x:hover { color: var(--text); }
.nf-find-x.hidden { display: none; }
.nf-answer { margin: -2px 0 10px; color: var(--text); font-size: 13px; }
.nf-answer.hidden { display: none; }
.nf-widen { border: 0; background: none; color: var(--accent-dim); cursor: pointer; font: inherit; padding: 0 2px; }
.nf-widen:hover { text-decoration: underline; }
.nf-hits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.nf-hit { padding: 1px 7px; border-radius: 6px; background: var(--bg-raised); color: var(--text-dim); font-size: 11px; }
.nf-hit-on { background: var(--accent-soft); color: var(--accent-on); font-weight: 500; }
.nf-snippet {
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-soft); color: var(--text-muted);
  font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nf-snippet mark { background: var(--accent-soft); color: var(--accent-on); border-radius: 3px; padding: 0 2px; }
.nf-why { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.45; color: var(--text); }
.nf-ai-icon { width: 14px; height: 14px; flex: none; margin-top: 2px; fill: var(--accent); }
#nf-answer .nf-ai-icon { margin-right: 6px; vertical-align: -2px; }
#nf-answer:has(> .nf-ai-icon) { display: flex; align-items: flex-start; }
.nf-ai-wait { color: var(--text-muted); white-space: nowrap; }
.nf-ai-wait .nf-ai-icon { margin-right: 4px; animation: nf-ai-pulse 1.4s ease-in-out infinite; }
@keyframes nf-ai-pulse { 50% { opacity: .35; } }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.1s, transform 0.1s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
/* Upcoming meeting card variant — Today filter shows these alongside notes */
.card-upcoming {
  border-style: dashed;
  cursor: default;
}
.card-upcoming:hover { transform: none; }
.card-upcoming .upcoming-create {
  margin-top: auto;
  align-self: flex-start;
}
.pill-accent {
  background: var(--accent-fill);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
}
.card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-date {
  font-size: 12px;
  color: var(--text-muted);
}
.card-attendees {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.card-meta {
  margin-top: auto;
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}
.card-meta .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.has-notes { background: var(--accent); }
.dot.has-ai { background: var(--success); }
.dot.has-transcript { background: var(--warn); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-raised);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.pill-ghost { background: transparent; border: 1px solid var(--border); }
.attendee-pills, .tag-pills {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tag-pills .pill { background: rgba(74,158,255,0.12); color: var(--accent); }
.tag-pills .pill::before { content: "#"; opacity: 0.7; margin-right: 2px; }

/* list mode */
/* List view (Jose, 2026-10-22, round 1 sample 3): one quiet panel with
   hairline rows, the date in a narrow column on the LEFT, then the title, then
   fixed slots for Shared and for each status icon, so every row lines up
   whether or not it has icons. Only note cards (<a class="card">) take the
   grid; upcoming-meeting cards keep the plain row. */
.cards.list-mode {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  --nl-date: 102px; --nl-shared: 48px; --nl-icons: 57px;
}
.cards.list-mode .card {
  flex-direction: row;
  align-items: center;
  min-height: auto;
  padding: 8px 14px;
  gap: 12px;
}
.cards.list-mode .card-title { flex: 1; -webkit-line-clamp: 1; }
.cards.list-mode .card-meta { margin: 0; }
.cards.list-mode a.card {
  display: grid;
  grid-template-columns: var(--nl-date) minmax(0, 1fr) var(--nl-shared) minmax(var(--nl-icons), auto);
  align-items: center; column-gap: 16px; row-gap: 4px;
  min-height: 33px; padding: 6px 14px; margin: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none;
}
.cards.list-mode a.card + a.card { border-top: 1px solid var(--border-soft); }
.cards.list-mode a.card:hover { background: var(--bg-raised); transform: none; box-shadow: none; }
.cards.list-mode a.card .card-date-line { display: contents; }
.cards.list-mode a.card .card-date { grid-column: 1; grid-row: 1; justify-self: start; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cards.list-mode a.card .card-title { grid-column: 2; grid-row: 1; font-weight: 500; font-size: 13px; line-height: 20px; }
.cards.list-mode a.card .card-shared { grid-column: 3; grid-row: 1; justify-self: center; }
/* .card-meta opens up so the icons take column 4 and a warning chip goes
   under the title: one wide chip no longer pushes that row out of line. */
.cards.list-mode a.card .card-meta { display: contents; }
.cards.list-mode a.card .card-meta-sep { display: none; }
.cards.list-mode a.card .chip-attn { grid-column: 2 / -1; justify-self: start; }
.cards.list-mode a.card .card-icons { grid-column: 4; grid-row: 1; display: grid; grid-template-columns: repeat(3, 13px); gap: 9px; min-height: 18px; }
.cards.list-mode a.card .card-icon { grid-row: 1; }
.cards.list-mode a.card .card-icon[data-kind="notes"] { grid-column: 1; }
.cards.list-mode a.card .card-icon[data-kind="summary"] { grid-column: 2; }
.cards.list-mode a.card .card-icon[data-kind="transcript"] { grid-column: 3; }
/* Anything else on a note (tags, a find match) sits under the title. */
.cards.list-mode a.card > :not(.card-date-line):not(.card-title):not(.card-meta) { grid-column: 2 / -1; }
/* Upcoming-meeting cards (Today) keep their own box and spacing in the list. */
.cards.list-mode .card-upcoming { margin: 6px 0; }
/* Phone: title and icons on the first line, the date and Shared under them. */
@media (max-width: 600px) {
  .cards.list-mode a.card { grid-template-columns: minmax(0, 1fr) var(--nl-icons); }
  .cards.list-mode a.card .card-title { grid-column: 1; grid-row: 1; }
  .cards.list-mode a.card .card-icons { grid-column: 2; grid-row: 1; }
  .cards.list-mode a.card .card-date { grid-column: 1; grid-row: 2; font-size: 11px; }
  .cards.list-mode a.card .card-shared { grid-column: 2; grid-row: 2; justify-self: end; }
  .cards.list-mode a.card .chip-attn,
  .cards.list-mode a.card > :not(.card-date-line):not(.card-title):not(.card-meta) { grid-column: 1 / -1; }
}

/* upcoming */
.upcoming-day { margin-bottom: 24px; }
.upcoming-day-label {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.upcoming-event {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px;
}
.upcoming-time {
  flex-shrink: 0; width: 70px; font-variant-numeric: tabular-nums;
  font-size: 12px; color: var(--text-muted);
}
.upcoming-body { flex: 1; min-width: 0; }
.upcoming-title { font-weight: 500; font-size: 14px; }
.upcoming-attendees { font-size: 11px; margin-top: 2px; }
.upcoming-action { flex-shrink: 0; }
.cards.list-mode .upcoming-event,
#notes-container.cards .upcoming-event { display: flex; }
@media (max-width: 600px) {
  .upcoming-event { flex-wrap: wrap; }
  .upcoming-time { width: auto; }
  .upcoming-action { width: 100%; }
  .upcoming-action .btn { width: 100%; }
}

/* person dashboard */
.person-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.person-view.hidden { display: none; }
.person-header {
  display: flex; gap: 14px; padding: 14px 20px;
  border-bottom: 1px solid var(--border); align-items: center;
}
.person-meta { flex: 1; }
.person-meta h1 { margin: 0; font-size: 22px; font-weight: 600; }
.person-meta .muted { font-size: 12px; margin-top: 2px; }
.person-actions { flex-shrink: 0; }

.person-tabs {
  display: flex; gap: 2px; padding: 0 20px;
  border-bottom: 1px solid var(--border); background: var(--bg);
  /* Tabs that do not fit wrap onto another row, so every tab is always in
     view. A sideways-scrolling row hid the last tabs (1:1 Prep Archive,
     Weekly Logs, Context) past the right edge of a half-width window with
     nothing to click to reach them (Anthony, 2026-10-27). */
  flex-wrap: wrap;
}
.ptab {
  padding: 10px 14px;
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 13px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap;
}
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--text); border-bottom-color: var(--accent); }
.ptab-count {
  display: inline-block; margin-left: 4px; padding: 0 6px;
  background: var(--bg-raised); border-radius: 999px;
  font-size: 11px; color: var(--text-dim);
}

/* Notetaker settings (item 5) -- plain stacked sections, .person-view's
   own overflow:hidden overridden here since this page has no other
   scroll container. */
#notetaker-settings-view { overflow-y: auto; }
.settings-section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: none; }
.settings-section h3 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--text); }
#notetaker-sync-result { margin-top: 8px; }

/* EG Flow web pages (Dictionary / Settings) + Voices — same
   .person-view + stacked .settings-section idiom as Notetaker settings
   above, same overflow override reason (no other scroll container). */
#flow-dictionary-view, #flow-settings-view, #voices-view { overflow-y: auto; }
.flow-word-add { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.flow-word-add input[type="text"] {
  flex: 1; min-width: 160px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-alt); color: var(--text); font-size: 13px;
}
#flow-company-search {
  width: 100%; margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-alt); color: var(--text); font-size: 13px;
}
.flow-word-list { list-style: none; margin: 10px 0 0; padding: 0; }
.flow-word-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-soft);
}
.flow-word-row:last-child { border-bottom: none; }
.flow-word-row .flow-word-text { font-size: 13px; color: var(--text); }
.flow-word-row .flow-word-text .arrow { color: var(--text-dim); margin: 0 4px; }
.flow-word-row .flow-word-del {
  border: none; background: transparent; color: var(--text-dim); cursor: pointer;
  font-size: 13px; padding: 2px 6px;
}
.flow-word-row .flow-word-del:hover { color: var(--danger-text); }
.flow-strength-options { display: flex; flex-direction: column; gap: 8px; max-width: 480px; }
.flow-strength-option {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.flow-strength-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.flow-strength-option input { margin-top: 3px; }
.flow-mac-only-list { list-style: disc; padding-left: 18px; margin: 6px 0 0; }
.flow-mac-only-list li { margin-bottom: 4px; }
.flow-bridge-stale { color: var(--danger-text); }
.ptab.active .ptab-count { background: var(--accent-dim); color: #fff; }

.person-panels {
  flex: 1; overflow-y: auto;
  padding: 16px 20px 40px;
}
.ppanel { display: none; }
.ppanel.active { display: block; }

.person-edit {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 12px;
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.person-edit:focus { border-color: var(--accent); outline: none; }
#person-context { font-family: var(--font); font-size: 14px; line-height: 1.55; }

/* Main tab: todos + next meeting */
.main-section {
  margin-bottom: 28px;
  max-width: 820px;
}
.main-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 12px;
  /* In a narrow window the Add topic box drops under the heading instead of
     pushing Add off screen and making the whole page scroll sideways. */
  flex-wrap: wrap;
}
.main-section-head h3 {
  margin: 0; font-size: 15px; font-weight: 600;
  color: var(--text);
}
.todo-toolbar { display: flex; gap: 8px; min-width: 0; max-width: 100%; }
.todo-toolbar input {
  flex: 1; min-width: 120px;
  padding: 6px 10px; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 12px;
}
.todo-toolbar input:focus { border-color: var(--accent); outline: none; }
.todo-toolbar .btn { padding: 6px 12px; font-size: 12px; }

/* Inline note editor (below Next 1:1) */
.inline-note {
  margin-top: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.inline-note.hidden { display: none; }
.inline-note-header {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.inline-note-title-wrap { flex: 1; min-width: 0; }
.inline-title-input {
  width: 100%;
  background: transparent; border: 1px solid transparent;
  padding: 3px 6px; margin-left: -6px;
  font-size: 15px; font-weight: 600; color: var(--text);
  border-radius: 4px;
}
.inline-title-input:hover { border-color: var(--border); }
.inline-title-input:focus { border-color: var(--accent); outline: none; }
.inline-note-sub { font-size: 11px; padding: 3px 0 0 0; }
.inline-note-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.inline-note-tabs {
  display: flex; gap: 2px; padding: 0 14px;
  border-bottom: 1px solid var(--border); background: var(--bg-raised);
}
.inline-tab {
  padding: 8px 12px; background: transparent; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 12px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.inline-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.inline-panel { display: none; padding: 12px 14px; }
.inline-panel.active { display: block; }
.inline-ta {
  width: 100%; min-height: 260px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 12px;
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 13px; line-height: 1.6;
  resize: vertical;
}
.inline-ta:focus { border-color: var(--accent); outline: none; }

.todo-group { margin-bottom: 18px; }
.todo-group-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  padding: 6px 0 6px 0;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  transition: background 0.1s;
}
.todo-item:hover { background: var(--bg-alt); }
.todo-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}
.todo-item .todo-text {
  flex: 1; font-size: 13px; line-height: 1.5;
  cursor: pointer; word-break: break-word;
  white-space: pre-wrap;
}
.todo-item.done .todo-text {
  text-decoration: line-through;
  color: var(--text-dim);
}
.todo-item .todo-actions {
  visibility: hidden;
  display: flex; gap: 4px;
}
.todo-item:hover .todo-actions { visibility: visible; }
.todo-item .todo-act {
  background: transparent; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 12px; padding: 2px 6px;
  border-radius: 3px;
}
.todo-item .todo-act:hover { background: var(--bg-raised); color: var(--text); }
.todo-item .todo-due {
  font-size: 11px; color: var(--text-muted);
  background: var(--bg-raised); padding: 1px 6px; border-radius: 3px;
}
.todo-item .todo-due.overdue { color: var(--danger-text); }

/* Discussion Topics shared/private split (docs/ACCESS-MODEL-SPEC.md Phase 2) */
.dt-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
  margin: 18px 0 4px 0;
}
.dt-section-private { border-top: 1px dashed var(--border); padding-top: 6px; }
.todo-vis-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: var(--bg-raised); color: var(--text-muted); white-space: nowrap;
}
.todo-item-private { background: var(--bg-alt); }
.todo-act-move-visibility { font-size: 13px; }

/* Drag-and-drop */
.todo-item { cursor: default; }
.todo-item .todo-drag-handle {
  visibility: hidden;
  color: var(--text-muted);
  font-size: 12px; line-height: 1;
  cursor: grab;
  user-select: none;
  letter-spacing: -2px;
  margin-top: 4px;
  padding: 0 2px;
}
.todo-item:hover .todo-drag-handle { visibility: visible; }
.todo-item .todo-drag-handle:active { cursor: grabbing; }
.todo-item.dragging {
  opacity: 0.4;
  background: var(--bg-alt);
}
.todo-item.drag-over {
  box-shadow: inset 0 2px 0 0 var(--accent);
  background: var(--bg-alt);
}

/* Quarter / year sub-tabs (inside a panel) */
.quarter-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 6px 0 16px;
}
.quarter-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 6px;
}
.quarter-tab:hover { color: var(--text); }
.quarter-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.qtab-count {
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
}
.quarter-tab.active .qtab-count {
  background: var(--accent-fill);
  color: white;
}

/* 1:1 Prep Archive layout */
.prep-archive-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  min-height: 400px;
}
.prep-archive-list {
  border-right: 1px solid var(--border);
  padding-right: 12px;
  max-height: 70vh;
  overflow-y: auto;
}
.prep-archive-item {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  border: 1px solid transparent;
}
.prep-archive-item:hover { background: var(--bg-alt); }
.prep-archive-item.active {
  background: var(--bg-alt);
  border-color: var(--accent);
}
.prep-archive-item .pa-date { font-weight: 500; }
.prep-archive-item .pa-meeting {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prep-archive-view {
  background: var(--bg);
  padding: 10px 16px;
  border-radius: 6px;
  max-height: 70vh;
  overflow-y: auto;
}
.prep-archive-view h1, .prep-archive-view h2, .prep-archive-view h3 {
  margin-top: 16px; margin-bottom: 6px;
}
.prep-archive-view ul { padding-left: 20px; }
@media (max-width: 900px) {
  .prep-archive-layout {
    grid-template-columns: 1fr;
  }
  .prep-archive-list {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 12px;
    max-height: 200px;
  }
}

/* Annual Plan table */
.ap-table .ap-cell-ro {
  color: var(--text-dim);
  font-size: 12px;
  padding: 8px 10px;
  vertical-align: top;
}
.ap-table .ap-desc-cell {
  color: var(--text);
  font-weight: 500;
  max-width: 260px;
}
.ap-role-primary {
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}
.ap-role-contributing {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#todo-done-wrap, #todo-archive-wrap {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
#todo-done-wrap summary, #todo-archive-wrap summary {
  cursor: pointer; font-size: 12px; color: var(--text-muted);
  padding: 4px 0;
}
#todo-done-wrap summary:hover, #todo-archive-wrap summary:hover { color: var(--text); }
#todo-done-list .todo-item { opacity: 0.6; }
/* Archive rows (person.recently_completed) are frozen text, not live todos —
   no checkbox/actions exist in the markup, and no drag/hover affordances. */
#todo-archive-list .todo-item {
  opacity: 0.6; cursor: default; padding-left: 8px;
}
#todo-archive-list .todo-item:hover { background: none; }

/* Next meeting card */
.nm-empty {
  font-size: 13px; color: var(--text-muted);
  padding: 10px 14px;
  background: var(--bg-alt); border: 1px dashed var(--border);
  border-radius: 6px;
}
.nm-summary {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.nm-summary strong { font-size: 14px; font-weight: 600; }

/* Morning 1:1 prep doc */
.prep-doc-content {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  max-width: 820px;
}
.prep-doc-content h1, .prep-doc-content h2, .prep-doc-content h3 {
  margin: 1.2em 0 0.4em; font-weight: 600;
}
.prep-doc-content h1 { font-size: 17px; }
.prep-doc-content h2 { font-size: 15px; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.prep-doc-content h3 { font-size: 13px; color: var(--text); }
.prep-doc-content p { margin: 0 0 0.8em; }
.prep-doc-content ul, .prep-doc-content ol { padding-left: 1.3em; margin: 0 0 0.8em; }
.prep-doc-content li { margin: 0.2em 0; }
.prep-doc-content hr { border: none; border-top: 1px solid var(--border); margin: 1.4em 0; }
.prep-doc-content strong { color: var(--text); font-weight: 600; }
.prep-doc-content code {
  background: var(--bg-raised); padding: 1px 5px;
  border-radius: 3px; font-size: 0.92em;
}
.prep-doc-content blockquote {
  border-left: 3px solid var(--border); padding-left: 12px;
  margin-left: 0; color: var(--text-muted);
}
.prep-doc-empty {
  padding: 14px; background: var(--bg-alt);
  border: 1px dashed var(--border); border-radius: 6px;
  color: var(--text-muted); font-size: 13px;
}

/* Discussion topics, morning prep and next agenda share one column, on the
   LEFT where Morning 1:1 Prep always sat (Jose, 2026-11-02: never centered). */
#ppanel-main .topics-layout {
  display: block;
  width: 100%;
  max-width: 820px;
  min-width: 0;
  margin: 0;
}
#ppanel-main .topics-layout > .main-section {
  width: 100%; min-width: 0; margin: 0 0 28px;
}
#ppanel-main .todo-group { margin-bottom: 12px; }
#ppanel-main .topic-add-trigger {
  display: block; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-muted); padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
#ppanel-main .topic-add-trigger:hover { background: var(--bg-alt); color: var(--text); }
#ppanel-main .topic-composer {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
#ppanel-main .topic-composer[hidden], #ppanel-main .topic-add-trigger[hidden] { display: none; }
#ppanel-main .topic-composer:focus-within { border-bottom-color: var(--text-muted); }
#ppanel-main .topic-add-mark { color: var(--text-muted); flex: none; }
#ppanel-main #todo-new-input {
  flex: 1; min-width: 0; width: 100%; padding: 4px 0; border: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none;
}
#ppanel-main #todo-new-input::placeholder { color: var(--text-muted); }
#ppanel-main #topic-private-toggle {
  display: inline-flex; border: 0; padding: 4px 6px; border-radius: 4px;
  background: transparent; color: var(--text-muted); cursor: pointer;
}
#ppanel-main #topic-private-toggle:hover { background: var(--bg-raised); }
#ppanel-main #topic-private-toggle[aria-pressed="true"] { color: var(--text); background: var(--bg-raised); }
#ppanel-main #topic-private-toggle .eg-i { width: 14px; height: 14px; }
#ppanel-main .pt-meeting-head { gap: 10px 16px; }
#ppanel-main #nm-status { margin-left: auto; font-size: 12px; }
#ppanel-main #next-meeting-card { min-width: 0; max-width: 100%; }
#ppanel-main .topics-meeting-section .nm-empty,
#ppanel-main .topics-meeting-section .nm-summary { padding: 0; margin: 0; border: 0; background: transparent; }
#ppanel-main .topics-meeting-section .nm-empty { font-size: 13px; }
#ppanel-main .topics-meeting-section .nm-summary {
  gap: 12px; flex-wrap: wrap; justify-content: flex-start; font-size: 12px;
  overflow-wrap: anywhere;
}
#ppanel-main .nm-summary .btn { padding: 6px 10px; font-size: 12px; }
#ppanel-main .prep-doc-content,
#ppanel-main .prep-doc-empty { min-width: 0; overflow-wrap: anywhere; }
#ppanel-main .prep-doc-content img { max-width: 100%; height: auto; }
#ppanel-main .prep-doc-content pre,
#ppanel-main .prep-doc-content table { max-width: 100%; overflow-x: auto; }
#ppanel-main .prep-doc-content table { display: block; }
#ppanel-main .prep-doc-content h2 { color: var(--text); }
#ppanel-main #prep-doc-section a,
#ppanel-main #next-agenda-section a {
  color: var(--text); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: var(--border);
}
#ppanel-main #prep-doc-section a:hover,
#ppanel-main #next-agenda-section a:hover { text-decoration-color: var(--text-muted); }
#ppanel-main #pt-meeting-body .main-section-head {
  margin: 1.2em 0 0.4em; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
#ppanel-main #pt-meeting-body > .pt-agenda-section:first-child .main-section-head { margin-top: 0.4em; }
#ppanel-main #pt-meeting-body .main-section-head h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 0; }
#ppanel-main .pt-agenda-section .muted { font-size: 12px; }
#ppanel-main .pt-agenda-section > div > :last-child { margin-bottom: 0; }
#ppanel-main #inline-note { width: 100%; min-width: 0; margin: 0 0 28px; }
#ppanel-main #inline-note .inline-note-header {
  flex-direction: column; align-items: stretch; flex-wrap: wrap; overflow-wrap: anywhere;
}
#ppanel-main #inline-note .inline-note-actions { flex-wrap: wrap; max-width: 100%; }
#ppanel-main #inline-note .inline-note-tabs { flex-wrap: wrap; }
#ppanel-main #inline-note .readonly-content { overflow-wrap: anywhere; }
#ppanel-main #todo-done-wrap { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
#ppanel-main #todo-archive-wrap { margin: 12px 0 0 10px; padding-top: 8px; }
#ppanel-main #todo-done-list .todo-item { opacity: 1; }
#ppanel-main .todo-item input[type="checkbox"] { flex-shrink: 0; }
#ppanel-main .todo-item:not(.todo-item-locked) .todo-actions { visibility: visible; opacity: 0; }
#ppanel-main .todo-item:hover .todo-actions,
#ppanel-main .todo-item:focus-within .todo-actions { opacity: 1; }
#ppanel-main .todo-item:focus-within .todo-drag-handle,
#ppanel-main .todo-item:focus-within .todo-meta-info { visibility: visible; }

.person-topics-self > .person-header { padding-top: 12px; padding-bottom: 12px; }
.person-topics-self > .person-header .page-path,
.person-topics-self #person-role,
.person-topics-self #person-self-note,
.person-topics-self > .person-header .person-actions { display: none; }
.person-topics-self #person-name { font-size: 18px; }

@media (hover: none) {
  #ppanel-main .todo-item .todo-actions { opacity: 1; }
  #ppanel-main .todo-item .todo-drag-handle,
  #ppanel-main .todo-item .todo-meta-info { visibility: visible; }
}
@media (max-width: 700px) {
  #ppanel-main .pt-meeting-head { gap: 8px 12px; }
  #ppanel-main #next-meeting-card { flex-basis: 100%; }
  #ppanel-main .prep-doc-content { padding: 14px; }
  #ppanel-main .todo-item { flex-wrap: wrap; gap: 8px; }
  #ppanel-main .todo-text { min-width: 0; flex-basis: 65%; }
  #ppanel-main .todo-actions { margin-left: auto; }
}

/* ----- OKR cards (Paycor-inspired) ----- */
.okrs-toolbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.okrs-summary {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted);
}
.okrs-summary .os-item { display: flex; flex-direction: column; }
.okrs-summary .os-val {
  font-size: 17px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.okrs-summary .os-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
}
.okrs-summary .os-donut {
  position: relative; width: 52px; height: 52px;
}
.okrs-summary .os-donut-legend { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.okrs-summary .os-legend-row { display: flex; gap: 6px; align-items: center; }
.okrs-summary .os-dot { width: 8px; height: 8px; border-radius: 50%; }
.okrs-summary .os-dot.on-track { background: var(--success); }
.okrs-summary .os-dot.off-track { background: var(--danger); }
.okrs-summary .os-dot.no-status { background: var(--text-dim); }

.okrs-mode-toggle {
  display: flex; gap: 2px;
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px;
}
.okrs-mode-toggle .btn {
  padding: 4px 12px; font-size: 12px;
  border: none; background: transparent; color: var(--text-muted);
}
.okrs-mode-toggle .btn.active {
  background: var(--bg-raised); color: var(--text);
}

.okrs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  max-width: 1200px;
}
@media (max-width: 700px) {
  .okrs-cards { grid-template-columns: 1fr; }
  .okrs-toolbar { flex-direction: column; align-items: stretch; }
}

.okr-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.okr-card-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.okr-card-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 8px; line-height: 1.35;
}
.okr-card-meta-top {
  display: flex; align-items: center; gap: 8px; font-size: 11px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.okr-type {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase;
}
.okr-type.department { background: rgba(60, 194, 135, 0.14); color: var(--success-text); }
.okr-type.personal { background: rgba(74, 158, 255, 0.14); color: var(--accent); }
.okr-type.company { background: rgba(244, 184, 68, 0.14); color: var(--warn-text); }
.okr-type.team { background: rgba(244, 184, 68, 0.14); color: var(--warn-text); }
.okr-owner { color: var(--text-muted); }

.okr-card-meta-bottom {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px;
}
.okr-progress-pill {
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--bg-raised); color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 54px; text-align: center;
}
.okr-progress-pill.high { background: rgba(60, 194, 135, 0.18); color: var(--success-text); }
.okr-progress-pill.mid { background: rgba(244, 184, 68, 0.18); color: var(--warn-text); }
.okr-progress-pill.low { background: rgba(229, 90, 90, 0.18); color: var(--danger-text); }
.okr-updated { color: var(--text-dim); }
.okr-quarter-pill {
  background: var(--bg-raised); color: var(--text-muted);
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
  font-size: 10px; letter-spacing: 0.04em;
}
.okr-status-pill {
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em;
  padding: 2px 8px; border-radius: 4px;
}
.okr-status-pill.due { background: rgba(244, 184, 68, 0.16); color: var(--warn-text); }
.okr-status-pill.closed { background: var(--bg-raised); color: var(--text-muted); }
.okr-status-pill.on-track { background: rgba(60, 194, 135, 0.16); color: var(--success-text); }
.okr-status-pill.off-track { background: rgba(229, 90, 90, 0.16); color: var(--danger-text); }

.okr-card-body {
  padding: 8px 16px 14px;
}
.okr-kr {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.okr-kr:last-child { border-bottom: none; }
.okr-kr-text { flex: 1; font-size: 12.5px; line-height: 1.45; color: var(--text); }
.okr-kr-progress {
  flex-shrink: 0;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg-raised); color: var(--text-muted);
  min-width: 44px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.okr-kr-progress.high { background: rgba(60, 194, 135, 0.16); color: var(--success-text); }
.okr-kr-progress.mid { background: rgba(244, 184, 68, 0.16); color: var(--warn-text); }
.okr-kr-progress.low { background: rgba(229, 90, 90, 0.16); color: var(--danger-text); }
.okr-kr-progress.zero { background: var(--bg-raised); color: var(--text-dim); }

.okr-empty {
  padding: 30px; text-align: center;
  background: var(--bg-alt); border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-muted); font-size: 13px;
}

/* ----- Expectations table ----- */
.exp-section { margin-bottom: 28px; }
.exp-section-title {
  font-size: 13px; font-weight: 600;
  padding: 6px 0 8px 0; margin-bottom: 8px;
  color: var(--text); border-bottom: 1px solid var(--border);
}
.exp-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  font-size: 12.5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.exp-table thead th {
  background: var(--bg-raised); color: var(--text-muted);
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.exp-table thead th.center { text-align: center; }
.exp-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.4;
}
.exp-table tbody tr:last-child td { border-bottom: none; }
.exp-table tbody tr:hover { background: var(--bg-raised); }
.exp-table td.exp-desc { color: var(--text); min-width: 260px; }
.exp-table td.exp-rating {
  text-align: center; width: 50px;
  font-variant-numeric: tabular-nums; font-weight: 600;
  color: var(--text);
}
.exp-table td.exp-rating.empty { color: var(--text-dim); font-weight: 400; }
.exp-table td.exp-rating .exp-pill {
  display: inline-block; min-width: 28px; padding: 2px 6px;
  border-radius: 4px; font-size: 11px;
}
.exp-table td.exp-rating .exp-pill.high { background: rgba(60, 194, 135, 0.16); color: var(--success-text); }
.exp-table td.exp-rating .exp-pill.mid { background: rgba(244, 184, 68, 0.16); color: var(--warn-text); }
.exp-table td.exp-rating .exp-pill.low { background: rgba(229, 90, 90, 0.16); color: var(--danger-text); }
.exp-table td.exp-comment {
  font-size: 12px; color: var(--text-muted);
  min-width: 160px;
}
.exp-table td.exp-comment-mine { color: var(--text); }
.exp-empty {
  padding: 30px; text-align: center;
  background: var(--bg-alt); border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-muted); font-size: 13px;
}
.exp-sheet-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(74, 158, 255, 0.08);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 6px; margin-bottom: 14px;
  font-size: 12px; color: var(--text);
}
.exp-sheet-banner a { color: var(--accent); }
.exp-sheet-banner-muted {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  color: var(--text-muted);
}
.exp-table td[contenteditable] {
  cursor: text;
  transition: background 0.25s;
}
.exp-table td[contenteditable]:hover { background: var(--bg-raised); }
.exp-table td[contenteditable]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--bg);
}
.exp-empty-dash { color: var(--text-dim); }

/* 1:1 Meetings list. #peer-recent-list is the peer view's "Recent meetings
   with them" (2026-10-27), drawn the same way. */
#person-1on1-list .p-meeting,
#peer-recent-list .p-meeting {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
  align-items: center;
}
#person-1on1-list .p-meeting-date,
#peer-recent-list .p-meeting-date {
  color: var(--text-muted); font-size: 12px; min-width: 90px;
}
#person-1on1-list .p-meeting-title,
#peer-recent-list .p-meeting-title {
  flex: 1; font-size: 13px;
}
#person-1on1-list .p-meeting-title a,
#peer-recent-list .p-meeting-title a { color: var(--accent); }
#peer-recent-wrap h3 { margin: 20px 0 8px; font-size: 14px; }
#person-1on1-list .p-meeting-dots { display: flex; gap: 6px; font-size: 11px; color: var(--text-dim); }

/* Annual plan cards */
#person-annual-plan .ap-item {
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
}
#person-annual-plan .ap-channel {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 4px;
}
#person-annual-plan .ap-title { font-weight: 500; font-size: 13px; margin-bottom: 4px; }
#person-annual-plan .ap-goal { font-size: 12px; color: var(--text-muted); }
#person-annual-plan .ap-today { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
#person-annual-plan .ap-role-primary { color: var(--accent); font-weight: 500; }
#person-annual-plan .ap-role-contributing { color: var(--text-muted); }

#person-annual-plan .ap-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
#person-annual-plan .ap-item:last-child { border-bottom: none; }
#person-annual-plan .ap-channel {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
#person-annual-plan .ap-title { font-weight: 500; }
#person-annual-plan .ap-goal { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
#person-annual-plan .ap-role-primary { color: var(--accent); }
#person-annual-plan .ap-role-contributing { color: var(--text-muted); }

#person-meetings .p-meeting {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
#person-meetings .p-meeting:last-child { border-bottom: none; }
#person-meetings .p-meeting-date { color: var(--text-muted); font-size: 11px; min-width: 70px; }
#person-meetings .p-meeting-title { flex: 1; }
#person-meetings .p-meeting a { color: var(--accent); }

@media (max-width: 900px) {
  .person-grid { grid-template-columns: 1fr; }
}

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty h3 { margin: 0 0 8px; font-weight: 600; }

/* ---------- detail view ---------- */
.detail-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.detail-view.hidden { display: none; }
/* Clean-doc header (2026-10-29): a small path, then the title / one muted line
   / people on the left and Share + the ⋯ menu on the right. Shared pieces
   (.page-path, .page-meta, .people-chips, .action-menu) are in ui-kit.css. */
.detail-header {
  display: flex;
  flex-direction: column;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.detail-row { display: flex; gap: 16px; align-items: flex-start; }
.detail-meta { flex: 1; min-width: 0; }
.title-input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  padding: 2px 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
  border-radius: 4px;
  margin-left: -8px;
}
.title-input:hover { border-color: var(--border); }
.title-input:focus { border-color: var(--accent); outline: none; }
.detail-meta .page-meta { padding-left: 0; }
.detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 0;
  align-items: center;
}
.detail-sub:not(:has(.pill)) { display: none; }
.detail-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.detail-actions .pill-warn { gap: 4px; }
.detail-actions .pill-warn .eg-i { width: 12px; height: 12px; }
/* "Refresh from Granola" — re-pull transcript + AI notes on demand. */
#refresh-granola-btn .rg-ico { display: inline-block; }
#refresh-granola-btn.busy { opacity: 0.75; pointer-events: none; }
#refresh-granola-btn.busy .rg-ico { animation: rg-spin 0.9s linear infinite; }
@keyframes rg-spin { to { transform: rotate(360deg); } }

/* Join and Record — manual egrecorder:// launcher, today's notes only (see
   #join-record-btn in index.html, renderJoinRecordButton()/
   resolveJoinRecordMeeting() in app.js). Uses .btn-primary's existing
   --accent/--accent-dim tokens for color, so it already renders correctly in
   all four theme states with no extra rules here — the .pending state below
   is a plain opacity dim, same trick #refresh-granola-btn.busy uses above. */
#join-record-btn.pending { opacity: 0.6; cursor: default; }
/* Slim outline style: recording mostly starts from the Mac app's pop-up, so the
   page button is a quiet backup (in-person meetings), not the main action. */
#join-record-btn.jr-slim { background: transparent; border: 1px solid var(--border); color: var(--text-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
#join-record-btn.jr-slim:hover { color: var(--text); background: var(--bg-raised); }
#join-record-btn.jr-slim .jr-ico { display: inline-flex; }
#join-record-btn .jr-ico .eg-i { width: 14px; height: 14px; }
#join-record-btn .jr-ico[data-icon="mic"] .i-stop,
#join-record-btn .jr-ico[data-icon="stop"] .i-mic { display: none; }
.ask-fields .modal-content label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

.save-indicator {
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 4px;
}
.save-indicator.saving { color: var(--warn-text); }
.save-indicator.saved { color: var(--success-text); }
.save-indicator.error { color: var(--danger-text); }
.save-indicator.conflict {
  color: var(--danger-text);
  background: rgba(229,90,90,0.12);
}

/* tabs */
.tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab-panel { display: none; flex: 1; overflow-y: auto; padding: 16px 20px 40px; }
.tab-panel.active { display: flex; flex-direction: column; }

.readonly-content {
  max-width: 780px;
  line-height: 1.7;
  color: var(--text);
}
.readonly-content h1, .readonly-content h2, .readonly-content h3 { margin-top: 1.5em; }
.readonly-content p { margin: 0 0 1em; }
.readonly-content pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
}
.readonly-content code { background: var(--bg-alt); padding: 1px 5px; border-radius: 3px; font-size: 0.92em; }
.readonly-content ul, .readonly-content ol { padding-left: 1.3em; }
.readonly-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 12px;
  margin-left: 0;
  color: var(--text-muted);
}

/* EasyMDE overrides for dark mode */
.EasyMDEContainer { flex: 1; display: flex; flex-direction: column; }
.EasyMDEContainer .CodeMirror {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-top: none;
  flex: 1;
  /* Sans-serif (not monospace) so bold/italic visually pop while editing.
     Monospace fonts collapse bold/regular to near-identical widths and
     visual weights, making the bold toolbar button look like it did nothing. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
}
/* Make markdown syntax visibly render while editing — true WYSIWYG feel. */
.EasyMDEContainer .cm-s-easymde .cm-strong { font-weight: 700; color: var(--text); }
.EasyMDEContainer .cm-s-easymde .cm-em { font-style: italic; }
.EasyMDEContainer .cm-s-easymde .cm-strikethrough { text-decoration: line-through; opacity: 0.7; }
/* Inline code = monospace + subtle background */
.EasyMDEContainer .cm-s-easymde .cm-comment {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 0.92em;
  background: var(--bg-alt, #f5f5f5);
  padding: 1px 4px;
  border-radius: 3px;
}
/* Dim the **/__/# formatting markers so the rendered text is what stands out */
.EasyMDEContainer .cm-s-easymde .cm-formatting {
  color: var(--text-muted, #999);
  opacity: 0.55;
}
/* Bullets — render a real bullet char alongside the `-` so list structure reads */
.EasyMDEContainer .cm-s-easymde .cm-variable-2,
.EasyMDEContainer .cm-s-easymde .cm-variable-3 { color: var(--text); }

/* Conflict-merge dialog (Task #11) */
#conflict-dialog .conflict-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
#conflict-dialog .conflict-col { display: flex; flex-direction: column; }
#conflict-dialog .conflict-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.5px; margin-bottom: 4px;
}
#conflict-dialog .conflict-text {
  width: 100%; font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 12px; padding: 8px; border: 1px solid var(--border);
  border-radius: 4px; resize: vertical;
}
#conflict-dialog .conflict-text[data-side="mine"] { background: var(--accent-soft); color: var(--text); }
#conflict-dialog .conflict-text[data-side="theirs"] { background: rgba(245, 158, 11, 0.14); color: var(--text); }
#conflict-dialog .conflict-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px;
}
.EasyMDEContainer .editor-toolbar {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom: none;
  opacity: 1;
}
.EasyMDEContainer .editor-toolbar button {
  color: var(--text-muted) !important;
}
.EasyMDEContainer .editor-toolbar button:hover {
  background: var(--bg-raised);
  border-color: transparent;
}
.EasyMDEContainer .editor-toolbar button.active {
  background: var(--bg-raised);
  color: var(--text) !important;
}
.EasyMDEContainer .CodeMirror-cursor { border-left-color: var(--text); }
/* Tone down heading sizes in the editor — EasyMDE's defaults make ### look like H1 */
.EasyMDEContainer .cm-s-easymde .cm-header { color: var(--text); font-weight: 600; }
.EasyMDEContainer .cm-s-easymde .cm-header-1 { font-size: 1.15em; }
.EasyMDEContainer .cm-s-easymde .cm-header-2 { font-size: 1.10em; }
.EasyMDEContainer .cm-s-easymde .cm-header-3 { font-size: 1.05em; }
.EasyMDEContainer .cm-s-easymde .cm-header-4,
.EasyMDEContainer .cm-s-easymde .cm-header-5,
.EasyMDEContainer .cm-s-easymde .cm-header-6 { font-size: 1.0em; }
.EasyMDEContainer .cm-s-easymde .cm-quote { color: var(--text-muted); }
.EasyMDEContainer .cm-s-easymde .cm-link { color: var(--accent); }

/* Rendered preview — Granola-like clean typography */
.EasyMDEContainer .editor-preview, .EasyMDEContainer .editor-preview-side {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  padding: 16px 20px;
}
.EasyMDEContainer .editor-preview h1,
.EasyMDEContainer .editor-preview-side h1 { font-size: 18px; margin: 18px 0 8px; font-weight: 600; }
.EasyMDEContainer .editor-preview h2,
.EasyMDEContainer .editor-preview-side h2 { font-size: 16px; margin: 16px 0 6px; font-weight: 600; }
.EasyMDEContainer .editor-preview h3,
.EasyMDEContainer .editor-preview-side h3 { font-size: 14px; margin: 14px 0 4px; font-weight: 600; color: var(--text); }
.EasyMDEContainer .editor-preview h4,
.EasyMDEContainer .editor-preview-side h4 { font-size: 13px; margin: 12px 0 4px; font-weight: 600; color: var(--text-muted); }
.EasyMDEContainer .editor-preview ul,
.EasyMDEContainer .editor-preview ol { padding-left: 22px; margin: 4px 0; }
.EasyMDEContainer .editor-preview li { margin: 2px 0; }
.EasyMDEContainer .editor-preview p { margin: 6px 0; }

.EasyMDEContainer .editor-statusbar { color: var(--text-dim); }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  width: min(420px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-content h2 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-content label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--text-muted);
  gap: 4px;
}
.modal-content input {
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* ---------- toast ----------
   One small pill, bottom-right but ABOVE the floating 💡 Suggest button
   (suggest-widget.js pins itself at right:18/bottom:18 with a z-index in the
   billions — anything at the old bottom:20/right:20 was covered by it, which
   made every error in the app unreadable). Collapsed it is a single trimmed
   line; click to expand and read the full message (app.js wires the click,
   and every toast writer's hide-timer skips while .open). Colors are rgba
   tints so the same rule reads correctly in dark mode. */
.toast {
  position: fixed;
  bottom: 72px;
  right: 18px;
  max-width: 280px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 6px 30px 6px 24px;
  border-radius: 999px;
  font-size: 12px;
  z-index: 200;
  box-shadow: 0 6px 18px rgba(16,20,30,0.14);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast::before {
  content: "";
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.toast::after {
  content: "✕";
  position: absolute;
  right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-dim);
}
.toast.error {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.35);
}
.toast.error::before { background: var(--danger); }
.toast.success {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.35);
}
.toast.success::before { background: var(--success); }
.toast .t-b { font-weight: 650; }
.toast .t-d { color: var(--text-muted); }
/* expanded: same spot, grows into a small card, full text wraps */
.toast.open {
  white-space: normal;
  border-radius: 12px;
  max-width: 340px;
  line-height: 1.45;
}
.toast.open::before { top: 13px; transform: none; }
.toast.open::after { top: 13px; transform: none; }

/* ---------- mobile ---------- */
.sidebar-only-mobile { display: none; }

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-only-mobile { display: inline-flex; }
  .cards { grid-template-columns: 1fr; }
  .topbar { padding: 10px 14px; }
  .list-view { padding: 12px 14px 40px; }
  .detail-header { padding: 10px 14px; }
  /* Phone: the buttons wrap under the people and Share takes the row. */
  .detail-row { flex-wrap: wrap; gap: 10px; }
  .detail-actions { width: 100%; flex-wrap: wrap; row-gap: 6px; }
  .detail-actions #share-btn { flex: 1; justify-content: center; }
  .title-input { font-size: 20px; }
  .tab-panel { padding: 12px 14px 40px; }
  .tabs { padding: 0 10px; overflow-x: auto; }
  .tab { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
}

@media (max-width: 500px) {
  .modal-content { padding: 18px; }
  .card { min-height: auto; }
}

/* sidebar backdrop when open on mobile */
@media (max-width: 900px) {
  #app.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 40;
  }
}

/* ---------- v20: section headers with action buttons ---------- */
.nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.nav-gear, .nav-add-person {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.nav-section:hover .nav-gear,
.nav-section:hover .nav-add-person { opacity: 1; }
.nav-gear:hover, .nav-add-person:hover {
  background: var(--bg-raised);
  color: var(--text);
}
.nav-add-person { font-size: 16px; font-weight: 600; }

/* ---------- Collapsible sidebar sections (static/sidebar_collapse.js) ----------
 * The Mac app's header row, copied: a chevron then the label, the whole left of
 * the row is one button, the gear / "+" sit beside it. The chevron is drawn
 * here, not in the DOM, because the Mac app scrapes this sidebar and reads the
 * title text out of it. A closed section is hidden by .collapsed, a class the
 * scraper ignores, so the Mac app still sees every row. */
.nav-title .nav-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  margin: -4px 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}
.nav-toggle::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin: 0 2px 3px 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.6;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.nav-section.collapsed .nav-toggle::before { transform: rotate(-45deg); margin-bottom: 0; }
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (hover: hover) {
  .nav-toggle:hover::before { opacity: 0.9; }
}
.nav-section.collapsed { padding-bottom: 4px; }
.nav-section.collapsed > :not(.nav-title) { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .nav-toggle::before { transition: none; }
}

/* Touch devices: neutralize :hover-driven visual changes in the sidebar. iOS
 * Safari treats :hover as "sticky" — when a tap produces a hover change, the
 * FIRST tap only applies the hover state and a SECOND tap activates the link.
 * That is the reported "have to double-tap every nav item" bug with the drawer
 * open. Removing the hover delta on touch (and showing the per-section gear/add
 * buttons unconditionally) means a single tap navigates. Mouse devices — which
 * match (hover: hover) — keep the original hover-reveal behavior untouched. */
@media (hover: none) {
  .nav-item:hover, .nav-list > a:hover { background: transparent; }
  .nav-item.active:hover, .nav-list > a.active:hover { background: var(--row-active); }
  .nav-gear, .nav-add-person { opacity: 1; }
}

/* ---------- v20: person bucket DnD + hover-X delete ---------- */
.nav-list.person-bucket {
  min-height: 4px;
}
.nav-list.person-bucket.bucket-drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  background: rgba(120, 160, 220, 0.06);
  border-radius: 4px;
}
.nav-list.person-bucket > a {
  position: relative;
  cursor: grab;
}
.nav-list.person-bucket > a.dragging {
  opacity: 0.4;
}
.nav-list.person-bucket > a:active { cursor: grabbing; }
.nav-person-del {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-raised);
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.nav-list.person-bucket > a:hover .nav-person-del { opacity: 1; }
.nav-person-del:hover { background: var(--danger); color: #fff; }

/* ---------- v20: todo metadata tooltip + history link ---------- */
.todo-item .todo-meta-info {
  visibility: hidden;
  margin-left: 4px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
  border-radius: 3px;
  user-select: none;
}
.todo-item:hover .todo-meta-info { visibility: visible; }
.todo-item .todo-meta-info:hover { background: var(--bg-raised); color: var(--text); }

/* Tooltip — pure CSS via `title` is fine, but we render a richer one on hover */
.todo-tooltip {
  position: fixed;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 300;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  max-width: 320px;
}
.todo-tooltip.hidden { display: none; }
.todo-tooltip .row { display: flex; gap: 8px; }
.todo-tooltip .row .k { color: var(--text-dim); min-width: 78px; }
.todo-tooltip .row .v { color: var(--text); }

/* ---------- v20: history modal timeline ---------- */
.todo-history-content { width: min(540px, 92vw); max-height: 80vh; }
.todo-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
}
.history-entry {
  border-left: 2px solid var(--border);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.history-entry.create { border-left-color: var(--success, #4caf50); }
.history-entry.edit   { border-left-color: var(--accent, #6699ff); }
.history-entry.delete { border-left-color: var(--danger, #d44); }
.history-entry .when { color: var(--text-dim); font-size: 11px; }
.history-entry .by   { color: var(--text); }
.history-entry .change {
  margin-top: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  font-size: 11px;
}
.history-entry .change .before { color: var(--text-dim); text-decoration: line-through; }
.history-entry .change .after  { color: var(--text); }

/* ---------- v20: quick toggles ---------- */
.quick-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}
.quick-toggle-list label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
/* ---------- v22: section visibility toggles ---------- */
.nav-section.section-hidden { display: none !important; }
.quick-toggle-group { display: flex; flex-direction: column; gap: 6px; }
.quick-toggle-grouptitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ========================================================================
 * v23: Performance Hub styles — appended from okr-web/static/style.css
 * Untouched except for this comment fence. Selectors are scoped enough
 * (.objectives-grid, .donut-wrap, .review-modal, etc.) that nothing
 * conflicts with the meetings-web rules above.
 * ======================================================================== */

/* ---------------------------------------------------------------- *
 * EG Performance Hub - Paycor-inspired styling (sidebar version)
 * ---------------------------------------------------------------- */
:root {
  --surface: var(--bg-alt);
  --muted: var(--text-muted);
  --primary: var(--accent);
  --primary-dark: var(--accent-dim);
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --gray: var(--text-dim);
  --blue: var(--accent);
  --shadow: 0 1px 2px rgba(20, 30, 50, 0.05), 0 6px 18px rgba(30, 30, 60, 0.06);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--primary); text-decoration: none; }

/* Removed in the meetings-web merge: the .sidebar / .brand / .side-nav /
 * .side-btn / .sidebar-footer / .user-switch / #app rules from okr-web
 * standalone styled its own left rail + full-screen main area. We use the
 * meetings-web layout (already styled above), so these would have fought
 * for the same selectors. The `.view` visibility rule below stays — it's
 * how perfhub.js shows/hides its view containers. */

.view { display: none; }
/* `.main` is a flex column with overflow:hidden, so every direct child view has
 * to own its own scroll — same pattern as .list-view above. Without the flex +
 * overflow-y here these sections grow past main and get CLIPPED with no way to
 * scroll (settings alone was hiding ~3.8k px of content). min-height:0 is what
 * lets a flex child actually shrink below its content height and scroll. */
.view.active {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.view.hidden { display: none !important; }

/* ---------------- Objectives ---------------- */
.objectives-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 16px;
}
.header-left h2 { margin: 0; font-size: 22px; font-weight: 600; }
.header-left h2 .muted { font-weight: 400; color: var(--muted); margin-right: 8px; font-size: 18px; }
.header-left h2 select {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-raised);
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.gray { background: var(--gray); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.badge.personal { background: var(--accent-soft); color: var(--accent); }
.badge.company { background: rgba(245, 158, 11, 0.14); color: var(--dm-warn-text); }
.badge.due { background: var(--dm-danger-tint); color: var(--dm-danger-text); padding: 2px 6px; }
.badge.q { background: var(--bg-raised); color: var(--muted); }
.avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6b8cff, var(--accent));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}
.chk { display: flex; gap: 5px; align-items: center; font-size: 12px; cursor: pointer; }
.chk input { cursor: pointer; }

/* ---------------- Modals ---------------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(20, 30, 50, 0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-card {
  background: #fff;
  border-radius: 10px;
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 28px;
  box-shadow: 0 24px 60px rgba(20, 30, 50, 0.24);
  position: relative;
}
.modal-card.narrow { width: min(540px, 92vw); }
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: transparent; border: none;
  font-size: 24px; color: var(--muted);
  cursor: pointer; line-height: 1;
}
.modal-card h2 { margin-top: 4px; }

.q-row {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
}
.q-num {
  background: var(--accent-fill); color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.q-body h4 { margin: 0 0 4px; font-size: 14px; }
.q-body .prompt { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.q-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-side h5 { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.q-side textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.q-side .read-only {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px;
  min-height: 80px;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 13px;
}
.q-side .locked-msg {
  background: rgba(245, 158, 11, 0.14);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  color: var(--dm-warn-text);
  padding: 8px;
  border-radius: 5px;
  font-size: 12px;
}

/* ---------------- Toast + utility ----------------
   The pill itself is defined ONCE, in the "toast" section further up — this
   block used to hold a second, conflicting .toast (solid navy/red, back at
   the covered bottom:24 corner) that silently won the cascade and undid the
   other one. Only the shared hide state lives here now. */
.toast.hidden { display: none; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 980px) {
  /* NOTE: the old okr-web mini-rail collapse ( .sidebar{width:60px} +
     #app{margin-left:60px} + hiding .side-btn/.sidebar-footer/.title ) was
     removed here. Those hide-selectors are dead post the meetings-web / EG Notes
     rebrand — current nav markup uses .nav-item/.nav-section/.nav-title, so the
     collapse narrowed the box to 60px WITHOUT hiding the labels, clipping them to
     single letters, and this ≤980px block was overriding the ≤900px drawer rules
     at phone width (shoving #app sideways). The drawer (≤900px) now owns mobile. */
  .oneonone-grid { grid-template-columns: 1fr; }
  .q-answers { grid-template-columns: 1fr; }
  .alignment-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Attachments (Task #6) — drag-drop zone + thumb strip + lightbox
   ========================================================================== */
.attachments-zone {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.attachments-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}
.att-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 6px;
  border: 1px solid var(--border, #d8dadf);
  background: var(--bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}
.att-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.att-thumb .att-icon {
  font-size: 28px;
  display: flex; flex-direction: column; align-items: center;
  color: var(--text-muted);
  padding: 4px;
  text-align: center;
}
.att-thumb .att-icon .att-name {
  font-size: 10px;
  line-height: 1.1;
  margin-top: 4px;
  word-break: break-word;
  max-width: 88px;
  max-height: 36px;
  overflow: hidden;
}
.att-thumb .att-del {
  position: absolute;
  top: 2px; right: 2px;
  background: rgba(0,0,0,0.55);
  color: white;
  border: 0;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  display: none;
}
.att-thumb:hover .att-del { display: block; }
.attachments-drop {
  border: 2px dashed var(--border, #d0d4da);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.attachments-drop.dragover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--dm-link);
}
.attachments-drop-hint { flex: 1; text-align: left; }
#attachments-status { white-space: nowrap; }
/* Lightbox */
.att-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.att-lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  background: #222;
}
.att-lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 0;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 18px;
  cursor: pointer;
}
.att-lightbox-caption {
  color: white;
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
  max-width: 80vw;
}
/* Prev/next navigation arrows (also driven by ← / → keys) */
.att-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 46px; height: 46px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.att-nav:hover { background: rgba(255,255,255,0.32); }
.att-prev { left: 16px; }
.att-next { right: 16px; }
/* Non-image attachment card shown inside the same viewer */
.att-lightbox-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #fff;
  background: #1b1b1f;
  border-radius: 10px;
  padding: 40px 48px;
  max-width: 80vw;
}
.att-file-big { font-size: 72px; line-height: 1; }
.att-file-title { font-size: 16px; word-break: break-all; text-align: center; max-width: 60vw; }
.att-file-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Trix WYSIWYG editor (replaced EasyMDE 2026-05-27) ---------- */
/* Light toolbar in the dark theme so Trix's native dark SVG icons stay
   crisp and high-contrast. Editor body stays dark to match the app. */
trix-toolbar {
  background: #f1f3f5;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 6px 8px;
  position: sticky;
  top: 0;
  z-index: 5;
}
trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
trix-toolbar .trix-button-group {
  background: #ffffff;
  border: 1px solid #c8ccd0;
  border-radius: 4px;
  margin: 0;
  display: inline-flex;
  overflow: hidden;
}
trix-toolbar .trix-button-group--file-tools { margin-left: auto; }
trix-toolbar .trix-button {
  background: transparent;
  color: #1a1d1f;
  border: none;
  border-right: 1px solid #d6d9dc;
  min-width: 34px;
  height: 32px;
  cursor: pointer;
  position: relative;
}
trix-toolbar .trix-button:last-child { border-right: none; }
trix-toolbar .trix-button::before {
  opacity: 0.85;
}
trix-toolbar .trix-button:hover {
  background: #d8e6f7;
}
trix-toolbar .trix-button:hover::before { opacity: 1; }
trix-toolbar .trix-button.trix-active {
  background: var(--accent-fill);
  color: #ffffff;
}
trix-toolbar .trix-button.trix-active::before {
  filter: invert(1) brightness(2);
  opacity: 1;
}
trix-toolbar .trix-button:disabled,
trix-toolbar .trix-button.trix-button--icon-attach[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}
trix-toolbar .trix-dialogs {
  background: #ffffff;
  color: #1a1d1f;
  border: 1px solid #c8ccd0;
  border-radius: 4px;
  margin-top: 4px;
}
trix-toolbar .trix-input--dialog {
  background: #ffffff;
  color: #1a1d1f;
  border: 1px solid #c8ccd0;
  border-radius: 4px;
  padding: 4px 8px;
}
trix-toolbar .trix-button--dialog {
  background: var(--accent-fill);
  color: #ffffff;
  border-radius: 4px;
}

trix-editor.perfhub-editor {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding: 14px 16px;
  min-height: 320px;
  font-size: 15px;
  line-height: 1.55;
  outline: none;
  caret-color: var(--accent);
  overflow-y: auto;
}
trix-editor.perfhub-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim);
}
trix-editor.perfhub-editor h1 { font-size: 22px; margin: 14px 0 8px; font-weight: 600; }
trix-editor.perfhub-editor h2 { font-size: 18px; margin: 12px 0 6px; font-weight: 600; }
trix-editor.perfhub-editor p { margin: 0 0 8px; }
trix-editor.perfhub-editor ul, trix-editor.perfhub-editor ol { margin: 4px 0 10px 22px; }
trix-editor.perfhub-editor li { margin: 2px 0; }
trix-editor.perfhub-editor blockquote {
  border-left: 3px solid var(--accent-dim);
  margin: 8px 0;
  padding: 4px 12px;
  color: var(--text-muted);
}
trix-editor.perfhub-editor pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  overflow-x: auto;
}
trix-editor.perfhub-editor code {
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
}
trix-editor.perfhub-editor a { color: var(--accent); text-decoration: underline; }
trix-editor.perfhub-editor figure.attachment {
  margin: 8px 0;
  border-radius: 6px;
  overflow: hidden;
}
trix-editor.perfhub-editor figure.attachment img { max-width: 100%; height: auto; }

/* ---------- To-dos side panel in the note editor (1:1 / prep notes) ---------- */
/* Two-column layout for the detail view: note editor (#detail-main) on the left,
   the matched person's to-dos (#detail-todos) pinned on the right. Reuses the
   existing .todo-item/.todo-group styling so panel items match the person page. */
/* flex:1 + min-height:0 + overflow-y:auto makes .detail-body the bounded
   scroll container for the note editor. Without these it grows to content
   height and the bottom of long notes gets clipped by .detail-view's
   overflow:hidden (Brian: "unable to scroll to see all the notes"). */
.detail-body { display: flex; align-items: flex-start; gap: 0; flex: 1; min-height: 0; overflow-y: auto; }
#detail-main { flex: 1 1 auto; min-width: 0; }
.detail-todos {
  flex: 0 0 340px;
  width: 340px;
  align-self: stretch;
  border-left: 1px solid var(--border);
  margin-left: 16px;
  padding: 4px 4px 24px 16px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  position: sticky;
  top: 12px;
}
.detail-todos.hidden { display: none; }
.detail-todos-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
#detail-todos-name { font-weight: 600; font-size: 14px; }
.detail-todos .todo-add-input,
.todo-add-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 13px;
}
.detail-todos .todo-add-input:focus { outline: none; border-color: var(--accent); }
.detail-todos .todo-done-wrap { margin-top: 14px; }

/* Panel density. The person page is ~1000px wide and can afford a reserved
   gutter for controls; this panel is 340px and cannot. Two offenders were
   eating roughly a third of the text column:
     - .todo-actions is `visibility: hidden`, which still RESERVES layout for
       three buttons. Text wrapped after 3-4 words with ~100px of blank space
       to its right.
     - .todo-drag-handle likewise held a column open for a control that is not
       useful in a cramped sidebar.
   Both are display:none here and revealed on hover, which returns the width
   to the text instead of holding it for something invisible. */
.detail-todos .todo-item .todo-actions,
.detail-todos .todo-item .todo-drag-handle { display: none; }
.detail-todos .todo-item:hover .todo-actions { display: flex; }
.detail-todos .todo-item {
  padding: 5px 4px;
  gap: 8px;
  align-items: baseline;
}
.detail-todos .todo-item input[type="checkbox"] {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 2px;
}
.detail-todos .todo-item .todo-text {
  font-size: 12.5px;
  line-height: 1.45;
  /* Long unbroken tokens (URLs, SKUs) still wrap, but ordinary prose breaks on
     word boundaries — break-word alone was splitting mid-word in a column this
     narrow. */
  word-break: normal;
  overflow-wrap: anywhere;
}
.detail-todos .todo-group { margin-bottom: 12px; }
.detail-todos .todo-group-title { font-size: 10.5px; letter-spacing: 0.04em; }
.detail-todos .dt-section-title {
  font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted); margin: 16px 0 6px;
}
.detail-todos .dt-section-private { border-top: 1px solid var(--border); padding-top: 4px; }
/* The 🔒 badge is a flex sibling of the text; at this width it would squeeze
   the text into a ribbon. Park it on its own line under the item instead. */
.detail-todos .todo-item .todo-vis-badge {
  font-size: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}
.detail-todos .todo-item .todo-meta-info { flex: 0 0 auto; }
.detail-todos .todo-done-wrap summary {
  cursor: pointer; color: var(--text-muted); font-size: 12px; user-select: none;
}

/* Meeting brief (admin-only prep doc for one meeting instance), above the
   to-dos. Same <details> shape as .todo-done-wrap; readonly-content (shared
   with the AI Summary / Zoom summary tabs) handles the rendered markdown. */
.detail-brief {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 14px;
  background: var(--bg-alt);
}
.detail-brief.hidden { display: none; }
.detail-brief summary {
  cursor: pointer; font-weight: 600; font-size: 13px; user-select: none;
}
.detail-brief-body { margin-top: 8px; font-size: 12.5px; }

/* Multi-attendee to-dos (group meetings): one collapsible section per
   resolved person, same visual language as the rest of this panel. */
#detail-todos-multi.hidden { display: none; }
.dtm-person {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.dtm-person summary {
  cursor: pointer; font-weight: 600; font-size: 13px; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dtm-person .todo-add-input { margin-top: 10px; }

.detail-todos-toggle {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: 8px;
  margin-top: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  position: sticky;
  top: 12px;
}
.detail-todos-toggle:hover { color: var(--text); border-color: var(--accent); }
.detail-todos-toggle.hidden { display: none; }

/* Stack the panel below the editor on narrow screens */
@media (max-width: 900px) {
  .detail-body { flex-direction: column; }
  /* Stretch, never wider than the screen: with align-items:flex-start a
     column flex item sizes to its content, so the agenda ran ~85px past
     the right edge at 390px (cut-off text and chips, 10/13). */
  #detail-main { align-self: stretch; width: 100%; max-width: 100%; }
  .detail-todos {
    flex-basis: auto; width: 100%; margin-left: 0;
    border-left: none; border-top: 1px solid var(--border);
    margin-top: 16px; padding: 14px 0 24px 0; position: static; max-height: none;
  }
  .detail-todos-toggle { margin-left: 0; }
}

/* ---------- Tighten loose-list spacing in rendered notes ----------
   Granola AI summaries are "loose" markdown lists (blank line between bullets),
   which marked/Trix render as <li><p>…</p></li>, and the paragraph margin adds
   a big gap between every bullet. Zero the inner <p> margin inside list items
   so bullets sit tight. Applies to the Trix AI-summary editor + readonly tabs. */
trix-editor.perfhub-editor li > p,
.readonly-content li > p {
  margin: 0;
}
trix-editor.perfhub-editor li { margin: 1px 0; }
.readonly-content li { margin: 1px 0; }

/* ============================================================================
 * Sidebar contrast fix  (branch: jose/sidebar-contrast)
 * ----------------------------------------------------------------------------
 * Bug: the okr-web merge appended a global :root that pins --text to a fixed
 * dark navy (#1a2233). The sidebar background uses --bg-alt, which stays
 * theme-aware and flips dark in OS dark mode -> dark text on a dark sidebar =
 * invisible nav items. (Same root cause that hid the sign-in title.)
 * Fix: give the sidebar its OWN theme-aware text colors so it reads in BOTH
 * dark and light mode. Scoped to .sidebar with higher specificity than the
 * .nav-item rules, so it wins over the clobbered --text without touching the
 * global theme or the Performance Hub screens.
 * ========================================================================== */
/* Sidebar text uses the theme-aware tokens so it reads in ALL FOUR states:
 * auto-light, auto-dark, and the forced html[data-theme="light"|"dark"] switch.
 * The previous version keyed off @media (prefers-color-scheme) ONLY, so tapping
 * "Light" on an OS-dark device left near-white nav text (#e8e9ea) on the white
 * sidebar (the reported washout). html[data-theme] pins --text / --text-faint /
 * --nav-active-text and out-specifies the legacy okr-web :root clobber, so these
 * resolve to a readable color in every theme + OS combination. */
.sidebar { color: var(--text); }
.sidebar .brand,
.sidebar .nav-item,
.sidebar .nav-list > a { color: var(--text); }
.sidebar .nav-title,
.sidebar .count { color: var(--text-faint); }
.sidebar .nav-item.active,
.sidebar .nav-list > a.active { color: var(--nav-active-text); }

/* Note/meeting card titles: use the theme-aware --text token so they read in
   ALL FOUR states — auto-light, auto-dark, and the forced html[data-theme]
   switch. The previous version keyed off @media (prefers-color-scheme) ONLY, so
   forcing Light on an OS-dark device left near-white titles (#e8e9ea) on the
   white cards (the reported washout). html[data-theme] + the html:not([data-theme])
   auto rules pin --text correctly and out-specify the legacy okr-web clobber. */
.cards .card-title { color: var(--text); }

/* Note editor contrast fix (same root cause, third instance): trix-editor
   renders the clobbered --text (#1a2233 navy) on a dark --bg-alt surface
   in OS dark mode, making note content unreadable. html:not([data-theme])
   guards keep Auto following the OS while losing to the forced-theme pins
   below (same specificity, later in the file). */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) trix-editor,
  html:not([data-theme="light"]) .trix-content { color: #e8e9ea; }
}
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) trix-editor,
  html:not([data-theme="dark"]) .trix-content { color: #1a1d1f; }
}

/* ------------------------------------------------------------------ *
 * Appearance switch (branch: jose/theme-switch)
 * Auto (no data-theme attr) = follow the OS via the rules above.
 * html[data-theme="light"|"dark"] forces a coherent theme by pinning
 * every scheme-dependent variable, independent of the OS setting.
 * ------------------------------------------------------------------ */
.theme-switch {
  display: flex;
  gap: 2px;
  margin: 10px 12px 12px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  flex: none;
}
.theme-switch button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 600 10.5px/1 var(--font);
  padding: 5px 0;
  border-radius: 999px;
  cursor: pointer;
}
.theme-switch button.on { background: var(--bg-alt); color: var(--text); box-shadow: 0 0 0 1px var(--btn-secondary-border); }

/* Forced LIGHT: the values the legit theme uses under
   @media (prefers-color-scheme: light). */
html[data-theme="light"] {
  --bg: #fafbfc;
  --bg-alt: #ffffff;
  --bg-raised: #f3f4f6;
  --border: #e8eaed;
  --border-soft: #eef0f2;
  --text: #1c1f23;
  --text-muted: #5f6571;
  --text-dim: #646b77;
  --accent: #6366f1;
  --accent-dim: #4f46e5;
  --accent-soft: #eef2ff;
  --accent-on: #4338ca;
  --sidebar-bg: #ffffff;
  --section-label: #646b77;
  --bg-side: #ffffff;
  --row-hover: #f3f4f6;
  --row-active: #eef2ff;
  --nav-active-text: #4338ca;
  --badge-bg: #f3f4f6;
  --text-faint: #646b77;
  --accent-fill: #6366f1;
  --accent-fill-hover: #4f46e5;
  /* ---- Button hierarchy (UI audit 2026-10-13). One --btn-primary per view; Accept = success;
     Remove = danger; everything else is secondary/tertiary. Contrast = WCAG 2.x ratios, white label on fill. ---- */
  --btn-primary-bg: #4f46e5;        /* white 6.29:1 */
  --btn-primary-bg-hover: #4338ca;  /* white 7.90:1 */
  --btn-primary-fg: #ffffff;
  --btn-success-bg: #047857;        /* white 5.48:1 */
  --btn-success-bg-hover: #065f46;  /* white 7.68:1 */
  --btn-success-fg: #ffffff;
  --btn-danger-bg: #b91c1c;         /* white 6.47:1 */
  --btn-danger-bg-hover: #991b1b;   /* white 8.31:1 */
  --btn-danger-fg: #ffffff;
  --btn-secondary-bg: var(--bg-alt);
  --btn-secondary-bg-hover: var(--bg-raised);
  --btn-secondary-fg: var(--text);
  --btn-secondary-border: #c9ced8;
  --link: #4338ca;                  /* 7.90:1 on white */
  --link-hover: #3730a3;
  --chip-bg: var(--bg-raised); --chip-fg: var(--text-muted); --chip-border: var(--border);
  --avatar-bg: var(--bg-raised); --avatar-fg: var(--text-muted);
  /* status colours as TEXT (--success/--warn/--danger stay for fills, borders, icons) */
  --success-text: #047857;          /* 5.48:1 on white */
  --warn-text: #b45309;             /* 5.02:1 */
  --danger-text: #b91c1c;           /* 6.47:1 */
  color-scheme: light;
}
html[data-theme="light"] trix-editor,
html[data-theme="light"] .trix-content { color: #1a1d1f; }

/* Forced DARK: the legit theme's dark defaults. */
html[data-theme="dark"] {
  --bg: #1e1e1e;
  --bg-alt: #262626;
  --bg-raised: #2c2c2e;
  --border: #333336;
  --border-soft: #2a2a2c;
  --text: #e9eaed;
  --text-muted: #9aa0aa;
  --text-dim: #9298a3;
  --accent: #818cf8;
  --accent-dim: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.16);
  --accent-on: #c7ccff;
  --sidebar-bg: #1e1e1e;
  --section-label: #9298a3;
  --bg-side: #1e1e1e;
  --row-hover: #2c2c2e;
  --row-active: rgba(99, 102, 241, 0.16);
  --nav-active-text: #c7ccff;
  --badge-bg: #2c2c2e;
  --text-faint: #9298a3;
  --accent-fill: #4f46e5;
  --accent-fill-hover: #4338ca;
  /* ---- Button hierarchy (UI audit 2026-10-13), dark values; see the light block for the rules. ---- */
  --btn-primary-bg: #5659f0;        /* white 5.14:1; 3.21:1 on the card */
  --btn-primary-bg-hover: #5b5df1;  /* white 4.91:1 */
  --btn-primary-fg: #ffffff;
  --btn-success-bg: #048157;        /* white 4.90:1 */
  --btn-success-bg-hover: #04865a;  /* white 4.60:1 */
  --btn-success-fg: #ffffff;
  --btn-danger-bg: #dc2626;         /* white 4.83:1 */
  --btn-danger-bg-hover: #d62222;   /* white 5.11:1 */
  --btn-danger-fg: #ffffff;
  --btn-secondary-bg: var(--bg-alt);
  --btn-secondary-bg-hover: var(--bg-raised);
  --btn-secondary-fg: var(--text);
  --btn-secondary-border: #4a4f5a;  /* 2.01:1 on the card */
  --link: #a5b4fc;                  /* 8.27:1 on the card */
  --link-hover: #c7ccff;
  --chip-bg: var(--bg-raised); --chip-fg: var(--text-muted); --chip-border: var(--border);
  --avatar-bg: var(--bg-raised); --avatar-fg: var(--text-muted);
  --success-text: #34d399;          /* 8.58:1 on the card */
  --warn-text: #fbbf24;             /* 9.88:1 */
  --danger-text: #f87171;           /* 5.96:1 */
  color-scheme: dark;
}
html[data-theme="dark"] trix-editor,
html[data-theme="dark"] .trix-content { color: #e8e9ea; }
/* ================================================================
   Manage Myself — CEO/self coaching (dashboard + history).
   Reuses .todo-item / .pill / .ppanel / .person-tabs / .modal /
   .readonly-content; these are the coaching-only additions.
   ================================================================ */
.coaching-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.coaching-view.hidden { display: none !important; }
#coaching-view .person-panels { flex: 1; overflow-y: auto; }
#coaching-view .ppanel,
#person-view .ppanel[data-coaching-panel] { padding: 4px 2px 40px; }

/* Manage Myself, quieter (Jose 2026-10-23, round 1 sample 3): soft Generate
   button in the Home colour, sources as one quiet line on the right, counts as
   one line, one-line actions with hover icons, History weeks that open in place. */
.coach-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; }
.coach-svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.coach-run-cloud { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-on); border: 1px solid transparent; font-weight: 600; }
.btn.coach-run-cloud:hover { background: var(--accent-soft); border-color: var(--accent); }
/* In the page's control row it is the one visible secondary button, like Share on a note. */
.coach-controls .btn.coach-run-cloud { background: var(--btn-secondary-bg); color: var(--btn-secondary-fg); border: 1px solid var(--btn-secondary-border); font-weight: 500; }
.coach-controls .btn.coach-run-cloud:hover { background: var(--btn-secondary-bg-hover); border-color: var(--btn-secondary-border); }
.btn.coach-run-cloud:disabled { opacity: 0.7; }

.coach-sources-pop { margin-left: auto; position: relative; font-size: 12px; }
.coach-sources-pop > summary { list-style: none; cursor: pointer; color: var(--text-muted); padding: 4px 2px; }
.coach-sources-pop > summary::-webkit-details-marker { display: none; }
.coach-sources-pop > summary:hover { color: var(--text); }
.coach-sources-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 300px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); padding: 6px 12px;
}
.coach-source-item { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; padding: 5px 0; color: var(--text); }
.coach-source-item + .coach-source-item { border-top: 1px solid var(--border); }
.coach-ok { color: var(--dm-ok-text); white-space: nowrap; }
.coach-dim { color: var(--text-muted); white-space: nowrap; }
.coach-source-item a { color: var(--dm-link); }

.coach-counts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin: 0 0 18px; }
.coach-counts b { font-weight: 600; color: var(--text); margin-right: 3px; }
.coach-counts .is-danger, .coach-counts .is-danger b { color: var(--danger-text); }

.coach-group-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.coach-group-week { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-muted); cursor: pointer; }
.coach-group-week:hover { color: var(--accent); }

/* Action item: one line; the detail opens under the title on a click. */
.coach-item { align-items: flex-start; border-bottom: 1px solid var(--border); border-radius: 0; }
.coach-item .coach-body { flex: 1; min-width: 0; }
.coach-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.coach-title { display: inline-flex; align-items: flex-start; gap: 6px; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.coach-title:disabled { cursor: default; color: inherit; }
.coach-title .coach-svg { width: 12px; height: 12px; margin-top: 4px; color: var(--text-muted); transition: transform 0.12s; }
.coach-title[aria-expanded="true"] .coach-svg { transform: rotate(90deg); }
.coach-chev-pad { display: inline-block; width: 12px; flex: none; }
.coach-item .todo-text { cursor: inherit; }
.coach-item.going .coach-title .todo-text { font-weight: 600; }
.coach-detail { font-size: 12px; margin: 3px 0 2px 18px; line-height: 1.45; }
.coach-item .coach-pri { font-size: 10px; padding: 1px 6px; }
.coach-item .coach-actions { visibility: visible; opacity: 0; transition: opacity 0.1s; display: flex; align-items: center; gap: 2px; }
.coach-item:hover .coach-actions, .coach-item:focus-within .coach-actions { opacity: 1; }
@media (hover: none) { .coach-item .coach-actions { opacity: 1; } }
.coach-item .coach-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 0; color: var(--text-muted); }
.coach-item .coach-icon:disabled { opacity: 0.4; cursor: default; }
/* Row padding, checkbox (including native margins), gap and chevron align the panel with title text. */
.coach-egpm-preview { display: grid; gap: 8px; max-width: 720px; min-width: 0; margin: 8px 0 16px 61px; padding: 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; box-shadow: none; }
.coach-egpm-fields { display: grid; gap: 6px; min-width: 0; }
.coach-egpm-preview label { min-width: 0; font-size: 12px; color: var(--text-muted); }
.coach-egpm-fields label { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: start; gap: 8px; }
.coach-egpm-fields label > span { padding-top: 5px; line-height: 20px; }
.coach-egpm-preview input, .coach-egpm-preview textarea { width: 100%; min-width: 0; min-height: 30px; box-sizing: border-box; padding: 4px 8px; border-width: 1px; border-style: solid; border-color: var(--border); border-radius: 4px; background: var(--bg); color: var(--text); font-size: 13px; line-height: 20px; }
.coach-egpm-preview textarea { resize: none; overflow-y: hidden; }
.coach-egpm-footer { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coach-egpm-due { display: flex; align-items: center; gap: 6px; flex: none; }
.coach-egpm-due input { width: 136px; }
.coach-egpm-destination { flex: 1; margin: 0; font-size: 12px; }
.coach-egpm-error { margin: 0; color: var(--danger); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.coach-egpm-buttons { display: flex; flex: none; gap: 6px; margin-left: auto; }
.coach-egpm-buttons .btn { min-height: 30px; padding: 4px 10px; line-height: 20px; }
@media (max-width: 640px), (pointer: coarse) {
  .coach-item { flex-wrap: wrap; }
  .coach-item .coach-actions { opacity: 1; margin-left: auto; }
  .coach-item .coach-icon { width: 44px; height: 44px; }
  .coach-egpm-preview { margin-left: 0; padding: 12px; }
  .coach-egpm-fields label { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .coach-egpm-fields label > span { padding-top: 0; }
  .coach-egpm-preview input, .coach-egpm-preview textarea { min-height: 44px; font-size: 16px; }
  .coach-egpm-footer { flex-wrap: wrap; gap: 8px 12px; }
  .coach-egpm-destination { flex: 1 1 160px; }
  .coach-egpm-buttons .btn { min-height: 44px; }
}
.coach-empty { margin-top: 8px; }

.coach-done > summary, .coach-done-week > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); padding: 6px 0; }
.coach-done > summary::-webkit-details-marker, .coach-done-week > summary::-webkit-details-marker { display: none; }
.coach-done > summary .coach-svg, .coach-done-week > summary .coach-svg { width: 12px; height: 12px; transition: transform 0.12s; }
.coach-done[open] > summary .coach-svg, .coach-done-week[open] > summary .coach-svg { transform: rotate(90deg); }
.coach-done-week { margin-left: 18px; }

/* History: slim week rows; the open week sits right under its row. */
.coach-history-top { font-size: 13px; color: var(--text-muted); padding: 2px 0 8px; border-bottom: 1px solid var(--border); }
.coach-week-list { display: flex; flex-direction: column; margin-bottom: 18px; }
.coach-week-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 12px; border-bottom: 1px solid var(--border); border-left: 2px solid transparent; cursor: pointer;
}
.coach-week-row:hover { background: var(--bg-alt); }
.coach-week-row.active { background: var(--bg-alt); border-left-color: var(--accent); }
.coach-week-label { font-size: 14px; color: var(--text); }
.coach-week-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; white-space: nowrap; }
.coach-week-meta .coach-svg { width: 12px; height: 12px; color: var(--text-muted); transition: transform 0.12s; }
.coach-week-row.active .coach-week-meta .coach-svg { transform: rotate(90deg); }
.coach-week-detail { padding: 14px 16px 18px; border-bottom: 1px solid var(--border); }

.coach-reader-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.coach-report-tabs { display: inline-flex; gap: 2px; padding: 2px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 7px; }
.coach-report-tab { background: none; border: 0; border-radius: 5px; padding: 4px 12px; font: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.coach-report-tab.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.coach-jump-actions { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.coach-jump-actions:hover { color: var(--accent); }
.coach-sections { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.coach-sections:empty { display: none; }
.coach-sections button { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--text-muted); cursor: pointer; }
.coach-sections button:hover { color: var(--accent); }
.coach-week-detail .readonly-content.coach-md { max-width: none; }
.coach-md h1 { font-size: 17px; margin: 10px 0 6px; }
.coach-md h2 { font-size: 15px; margin: 18px 0 6px; scroll-margin-top: 12px; }
.coach-week-actions { margin-top: 18px; scroll-margin-top: 12px; }

/* Multi-line edit modal (todo editor) */
.ml-edit-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.ml-edit-modal { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px; padding: 18px 18px 16px; width: min(640px, 92vw); box-shadow: 0 16px 48px rgba(0,0,0,.45); }
.ml-edit-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.ml-edit-area { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; min-height: 120px; max-height: 420px; background: var(--bg-alt); color: var(--text); }
.ml-edit-area:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.ml-edit-hint { font-size: 11px; margin-top: 8px; line-height: 1.45; }
.ml-edit-hint code { background: var(--bg-alt); padding: 1px 4px; border-radius: 4px; font-size: 10px; }
.ml-edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.ml-confirm-modal { width: min(400px, 92vw); }
.ml-confirm-modal .ml-edit-label { font-weight: 500; margin-bottom: 4px; }

/* ================================================================
   Sidebar nav icons — Workbench (Command Center) mirror.
   Feather-style stroke SVGs as CSS masks so they inherit the row's
   currentColor in every theme, with zero markup changes: dynamic
   rows (people / tags / months) get icons too.
   ================================================================ */
:root {
  --i-cal:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  --i-file:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
  --i-sun:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.2' y1='4.2' x2='5.6' y2='5.6'/%3E%3Cline x1='18.4' y1='18.4' x2='19.8' y2='19.8'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.2' y1='19.8' x2='5.6' y2='18.4'/%3E%3Cline x1='18.4' y1='5.6' x2='19.8' y2='4.2'/%3E%3C/svg%3E");
  --i-cols:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='18' rx='1'/%3E%3Crect x='14' y='3' width='7' height='18' rx='1'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 11 12 14 22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
  --i-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --i-user:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  --i-target:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
  --i-merge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Cpath d='M6 21V9a9 9 0 0 0 9 9'/%3E%3C/svg%3E");
  --i-star:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
  --i-msg:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  --i-list:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='10' y1='6' x2='21' y2='6'/%3E%3Cline x1='10' y1='12' x2='21' y2='12'/%3E%3Cline x1='10' y1='18' x2='21' y2='18'/%3E%3Cpolyline points='3 6 4 7 6 5'/%3E%3Cpolyline points='3 12 4 13 6 11'/%3E%3Cpolyline points='3 18 4 19 6 17'/%3E%3C/svg%3E");
  --i-tag:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E");
}
.nav-item::before, .nav-list > a::before {
  content: "";
  width: 14px; height: 14px;
  flex: 0 0 14px;
  background: currentColor;
  opacity: 0.75;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
  display: none;
}
.nav-item[data-filter]::before,
.nav-item[data-coaching-nav]::before,
.nav-item[data-perfhub-view]::before,
.nav-item.leadership-link::before,
#nav-directs > a::before,
#nav-non-directs > a::before,
#nav-people > a::before,
#nav-tags > a::before,
#nav-months > a::before { display: inline-block; }
.nav-item.active::before { opacity: 1; }

.nav-item[data-filter="upcoming"] { --ico: var(--i-cal); }
.nav-item[data-filter="all"]      { --ico: var(--i-file); }
.nav-item[data-filter="today"]    { --ico: var(--i-sun); }
.nav-item[data-filter="week"]     { --ico: var(--i-cols); }
.nav-item[data-filter="month"]    { --ico: var(--i-cal); }
.nav-item[data-coaching-nav="dashboard"] { --ico: var(--i-check); }
.nav-item[data-coaching-nav="history"]   { --ico: var(--i-clock); }
.nav-item.leadership-link                { --ico: var(--i-users); }
.nav-item.leadership-link .ltm-icon      { display: none; }
.nav-item[data-perfhub-view="weekly-logs"]       { --ico: var(--i-list); }
#nav-directs > a, #nav-non-directs > a, #nav-people > a { --ico: var(--i-user); }
#nav-tags > a   { --ico: var(--i-tag); }
#nav-months > a { --ico: var(--i-cal); }

/* ---------------- Settings page (#/settings) ---------------- */
:root { --i-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); }
.nav-item[data-perfhub-view="settings"] { --ico: var(--i-gear); }
:root {
  --i-bulb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E");
  --i-checkc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  --i-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
  --i-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' y1='19' x2='12' y2='23'/%3E%3Cline x1='8' y1='23' x2='16' y2='23'/%3E%3C/svg%3E");
  --i-sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2z'/%3E%3C/svg%3E");
  --i-clip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3C/svg%3E");
  --i-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3Cpath d='M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2'/%3E%3C/svg%3E");
}
/* Inline button/title icons: same mask technique as the sidebar rows, so they
   follow currentColor in light and dark. Replaces emoji used as icons
   (markup: <span class="ico ico-mic" aria-hidden="true"></span>). */
.ico {
  display: inline-block; width: 1.05em; height: 1.05em; flex: 0 0 auto;
  vertical-align: -0.17em; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat;
}
.ico-bulb { --ico: var(--i-bulb); }
.ico-users { --ico: var(--i-users); }
.ico-checkc { --ico: var(--i-checkc); }
.ico-circle { --ico: var(--i-circle); }
.ico-mic { --ico: var(--i-mic); }
.ico-sparkle { --ico: var(--i-sparkle); }
.ico-clip { --ico: var(--i-clip); }
.ico-note { --ico: var(--i-file); }
.ico-trash { --ico: var(--i-trash); }
.set-check-row .ico { color: var(--text-muted); margin-right: 2px; }
.set-check-row .ico-checkc { color: var(--success-text); }
.nav-section-settings { margin-top: 8px; }

/* The 920px cap is a READABILITY constraint on the content, not on the scroll
 * container. `.view.active` owns the scroll (main is overflow:hidden), so
 * capping #view-settings itself made the scrolling element only 920px wide and
 * its scrollbar rendered mid-screen with ~290px of dead space to its right.
 * Keep the view full-width and cap its children instead. */
#view-settings { max-width: none; }
#view-settings > * { max-width: 920px; }
.set-section { padding: 18px 0; border-top: 1px solid var(--border); }
.set-section:first-of-type { border-top: 0; padding-top: 4px; }
.set-h { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.set-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.set-input, .set-textarea { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; }
.set-input:focus, .set-textarea:focus { outline: none; border-color: var(--accent); }
.set-textarea { width: 100%; min-height: 68px; font-family: ui-monospace, monospace; }
.set-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.set-card-l { min-width: 0; }
.set-card-name { font-weight: 600; font-size: 14px; }
.set-card-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.set-badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--badge-bg); color: var(--text-muted); }
.set-badge.on { background: rgba(60,194,135,.16); color: var(--success-text); }
.set-checklist { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.set-checklist-h { font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.set-check-row { font-size: 13px; margin: 3px 0; }
.set-pre { background: #0b1020; color: #cfe; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.set-oo { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; margin: -6px 0 12px; padding: 10px 14px; background: var(--bg-raised); }
.set-editinner { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin: 6px 0 14px; background: var(--bg-raised); }
.set-msg { margin-left: 4px; }
.set-wl-row { flex-direction: column; align-items: stretch; gap: 8px; }
.set-wl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.set-rec-head, .set-rec-row { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr auto; gap: 10px; align-items: center; }
.set-rec-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 4px 4px 8px; }
.set-rec-row { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.set-rec-title { font-weight: 600; font-size: 13px; }
.set-rec-who { display: flex; flex-wrap: wrap; gap: 4px; }
.set-pill { background: var(--badge-bg); color: var(--text); font-size: 11px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
@media (max-width: 720px) {
  .set-rec-head { display: none; }
  .set-rec-row { grid-template-columns: 1fr; }
}

/* ---- GitHub page (#/github) ------------------------------------------------ */
.gh-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:4px 0 18px}
.gh-tile{background:var(--bg-alt);border:1px solid var(--border);border-radius:10px;padding:14px 16px}
.gh-tile-n{font-size:26px;font-weight:700;line-height:1.1}
.gh-tile-l{color:var(--text-muted);font-size:12px;margin-top:2px}
.gh-card{background:var(--bg-alt);border:1px solid var(--border);border-radius:12px;padding:16px 18px;margin-bottom:14px}
.gh-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.gh-repo{font-family:var(--mono,monospace);font-weight:600;font-size:15px}
.gh-pill{border:1px solid var(--border);border-radius:999px;padding:4px 12px;font-size:12px;font-weight:600;cursor:pointer;background:var(--bg-raised);color:var(--text-muted)}
.gh-pill.on{background:var(--accent-soft);color:var(--accent-on);border-color:var(--accent)}
.gh-meta{color:var(--text-muted);font-size:12.5px;margin:6px 0 12px}
.gh-ci{cursor:pointer}.gh-ci input{vertical-align:middle;margin-right:3px}
.gh-slack{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px;font-size:12.5px}
.gh-thread{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:3px 10px;font-weight:600;font-size:12px;border:1px solid var(--border)}
.gh-thread.on{background:var(--accent-soft);color:var(--accent-on);border-color:var(--accent)}
.gh-thread.off{background:var(--bg-alt);color:var(--text-muted)}
.gh-linkbtn{background:none;border:0;padding:0;color:var(--text-muted);text-decoration:underline;cursor:pointer;font-size:12.5px}
.gh-linkbtn:hover{color:var(--text)}
.gh-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.gh-col{background:var(--bg-raised);border:1px solid var(--border-soft);border-radius:10px;padding:12px}
.gh-col-accent{border:1.5px solid var(--accent);background:var(--accent-soft)}
.gh-col-h{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-weight:700;margin-bottom:8px}
.gh-collab{display:flex;justify-content:space-between;padding:3px 0;font-size:13px}
.gh-collab.pending{opacity:.72}
.gh-collab.pending>span:first-child{font-style:italic}
.gh-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.gh-chip{display:inline-flex;align-items:center;gap:4px;background:var(--bg-alt);border:1px solid var(--border);border-radius:999px;padding:3px 6px 3px 10px;font-size:12.5px}
.gh-chip.accent{border-color:var(--accent);color:var(--accent-on)}
.gh-x{border:none;background:transparent;cursor:pointer;color:var(--text-dim);font-size:14px;line-height:1;padding:0 2px}
.gh-x:hover{color:var(--red,#b91c1c)}
.gh-add{display:flex;gap:6px;margin-top:6px}
.gh-foot{margin-top:12px}
/* "Open now" — what GitHub has open this minute, above the history chips. */
.gh-open{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.gh-open-h{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-dim);font-weight:600;margin-right:2px}
a.gh-verdict{text-decoration:none}
a.gh-verdict:hover{border-color:var(--accent)}
.gh-verdicts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.gh-verdict{font-size:12px;padding:2px 8px;border-radius:999px;border:1px solid var(--border)}
.gh-verdict.green{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.gh-verdict.yellow{background:#fef9c3;color:#854d0e;border-color:#fde68a}
.gh-verdict.red{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.gh-avail{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;padding:8px 12px;margin-bottom:8px}
.gh-section-h{font-weight:700;font-size:13px;margin:18px 0 8px}
/* Auto-mode only: forced html[data-theme="light"] must NOT get OS-dark badges.
   Forced dark is handled by the :root[data-theme="dark"] rules just below. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme]) .gh-verdict.green{background:#132e1c;color:#86efac;border-color:#1f5233}
  :root:not([data-theme]) .gh-verdict.yellow{background:#332a0d;color:#fde68a;border-color:#5c4a12}
  :root:not([data-theme]) .gh-verdict.red{background:#3a1414;color:#fca5a5;border-color:#5c1d1d}
}
:root[data-theme="dark"] .gh-verdict.green{background:#132e1c;color:#86efac;border-color:#1f5233}
:root[data-theme="dark"] .gh-verdict.yellow{background:#332a0d;color:#fde68a;border-color:#5c4a12}
:root[data-theme="dark"] .gh-verdict.red{background:#3a1414;color:#fca5a5;border-color:#5c1d1d}
@media (max-width:700px){.gh-tiles{grid-template-columns:repeat(2,1fr)}.gh-cols{grid-template-columns:1fr}}

/* ---------------- Share this note ---------------- */
/* Theme via var(--*) tokens so the modal follows the app's light/dark toggle
 * rather than forcing one scheme (see the theme-contrast bug class). Uses
 * .modal-content (var(--bg-alt)), NOT .modal-card (hardcoded #fff, above) —
 * that hardcoded background is the washout trap this file already has one
 * instance of; the share modal must never adopt it. Component classes below
 * are ported verbatim from the approved wireframe (identical token names). */
.share-modal { max-width: 620px; }
.share-msg { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 2px; }
.share-msg.error { color: var(--warn-text); }
.share-explain { color: var(--text-muted); font-size: 12.5px; margin: -6px 0 2px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 13px;
  border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--accent-on); }
.chip.active { background: var(--accent-soft); color: var(--accent-on);
  border-color: var(--accent); font-weight: 600; }

/* Pipeline-attention chip (Brian, 2026-09-12): a note whose automatic
   capture pipeline failed or stalled gets this on its All Notes / Home
   card. Amber for a soft staleness warning, red for a hard error. Sits in
   the card-meta row alongside the has_notes/has_ai/has_transcript dots, so
   it must not pick up .chip's hover lift/color-swap treatment -- it's a
   status indicator, not a clickable filter. */
.chip-attn { display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 20px; background: rgba(245, 158, 11, 0.14); color: var(--dm-warn-text); border: none;
  cursor: default; }
.chip-attn:hover { border-color: transparent; color: var(--dm-warn-text); transform: none; }
.chip-attn-error { background: var(--dm-danger-tint); color: var(--dm-danger-text); }
.chip-attn-error:hover { color: var(--dm-danger-text); }

.pill-warn { background: rgba(245, 158, 11, 0.14); color: var(--warn-text);
  border: 1px solid rgba(245, 158, 11, 0.35); font-weight: 600; }

.avatar-circle { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-fill);
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex: 0 0 auto; }

.share-search { position: relative; }
.share-search input { width: 100%; padding: 9px 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text);
  font-size: 13px; min-width: 0; }
.share-people-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 5; background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); max-height: 220px;
  overflow-y: auto; }
.share-people-result { display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; background: transparent; border: none; text-align: left;
  font-size: 13px; color: var(--text); cursor: pointer; }
.share-people-result:hover { background: var(--bg-raised); }
.share-people-result-text { min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; display: flex; gap: 6px; align-items: baseline; }
.share-people-empty { padding: 10px 12px; font-size: 12px; }

.share-quickadds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

.share-owner-row, .share-person-row { display: flex; align-items: center; gap: 10px;
  padding: 6px 0; }
.share-person-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-person-role { font-size: 11.5px; color: var(--text-dim); flex: 0 0 auto; }
.share-remove-person { flex: 0 0 auto; }
.share-added-list { max-height: 160px; overflow-y: auto; }
.share-divider { height: 1px; background: var(--border-soft); border: none; margin: 2px 0; }

.share-scope-row label { display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 6px; }
.share-scope-row select { width: 100%; padding: 8px 10px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 13px; }
.share-warning { display: none; align-items: center; gap: 6px; margin-top: 8px;
  padding: 8px 10px; border-radius: 6px; background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35); color: var(--warn-text); font-size: 12px;
  font-weight: 600; }
.share-warning.show { display: flex; }

/* Second confirmation for scope='public' — in-app, never window.confirm(). */
.share-confirm-inline { margin-top: 4px; padding: 12px; border-radius: 8px;
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.35); }
.share-confirm-text { font-size: 12.5px; color: var(--text); margin-bottom: 10px; }
.share-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

.share-link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-link-row input { flex: 1; min-width: 0; padding: 8px 10px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px; color: var(--text-muted);
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.share-expiry-note { font-size: 11.5px; color: var(--text-dim); margin-top: -6px; }

@media (max-width: 640px) {
  .share-owner-row, .share-person-row { flex-wrap: wrap; }
}

/* =====================================================================
   HOME — new default landing view (P2 social layer). Ask-anything bar on
   top; scope toggle + recipe chips share one row; "Coming up" (calendar
   events, click-to-prep) carries the per-calendar visibility toggle chips
   on its header row; "Recent asks" (chat threads, deduped+capped) and
   "Recent" (notes) below. Compaction pass (Granola-grade density, no
   redesign) keeps every class name/token from the original
   Brian-approved wireframe (exports/social-layer-wireframe/index.html) —
   this block only tightens spacing/type and adds the calendar-chip +
   section-row styles. All-Notes card share-indicator
   (.card-share-indicator) lives here too since it's the same visual
   language as the Home feed rows.
   ===================================================================== */
.home-view { flex: 1; overflow-y: auto; padding: 16px 20px 40px; }
.home-view:not(.active) { display: none; }
/* Left-aligned like every other page (Brian, 2026-09-28: the centred column
   read as a separate app). */
.home-inner { max-width: none; margin: 0; min-width: 0; }   /* full width (Jose, 2026-10-22) */

/* Top zone (ask bar + scope/recipe chips + caption + Recent asks + folder
   filter chips) — contained in its own subtle panel so it reads as ONE
   distinct block, clearly separated from "Coming up" below (per the
   approved wireframe). --bg-raised/--border already flip correctly in
   BOTH theme mechanisms this app has (the @media prefers-color-scheme auto
   path AND the forced html[data-theme] switch — see :root/dark-media/
   forced-theme blocks near the top of this file), so reusing them here
   needs no extra dark-mode rule of its own. */
.home-top-zone { background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px 12px; margin-bottom: 22px; }

.ask-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; display: flex; gap: 6px; align-items: center; margin-top: 0; }
.ask-input { flex: 1; min-width: 0; border: none; background: transparent;
  padding: 10px 10px; font-size: 14px; color: var(--text); }
.ask-input:focus { outline: none; }

.feed-section-label { font-size: 13px; font-weight: 700; color: var(--text);
  margin: 18px 0 4px; }
/* Section header row (e.g. "Coming up" + calendar chips) — label left,
   chips right, wrapping on narrow viewports instead of overflowing. */
.feed-section-row { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin: 18px 0 4px; }
.feed-section-row .feed-section-label { margin: 0; }
.chip-row-sm { gap: 4px; }
.chip-row-sm .chip { padding: 3px 9px; font-size: 11px; }

/* "Coming up" header row: calendar chips + refresh button (item 3) share
   one right-aligned group so feed-section-row's own space-between still
   puts "Coming up" on the left. */
.feed-section-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.icon-btn-refresh { min-width: 28px; min-height: 28px; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; }
.icon-btn-refresh:disabled { opacity: 0.55; cursor: default; }
.icon-btn-refresh.spinning { animation: icon-refresh-spin 0.7s linear infinite; }
@keyframes icon-refresh-spin { to { transform: rotate(360deg); } }

/* ---------------- Calendar manager (Brian, 2026-09-14) ----------------
   "We need to have a better heading header for the calendars connected. I
   also would like to be able to drag and drop the order of them and to hide
   certain ones... I also like to change the color of each of the calendars
   ... I want to see the colors carry through so I can easily tell if it's a
   work item or personal item."

   Eight NAMED hues, not hash slots. The old 6-slot string hash put "Brian
   Lim - Work", "brian lim - personal" and "Days Off - Emazing Group" on the
   same red, which defeats the entire point of colouring them. app.js
   resolves a calendar's key as (user's pick) -> (position in the ordered
   list), so two calendars cannot collide until there are more than eight.
   Keep these names in lockstep with app.js CAL_PALETTE and
   routes_prefs.CALENDAR_COLORS. */
[data-cal-color="cal-indigo"]  { --cal-c: #6366f1; }
[data-cal-color="cal-sky"]     { --cal-c: #0ea5e9; }
[data-cal-color="cal-emerald"] { --cal-c: #10b981; }
[data-cal-color="cal-amber"]   { --cal-c: #f59e0b; }
[data-cal-color="cal-rose"]    { --cal-c: #ef4444; }
[data-cal-color="cal-violet"]  { --cal-c: #a855f7; }
[data-cal-color="cal-teal"]    { --cal-c: #14b8a6; }
[data-cal-color="cal-slate"]   { --cal-c: #64748b; }

/* The carry-through: one custom property, read by the upcoming row's left
   rail, the row avatar and every dot/swatch in the manager. */
.meeting-row-upcoming[data-cal-color] { border-left-width: 3px; border-left-style: solid;
  border-left-color: var(--cal-c, var(--accent)); }

/* Home's control: a named <details> popover, so the section header says
   "Calendars 4 of 5" instead of spilling five bare chip names next to the
   "Coming up" label. */
.cal-menu { position: relative; }
.cal-menu-summary { list-style: none; cursor: pointer; display: inline-flex;
  align-items: center; gap: 6px; padding: 3px 9px; font-size: 11.5px;
  font-weight: 600; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg-alt); white-space: nowrap; }
.cal-menu-summary::-webkit-details-marker { display: none; }
.cal-menu-summary:hover { border-color: var(--accent); color: var(--text); }
.cal-menu[open] .cal-menu-summary { border-color: var(--accent); color: var(--text); }
.cal-menu-dots { display: inline-flex; gap: 3px; }
.cal-menu-dot { width: 7px; height: 7px; border-radius: 50%;
  background: var(--cal-c, var(--accent)); }
.cal-menu-dot.off { opacity: 0.25; }
.cal-menu-count { color: var(--text-dim); font-weight: 500; }
.cal-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 268px; padding: 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14); }
.cal-menu-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 8px; }
.cal-menu-head-title { font-size: 12px; font-weight: 700; color: var(--text); }
.cal-menu-head-hint { font-size: 11px; color: var(--text-dim); }

/* The list itself, shared verbatim by the popover and the Notetaker settings
   page (app.js renderCalendarManager writes the same HTML into both). */
.cal-list { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: 2px; }
.cal-list-wide { max-width: 460px; }
.cal-empty { font-size: 12px; color: var(--text-dim); padding: 4px 2px; }
.cal-item { border-radius: 7px; border: 1px solid transparent; }
.cal-item-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; }
.cal-item:hover { background: var(--bg-alt); }
.cal-item.dragging { opacity: 0.45; }
.cal-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.cal-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.cal-item-off .cal-name { color: var(--text-dim); text-decoration: line-through; }
.cal-item-off .cal-swatch { opacity: 0.35; }
.cal-grip { cursor: grab; color: var(--text-faint, var(--text-dim)); font-size: 13px;
  line-height: 1; flex: 0 0 auto; user-select: none; }
.cal-item.dragging .cal-grip { cursor: grabbing; }
.cal-swatch { flex: 0 0 auto; width: 13px; height: 13px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12); cursor: pointer;
  background: var(--cal-c, var(--accent)); }
.cal-name { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-eye { flex: 0 0 auto; border: 0; background: none; cursor: pointer;
  padding: 3px 4px 1px; line-height: 0; color: var(--text-muted); border-radius: 5px; }
.cal-eye[aria-pressed="false"] { color: var(--text-faint, var(--text-dim)); }
.cal-eye:hover { background: var(--border); color: var(--text); }

/* Colour picker: an inline row inside the item rather than a second floating
   layer, so it cannot be clipped by the popover it already lives in. */
.cal-palette { display: flex; gap: 6px; padding: 2px 6px 8px 32px; }
.cal-swatch-opt { width: 15px; height: 15px; padding: 0; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  background: var(--cal-c, var(--accent)); }
.cal-swatch-opt:hover { transform: scale(1.12); }
.cal-swatch-opt.on { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text); }

.date-group { margin-top: 12px; }
.date-group-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-faint, var(--text-dim));
  padding-bottom: 6px; border-bottom: 1px solid var(--border-soft, var(--border));
  margin-bottom: 6px; }

.meeting-row { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-alt); margin-bottom: 6px; cursor: pointer;
  min-width: 0; transition: border-color 0.1s; }
.meeting-row:hover { border-color: var(--accent); }
.meeting-row-upcoming { border-style: dashed; cursor: pointer; }
.meeting-row-upcoming:hover { border-color: var(--warn); }
.meeting-row-main { min-width: 0; flex: 1 1 220px; }
.meeting-row-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.meeting-row-title { font-weight: 600; font-size: 13.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meeting-row-side { display: flex; flex-direction: column; align-items: flex-end;
  gap: 6px; flex: 0 0 auto; }

/* Shared indicator — All Notes cards AND Home feed rows. "Shared" pill when
   the owner has an active NoteShare on the note; a muted label otherwise. */
.card-share-indicator { display: flex; }
/* All Notes card (Jose, 2026-10-22): date + a small Shared pill on one line,
   status as small icons. */
.card-date-line { display: flex; align-items: center; gap: 8px; min-height: 18px; }
/* Inside a clickable card the hand pointer stays (the zero-specificity
   [data-tip] arrow rule further down would otherwise win). */
.card-date-line .card-date, .card-icon, .card-shared { cursor: inherit; }
/* Read by screen readers, never shown (the card's privacy line). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.card-shared { padding: 1px 6px; font-size: 10px; line-height: 1.6; }
.card-icons { display: inline-flex; align-items: center; gap: 9px; }
.card-icon { display: inline-flex; align-items: center; height: 18px; color: var(--text-dim); }
.card-icon svg { display: block; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.personal-note-label { font-size: 11px; color: var(--text-dim); }
/* Item 6 (Shared with me): owner attribution line, only present on
   /api/notes?scope=shared items. */
.chip-shared { background: var(--accent-soft); color: var(--accent-on); font-weight: 600;
  cursor: default; }
.chip-shared:hover { border-color: var(--border); color: var(--accent-on); }

/* ---------------- Folders + auto-share rules (social layer P4) ----------------
   Folder pill on All Notes cards and the "Coming up" rows (.folder-pill),
   the 🔒 "Always shares to: X" hint on rule-bound rows/cards, and the
   owner-only rule editor (folder <select> + on/off toggle) on the note
   detail header. The Home chip-filter row this used to mention went away
   with the Recent feed it filtered (2026-09-14). */
.folder-pill { background: var(--accent-soft); color: var(--accent-on);
  font-weight: 600; flex: 0 0 auto; }
.auto-share-hint { margin-top: 4px; }
.card .auto-share-hint { margin-top: 6px; }

/* "Coming up" event-card folder chip (wireframe P6) — a louder, colored
   cousin of .folder-pill above, shown only when the event's share_rule
   enrichment matched (scripts/routes_agent_calendar.py, session route
   only). Known folder names keep the wireframe's exact soft-tag palette;
   any other name gets one of 6 hash-assigned slots (static/app.js
   folderColorKey()) so a brand-new folder still renders a stable,
   readable color with zero server round trip. rgba() overlays on
   --success/--warn/--danger (which don't flip between themes, same as
   .pill-warn above) keep contrast fine in both light and dark; the two
   hash-only hues (slot-4/slot-5) are plain hex for the same reason
   .gh-verdict.* uses raw hex elsewhere in this file. */
.event-folder-chip { font-weight: 600; flex: 0 0 auto; }
.event-folder-chip[data-folder-color="leadership"] { background: rgba(99,102,241,0.14); color: var(--accent); }
.event-folder-chip[data-folder-color="merch"] { background: rgba(16,185,129,0.14); color: var(--success-text); }
.event-folder-chip[data-folder-color="oneonones"] { background: rgba(245,158,11,0.14); color: var(--warn-text); }
.event-folder-chip[data-folder-color="vendors"] { background: rgba(239,68,68,0.14); color: var(--danger-text); }
.event-folder-chip[data-folder-color="slot-0"] { background: rgba(99,102,241,0.14); color: var(--accent); }
.event-folder-chip[data-folder-color="slot-1"] { background: rgba(16,185,129,0.14); color: var(--success-text); }
.event-folder-chip[data-folder-color="slot-2"] { background: rgba(245,158,11,0.14); color: var(--warn-text); }
.event-folder-chip[data-folder-color="slot-3"] { background: rgba(239,68,68,0.14); color: var(--danger-text); }
.event-folder-chip[data-folder-color="slot-4"] { background: rgba(168,85,247,0.14); color: #a855f7; }
.event-folder-chip[data-folder-color="slot-5"] { background: rgba(14,165,233,0.14); color: #0ea5e9; }

/* Ask-anything conversation panel */
.ask-panel { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-alt); padding: 14px 16px; }
.ask-thread { display: flex; flex-direction: column; gap: 10px; max-height: 50vh;
  overflow-y: auto; }
.ask-msg { font-size: 13.5px; line-height: 1.6; padding: 10px 12px; border-radius: 8px;
  max-width: 92%; }
.ask-msg-user { align-self: flex-end; background: var(--accent-soft); color: var(--accent-on);
  font-weight: 500; }
.ask-msg-assistant { align-self: flex-start; background: var(--bg-raised); color: var(--text); }
.ask-msg-assistant p { margin: 0 0 8px; }
.ask-msg-assistant p:last-child { margin-bottom: 0; }
.ask-msg-assistant ul { margin: 0 0 8px; padding-left: 18px; }
.ask-msg-assistant ul:last-child { margin-bottom: 0; }
.ask-pending .ask-dots { color: var(--text-dim); animation: ask-pulse 1.4s ease-in-out infinite; }
@keyframes ask-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.ask-error { color: var(--danger-text, #ef4444); }
.citation-row { margin-top: 8px; }
.citation-chip { font-size: 11.5px; padding: 4px 10px; }

.recent-asks-list { display: flex; flex-direction: column; gap: 2px; }
.recent-ask-row { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; width: 100%; text-align: left; padding: 5px 8px; border: 1px solid transparent;
  border-radius: 6px; background: transparent; cursor: pointer; font: inherit; color: inherit; }
.recent-ask-row:hover { background: var(--bg-raised); border-color: var(--border); }
.recent-ask-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 12.5px; }
.recent-ask-scope { flex: 0 0 auto; }

@media (max-width: 900px) {
  .home-view { padding: 12px 14px 40px; }
}
@media (max-width: 500px) {
  .meeting-row-side { align-items: flex-start; width: 100%; }
  .ask-msg { max-width: 100%; }
  .feed-section-row { align-items: flex-start; }
  .chip-row-sm { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Transcript turns — speaker-block layout (2026-08-12)

   Copied from what Wispr Flow shows, after Brian compared the two side by side
   on the Jetset call: the speaker is a small label ABOVE the words, not bold
   text buried at the front of the sentence, and each speaker keeps a stable
   colour so a long call is scannable. Paired with the exporter change that
   merges consecutive turns by one person into a single paragraph.
--------------------------------------------------------------------------- */
#transcript-content .tr-turn,
#inline-transcript-content .tr-turn {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 2px solid var(--rule, #e2e2e2);
}
#transcript-content .tr-speaker,
#inline-transcript-content .tr-speaker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  line-height: 1.3;
}
#transcript-content .tr-text,
#inline-transcript-content .tr-text {
  font-size: 14px;
  line-height: 1.62;
  /* An ASR transcript has no hyphenation points and long unbroken tokens
     (URLs, IDs) are common; without this the pane scrolls sideways on phone. */
  overflow-wrap: anywhere;
}
#transcript-content .tr-plain,
#inline-transcript-content .tr-plain { margin: 0 0 12px; opacity: .75; }

/* Six accents, reused in first-seen order. Chosen to stay legible on both the
   light and dark themes rather than keyed off a single background. */
.tr-accent-0 { border-left-color: #2a5a8a; } .tr-accent-0 .tr-speaker { color: #2a5a8a; }
.tr-accent-1 { border-left-color: #b8410e; } .tr-accent-1 .tr-speaker { color: #b8410e; }
.tr-accent-2 { border-left-color: #2f6b3c; } .tr-accent-2 .tr-speaker { color: #2f6b3c; }
.tr-accent-3 { border-left-color: #6b3fa0; } .tr-accent-3 .tr-speaker { color: #6b3fa0; }
.tr-accent-4 { border-left-color: #a36a1d; } .tr-accent-4 .tr-speaker { color: #a36a1d; }
.tr-accent-5 { border-left-color: #1b5965; } .tr-accent-5 .tr-speaker { color: #1b5965; }

@media (max-width: 600px) {
  #transcript-content .tr-turn,
  #inline-transcript-content .tr-turn { margin-bottom: 14px; padding-left: 9px; }
  #transcript-content .tr-text,
  #inline-transcript-content .tr-text { font-size: 13px; line-height: 1.58; }
}

/* ---------- Expectations v2: compact, labelled person-page list ---------- */
.exp2-wrap { margin-bottom: 8px; min-width: 0; }
.exp2-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.exp2-progress, .exp2-progress-line { font-size: 12px; color: var(--text-muted); }
.exp2-status-banner { margin: 10px 0 12px; }
.exp2-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.exp2-status-line { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.exp2-status-line strong { font-weight: 600; color: var(--text); }
.exp2-ack-btn { min-height: 44px; padding: 0 12px; }
.exp2-empty { text-align: center; }
.exp2-empty .btn { min-height: 44px; margin-top: 10px; padding: 0 16px; }
.exp2-table { width: min(100%, 1040px); table-layout: fixed; border-collapse: collapse; font-size: 13px; background: var(--bg-alt); }
.exp2-col-comment { width: 20%; }
.exp2-col-q { width: 36px; }
.exp2-table th, .exp2-table td { border-bottom: 1px solid var(--border); text-align: left; }
.exp2-table thead th { padding: 9px 12px; font-size: 11px; line-height: 16px; text-transform: uppercase; letter-spacing: .055em; color: var(--section-label); font-weight: 600; }
.exp2-table thead th:first-child { padding-left: 10px; }
.exp2-table .exp2-th-q { padding-left: 0; padding-right: 0; text-align: center; }
.exp2-row { position: relative; cursor: pointer; }
.exp2-row > td { height: 52px; padding: 4px 12px; vertical-align: top; min-width: 0; }
.exp2-row > td:first-child { padding-left: 10px; }
.exp2-row > td:last-child { padding-right: 32px; }
.exp2-row:hover { background: var(--row-hover); }
.exp2-row.is-open { background: var(--accent-soft); }
.exp2-row:focus-visible { outline: 2px solid var(--accent-on); outline-offset: -2px; }
.exp2-row-line { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; }
.exp2-row-number { flex: 0 0 15px; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.exp2-item-title { min-width: 0; max-width: 68%; font-size: 13px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp2-row-meta { flex-shrink: 0; color: var(--text-muted); white-space: nowrap; font-size: 13px; line-height: 20px; }
.exp2-preview { flex: 1; min-width: 28px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 20px; color: var(--text-muted); }
.exp2-row-chevron { position: absolute; right: 10px; top: 18px; width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.exp2-row-chevron svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.exp2-row.is-open .exp2-row-chevron { transform: rotate(90deg); }
.exp2-row.is-open .exp2-item-title { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.exp2-details { margin-left: 24px; padding: 4px 0 10px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; cursor: auto; }
.exp2-detail-label { margin: 0 0 4px; color: var(--section-label); font-size: 10px; line-height: 1.4; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; }
.exp2-body-bullets { margin: 0; padding-left: 16px; list-style: disc; }
.exp2-body-bullets > li { padding-left: 1px; }
.exp2-body-bullets > li + li { margin-top: 4px; }
.exp2-body-bullets > li::marker { color: var(--text-muted); font-size: 10px; }
.exp2-measure { margin-top: 10px; }
.exp2-details p { margin: 0; }
.exp2-details p + p { margin-top: 4px; }
.exp2-details strong { font-weight: 600; }
.exp2-detail-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 8px; color: var(--text-muted); }
.exp2-quiet { border: 0; border-radius: 0; background: transparent; color: var(--text-muted); font: inherit; text-align: left; cursor: pointer; }
.exp2-quiet:hover { color: var(--text); }
.exp2-quiet:focus-visible, .exp2-qgrade:focus-visible { outline: 2px solid var(--accent-on); outline-offset: 1px; }
.exp2-detail-footer .exp2-quiet { min-height: 28px; padding: 4px 0; line-height: 20px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--btn-secondary-border); }
.exp2-original { margin-top: 6px; color: var(--text-muted); white-space: pre-wrap; }
.exp2-okr-list { list-style: none; padding: 0; margin: 4px 0 0; }
.exp2-okr-chip { min-height: 44px; max-width: 100%; padding: 4px 0; overflow-wrap: anywhere; }
.exp2-table .exp2-td-q { padding-left: 0; padding-right: 0; text-align: center; }
.exp2-qgrade { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; width: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-muted); font: inherit; font-weight: 400; }
.exp2-grade-chip { cursor: pointer; }
.exp2-grade-chip:hover { color: var(--text); background: var(--row-hover); }
.exp2-comment-display { display: flex; align-items: center; min-height: 44px; gap: 4px; min-width: 0; }
.exp2-comment-text { flex: 1; min-width: 0; color: var(--text-muted); font-size: 13px; line-height: 1.45; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.exp2-comment-add { flex-shrink: 0; min-width: 44px; min-height: 44px; padding: 0; }
.exp2-row.is-open .exp2-comment-display { display: block; }
.exp2-row.is-open .exp2-comment-text { padding-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.exp2-comment-form { cursor: auto; }
.exp2-comment-input { width: 100%; min-height: 100px; box-sizing: border-box; font: inherit; font-size: 13px; border: 1px solid var(--btn-secondary-border); border-radius: 4px; padding: 8px; background: var(--bg-alt); color: var(--text); resize: vertical; }
.exp2-comment-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.exp2-comment-actions button { min-width: 44px; min-height: 44px; }
.exp2-mobile-label { display: none; }
.exp2-table [hidden] { display: none !important; }
.exp2-legacy { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 12px; }
.exp2-legacy summary { cursor: pointer; font-size: 12px; color: var(--text-dim); }

@media (max-width: 700px) {
  .exp2-status-line { flex-basis: 100%; font-size: 12px; }
  .exp2-table, .exp2-table tbody { display: block; width: 100%; }
  .exp2-table colgroup, .exp2-table thead { display: none; }
  .exp2-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--border); }
  .exp2-row > td { display: block; height: auto; padding: 0; border: 0; min-width: 0; }
  .exp2-row > td:first-child { grid-column: 1 / -1; padding: 0 30px 0 0; }
  .exp2-row-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; min-height: 40px; }
  .exp2-row-number { display: none; }
  .exp2-item-title { max-width: 100%; }
  .exp2-row-meta { font-size: 12px; }
  .exp2-preview { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .exp2-row-chevron { top: 18px; right: 6px; }
  .exp2-details { margin-left: 0; padding: 12px 0 0; }
  .exp2-detail-footer .exp2-quiet { min-width: 44px; min-height: 44px; padding: 12px 0; }
  .exp2-row > .exp2-td-comment { display: none; }
  .exp2-row.is-open > .exp2-td-comment { display: block; grid-column: 1 / -1; padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--border); }
  .exp2-td-comment::before { content: attr(aria-label); display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--section-label); }
  .exp2-row.is-open .exp2-comment-text { padding-top: 0; }
  .exp2-comment-input { font-size: 16px; }
  .exp2-mobile-label { display: block; margin-top: 8px; font-size: 11px; color: var(--section-label); }
  .exp2-qgrade { min-width: 44px; }
}

.exp2-grade-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); display: flex;
  align-items: center; justify-content: center; z-index: 200; padding: 16px; box-sizing: border-box;
}
.exp2-grade-modal {
  background: var(--bg-alt); border-radius: 10px; padding: 18px; width: 100%; max-width: 360px;
  box-sizing: border-box; display: flex; flex-direction: column; gap: 10px;
}
.exp2-grade-modal label { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.exp2-grade-modal select, .exp2-grade-modal textarea {
  font-size: 14px; padding: 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); min-height: 44px; box-sizing: border-box; width: 100%;
}
.exp2-grade-modal textarea { min-height: 70px; resize: vertical; }
.exp2-grade-actions { display: flex; justify-content: flex-end; gap: 8px; }
.exp2-grade-actions .btn { min-height: 44px; padding: 0 16px; }

@media (max-width: 500px) {
  .exp2-toolbar { flex-direction: column; align-items: stretch; }
}

/* ===================== in-app tab strip (#app-tabs) =====================
   The open-notes queue, moved out of Chromium's tab strip and into the app so
   Ctrl+Tab / Ctrl+W / Ctrl+T / Ctrl+Shift+T work for everyone with nothing to
   install. See the "in-app tabs" block in app.js for the model.

   Sits between the topbar and the views, inside <main>, so it starts to the
   right of the sidebar and reads as a label for the content beneath it. */
.app-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  /* A flex child of the column-flex <main> with overflow set has min-height 0,
     so a tall page (GitHub, Settings) shrank the strip to 10-20px and clipped
     the tab names. It keeps its own height. */
  flex: 0 0 auto;
  min-height: 35px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;              /* a strip that scrolls is fine; a strip
                                         with a scrollbar eats its own height */
}
.app-tabs::-webkit-scrollbar { display: none; }
/* One tab is a title bar, not a choice. Hidden until there are two. */
.app-tabs.hidden { display: none; }

.app-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  height: 26px;
  padding: 0 6px 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1;
  cursor: default;
  user-select: none;
}
.app-tab:hover { background: var(--row-hover); }

/* Drag to reorder. The tab being dragged fades; the insertion point shows as a
   caret on the edge the drop will land on, so you can tell "before this tab"
   from "after this tab" -- without it the last position is unreachable because
   there is nothing to the right to hover. `position: relative` is on .app-tab
   only for these carets. */
.app-tab { position: relative; }
.app-tab[draggable="true"] { cursor: grab; }
.app-tab.dragging { opacity: .4; cursor: grabbing; }
.app-tab.drop-before::before,
.app-tab.drop-after::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 2px;
  border-radius: 1px;
  background: var(--accent, #4f46e5);
}
.app-tab.drop-before::before { left: -3px; }
.app-tab.drop-after::after { right: -3px; }
/* The close button must stay clickable mid-strip: without its own cursor it
   inherits `grab` and reads as draggable when it is not. */
.app-tab-x { cursor: pointer; }
.app-tab.active {
  /* --bg-card / --border-strong are not defined anywhere, so the light
     fallbacks always won: a white active tab with dark-mode (near-white)
     text. The theme tokens follow both themes. */
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.app-tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-tab-x {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-faint, #8b949e);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  /* Reserved even when invisible, so a tab does not resize under the cursor
     on hover and make you miss the ✕ you were aiming at. */
  opacity: 0;
}
.app-tab:hover .app-tab-x,
.app-tab.active .app-tab-x { opacity: 1; }
.app-tab-x:hover { background: rgba(15, 23, 42, .12); color: var(--text); }

.app-tab-new {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.app-tab-new:hover { background: rgba(15, 23, 42, .08); color: var(--text); }

html[data-theme="dark"] .app-tab:hover { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .app-tab-x:hover,
html[data-theme="dark"] .app-tab-new:hover { background: rgba(255, 255, 255, .12); }

/* ============================================================
 * EG Plan (SPEC-B3-frontend.md) — company/department/cascade/weekly pages,
 * the shared inspector/assistant drawer, and the small chip/table/tree
 * vocabulary they share. Reuses .exp-table, .chip, .btn, .muted and the
 * --accent/--success/--warn/--danger tokens rather than introducing a
 * second visual language — this is the same app as Objectives/Alignment,
 * not the standalone prototype's warm-paper styling.
 * ============================================================ */
.plan-view { padding: 0 0 40px; }
.plan-page { padding: 10px 16px 0; }

.plan-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.plan-header h2 { margin: 0 0 4px; }
.plan-header-right { display: flex; gap: 8px; flex-wrap: wrap; }

/* Theme of the year: an editable subheadline, not a text box. */
.plan-theme {
  font-size: 16px; font-weight: 500; color: var(--text); margin: 2px 0 4px;
  cursor: text; border-radius: 6px; padding: 2px 6px; margin-left: -6px;
  max-width: 720px;
}
.plan-theme:hover, .plan-theme:focus { background: var(--bg-alt); outline: none; }
.plan-theme-empty { color: var(--text-muted); font-style: italic; font-weight: 400; }
.plan-theme-editing { display: flex; align-items: center; gap: 6px; cursor: default; }
.plan-theme-editing .plan-theme-input { flex: 1 1 auto; width: auto; }
.plan-theme-input {
  width: 100%; min-width: 320px; border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 8px; background: var(--bg-alt); color: var(--text); font: inherit; font-weight: 500;
}

.plan-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.plan-tile {
  flex: 1 1 220px; min-width: 200px; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; background: var(--bg-alt);
}
.plan-tile-critical { border-color: var(--accent); background: var(--accent-soft); }
.plan-tile-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-dim); font-weight: 600; margin-bottom: 4px;
}
.plan-tile-title { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.plan-tile-value { font-size: 20px; font-weight: 700; color: var(--text); }

.plan-table tbody tr.plan-row { cursor: pointer; }
.plan-table tbody tr.plan-row:hover { background: var(--row-hover); }

.plan-group { margin: 10px 0; border: 1px solid var(--border-soft); border-radius: 10px; padding: 4px 10px 10px; }
.plan-group > summary {
  cursor: pointer; padding: 10px 2px; font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.plan-group > summary::-webkit-details-marker { display: none; }
.plan-group > summary::before { content: "▸"; display: inline-block; transition: transform .12s; }
.plan-group[open] > summary::before { transform: rotate(90deg); }
.plan-subgroup-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 10px 2px 4px; }

.plan-dept-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.plan-dept-card {
  display: block; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px;
  background: var(--bg-alt); text-decoration: none; color: inherit;
}
.plan-dept-card:hover { border-color: var(--accent); }
.plan-dept-card-title { font-weight: 600; margin-bottom: 4px; }

/* ---- chips (status tags, not clickable filters — same non-interactive
   pattern as .chip-attn above) ---- */
.chip-warn, .chip-flag, .chip-accepted, .chip-owner, .chip-draft, .chip-leadlag, .chip-source, .chip-on, .chip-off {
  cursor: default; padding: 2px 9px; font-size: 11px;
}
.chip-warn:hover, .chip-flag:hover, .chip-accepted:hover, .chip-owner:hover, .chip-draft:hover,
.chip-leadlag:hover, .chip-source:hover, .chip-on:hover, .chip-off:hover {
  border-color: var(--border); color: inherit; transform: none;
}
.chip-warn { background: rgba(245, 158, 11, 0.14); color: var(--warn-text); border-color: rgba(245, 158, 11, 0.35); }
.chip-flag { background: rgba(239, 68, 68, 0.10); color: var(--danger-text); border-color: rgba(239, 68, 68, 0.25); }
.chip-accepted { background: rgba(16, 185, 129, 0.14); color: var(--success-text); border-color: rgba(16, 185, 129, 0.32); }
.chip-owner { background: var(--bg-raised); color: var(--text-muted); }
/* Objective not accepted yet: muted, never a warning (Brian, 2026-10-01). */
.chip-draft { background: var(--bg-raised); color: var(--text-muted); border-style: dashed; }
.chip-leadlag.chip-lead { background: var(--accent-soft); color: var(--accent-on); }
.chip-leadlag.chip-lag { background: var(--bg-raised); color: var(--text-muted); }
.chip-source-dw { background: rgba(99, 102, 241, 0.12); color: var(--accent-on); }
.chip-source-cards { background: rgba(16, 185, 129, 0.12); color: var(--success-text); }
.chip-source-manual { background: rgba(245, 158, 11, 0.12); color: var(--warn-text); }
.chip-on { background: rgba(16, 185, 129, 0.14); color: var(--success-text); }
.chip-off { background: rgba(239, 68, 68, 0.12); color: var(--danger-text); }

/* ---- progress bar (priority/objective/KR rows + tree) ---- */
.plan-progress-bar {
  display: inline-flex; align-items: center; gap: 6px; min-width: 90px;
}
.plan-progress-bar::before {
  content: ""; display: block; width: 56px; height: 6px; border-radius: 4px;
  background: var(--bg-raised); flex: 0 0 auto;
}
.plan-progress-fill {
  display: block; height: 6px; border-radius: 4px; background: var(--accent);
  margin-left: -62px; position: relative;
}
.plan-progress-pct { font-size: 11px; color: var(--text-muted); }
.plan-progress-empty { display: inline-block; min-width: 90px; }

/* The Cascade tree is static/plan_cascade.css; this level chip is shared with it. */
.plan-level-chip {
  font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg-raised);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}

/* ---- L10 / weekly sections ---- */
.plan-l10-section {
  border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.plan-l10-theme {
  border: 1px solid var(--border-soft); border-left: 3px solid var(--accent, var(--text-muted)); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere;
}
.plan-l10-theme-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.plan-l10-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.plan-l10-head h3 { margin: 0; font-size: 14px; }
.plan-l10-section textarea, .plan-l10-section input[type="number"] {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 9px; background: var(--bg-alt); color: var(--text); font: inherit; margin-top: 6px;
}
.plan-ids-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.plan-ids-text { flex: 1 1 220px; min-width: 0; }
.plan-ids-remove { flex: 0 0 auto; }
/* Quarter objectives grouped by owner; the drafts / no-data switches under each table. */
.plan-table tr.plan-l10-owner th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text); background: var(--bg-raised);
  text-transform: none; letter-spacing: 0; padding-top: 6px; padding-bottom: 6px;
}
.plan-l10-more { margin-top: 8px; }
.plan-l10-lastweek-body { display: grid; gap: 8px; font-size: 13px; }
.plan-l10-list { margin: 4px 0 6px; padding-left: 18px; }
.plan-l10-list li { overflow-wrap: anywhere; }
.plan-l10-msg { margin: 4px 0 0; overflow-wrap: anywhere; }
/* The weekly tables are short: on a phone they fit the screen (titles wrap) instead of hiding
   the status column off to the right. */
@media (max-width: 600px) {
  #plan-weekly-body .plan-table-wrap > .plan-table { min-width: 0; }
  #plan-weekly-body .plan-table :is(td, th) { padding-left: 6px; padding-right: 6px; }
  #plan-weekly-body .plan-table td { overflow-wrap: break-word; }
}
/* 32px click targets on the Weekly meeting page only (UI audit F13, 2026-10-13). Sizing only: colours, .btn-*
   tokens and the layout stay as they are, and the dense tables elsewhere keep their compact controls. */
#plan-weekly-body :is(button, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"])) { min-height: 32px; box-sizing: border-box; }
/* Safari ignores min-height on a native select but honours height. */
#plan-weekly-body select { height: 32px; box-sizing: border-box; }
#plan-weekly-body :is(button.btn, .plan-ids-remove) { min-width: 32px; }
#plan-weekly-body .plan-l10-section p > a:only-child { display: inline-flex; align-items: center; min-height: 32px; }
/* The weekly-series chips (static/cal_l10.js): the x keeps its glyph and the chip keeps its height; only the hit area grows. */
#cal-l10-card .plan-level-chip .icon-btn { min-width: 32px; min-height: 32px; margin-block: -7px; }

/* ---- catchball ---- */
.plan-catchball { margin-top: 18px; }
.plan-catchball > summary { cursor: pointer; }
.plan-catchball-row { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.plan-catchball-row:last-child { border-bottom: none; }
.plan-catchball-add { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.plan-catchball-add textarea {
  flex: 1 1 auto; min-width: 0; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 9px; background: var(--bg-alt); color: var(--text); font: inherit; resize: vertical;
}
.plan-not-imported-note { margin: 0 0 8px; }

/* ---- shared drawer (Inspector / Distill / Assistant) ----
   Right-side panel on desktop; bottom sheet at <=860px per SPEC-B3's
   binary check (d) — this is the same breakpoint style as the rest of the
   app's own @media (max-width: ...) rules above. */
.plan-drawer { position: fixed; inset: 0; z-index: 500; }
.plan-drawer.hidden { display: none; }
.plan-pane-empty { font-size: 13px; padding: 8px 0; }

/* ---- Plan toolbar (year picker · quarter picker · Assistant) ----
   Rendered by plan.js's planToolbarHtml() at the top of every plan page,
   mirroring the prototype's topbar dataset switch + Assistant button. */
.plan-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border-soft);
}
.plan-toolbar-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); font-weight: 600; }
.plan-toolbar select {
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px;
  background: var(--bg-alt); color: var(--text); font: inherit; font-size: 13px;
}
.plan-seg { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: 20px; padding: 2px; background: var(--bg-alt); }
.plan-seg button {
  border: none; background: transparent; color: var(--text-muted); font: inherit; font-size: 12.5px;
  padding: 4px 11px; border-radius: 16px; cursor: pointer;
}
.plan-seg button:hover { color: var(--text); }
.plan-seg button.active { background: var(--accent-fill); color: #fff; }
.plan-toolbar-spacer { flex: 1 1 auto; }
/* Right-hand cluster (merged toggle, Columns, Assistant). It stays one unit, so
   the Assistant button never wraps alone under the quarter pills: when the pane
   is tight (docked drawer) the toggle label wraps to two lines instead, and
   only when even that cannot fit does the whole cluster drop, right-aligned. */
.plan-toolbar-right {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex: 1 1 330px; min-width: 0; margin-left: auto;
}
.plan-toolbar-right .plan-inactive-toggle { flex: 0 1 auto; white-space: normal; line-height: 1.25; margin-right: 0; }
.plan-toolbar-right .btn, .plan-toolbar-right .plan-cols-wrap { flex: none; }
/* Wide tables scroll inside their own box, so the page column (and the
   toolbar above it) never scrolls sideways when the pane is docked. */
.plan-row-offq { opacity: .45; }
.chip-kr { background: var(--paper-warm, #f3ede2); color: var(--text-muted); border: 1px solid var(--border); }
.chip-bucket { background: rgba(47, 107, 60, 0.12); color: var(--dm-ok-text); border: 1px solid rgba(47, 107, 60, 0.4); }
.chip-proposed { background: rgba(99, 102, 241, 0.12); color: var(--accent); border: 1px dashed var(--accent); }
.chip-channel { background: var(--bg-raised); color: var(--text-muted); border: 1px solid var(--border); font-weight: 600; letter-spacing: .02em; }

/* Definition/formula tooltip glyph: title row + the three scoreboard tiles. */
/* No `cursor: help` here any more. On macOS that renders an arrow with a
   question mark, which Brian read on 2026-09-22 as "I just see a question
   mark whenever I mouse over them" — the hover affordance was the bug
   report. The bubble below is the tooltip now; native title= is gone. */
.plan-info { cursor: pointer; color: var(--text-dim); font-size: 12px; }
.plan-info:hover { color: var(--accent); }

/* One bubble, parented to <body>, positioned in JS (see showTip). Fixed so a
   scrolling table cannot clip it, and pointer-events:none so it never eats
   the hover that is keeping it open. */
.plan-tip-bubble {
  position: fixed;
  z-index: 9999;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  /* Fixed colors, not var(--text): in dark mode --text is near white, which made
     a white bubble with white words. A dark bubble with a faint light edge reads
     on both themes. */
  background: #1c1c1e;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity .08s ease;
  pointer-events: none;
}
.plan-tip-bubble.on { opacity: 1; visibility: visible; }
/* Quiet form ([data-tip-quiet]): one small dark line, for the All Notes card's
   date and status icons (Jose, 2026-10-22, round 3 sample 3). */
.plan-tip-bubble.quiet { max-width: none; padding: 4px 7px; border-radius: 4px; background: #34363c; border: 0;
  font-size: 10.5px; line-height: 1.4; white-space: nowrap; box-shadow: 0 2px 6px rgba(28, 31, 35, 0.12); transition: opacity .12s ease; }
/* Sharing and scheduling hints are longer than the usual quiet date tip. */
body:has(#person-view:not(.hidden) #ppanel-main.active) .plan-tip-bubble.quiet {
  max-width: calc(100vw - 16px); overflow: hidden; text-overflow: ellipsis;
}
/* Text-like things show the plain arrow instead of the I-beam. Links, buttons and
   form controls keep the pointer or text cursor they already had: with the old
   [data-tip]:not([data-tip-area]) rule (specificity 0,2,0) every tipped button in
   EG Hub turned into an arrow. :where() keeps this at zero specificity, so any
   class that sets its own cursor (grab, pointer, not-allowed) still wins. */
:where([data-tip]:not([data-tip-area]):not(a, button, summary, select, label, input, textarea)) { cursor: default; }
th[data-tip] { text-decoration: underline dotted rgba(0, 0, 0, 0.22); text-underline-offset: 3px; }

/* "where from?" opener in a cascade L2 row's chip line + the panel it opens. */
.plan-origin-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0 2px;
  font-size: 11px;
  cursor: pointer;
}
.plan-origin-btn:hover { color: var(--accent); border-color: var(--accent); }
.plan-origin-desc { font-size: 13px; line-height: 1.5; color: var(--text); }
.plan-origin-field { margin-top: 12px; }
.plan-origin-field > div { font-size: 13px; }

/* Column chooser popover (item 2), same shape as .cal-menu-panel. */
.plan-cols-wrap { position: relative; }
.plan-cols-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 200px; padding: 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}
.plan-cols-pop.hidden { display: none; }
.plan-cols-pop-head { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.plan-cols-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; max-height: 320px; overflow-y: auto; }
.plan-cols-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }

/* Sortable table headers (item 2). */
.plan-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.plan-th-sort:hover { color: var(--accent); }
.plan-dept-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18); }
.plan-align-index { margin-bottom: 16px; }
.plan-align-select { width: 100%; max-width: 260px; font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-alt); color: var(--text); }
.plan-align-reason { margin-top: 3px; max-width: 260px; }
/* Departments table: the picker, reason and chip columns wrap inside the
   800px page column beside the docked pane. */
.plan-dept-table td { word-break: break-word; vertical-align: top; }
.plan-dept-state { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
/* Multi-select action bar (item 6): sticks under the docked pane's own
   scroll area so it stays visible while picking rows down a long table. */
.plan-align-actionbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent);
}
.plan-align-actionbar.hidden { display: none; }
.plan-align-actionbar-count { font-weight: 600; font-size: 12.5px; }
.plan-align-actionbar-set { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.plan-align-actionbar-set select { font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; }
.plan-align-pick, .plan-align-pick-all { cursor: pointer; }
.plan-table-wrap { overflow-x: auto; max-width: 100%; }
.plan-table-wrap > .plan-table { min-width: 720px; }
.plan-filter-note { font-size: 12px; color: var(--text-muted); margin: -6px 0 10px; }
.plan-filter-note a { cursor: pointer; }

/* Global Assistant (verb grid + proposal cards) */
.plan-assist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 10px; }
.plan-assist-grid button {
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px;
  padding: 7px 4px; border-radius: 8px; cursor: pointer;
}
.plan-assist-grid button.active { border-color: var(--accent-fill); background: var(--accent-fill); color: #fff; }
.plan-assist-list { display: flex; flex-direction: column; gap: 8px; }
.plan-assist-card .muted.small { line-height: 1.4; }
.plan-assist-actions { display: flex; gap: 6px; margin-top: 2px; }

/* Docked pane: on desktop the drawer lives INSIDE the active plan section
   (plan.js moves the node) as a fixed-width right column, always visible,
   with the page scrolling beside it — the prototype's inspector pane.
   Below 861px the fixed bottom-sheet rules further down still apply because
   the node is moved back out to <body> only when leaving plan routes; the
   media query re-asserts position:fixed so the sheet overlays the page. */
@media (min-width: 861px) {
  .plan-view.active { display: flex; flex-direction: row; overflow: hidden; padding: 0; }
  .plan-view.active > .plan-page { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 10px 20px 40px; }
  .plan-view > .plan-drawer {
    position: static; inset: auto; z-index: auto; flex: 0 0 380px;
    display: flex; flex-direction: column; min-height: 0;
    border-left: 1px solid var(--border); background: var(--bg-alt);
  }
  .plan-view > .plan-drawer.hidden { display: flex; }
  .plan-view > .plan-drawer > .plan-drawer-backdrop { display: none; }
  .plan-view > .plan-drawer > .plan-drawer-sheet {
    position: relative; inset: auto; width: auto; flex: 1 1 auto; min-height: 0;
    box-shadow: none; border-left: none;
  }
}
.plan-drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.32); }
.plan-drawer-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--bg-alt); border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.12);
  padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}
.plan-drawer-sheet label {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px;
  font-weight: 600; color: var(--text-muted);
}
.plan-drawer-sheet input[type="text"], .plan-drawer-sheet input[type="number"],
.plan-drawer-sheet textarea, .plan-drawer-sheet select {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 400;
  box-sizing: border-box; width: 100%;
}
.plan-drawer-row { display: flex; gap: 10px; }
.plan-drawer-row > label { flex: 1 1 0; }
.plan-drawer-quarters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.plan-drawer-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.plan-drawer-error { color: var(--danger-text); font-size: 12.5px; min-height: 1em; }
.plan-drawer-meta { margin-top: -4px; }
/* One line of plain-English help under each inspector field. */
.plan-field-help { display: block; margin: 2px 0 10px; font-weight: 400; line-height: 1.35; }
.plan-drawer-cancel { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border, #e5e7eb); }
/* "What to do this week" on the Company page. */
.plan-weekstrip { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; background: var(--bg-alt, #f8f9fb); font-size: 13px; }
.plan-weekstrip-title { font-weight: 600; margin-bottom: 4px; }
.plan-weekstrip ol { margin: 0; padding-left: 20px; }
.plan-weekstrip li { margin: 2px 0; }
.plan-weekstrip-queue { margin: 0 0 6px; }
.plan-weekstrip-queue ul { margin: 2px 0 0; padding-left: 20px; }
.plan-wws-fresh { margin-top: 2px; }
/* Where we stand: three lines at most; the full text is in the tooltip. */
.plan-wws-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plan-stale-chip { margin-left: 4px; }
.plan-drawer-close {
  position: absolute; top: 12px; right: 14px; background: transparent; border: none;
  font-size: 20px; line-height: 1; color: var(--text-dim); cursor: pointer;
}
.plan-drawer-close:hover { color: var(--text); }
.plan-drawer-kr { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.plan-drawer-krs { display: flex; flex-direction: column; }

.plan-assist-card {
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.plan-assist-title { font-weight: 600; font-size: 12.5px; }
.plan-assist-radio { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; }

.plan-distill-obj { border: 1px solid var(--border-soft); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.plan-distill-obj-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.plan-distill-krs { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-muted); }

.btn-sm { padding: 4px 10px; font-size: 12px; }

@media (max-width: 860px) {
  .plan-drawer-sheet {
    top: auto; right: 0; left: 0; bottom: 0; width: auto; max-height: 86vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.16);
  }
  .plan-tiles { flex-direction: column; }
  .plan-drawer-row { flex-direction: column; }
}
@media (max-width: 600px) {
  .plan-table-wrap > .plan-table { min-width: 560px; }
  .plan-progress-bar, .plan-progress-empty { min-width: 64px; }
  .plan-progress-bar::before { width: 36px; }
  .plan-progress-fill { margin-left: -42px; }
}

/* The Record button when a recording is in flight (isRecordingNow() in
   app.js). Same button, stop affordance: Brian, 2026-09-22, "If it's already
   recording, then that button should say stop recording as an option, and I
   should be able to start it back up". Themed tokens only, like the rest of
   this file, so it survives all four theme states. */
#join-record-btn.recording {
  background: var(--danger-soft, #fee2e2);
  border-color: var(--danger, #b91c1c);
  color: var(--danger-text, #b91c1c);
}
#join-record-btn.recording .jr-ico {
  animation: jr-rec-pulse 1.6s ease-in-out infinite;
}
@keyframes jr-rec-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
@media (prefers-reduced-motion: reduce) {
  #join-record-btn.recording .jr-ico { animation: none }
}

/* The three progress steps. Each is a small stacked block (name over fact)
   instead of a bare label, and exactly one is ever .active -- see
   renderSummaryProgress(). .blocked is a step that is genuinely waiting on an
   earlier one, drawn dimmer than active so "waiting" and "working" cannot be
   confused at a glance, which is the whole complaint the rewrite answers. */
.ai-summary-writing-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.asw-step {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
}
.asw-name { font-size: 12px; font-weight: 600; }
.asw-detail { font-size: 11px; color: var(--text-muted); }
.asw-step.active { border-color: var(--accent, #2563eb); background: var(--accent-soft); }
.asw-step.active .asw-name { color: var(--accent-on); }
.asw-step.blocked { opacity: .6; }
.asw-step.done { border-color: var(--border); }
.asw-step.done .asw-name::before { content: "\2713\00a0"; color: var(--ok, #15803d); }
/* Right-click menu on an in-app link, drawn only inside EG Hub's child
   webview (app.js's contextmenu handler). Built from the same tokens as
   .app-tab so it follows the data-theme switch and the prefers-color-scheme
   fallback with everything else, and never needs a second colour decision.
   position: fixed because the coordinates come straight off the mouse event,
   which are viewport-relative, and because the page scrolls underneath it. */
.link-menu {
  position: fixed;
  z-index: 9000;
  min-width: 170px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.link-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  line-height: 1;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: default;
  white-space: nowrap;
}
.link-menu button:hover { background: var(--row-hover); }

/* The Rebuild summary line on the AI Summary tab is .inline-notice (ui-kit.css);
   the always-there button is in the note's ⋯ menu. */
.summary-rebuild-msg { max-width: 70ch; }

/* The "why are we waiting" line under the three steps (app.js's
   renderSummaryProgress). Reads as supporting text, not as another status:
   the steps carry the state, this carries the reason. */
.ai-summary-writing-why {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 62ch;
}

/* Cmd+F find-in-page (app.js's find-bar block). Floats over the scroller,
   top-right, the way a browser's own does. Tokens only, so it follows the
   data-theme switch and the prefers-color-scheme fallback. */
.find-bar {
  position: fixed;
  top: 12px;
  right: 18px;
  z-index: 9500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-alt);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.find-bar input {
  width: 200px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 3px 2px;
}
.find-count {
  font-size: 11.5px;
  color: var(--text-dim);
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.find-bar.find-none .find-count { color: var(--danger-text, #d93025); }
.find-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: default;
}
.find-btn:hover { background: var(--row-hover); color: var(--text); }

/* The matches. ::highlight() paints ranges without touching the DOM, which is
   what keeps this safe to run inside a note editor. */
::highlight(eg-find) {
  background-color: color-mix(in srgb, #f7c948 60%, transparent);
  color: inherit;
}
::highlight(eg-find-current) {
  background-color: #ff8a3d;
  color: #1c1f23;
}

/* ---- Scoreboard channel split (see static/plan.js tileSplitHtml) ---- */
.plan-split { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.plan-split-bar {
  display: flex; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--bg-raised); margin-bottom: 8px;
}
.plan-split-seg { display: block; height: 100%; }
.plan-split-seg-0 { background: #4f46e5; }
.plan-split-seg-1 { background: #0ea5e9; }
.plan-split-seg-2 { background: #f59e0b; }
.plan-split-row {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto minmax(36px, auto);
  align-items: center; gap: 8px; font-size: 12px; padding: 2px 0;
}
/* The NOI tile's stand-in for the stacked bar: same grid, same height as the
   bar plus its margin, so all three tiles' channel rows line up. */
.plan-split-legend {
  min-height: 14px; margin-bottom: 0;
  font-size: 10px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-dim);
}
.plan-split-legend > span:nth-child(3), .plan-split-legend > span:nth-child(4) { text-align: right; }
.plan-split-val, .plan-split-pct { white-space: nowrap; text-align: right; }
.plan-split-dot {
  width: 8px; height: 8px; border-radius: 2px; display: inline-block;
}
.plan-split-dot-none { background: #9ca3af; } /* the gap row: neutral, not a channel */
/* One line per channel at any tile width: a long name truncates rather
   than pushing its row to double height (INTO THE AM wrapped at ~220px). */
.plan-split-name { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-split-val { font-variant-numeric: tabular-nums; font-weight: 600; }
.plan-split-pct { font-variant-numeric: tabular-nums; text-align: right; }
.plan-split-foot, .plan-split-none { margin-top: 8px; }

.plan-split-toggle {
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; padding: 0 4px 0 0; font-size: 11px; line-height: 1;
}
.plan-split-toggle:hover { color: var(--accent); }

/* Company page rows (Brian, 2026-10-09): a click expands or collapses the key results, and a small
   pencil in the title cell opens the editor. A row with nothing under it does nothing on click.
   The pencil shows on hover with a mouse on a wide screen, and always on touch and narrow screens. */
.plan-table tbody tr.plan-row-expand:not(.plan-row-has-kids) { cursor: default; }
.plan-edit-pencil {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-left: 4px; padding: 0; vertical-align: middle;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
  color: var(--text-muted); cursor: pointer;
}
.plan-edit-pencil:hover, .plan-edit-pencil:focus-visible {
  color: var(--accent-on); background: var(--accent-soft); border-color: var(--border);
}
.plan-edit-pencil:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: hover) and (min-width: 861px) {
  .plan-edit-pencil { opacity: 0; }
  tr.plan-row:hover .plan-edit-pencil, .plan-edit-pencil:focus-visible { opacity: 1; }
}
@media (max-width: 860px), (hover: none) {
  .plan-edit-pencil { width: 32px; height: 32px; opacity: 1; }
}
.plan-split-detail > td { background: var(--bg-raised); padding: 10px 14px; }
.plan-split-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 12px; }
.plan-split-table th {
  text-align: left; font-weight: 600; color: var(--text-muted);
  padding: 4px 10px 4px 0; border-bottom: 1px solid var(--border);
}
.plan-split-table td { padding: 5px 10px 5px 0; }
.plan-split-table tfoot td {
  border-top: 1px solid var(--border); font-weight: 600;
}
.plan-split-num { font-variant-numeric: tabular-nums; }

/* Scoreboard tile projection line + ahead/behind colouring in the split. */
.plan-tile-proj { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.plan-split-behind { color: var(--warn-text); font-weight: 600; }
.plan-split-ahead { color: var(--success-text); font-weight: 600; }
.plan-split-src { margin-top: 8px; }

/* "How it's going" cell: a colour dot, then the words. */
.plan-health { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.plan-health-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #9ca3af; }
.plan-health-green { background: #2f9e55; }
.plan-health-amber { background: #e0a100; }
.plan-health-red { background: #d64545; }
.plan-health-grey { background: #9ca3af; }

/* "Show merged & cancelled" switch in the plan toolbar. */
.plan-inactive-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); cursor: pointer; user-select: none;
  margin-right: 8px; white-space: nowrap;
}
.plan-inactive-toggle input { margin: 0; cursor: pointer; }

/* Bullet tooltips (showTip renders a <ul> when the tip has several lines). */
.plan-tip-bubble ul { margin: 0; padding-left: 14px; }
.plan-tip-bubble li { margin: 1px 0; }
.plan-tip-bubble li::marker { color: rgba(255, 255, 255, 0.55); }

/* Objective drawer: confirm / change where it rolls up (2026-09-23). */
.plan-obj-link-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.plan-obj-link-actions select { max-width: 100%; min-width: 0; flex: 1 1 220px; }

/* ---- 2026-09-24: goal icons, goals holding their key results, tile
   periods, the right pane that collapses away, and assistant suggestions ---- */
.plan-icon { display: inline-flex; width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; flex: none; }
.plan-icon svg { width: 100%; height: 100%; }
.plan-kids-count {
  display: inline-block; min-width: 18px; margin-left: 3px; padding: 0 5px;
  border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--border);
  font-size: 10px; line-height: 16px; color: var(--text-muted); text-align: center;
}
.plan-kids { margin-top: 8px; }
.plan-split-table + .plan-split-src + .plan-kids, .plan-split-src + .plan-kids { margin-top: 16px; }
.plan-kids-title {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 6px;
}
.plan-kids .plan-table { background: var(--bg, #fff); }

.plan-tile-period {
  font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0;
  margin-left: 6px; vertical-align: middle;
}
/* Goal measures: one number per line, tight. */
.plan-measure-list { margin: 0; padding-left: 16px; }
.plan-measure-list li { margin: 0; line-height: 1.4; }
.plan-tiles-note { margin: -8px 0 16px; }
.plan-tile-nums { margin-top: 6px; font-size: 12px; color: var(--text-muted); display: grid; gap: 2px; }
.plan-tile-nums b { color: var(--text); font-variant-numeric: tabular-nums; }
.plan-tile-k { color: var(--text-muted); }
/* Name, then Target / Actual / Projected. The name column gives way (it
   truncates) so three numbers fit a 200px tile; money is already read short. */
.plan-split-row.plan-split-row3 {
  grid-template-columns: 10px minmax(0, 1fr) minmax(40px, auto) minmax(40px, auto) minmax(40px, auto);
  gap: 6px;
}
/* Holds the bar's place on the NOI tile (a percent has no share bar). */
.plan-split-bar-none { background: transparent; }
.plan-split-legend.plan-split-row3 > span:nth-child(n+3) { text-align: right; }

@media (min-width: 861px) {
  .plan-view > .plan-drawer.plan-pane-collapsed { display: none !important; }
}
.plan-suggest-pane h3 { margin: 0 0 2px; }
.plan-suggest-list { display: grid; gap: 8px; margin-top: 12px; }
.plan-suggest {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left;
  border: 1px solid var(--border); background: var(--bg, #fff); border-radius: 10px;
  padding: 9px 11px; font: inherit; font-size: 13px; line-height: 1.4; color: var(--text); cursor: pointer;
}
.plan-suggest:hover { border-color: var(--accent); background: var(--accent-soft, rgba(99, 102, 241, .06)); }
.plan-suggest-verb {
  flex: none; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft, rgba(99, 102, 241, .1)); border-radius: 6px; padding: 2px 6px; margin-top: 1px;
}

/* Your own person page (viewer_role "self") is your shared list with your
   manager: you add Shared topics and change only your own lines. No private
   section, no Shared/Private picker, no manager-only edit toggles; lines
   someone else added are view-only. See renderPerson() in app.js. */
.person-self-view #topic-private-toggle,
.person-self-view #dt-private-section,
.person-self-view #todo-done-wrap-private,
.person-self-view .todo-act-move-visibility,
.person-self-view #okrs-mode-edit,
.person-self-view #exp-mode-edit,
.person-self-view #plan-distill-btn,
.person-self-view #plan-distill-quarter-picker { display: none !important; }
.todo-item-locked { pointer-events: none; }
.todo-item-locked a { pointer-events: auto; }
.todo-from-badge { font-size: 11px; color: var(--text-muted); background: var(--bg-raised); border-radius: 999px; padding: 1px 7px; margin-left: 6px; white-space: nowrap; }
#person-self-note { margin-top: 4px; font-size: 13px; }

/* Transcript tab with no transcript yet (RAI F1 #5): says what the server knows. */
.transcript-wait { padding: 14px 16px; border: 1px dashed var(--border, #d0d5dd); border-radius: 10px; max-width: 640px; }
.transcript-wait p { margin: 0 0 6px; }
.transcript-wait p:last-child { margin-bottom: 0; }
.transcript-wait.gave-up { border-style: solid; }

/* Person tab (Brian, 2026-10-01): one summary line, and the old sheet tag as a
   quiet label after the title. */
.plan-person-summary { margin: 2px 0 12px; }
/* A button that reads as a link: "J with no quarter set" in the summary line. */
.plan-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }

/* Plan > Objectives (the old Performance Objectives + Check-ins, folded into
   Plan 2026-10-07). One card per objective: key results with bars, the
   quarter-close grade, and Claude's suggestion beside it. The same cards fill
   sections 1 and 4 of Quarterly 1:1. */
.plan-header-right { align-items: center; }
.plan-person-picker {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 13px;
}
.plan-grade-summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 4px 0 14px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt);
}
.plan-grade-summary strong { font-size: 16px; }
.plan-obj-list { display: grid; gap: 12px; max-width: 880px; }
.plan-obj-card {
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-alt);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.plan-obj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.plan-obj-title { font-weight: 600; font-size: 14px; line-height: 1.35; flex: 1 1 260px; }
.plan-obj-title-input {
  flex: 1 1 260px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
}
.plan-obj-chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.plan-obj-krs { display: flex; flex-direction: column; border-top: 1px dashed var(--border); margin-top: 2px; }
.plan-obj-kr {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--border-soft, var(--border));
}
.plan-obj-kr:last-child { border-bottom: 0; }
.plan-obj-kr-title { font-size: 13px; }
.plan-obj-grade { border-top: 1px dashed var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.plan-obj-suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-kr-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.plan-kr-form textarea { min-height: 70px; resize: vertical; }

/* Plan > Quarterly 1:1 (the old Performance Quarterly Reviews, folded into Plan
   2026-10-07). Five numbered sections; the answer / notes columns reuse the
   .q-row rules above. */
.plan-review-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt);
}
.plan-review-status {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: var(--bg-raised); color: var(--text-muted);
}
.plan-review-status.self-submitted { background: rgba(245, 158, 11, 0.14); color: var(--dm-warn-text); }
.plan-review-status.manager-drafted { background: var(--accent-soft); color: var(--accent); }
.plan-review-status.released { background: var(--dm-ok-tint); color: var(--dm-ok-text); }
.plan-review-section { max-width: 880px; margin: 0 0 26px; }
.plan-review-section > h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 10px; }
.plan-review-num {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent-fill); color: #fff; font-size: 12px; font-weight: 700;
}
.plan-review-quarter {
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 13px;
}
.plan-review-draft { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.plan-review-bonus { margin-bottom: 10px; }
.plan-page .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.plan-review-section .q-row { grid-template-columns: 1fr; border-bottom: 0; padding: 0; margin-top: 14px; }
.plan-review-section .q-num { display: none; }
.plan-review-section .q-side textarea { background: var(--bg); color: var(--text); }

/* ================================================================
   Dark-mode leak fixes (ui/dark-mode-leaks). Theme-aware helpers for the
   places that used raw light hex. Kept in its own block, separate from the
   token blocks above. Values are AA on --bg-alt / --bg-raised in each theme.
   color-scheme makes native selects, checkboxes, radios and scrollbars follow
   the theme instead of staying light next to a dark page.
   ================================================================ */
:root,
html[data-theme="light"] {
  --dm-link: #4338ca;
  --dm-ok-text: #065f46;
  --dm-warn-text: #92400e;
  --dm-danger-text: #b91c1c;
  --dm-ok-tint: rgba(16, 185, 129, 0.10);
  --dm-danger-tint: rgba(239, 68, 68, 0.10);
  --dm-chip-bg: var(--bg-raised);
  color-scheme: light;
}
html[data-theme="dark"] {
  --dm-link: #a5b4fc;
  --dm-ok-text: #34d399;
  --dm-warn-text: #fbbf24;
  --dm-danger-text: #f87171;
  --dm-ok-tint: rgba(16, 185, 129, 0.14);
  --dm-danger-tint: rgba(239, 68, 68, 0.14);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --dm-link: #a5b4fc;
    --dm-ok-text: #34d399;
    --dm-warn-text: #fbbf24;
    --dm-danger-text: #f87171;
    --dm-ok-tint: rgba(16, 185, 129, 0.14);
    --dm-danger-tint: rgba(239, 68, 68, 0.14);
    color-scheme: dark;
  }
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-fill); }

/* Action Dashboard: "Where your coaching pulls from" (was inline hex in app.js). */

/* Transcript speaker accents are dark hues; on a dark page they drop under 3:1.
   Same six hues, lifted for the dark themes. */
html[data-theme="dark"] .tr-accent-0 { border-left-color: #7fb0e6; } html[data-theme="dark"] .tr-accent-0 .tr-speaker { color: #7fb0e6; }
html[data-theme="dark"] .tr-accent-1 { border-left-color: #f08a5d; } html[data-theme="dark"] .tr-accent-1 .tr-speaker { color: #f08a5d; }
html[data-theme="dark"] .tr-accent-2 { border-left-color: #6fcf8a; } html[data-theme="dark"] .tr-accent-2 .tr-speaker { color: #6fcf8a; }
html[data-theme="dark"] .tr-accent-3 { border-left-color: #b996e6; } html[data-theme="dark"] .tr-accent-3 .tr-speaker { color: #b996e6; }
html[data-theme="dark"] .tr-accent-4 { border-left-color: #e0b05a; } html[data-theme="dark"] .tr-accent-4 .tr-speaker { color: #e0b05a; }
html[data-theme="dark"] .tr-accent-5 { border-left-color: #6cc3d4; } html[data-theme="dark"] .tr-accent-5 .tr-speaker { color: #6cc3d4; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .tr-accent-0 { border-left-color: #7fb0e6; } html:not([data-theme]) .tr-accent-0 .tr-speaker { color: #7fb0e6; }
  html:not([data-theme]) .tr-accent-1 { border-left-color: #f08a5d; } html:not([data-theme]) .tr-accent-1 .tr-speaker { color: #f08a5d; }
  html:not([data-theme]) .tr-accent-2 { border-left-color: #6fcf8a; } html:not([data-theme]) .tr-accent-2 .tr-speaker { color: #6fcf8a; }
  html:not([data-theme]) .tr-accent-3 { border-left-color: #b996e6; } html:not([data-theme]) .tr-accent-3 .tr-speaker { color: #b996e6; }
  html:not([data-theme]) .tr-accent-4 { border-left-color: #e0b05a; } html:not([data-theme]) .tr-accent-4 .tr-speaker { color: #e0b05a; }
  html:not([data-theme]) .tr-accent-5 { border-left-color: #6cc3d4; } html:not([data-theme]) .tr-accent-5 .tr-speaker { color: #6cc3d4; }
}

/* Note help is an overlay, so opening it never shifts the document. */
.note-tab-tooltip {
  position: fixed;
  z-index: 10000;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--border, #888);
  border-radius: 8px;
  background: var(--bg, #fff);
  color: var(--text, #222);
  box-shadow: 0 4px 18px #0003;
  font-size: 13px;
  line-height: 1.5;
}
.note-tab-tooltip[hidden], #home-archive[hidden], #owner-notes-editor[hidden] { display: none; }
#home-archive { margin-bottom: 16px; padding: 12px; border: 1px solid var(--border, #888); border-radius: 8px; }
#home-archive summary { cursor: pointer; font-weight: 600; }
.home-archive-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0; line-height: 1.6; }
#home-archive button { max-width: 100%; white-space: normal; }
#tab-btn-oneonone { display: none !important; }

/* Browser-only bar that hands a meeting link to the EG Hub app (open-in-app.js). */
.open-in-app { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 16px; background: var(--bg-alt); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.open-in-app label { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }

/* ---- Notes Home, quieter (Jose, 2026-10-22, round 2 sample 3) ----
   One ask box: the input line, then My notes / Team notes, the ready made
   questions and a small "Recent" control along its bottom. Coming up rows are
   one quiet line: time column, title, then a people icon (names in a quiet
   tooltip) and a thin calendar-colour bar. */
.ask-box.ask-box-unified { display: block; padding: 6px 8px 8px 14px; }
.ask-box-unified .ask-box-line { display: flex; align-items: center; gap: 8px; }
.ask-box-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ask-box-foot .ask-scope-toggle { gap: 2px; }
.ask-box-foot .chip { padding: 3px 9px; font-size: 11.5px; font-weight: 500; }
.ask-box-foot .ask-scope-toggle .chip { border-color: transparent; background: transparent; }
.ask-box-foot .ask-scope-toggle .chip.active { background: var(--accent-soft); color: var(--accent-on); }
.ask-box-foot #home-recipe-chips { gap: 4px; flex-wrap: wrap; }
.ask-recent { position: relative; margin-left: auto; }
.ask-recent.hidden { display: none; }
.ask-recent-summary { list-style: none; cursor: pointer; font-size: 11.5px; color: var(--text-muted); padding: 3px 4px; }
.ask-recent-summary::-webkit-details-marker { display: none; }
.ask-recent-summary:hover, .ask-recent[open] > .ask-recent-summary { color: var(--text); }
.ask-recent-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(460px, 80vw);
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10); }
.ask-recent-pop.hidden { display: none; }
#feed-home-upcoming .date-group-label { text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); border: 0; padding: 0 4px 4px; }
#feed-home-upcoming .upc-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 16px; min-height: 40px; padding: 8px 4px;
  margin: 0; background: transparent; border: 0; border-radius: 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
#feed-home-upcoming .upc-row:hover { background: var(--bg-raised); border-color: var(--border-soft); }
#feed-home-upcoming .upc-row[data-cal-color] { border-left: 0; }
#feed-home-upcoming .upc-when { flex: 0 0 104px; font-size: 12px; color: var(--text-muted); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
#feed-home-upcoming .upc-row .meeting-row-title { font-weight: 500; font-size: 13px; }
#feed-home-upcoming .upc-row .meeting-row-main { flex: 1 1 auto; min-width: 0; }
#feed-home-upcoming .upc-row .meeting-row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#feed-home-upcoming .upc-row .meeting-row-side { width: auto; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 12px; }
#feed-home-upcoming .upc-row .meeting-row-side:empty { display: none; }
.upc-people { display: inline-flex; align-items: center; color: var(--text-dim); cursor: inherit; }
.upc-people svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#feed-home-upcoming .upc-reminders { margin: 4px 0 0; }
/* Round 2 sample 3 has the ask box on its own, no grey panel around it. */
.home-top-zone { background: transparent; border: 0; padding: 0; box-shadow: none; }
@media (max-width: 600px) {
  #feed-home-upcoming .upc-when { flex-basis: 72px; font-size: 11px; }
  #feed-home-upcoming .upc-row { gap: 10px; }
}

/* ---------------- Note history (tab row button + modal) ---------------- */
#note-history-btn { margin-left: auto; align-self: center; }
#note-history-btn[hidden] { display: none; }
.nh-card { position: relative; width: min(680px, 94vw); max-height: 86vh; overflow-y: auto; }
.nh-card .modal-close { position: absolute; top: 10px; right: 14px; background: transparent; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; line-height: 1; }
.nh-intro { margin: 0; font-size: 12.5px; }
.nh-list { display: flex; flex-direction: column; gap: 6px; }
.nh-row { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; padding: 9px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.nh-row:hover { border-color: var(--accent); }
.nh-row-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.nh-row-top .muted { font-size: 12px; }
.nh-row-preview { color: var(--text-muted); font-size: 12.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nh-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; }
.nh-full { margin: 0; max-height: 46vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13px; line-height: 1.55; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.nh-actions { display: flex; justify-content: flex-end; }
.nh-body { display: flex; flex-direction: column; gap: 12px; }

/* ==== DARK-MODE-POLISH-BEGIN (2026-11-13) ====
   Dark theme only. Every rule is scoped twice, like the token blocks at the top:
   html[data-theme="dark"] (forced Dark) and html:not([data-theme]) inside
   prefers-color-scheme: dark (Auto on a dark OS). Light mode is untouched. */
/* Rich-text toolbar (Trix): the light bar stayed white on the dark page. */
html[data-theme="dark"] trix-toolbar { background: var(--bg-raised); }
html[data-theme="dark"] trix-toolbar .trix-button-group { background: var(--bg-alt); border-color: var(--btn-secondary-border); }
html[data-theme="dark"] trix-toolbar .trix-button { color: var(--text); border-right-color: var(--border); }
html[data-theme="dark"] trix-toolbar .trix-button:not(.trix-active)::before { filter: invert(0.92); }
html[data-theme="dark"] trix-toolbar .trix-button:not(.trix-active):hover { background: var(--row-active); }
html[data-theme="dark"] trix-toolbar .trix-button:disabled { color: var(--text-muted); }
html[data-theme="dark"] trix-toolbar .trix-button.trix-active { background: var(--accent-fill); color: var(--btn-primary-fg); }
html[data-theme="dark"] trix-toolbar .trix-dialogs,
html[data-theme="dark"] trix-toolbar .trix-dialog { background: var(--bg-alt); color: var(--text); border-color: var(--btn-secondary-border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
html[data-theme="dark"] trix-toolbar .trix-input--dialog { background: var(--bg); color: var(--text); border-color: var(--btn-secondary-border); }
html[data-theme="dark"] trix-toolbar .trix-dialog .trix-button-group { background: var(--bg-raised); }
/* Generic .modal-card (Suggest, note history, etc.) was hard white. */
html[data-theme="dark"] .modal { background: rgba(0, 0, 0, 0.55); }
html[data-theme="dark"] .modal-card { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .modal-card :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea) { background: var(--bg); color: var(--text); border-color: var(--btn-secondary-border); }
/* Sign-in gate: Google's own dark button, and the dark scrim even when the OS is light. */
html[data-theme="dark"] .signin-overlay { background: rgba(20, 23, 25, 0.62); }
html[data-theme="dark"] .signin-google:not(.signin-email) { background: #131314; color: #e3e3e3; border-color: #8e918f; }
html[data-theme="dark"] .signin-google:not(.signin-email):hover { background: #1f1f20; }
/* Light fallbacks behind tokens this app never defines (--paper-warm, --danger-soft, --bg-hover). */
html[data-theme="dark"] .chip-kr { background: var(--bg-raised); }
html[data-theme="dark"] #join-record-btn.recording { background: var(--dm-danger-tint); }
html[data-theme="dark"] .whoami-logout:hover { background: var(--row-hover); }
/* Dark-ink colours that sit on the page itself. */
html[data-theme="dark"] .wl-pri-list li[class*="wl-pri-d"] .wl-pri-text { color: var(--text-muted); }
html[data-theme="dark"] .wl-pri-list li[class*="wl-pri-d"] .wl-pri-text::before { background: var(--btn-secondary-border); }
html[data-theme="dark"] #transcript-content .tr-turn:not([class*="tr-accent-"]),
html[data-theme="dark"] #inline-transcript-content .tr-turn:not([class*="tr-accent-"]) { border-left-color: var(--btn-secondary-border); }
html[data-theme="dark"] .asw-step.done .asw-name::before { color: var(--success-text); }
html[data-theme="dark"] .wlog-ck.dropped { background: var(--bg-alt); }
/* Goal icons get their hue inline from plan.js; lift it toward white so dark hues stay visible. */
html[data-theme="dark"] .plan-icon svg { color: color-mix(in srgb, currentColor 60%, var(--text)); }
/* White labels on fills that were too light in dark (taste_review contrast FAILs). */
html[data-theme="dark"] .ptab.active .ptab-count { background: var(--btn-primary-bg); }
html[data-theme="dark"] .wl-mode-toggle .wl-mode.active { background: var(--btn-primary-bg); }
html[data-theme="dark"] .ooa-step-finalized { background: var(--btn-success-bg); }
html[data-theme="dark"] .ooa-avatar[style*="#6366f1"] { background: var(--btn-primary-bg) !important; }
html[data-theme="dark"] .sidebar .count.count-alert { background: var(--btn-danger-bg); color: var(--btn-danger-fg); }
html[data-theme="dark"] .event-folder-chip[data-folder-color="slot-4"] { color: #c084fc; }
html[data-theme="dark"] .wl-banner.green { color: var(--success-text); }
html[data-theme="dark"] .wl-banner.yellow { color: var(--warn-text); }
html[data-theme="dark"] .wl-banner.red { color: var(--danger-text); }
@media (prefers-color-scheme: dark) {
  /* Rich-text toolbar (Trix): the light bar stayed white on the dark page. */
  html:not([data-theme]) trix-toolbar { background: var(--bg-raised); }
  html:not([data-theme]) trix-toolbar .trix-button-group { background: var(--bg-alt); border-color: var(--btn-secondary-border); }
  html:not([data-theme]) trix-toolbar .trix-button { color: var(--text); border-right-color: var(--border); }
  html:not([data-theme]) trix-toolbar .trix-button:not(.trix-active)::before { filter: invert(0.92); }
  html:not([data-theme]) trix-toolbar .trix-button:not(.trix-active):hover { background: var(--row-active); }
  html:not([data-theme]) trix-toolbar .trix-button:disabled { color: var(--text-muted); }
  html:not([data-theme]) trix-toolbar .trix-button.trix-active { background: var(--accent-fill); color: var(--btn-primary-fg); }
  html:not([data-theme]) trix-toolbar .trix-dialogs,
  html:not([data-theme]) trix-toolbar .trix-dialog { background: var(--bg-alt); color: var(--text); border-color: var(--btn-secondary-border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
  html:not([data-theme]) trix-toolbar .trix-input--dialog { background: var(--bg); color: var(--text); border-color: var(--btn-secondary-border); }
  html:not([data-theme]) trix-toolbar .trix-dialog .trix-button-group { background: var(--bg-raised); }
  /* Generic .modal-card (Suggest, note history, etc.) was hard white. */
  html:not([data-theme]) .modal { background: rgba(0, 0, 0, 0.55); }
  html:not([data-theme]) .modal-card { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
  html:not([data-theme]) .modal-card :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), textarea) { background: var(--bg); color: var(--text); border-color: var(--btn-secondary-border); }
  /* Sign-in gate: Google's own dark button, and the dark scrim even when the OS is light. */
  html:not([data-theme]) .signin-overlay { background: rgba(20, 23, 25, 0.62); }
  html:not([data-theme]) .signin-google:not(.signin-email) { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  html:not([data-theme]) .signin-google:not(.signin-email):hover { background: #1f1f20; }
  /* Light fallbacks behind tokens this app never defines (--paper-warm, --danger-soft, --bg-hover). */
  html:not([data-theme]) .chip-kr { background: var(--bg-raised); }
  html:not([data-theme]) #join-record-btn.recording { background: var(--dm-danger-tint); }
  html:not([data-theme]) .whoami-logout:hover { background: var(--row-hover); }
  /* Dark-ink colours that sit on the page itself. */
  html:not([data-theme]) .wl-pri-list li[class*="wl-pri-d"] .wl-pri-text { color: var(--text-muted); }
  html:not([data-theme]) .wl-pri-list li[class*="wl-pri-d"] .wl-pri-text::before { background: var(--btn-secondary-border); }
  html:not([data-theme]) #transcript-content .tr-turn:not([class*="tr-accent-"]),
  html:not([data-theme]) #inline-transcript-content .tr-turn:not([class*="tr-accent-"]) { border-left-color: var(--btn-secondary-border); }
  html:not([data-theme]) .asw-step.done .asw-name::before { color: var(--success-text); }
  html:not([data-theme]) .wlog-ck.dropped { background: var(--bg-alt); }
  /* Goal icons get their hue inline from plan.js; lift it toward white so dark hues stay visible. */
  html:not([data-theme]) .plan-icon svg { color: color-mix(in srgb, currentColor 60%, var(--text)); }
  /* White labels on fills that were too light in dark (taste_review contrast FAILs). */
  html:not([data-theme]) .ptab.active .ptab-count { background: var(--btn-primary-bg); }
  html:not([data-theme]) .wl-mode-toggle .wl-mode.active { background: var(--btn-primary-bg); }
  html:not([data-theme]) .ooa-step-finalized { background: var(--btn-success-bg); }
  html:not([data-theme]) .ooa-avatar[style*="#6366f1"] { background: var(--btn-primary-bg) !important; }
  html:not([data-theme]) .sidebar .count.count-alert { background: var(--btn-danger-bg); color: var(--btn-danger-fg); }
  html:not([data-theme]) .event-folder-chip[data-folder-color="slot-4"] { color: #c084fc; }
  html:not([data-theme]) .wl-banner.green { color: var(--success-text); }
  html:not([data-theme]) .wl-banner.yellow { color: var(--warn-text); }
  html:not([data-theme]) .wl-banner.red { color: var(--danger-text); }
}
/* The "summary written" flash was a pale green wash on the dark page. */
@keyframes aswFlashDark { 0% { background: var(--dm-ok-tint); } 100% { background: transparent; } }
html[data-theme="dark"] .ai-summary-done-flash { animation-name: aswFlashDark; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .ai-summary-done-flash { animation-name: aswFlashDark; }
}
/* ==== DARK-MODE-POLISH-END ==== */
