/* Cadence 2.0 display face — self-hosted, headings & big numbers only. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url(/fonts/nunito.woff2) format("woff2");
}

:root {
  --bg: #f4f3f8;
  --card: #ffffff;
  --ink: #16161d;
  --muted: #6b6b78;
  --line: #e6e6ec;
  --accent: #514ae0;
  --accent-soft: #e9e7fb;
  --border-accent: #d3d0f5;
  --display: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --green: #12915a;
  --green-soft: #e2f5ec;
  --amber: #b7791f;
  --amber-soft: #fdf3df;
  --red: #d1364a;
  --red-soft: #fde7ea;
  --blue: #1d64d8;
  --blue-soft: #e6effc;
  --frost: rgba(255, 255, 255, 0.92); /* frosted tabbar/sidebar backdrop */
  --radius: 14px;
  --tap: 58px;
  --pad: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 45, 0.05), 0 2px 8px rgba(20, 20, 45, 0.04);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark ("night") theme — set on <html data-theme="dark">. Only colour tokens
   change; every surface/text/border reads from these variables. */
/* Per-app identity: the Admissions mini-app runs teal on a mint-tinted ground.
   Set via body[data-app] by the router; vars inherit to everything inside. */
body[data-app="adm"] {
  --bg: #f0f6f4;
  --accent: #0f8a7a;
  --accent-soft: #dfeeea;
  --border-accent: #b8dcd3;
  --frost: rgba(240, 246, 244, 0.92);
}

[data-theme="dark"] {
  --bg: #0f1017;
  --card: #1a1b24;
  --ink: #e9e9f1;
  --muted: #9a9bad;
  --line: #2b2d3a;
  --accent: #8f88ff;
  --accent-soft: #262445;
  --border-accent: #3a3767;
  --green: #34d399;
  --green-soft: #123024;
  --amber: #fbbf24;
  --amber-soft: #322611;
  --red: #fb7185;
  --red-soft: #37171d;
  --blue: #7fb2ff;
  --blue-soft: #16273f;
  --frost: rgba(18, 19, 27, 0.9);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

[data-theme="dark"] body[data-app="adm"] {
  --bg: #0d1412;
  --accent: #3fc0ad;
  --accent-soft: #102c26;
  --border-accent: #1d4a41;
  --frost: rgba(13, 20, 18, 0.9);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* 2.0 density: 16px base (down from 18) — roughly a third more content per
     screen. The "A+ Bigger text" toggle still bumps it back up. */
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Display face on headings and big numbers — body text stays system. */
h1,
h2,
h3,
.stat b,
.score-points,
.stats-foot,
.tabbar button {
  font-family: var(--display);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 18px;
  /* Themed defaults so any input reads correctly in dark mode. */
  background: var(--card);
  color: var(--ink);
}

/* ---- Layout ------------------------------------------------------------ */
#app {
  min-height: 100vh;
  padding-bottom: calc(96px + var(--safe-bottom));
}

.screen {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: calc(var(--safe-top) + 16px) var(--pad) 12px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
  flex: 1;
  min-width: 0;
}
.topbar .sub {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}
.back-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 24px;
  display: grid;
  place-items: center;
  flex: none;
}

/* ---- Cards ------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad);
  margin-bottom: 12px;
}
.card.tappable:active {
  transform: scale(0.99);
}
.card.tappable {
  transition: transform 0.08s ease, border-color 0.12s ease;
}

/* Colour marker that replaces the old thick accent bar */
.goal-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.gdot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: none;
  background: var(--accent);
}
.gdot.lg {
  width: 14px;
  height: 14px;
  border-radius: 5px;
}
/* task colour dot (inherits the goal's colour) */
.tdot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 9px;
  vertical-align: middle;
  flex: none;
}
.goal-card {
  display: block;
  width: 100%;
  text-align: left;
}
.goal-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}
.goal-card .desc {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 14px;
}
.progress {
  height: 12px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.progress-row .count {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- Task rows --------------------------------------------------------- */
.task {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px var(--pad);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

/* ---- 2.0 density: grouped divider ROWS, not card-per-task -------------- */
/* A .rowcard holds one group (a date bucket, a goal, starred, pinned…) as a
   single card of compact rows — the hybrid design's biggest visible change. */
.rowcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}
.rowcard .task {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 9px 13px;
  gap: 11px;
  align-items: center;
  min-height: 52px;
}
.rowcard > .task:last-child,
.rowcard > .pin-wrap:last-child .task {
  border-bottom: 0;
}
.rowcard .checkbox {
  width: 26px;
  height: 26px;
  border-width: 2px;
  border-radius: 8px;
  font-size: 15px;
  margin-top: 0;
}
.rowcard .task-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.rowcard .chips {
  gap: 5px;
  margin-top: 3px;
}
.rowcard .chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 7px;
  gap: 4px;
}
.rowcard .chip .ic {
  width: 12px;
  height: 12px;
}
.rowcard .avatar.sm {
  width: 18px;
  height: 18px;
  font-size: 9px;
}
.rowcard .star-mark .ic {
  width: 13px;
  height: 13px;
}
.rowcard .sgc-foot,
.rowcard .task-foot {
  font-size: 11.5px;
  margin-top: 3px;
}
.rowcard .pin-wrap .pin-toggle {
  top: 50%;
  transform: translateY(-50%);
  right: 6px;
}
.rowcard .task.is-starred {
  border-left: 3px solid var(--amber);
}
.checkbox {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 3px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: transparent;
  margin-top: 2px;
}
.checkbox.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.checkbox.doing {
  border-color: var(--amber);
  color: var(--amber);
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  word-break: break-word;
}
.task.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip.owner {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip.due {
  background: var(--blue-soft);
  color: var(--blue);
}
.chip.due-soon {
  background: var(--amber-soft);
  color: var(--amber);
}
.chip.overdue {
  background: var(--red-soft);
  color: var(--red);
}
.chip.sub {
  background: var(--green-soft);
  color: var(--green);
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.avatar.sm {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

/* ---- Section headers --------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 2px 12px;
}
.section-head h3 {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0;
}
.section-head .n {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--tap);
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  padding: 0 18px;
}
.btn:active {
  filter: brightness(0.94);
}
.btn.secondary {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn.ghost {
  background: var(--accent-soft);
  color: var(--accent);
}
.btn.danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn.sm {
  min-height: 48px;
  font-size: 16px;
  width: auto;
  padding: 0 16px;
}
.add-btn {
  border: 2px dashed var(--line);
  background: transparent;
  color: var(--accent);
  min-height: 56px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 18px;
  width: 100%;
  margin-bottom: 12px;
}

/* ---- Bottom nav -------------------------------------------------------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--frost);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  max-width: 640px;
  margin: 0 auto;
}
.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  border-radius: 14px;
}
.tabbar button .ico {
  font-size: 24px;
}
.tabbar button.active {
  color: var(--accent);
}

/* ---- Login ------------------------------------------------------------- */
.login {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 40px) 22px 40px;
  text-align: center;
}
.login .logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
}
.login h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.login p.tag {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 30px;
}
.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.name-btn {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 22px 14px;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.name-btn .avatar {
  width: 48px;
  height: 48px;
  font-size: 20px;
}
.name-btn.admin::after {
  content: "ADMIN";
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

/* PIN pad */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 24px 0 28px;
}
.pin-dots .dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--line);
}
.pin-dots .dot.on {
  background: var(--accent);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 320px;
  margin: 0 auto;
}
.key {
  height: 72px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 30px;
  font-weight: 700;
}
.key.blank {
  background: transparent;
  box-shadow: none;
}
.key:active {
  background: var(--accent-soft);
}

/* ---- Modal / forms ----------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 10, 25, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 640px;
  border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(24px + var(--safe-bottom));
  max-height: 92vh;
  overflow-y: auto;
  animation: slideup 0.22s ease;
}
.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-close:hover {
  color: var(--ink);
}
@keyframes slideup {
  from {
    transform: translateY(30px);
    opacity: 0.4;
  }
}
.sheet .grabber {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  margin: 6px auto 16px;
}
/* ---- 2.0 profile menu (avatar → sheet) --------------------------------- */
.who-btn {
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.who-btn .avatar {
  box-shadow: 0 0 0 2px var(--accent);
}
.prof-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.prof-head b {
  font-family: var(--display);
  font-size: 17px;
  display: block;
}
.prof-head .muted-note {
  display: block;
  font-size: 13px;
}
.prof-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 2px 8px;
}
.prof-app {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.prof-app.here {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.prof-app-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.prof-app-ico .ic {
  width: 20px;
  height: 20px;
}
.prof-app-tx b {
  font-family: var(--display);
  font-size: 15px;
  display: block;
}
.prof-app-tx span {
  font-size: 12px;
  color: var(--muted);
}
.prof-here {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  background: var(--card);
  border-radius: 99px;
  padding: 3px 10px;
  white-space: nowrap;
}
.prof-out {
  color: var(--red);
}

.sheet h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 18px;
  padding-right: 40px;
}
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--card);
  color: var(--ink);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}
/* Modern dropdown: hide the native chrome and draw our own chevron. */
.field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238a8a99' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field select:hover {
  border-color: var(--border-accent);
}
.field select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.field select option {
  color: var(--ink);
  background: var(--card);
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1;
  min-width: 72px;
  min-height: 52px;
  border-radius: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
}
.seg button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.people-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--line);
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pill.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.sheet-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.sheet-actions .btn {
  flex: 1;
}

/* ---- Misc -------------------------------------------------------------- */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 50px 20px;
  font-size: 17px;
}
.empty .big {
  font-size: 46px;
  margin-bottom: 10px;
}
.status-picker {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.status-picker button {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13.5px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--muted);
  padding: 6px 10px;
}
.status-picker button.on[data-s="todo"] {
  background: var(--line);
  color: var(--ink);
  border-color: var(--muted);
}
.status-picker button.on[data-s="doing"] {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: var(--amber);
}
.status-picker button.on[data-s="done"] {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green);
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}
.meta-row .k {
  color: var(--muted);
  font-weight: 700;
  width: 96px;
  flex: none;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(110px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--card);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  z-index: 100;
  box-shadow: var(--shadow);
  animation: fadein 0.2s ease;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}
.spinner {
  text-align: center;
  padding: 60px;
  color: var(--muted);
  font-weight: 700;
}

/* ---- Icons ------------------------------------------------------------- */
.ic {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: -5px;
  flex: none;
}
.ic.sm {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}
.ic.lg {
  width: 48px;
  height: 48px;
  vertical-align: middle;
}
.tabbar .ico .ic {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
}
.nav-link .ic {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  color: var(--muted);
}
.nav-link.on .ic {
  color: var(--accent);
}
.nav-link.nav-plain {
  padding-left: 45px;
}
.back-btn .ic {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}
.chip .ic,
.comment-chip .ic {
  vertical-align: -3px;
}
.empty .big {
  color: var(--muted);
  opacity: 0.55;
}

/* ---- Shared additions -------------------------------------------------- */
.muted-note {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.login .blurb {
  margin: 34px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.hint {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 12px;
  margin: 0 0 16px;
}
.tip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.tip .tip-ico {
  flex: none;
  font-size: 18px;
}
.tip .tip-text {
  flex: 1;
}
/* Measure block (goal metric) */
.measure {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 4px 0 12px;
}
.measure-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.measure-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
}
.measure-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.measure-bar {
  background: var(--card);
}
.measure-bar > span {
  background: var(--accent);
}
.bar-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field-row {
  display: flex;
  gap: 12px;
}
.field-row .field {
  flex: 1;
}
.notes {
  color: var(--muted);
  margin: 12px 0 0;
  white-space: pre-wrap;
}
.chip.recur {
  background: var(--green-soft);
  color: var(--green);
}
.chip.doing {
  background: var(--amber-soft);
  color: var(--amber);
}
/* Due today/tomorrow: bright, solid — stands out from softer chips */
.chip.due-now {
  background: var(--amber);
  color: #fff;
}
/* Comment count: bright when unread for this user, subdued once read */
.chip.comment-chip {
  border: none;
  cursor: pointer;
}
.chip.comment-chip.read {
  background: var(--line);
  color: var(--muted);
}
.chip.comment-chip.unread {
  background: var(--accent);
  color: #fff;
}
.chip.todo {
  background: var(--line);
  color: var(--muted);
}

/* Mobile text-size levels: "big" (default) and "small" (one step down).
   zoom must NEVER sit on a container of position:fixed elements — WebKit
   anchors them to the zoomed box instead of the viewport, so a fixed bar
   scrolls up with the page and parks mid-screen. The tabbar is therefore
   PORTALED to #tabbar-root under <body> (see mountTabbar in app.js) where
   no zoomed ancestor can ever contain it; the full-screen meeting dashboard
   and modal backdrops likewise stay unzoomed. */
body[data-mode="mobile"][data-font="small"] #app > :not(.tabbar):not(.mtg-dash),
body[data-mode="mobile"][data-font="small"] .modal-backdrop > * {
  zoom: 0.88;
}
.checkbox.sm {
  width: 28px;
  height: 28px;
  border-width: 2px;
  border-radius: 9px;
  font-size: 16px;
  margin-top: 0;
}
/* Non-owner: checkbox is a static indicator, not tappable */
.checkbox.locked {
  cursor: default;
  opacity: 0.55;
}
.status-readonly {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Activity feed */
.act-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.act-row {
  display: flex;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px var(--pad);
  align-items: flex-start;
}
.act-row:active {
  transform: scale(0.995);
}
.act-row.unread {
  border-color: var(--border-accent);
  background: var(--accent-soft);
}
.act-body {
  flex: 1;
  min-width: 0;
}
.act-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 4px;
}
.act-who {
  font-weight: 800;
}
.act-kind {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.act-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.act-text {
  font-size: 16px;
  white-space: pre-wrap;
}
.act-task {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.dotnew {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
}
.xbtn {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 8px;
  flex: none;
}
.xbtn:active {
  background: var(--line);
}
.xbtn.big {
  font-size: 20px;
}

/* Recurring toggle */
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}
.toggle .knob {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  flex: none;
  transition: background 0.15s ease;
}
.toggle .knob::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.toggle.on {
  border-color: var(--green);
  color: var(--green);
}
.toggle.on .knob {
  background: var(--green);
}
.toggle.on .knob::after {
  transform: translateX(18px);
}

/* Lists */
.list-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px var(--pad);
  margin-bottom: 12px;
}
.list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 17px;
}
.list-head strong {
  flex: 1;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.list-item .li-text {
  flex: 1;
  font-size: 16px;
}
.list-item.done .li-text {
  color: var(--muted);
  text-decoration: line-through;
}
.add-item {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.add-item input {
  flex: 1;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--card);
  color: var(--ink);
}
.add-item input:focus {
  outline: none;
  border-color: var(--accent);
}
.add-item .btn.sm {
  flex: none;
}

/* Links */
.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px var(--pad);
  margin-bottom: 10px;
}
.link-a {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.link-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.link-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.link-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-url {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-a:hover .link-title {
  text-decoration: underline;
}

/* Comments / updates */
.comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.comment {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px 16px;
}
.comment.is-update {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}
.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 14px;
}
.comment-head .cname {
  font-weight: 800;
}
.comment-head .ctime {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
}
.badge-update {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: var(--card);
  padding: 3px 8px;
  border-radius: 999px;
}
.comment-body {
  font-size: 16px;
  white-space: pre-wrap;
}
.composer {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.composer-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer-box.update textarea {
  border-color: var(--accent);
}
.composer textarea {
  width: 100%;
  min-height: 60px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}
.composer textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.composer .btn.sm {
  align-self: flex-start;
}

/* ---- DESKTOP layout ---------------------------------------------------- */
body[data-mode="desktop"] #app {
  padding-bottom: 0;
}
.dsk {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 264px;
  flex: none;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  padding: 4px 8px 16px;
}
.brand img {
  width: 32px;
  height: 32px;
}
.nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.nav-link:hover {
  background: var(--bg);
}
.nav-link.on {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-section {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 18px 14px 6px;
}
.nav-goals {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.nav-goal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-left: calc(14px + var(--nind, 0) * 16px);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
/* Depth ≥1 rows are quieter and slightly smaller than their group header */
.nav-goal[style*="--nind:1"],
.nav-goal[style*="--nind:2"],
.nav-goal[style*="--nind:3"],
.nav-goal[style*="--nind:4"] {
  font-size: 14px;
  padding-top: 7px;
  padding-bottom: 7px;
}
/* Each school-goal group starts with a little air above it */
.nav-goal.nav-school {
  margin-top: 6px;
}
.nav-goal.nav-school:first-child {
  margin-top: 0;
}
.nav-subsec {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 12px 14px 4px;
}

/* Date buckets INSIDE a Tasks area read as sub-headers of it: smaller,
   quieter, indented under the TASKS header instead of rivalling it. */
.section-head.bucket-head {
  margin: 12px 2px 8px 12px;
}
.section-head.bucket-head h3 {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.6px;
}
.section-head.bucket-head .n {
  font-size: 11px;
}
.nav-goal:hover {
  background: var(--bg);
}
.nav-goal.on {
  background: var(--bg);
  font-weight: 800;
}
.nav-goal .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: none;
}
.nav-goal-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-foot .who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 12px;
  font-weight: 700;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-size: 16px;
}
.sidebar-foot .who:hover {
  color: var(--accent);
}
.sidebar-foot .who .who-edit {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.85;
}

/* Parent-goal link inside a task */
.goal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  max-width: 100%;
}
.goal-link .gdot {
  flex: 0 0 auto;
}
.goal-link > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-link .chev {
  font-size: 18px;
  opacity: 0.7;
}
.content {
  flex: 1;
  min-width: 0;
  padding: 30px 36px 60px;
  max-width: 1200px;
}
.content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.content-head h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
}
.content-head .btn.sm {
  flex: none;
}
.goal-head {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  align-items: center;
}
.narrow {
  max-width: 720px;
}
.mine-list .task:hover,
.narrow .card.tappable:hover {
  transform: translateY(-1px);
  cursor: pointer;
}

/* Goal tiles (desktop dashboard) */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: left;
  transition: transform 0.1s ease, border-color 0.12s ease;
  /* Tiles are <button>s: without this, a short card stretched to its grid
     row's height vertically CENTRES its content, leaving a dead band above
     the title. Top-align instead, and let the footer sink to the bottom. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
.tile .card-foot {
  margin-top: auto;
  padding-top: 8px;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-accent, #d6d3ff);
}
.tile h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.3px;
}
.tile-desc {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 12px;
}

/* Goal board — stacked horizontal sections (one-off first, then recurring) */
.goal-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.goal-sec {
  margin-bottom: 14px;
}
.goal-sec-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  align-items: start;
}
.goal-sec-add {
  align-self: start;
  height: 100%;
  min-height: 64px;
}

/* Legacy cadence board (kept for any other use) */
.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 16px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 10px;
}
.board-col {
  background: var(--bg);
  border-radius: 16px;
  min-width: 200px;
}
.board-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 12px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.board-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bcard {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.bcard:hover {
  transform: translateY(-1px);
}
.bcard.is-done .bcard-title {
  color: var(--muted);
  text-decoration: line-through;
}
.bcard-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.bcard-title {
  font-size: 16px;
  font-weight: 700;
  word-break: break-word;
}
.bcard .chips {
  margin-top: 8px;
}
.add-btn.sm {
  min-height: 44px;
  font-size: 15px;
  margin: 4px 0 0;
}

/* Desktop centred modals */
.modal-backdrop.center {
  align-items: center;
}
.task-modal {
  background: var(--bg);
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideup 0.2s ease;
}
.task-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.task-modal-head h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}
.task-modal-body {
  padding: 8px 22px 24px;
  overflow-y: auto;
}
body[data-mode="desktop"] .modal-backdrop.center .sheet {
  border-radius: 22px;
  max-width: 560px;
  max-height: 88vh;
}

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

/* ---- Team goals -------------------------------------------------------- */
.tg-block,
.tg-section {
  margin-bottom: 28px;
}
/* Light-tinted team-goal card: dark, readable text; distinct via a solid
   badge + accent border + left rail — not a heavy full-colour fill. */
.tg-card {
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.tg-card h2 {
  font-size: 23px;
  font-weight: 800;
  margin: 10px 0 0;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.tg-desc {
  color: var(--muted);
  font-size: 15px;
  margin: 6px 0 0;
}
.tg-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: var(--accent);
  padding: 4px 11px;
  border-radius: 999px;
}
.tg-card.tappable {
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}
.tg-card.tappable:hover {
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.16);
}
.tg-card.tappable:active {
  transform: scale(0.995);
}

/* Sort toggle row on a goal */
.sort-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 2px 12px;
}
.sort-row .sort-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.head-link {
  cursor: pointer;
  justify-content: space-between;
}
.head-link .chev {
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
}
.head-link:hover h3 {
  color: var(--accent);
}
/* View segments must WRAP inside the viewport, never scroll off-screen —
   flex:1 + min-width:0 lets the seg shrink so its buttons flow to new rows. */
.sort-seg {
  flex: 1 1 0;
  min-width: 0;
}
.sort-seg button {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  font-size: 14px;
  padding: 0 10px;
}
.sort-row .seg {
  flex: 1 1 0;
  min-width: 0;
}
body[data-mode="mobile"] .sort-row .seg button {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  font-size: 14.5px;
  padding: 0 12px;
}
.chip.tg-chip {
  background: var(--card);
  color: var(--muted);
}
.tg-card .measure {
  background: var(--card);
}
.tg-btn {
  background: var(--card);
  color: var(--accent);
  box-shadow: var(--shadow);
}
.tg-btn.solid {
  background: var(--accent);
  color: #fff;
}
body[data-mode="desktop"] .tg-block .tiles {
  margin-top: 12px;
}

/* First-run guide prompt */
.guide-prompt {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.guide-prompt .gp-ico {
  font-size: 22px;
  flex: none;
}
.guide-prompt .gp-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
body[data-mode="mobile"] .guide-prompt .btn.sm {
  flex-basis: 100%;
  order: 4;
}
.guide-prompt .gp-text strong {
  font-weight: 800;
}
.guide-prompt .gp-text span {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}
.guide-prompt .btn.sm {
  flex: none;
  background: var(--card);
  color: var(--accent);
}
.guide-prompt .xbtn {
  color: rgba(255, 255, 255, 0.85);
  flex: none;
}

/* ---- Guide / how-to ---------------------------------------------------- */
.guide-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--card);
  color: var(--ink);
  margin-bottom: 8px;
}
.guide-search:focus {
  outline: none;
  border-color: var(--accent);
}
.guide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px var(--pad);
  margin-bottom: 10px;
  transition: border-color 0.12s ease, transform 0.08s ease;
}
.guide-row:hover {
  border-color: var(--border-accent);
}
.guide-row:active {
  transform: scale(0.99);
}
.guide-row .gi {
  font-size: 22px;
  flex: none;
  width: 28px;
  text-align: center;
}
.guide-row .gt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.guide-row .gt strong {
  font-size: 17px;
  font-weight: 700;
}
.guide-row .gt span {
  font-size: 14px;
  color: var(--muted);
}
.guide-row .chev {
  color: var(--muted);
  font-size: 24px;
  flex: none;
}
.backlink {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  padding: 6px 0;
  margin-bottom: 12px;
  background: none;
}
.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px var(--pad);
}
.article.narrow {
  max-width: 720px;
}
.article h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
}
.article h4 {
  font-size: 17px;
  font-weight: 800;
  margin: 20px 0 8px;
}
.article p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.6;
}
.article ul,
.article ol {
  margin: 0 0 14px;
  padding-left: 22px;
  line-height: 1.6;
}
.article li {
  margin-bottom: 6px;
}
.article em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

/* Team tasks grid (desktop) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  align-items: start;
}
.team-col {
  background: var(--bg);
  border-radius: 16px;
  padding: 4px 4px 8px;
}
.team-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 800;
}
.team-col-head .n {
  color: var(--muted);
  font-weight: 700;
}
.team-col-body .task {
  margin-bottom: 8px;
}
.team-col-body .muted-note {
  padding: 4px 12px 8px;
}

/* ---- Icon delete button + detail actions ------------------------------- */
.icon-btn {
  min-height: 48px;
  width: 48px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  color: var(--muted);
}
.icon-btn:active {
  transform: scale(0.96);
}
.icon-btn.danger {
  color: var(--red);
  border-color: var(--red-soft);
  background: var(--red-soft);
}
.icon-btn .ic {
  width: 20px;
  height: 20px;
}
.detail-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.detail-actions .btn {
  flex: 1;
}
.sheet-actions .icon-btn {
  flex: 0 0 auto;
}

/* ---- Confirm dialog ---------------------------------------------------- */
.confirm-sheet {
  max-width: 420px;
  text-align: center;
}
.confirm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.confirm-icon .ic {
  width: 30px;
  height: 30px;
}
.confirm-icon.danger {
  background: var(--red-soft);
  color: var(--red);
}
.confirm-icon.warn {
  background: var(--amber-soft);
  color: var(--amber);
}
.confirm-card h2 {
  margin: 0;
}
.confirm-msg {
  color: var(--muted);
  font-size: 16px;
  margin: 8px 0 4px;
  line-height: 1.4;
}
.confirm-actions {
  width: 100%;
  margin-top: 18px;
}

/* ---- Activity event rows ---------------------------------------------- */
.act-row.event {
  align-items: center;
}
.act-ev-ico {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.act-ev-ico .ic {
  width: 20px;
  height: 20px;
}

/* ---- Team-goal inline header (My Goals / Team Goals) ------------------- */
.tg-inline {
  width: 100%;
  text-align: left;
  background: var(--accent-soft);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 14px var(--pad);
  margin: 6px 0 12px;
  cursor: pointer;
}
.tg-inline:active {
  transform: scale(0.997);
}
.tg-inline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tg-inline h3 {
  font-size: 20px;
  margin: 6px 0 8px;
}
.tg-inline .chev {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}
.tg-measure {
  margin-top: 8px;
}
.tg-measure-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.progress.sm {
  height: 7px;
  margin-top: 6px;
}
.progress.sm > span {
  background: var(--accent);
}

/* Three-way segmented toggles (e.g. Team: Goals / Team Tasks / Team Activities) */
.sort-seg button {
  min-width: 0;
  font-size: 14px;
  padding: 0 8px;
}

/* ---- Printable A3 planner ---------------------------------------------- */
#print-root { display: none; }
.pl-scaler { transform-origin: top left; }
.planner {
  background: var(--card);
  color: #16161d;
  font-family: var(--font, system-ui, sans-serif);
  padding: 4px;
  /* Print the brand colours as-is — without this, browsers drop the indigo
     header band ("Background graphics" off) and its white text turns to a
     dull grey-on-white wash. */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
/* Header — LOW and clean: WHITE band so the indigo brand pops. Identity
   left (indigo logo + wordmark, BIG ink name, indigo planner+date line);
   the school goal is THE one solid indigo block on the right. */
.pl-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  background: #fff;
  color: #16161d;
  padding: 8px 6px 14px;
  border-bottom: 3px solid #4f46e5;
}
.pl-head-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}
.pl-logo { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; letter-spacing: 0.3px; color: #4f46e5; }
.pl-logo img { width: 30px; height: 30px; border-radius: 8px; }
.pl-name {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.05;
  color: #16161d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-head-meta { font-size: 13.5px; font-weight: 700; color: #4f46e5; }
.pl-school {
  flex: 0 1 660px;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(120deg, #4f46e5, #6157f0);
  color: #fff;
  border-radius: 14px;
  padding: 13px 18px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.pl-school-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #e4e2ff;
}
.pl-school-kicker .ic { width: 13px; height: 13px; }
.pl-school-title { font-size: 19px; font-weight: 800; line-height: 1.2; color: #fff; }
.pl-school-measures { display: flex; flex-direction: column; gap: 5px; margin-top: 3px; }
.pl-sgm { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: #fff; }
.pl-sgm-label { flex: 0 0 auto; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e4e2ff; }
.pl-sgm .pl-bar { flex: 1; margin-top: 0; }
.pl-sgm-val { flex: 0 0 auto; font-weight: 800; }
.pl-bar.light { background: rgba(255, 255, 255, 0.25); }
.pl-bar.light > span { background: #fff; }
/* Overdue count badge inside the Today lane head */
.pl-ov-badge {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--red);
  background: var(--red-soft);
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: 0.3px;
}
.pl-col-head {
  display: flex; align-items: baseline; gap: 8px;
  break-after: avoid; page-break-after: avoid; break-inside: avoid;
  font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px;
  color: #4f46e5; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid #eceafe;
}
.pl-col-head span { font-size: 12.5px; font-weight: 700; color: #9a9aa5; letter-spacing: 0.5px; }
.pl-col-head.notes { color: #6b6b78; border-bottom-color: #e6e6ec; }
/* Dashboard: day lanes side by side + a Notes lane */
.pl-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 14px; align-items: stretch; }
.pl-lane { display: flex; flex-direction: column; min-width: 0; }
.pl-notes-lane .pl-notes-area {
  flex: 1; min-height: 460px; border: 1px solid #d6d3ff; border-radius: 8px; background: #fff;
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 31px, #e9e7fb 31px, #e9e7fb 32px);
}
/* Team-goals strip across the bottom */
.pl-tgstrip { margin-top: 16px; }
.pl-tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pl-card {
  border: 1px solid #e6e6ec; border-left: 4px solid #4f46e5; border-radius: 0 8px 8px 0;
  padding: 10px 12px; margin: 0 0 12px; break-inside: avoid; page-break-inside: avoid; background: #fff;
}
.pl-task { display: flex; align-items: flex-start; gap: 10px; }
.pl-task-main { flex: 1; min-width: 0; }
.pl-box {
  width: 17px; height: 17px; border: 1.5px solid #888; border-radius: 4px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; line-height: 1;
}
.pl-box.lg { width: 20px; height: 20px; border-width: 2px; border-color: #16161d; margin-top: 1px; }
.pl-box.on { background: #4f46e5; border-color: #4f46e5; }
.pl-title { font-size: 17px; font-weight: 700; line-height: 1.25; }
.pl-title.done { text-decoration: line-through; color: #9a9aa5; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.pl-goal { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.pl-chip { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: #f1eff7; color: #555; }
.pl-chip.overdue { background: var(--red-soft); color: var(--red); }
.pl-chip.due-soon { background: var(--amber-soft); color: var(--amber); }
.pl-notes { font-size: 14px; color: #6b6b78; margin-top: 7px; background: #faf9f6; border-radius: 6px; padding: 7px 9px; line-height: 1.3; }
.pl-sec { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #9a9aa5; margin: 8px 0 4px; }
.pl-line { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 3px; }
.pl-line .done { text-decoration: line-through; color: #9a9aa5; }
.pl-comment { font-size: 14px; color: #444; margin-bottom: 3px; }
.pl-cwho { font-weight: 700; }
.pl-empty { font-size: 14.5px; color: #b4b2a9; font-style: italic; padding: 2px 2px 10px; }
.pl-tg {
  border: 1px solid #d6d3ff; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px;
  break-inside: avoid; page-break-inside: avoid; background: #f6f5ff;
}
.pl-tg-title { font-size: 17px; font-weight: 800; }
.pl-tg-sub { font-size: 13px; font-weight: 700; color: #9a9aa5; }
.pl-areas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pl-area { font-size: 12px; font-weight: 800; border: 1px solid; border-radius: 999px; padding: 2px 9px; }
.pl-tg-meta { font-size: 13.5px; color: #6b6b78; margin-top: 3px; }
.pl-tg-measure { font-size: 14px; color: #4f46e5; font-weight: 700; margin-top: 7px; }
.pl-bar { height: 7px; background: #eceafe; border-radius: 999px; margin-top: 5px; overflow: hidden; }
.pl-bar > span { display: block; height: 100%; background: #4f46e5; border-radius: 999px; }
.pl-quote {
  margin: 4px 4px 0; padding: 14px 20px; border-left: 4px solid #4f46e5;
  background: #f6f5ff; border-radius: 0 10px 10px 0;
  font-size: 19px; font-style: italic; color: #3730a3; break-inside: avoid;
}
.pl-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid #e6e6ec;
  font-size: 12.5px; color: #9a9aa5;
}
.pl-foot span:last-child { font-style: italic; }

@media print {
  @page { size: A3 landscape; margin: 12mm; }
  body.printing > #app,
  body.printing > #modal-root,
  body.printing > #tabbar-root,
  body.printing #build-stamp,
  body.printing .toast { display: none !important; }
  body.printing #print-root { display: block !important; }
  body.printing { background: #fff; }
  body.printing #print-root * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ---- Build/version stamp ---------------------------------------------- */
.build-stamp {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 60;
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
  opacity: 0.5;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}
/* On mobile the plain version text sits at the very bottom of the page (in flow,
   seen when you scroll down) so it never hovers over a card. */
body[data-mode="mobile"] .build-stamp {
  position: static;
  right: auto;
  left: auto;
  bottom: auto;
  text-align: center;
  padding: 8px 0 calc(80px + env(safe-area-inset-bottom, 0px));
}
.build-stamp.update {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
/* The "new version" prompt stays hovering near the bottom (it vanishes on tap). */
body[data-mode="mobile"] .build-stamp.update {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  padding: 8px 14px;
}

/* ---- Meeting dashboard (TV, landscape) --------------------------------- */
.mtg-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.mtg-badge.live { background: var(--red-soft); color: var(--red); }
.mtg-badge.ended { background: var(--line); color: var(--muted); }
.mtg-badge.live { animation: mtgpulse 2s ease-in-out infinite; }
@keyframes mtgpulse { 0%,100% { opacity: 1 } 50% { opacity: 0.55 } }

/* Banner on My Tasks */
.mtg-banner {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--red-soft); border-left: 4px solid var(--red);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px var(--pad);
  margin-bottom: 12px; cursor: pointer;
}
.mtg-banner-title { font-weight: 800; font-size: 17px; flex: 1; min-width: 0; }
.mtg-banner-cta { color: var(--accent); font-weight: 800; font-size: 15px; white-space: nowrap; }

/* Full-screen dashboard */
.mtg-dash {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg); overflow: hidden;
}
.mtg-scale {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 22px; box-sizing: border-box;
  transform-origin: top left;
}
.mtg-fail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; font-size: 20px; color: var(--muted); }
/* Text-size segmented control */
.mtg-seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.mtg-seg button { width: 44px; min-height: 44px; font-weight: 800; color: var(--muted); line-height: 1; }
.mtg-seg button.on { background: var(--accent); color: #fff; }
/* Member snapshot summary + detail rows */
.mtg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.mtg-stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; }
.mtg-stat b { display: block; font-size: 22px; font-weight: 800; }
.mtg-stat span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.mtg-stat.doing b { color: var(--amber); }
.mtg-stat.overdue b { color: var(--red); }
.mtg-stat.done b { color: var(--green); }
.mtg-mem-tmain { flex: 1; min-width: 0; }
.mtg-mem-trow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mtg-mem-bits { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; }
.mtg-mem-bit { font-size: 12px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.mtg-mem-bit .ic { width: 13px; height: 13px; }
.mtg-mem-note { font-size: 12px; color: var(--muted); font-style: italic; }
.mtg-mem-goalmeta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.mtg-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mtg-title-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mtg-title-wrap h1 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.mtg-time { font-size: 14px; color: var(--muted); font-weight: 600; }
.mtg-people { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; justify-content: center; }
.mtg-person { display: flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; font-weight: 700; box-shadow: var(--shadow); }
.mtg-pname { font-size: 14px; }
.mtg-openn { background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.mtg-controls { display: flex; gap: 10px; }
.mtg-controls .btn.sm { min-height: 44px; }

.mtg-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; min-height: 0; }
.mtg-grid.split { grid-template-columns: 1fr 1fr; }
.mtg-col { min-height: 0; display: flex; flex-direction: column; }
.mtg-col.side { border-left: 1px solid var(--line); padding-left: 18px; }
.mtg-sec-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent); margin: 6px 0 12px; }
.mtg-sec-head .mtg-n { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 1px 10px; font-size: 13px; }
.mtg-cards { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-content: start; }
.mtg-activity { flex: 1; overflow-y: auto; }
.mtg-empty { color: var(--muted); font-size: 16px; padding: 18px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; }

.mtg-task { display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; }
.mtg-task.done { opacity: 0.75; }
.mtg-check { width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 8px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; margin-top: 1px; }
.mtg-check.on { background: var(--green); border-color: var(--green); }
.mtg-task-main { flex: 1; min-width: 0; }
.mtg-task-title { font-size: 19px; font-weight: 800; line-height: 1.25; }
.mtg-task.done .mtg-task-title { text-decoration: line-through; color: var(--muted); }
.mtg-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: var(--line); padding: 2px 7px; border-radius: 6px; vertical-align: middle; }
.mtg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.mtg-goal { font-size: 13px; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.mtg-owner { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 3px 11px 3px 4px; border-radius: 999px; }
.mtg-owner.none { background: var(--line); color: var(--muted); padding: 4px 11px; }
.mtg-due { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--line); color: var(--muted); }
.mtg-due.due-now, .mtg-due.due-soon { background: var(--amber-soft); color: var(--amber); }
.mtg-due.overdue { background: var(--red-soft); color: var(--red); }
.mtg-st { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 10px; border-radius: 999px; margin-left: auto; }
.mtg-st.todo { background: var(--line); color: var(--muted); }
.mtg-st.doing { background: var(--accent-soft); color: var(--accent); }
.mtg-st.done { background: var(--green-soft); color: var(--green); }

.mtg-goalrow { display: flex; flex-wrap: wrap; gap: 10px; }
.mtg-goalchip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; border: 1.5px solid; border-radius: 999px; padding: 6px 14px; background: var(--card); }
.mtg-goalchip .ic { width: 16px; height: 16px; }

.mtg-act { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.mtg-act-ico { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.mtg-act-ico .ic { width: 16px; height: 16px; }
.mtg-act-body { min-width: 0; }
.mtg-act-who { font-weight: 800; font-size: 14px; }
.mtg-act-kind { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; }
.mtg-act-text { font-size: 15px; margin-top: 2px; }
.mtg-act-on { color: var(--muted); }
.mtg-foot { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; }

@media (max-width: 900px) {
  .mtg-grid { grid-template-columns: 1fr; }
  .mtg-col.side { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .mtg-title-wrap h1 { font-size: 24px; }
}

/* Meeting: selectable participant + expanded member snapshot */
.mtg-person { cursor: pointer; transition: transform 0.06s ease; }
.mtg-person:active { transform: scale(0.97); }
.mtg-person.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mtg-person.on .mtg-openn { background: rgba(255,255,255,0.25); color: #fff; }
.mtg-back { min-height: 34px !important; padding: 0 12px !important; font-size: 13px !important; }
.mtg-mem { flex: 1; overflow-y: auto; }
/* Goals + sub-goals on the TV snapshot: a grid of small square cards, like
   the sub-goal grid on mobile — not full-width strips. */
.mtg-mem-goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mtg-mem-goalcard { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 10px 12px; }
.mtg-mem-goalt { font-weight: 800; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mtg-mem-measure { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.mtg-mini-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.mtg-mini-bar > span { display: block; height: 100%; border-radius: 999px; }
.mtg-mem-tn { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 6px; }
.mtg-mem-sec { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 12px 0 6px; }
.mtg-mem-task { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.mtg-mem-task.done { opacity: 0.65; }
.mtg-mem-task.done .mtg-mem-title { text-decoration: line-through; color: var(--muted); }
.mtg-mem-dot { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 auto; background: var(--muted); }
.mtg-mem-dot.doing { background: var(--amber); }
.mtg-mem-dot.done { background: var(--green); }
.mtg-mem-dot.todo { background: var(--line); border: 2px solid var(--muted); box-sizing: border-box; }
.mtg-mem-title { flex: 1; min-width: 120px; font-size: 16px; font-weight: 700; }
.mtg-mem-notes { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 7px 10px; margin-top: 8px; }
.mtg-mem-block { margin-top: 10px; }
.mtg-mem-blabel { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); font-weight: 800; margin-bottom: 5px; }
.mtg-mem-line { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.mtg-mem-line.muted { color: var(--muted); font-style: italic; }
.mtg-mem-line .strike { text-decoration: line-through; color: var(--muted); }
.mtg-mem-line .mtg-mem-due { margin-left: auto; }
.mtg-mem-cbx { width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 4px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.mtg-mem-cbx.on { background: var(--accent); border-color: var(--accent); }
.mtg-mem-cmt { font-size: 14px; margin-bottom: 5px; line-height: 1.4; }
.mtg-mem-upd { color: var(--accent); font-weight: 800; }
.mtg-mem-recur { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.mtg-mem-recur .ic { width: 13px; height: 13px; color: var(--muted); vertical-align: -2px; }
.mtg-mem-goal { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.mtg-mem-due { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; }
.mtg-mem-due.due-now, .mtg-mem-due.due-soon { background: var(--amber-soft); color: var(--amber); }
.mtg-mem-due.overdue { background: var(--red-soft); color: var(--red); }

/* Colour picker (goals + projects) — 4 contrasting swatches at a time */
.color-pick { display: flex; gap: 12px; }
.color-pick .swatch {
  width: 52px; height: 52px; border-radius: 14px;
  border: 3px solid transparent; cursor: pointer; flex: 0 0 auto;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.linkbtn {
  margin-top: 10px; background: none; border: none; padding: 4px 2px;
  color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.linkbtn .ic { width: 14px; height: 14px; }

/* Date field + custom calendar (desktop) */
.date-field {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--card);
  color: var(--ink);
  font-size: 18px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.date-field:hover { border-color: var(--border-accent); }
.date-field .date-val.muted { color: var(--muted); }
.date-field > .ic { color: var(--muted); flex: 0 0 auto; }
.cal-pop {
  position: fixed;
  z-index: 60;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(15, 16, 25, 0.22);
  padding: 14px;
  animation: slideup 0.14s ease;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-weight: 800; font-size: 16px; color: var(--ink); }
.cal-nav {
  width: 34px; height: 34px; border-radius: 10px; border: none;
  background: var(--line); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cal-nav:hover { background: var(--border-accent); }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-cell {
  min-width: 0;
  height: 38px;
  border: none; background: none; cursor: pointer;
  border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.cal-cell.empty { visibility: hidden; cursor: default; }
.cal-cell:hover { background: var(--accent-soft); }
.cal-cell.today { color: var(--accent); font-weight: 800; box-shadow: inset 0 0 0 2px var(--border-accent); }
.cal-cell.sel, .cal-cell.sel:hover { background: var(--accent); color: #fff; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.cal-link { background: none; border: none; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; padding: 4px 6px; }

.team-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); flex: 0 0 auto;
}

/* Reports */
.rpt-fbuild {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px; margin-bottom: 10px;
}
.rpt-fbuild-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rpt-fbuild-top select { flex: 1; }
.rpt-fbuild input[type="text"] { width: 100%; margin-bottom: 8px; }
.rpt-freq { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.rpt-freq input { width: 18px; height: 18px; }
.rpt-fill.card { padding: 4px 16px 16px; }
.rpt-ans { display: flex; gap: 10px; padding: 5px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.rpt-ans:last-of-type { border-bottom: none; }
.rpt-ans-q { color: var(--muted); font-weight: 700; flex: 0 0 42%; }
.rpt-ans-v { flex: 1; }

/* Projects */
.project-card .proj-ico { display: inline-flex; }
.project-card .proj-ico .ic { width: 22px; height: 22px; }
.proj-ico.lg .ic { width: 30px; height: 30px; }

/* Stats / gamification card */
.stats-card { padding: 14px 16px; }
.stats-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stats-level { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--accent); }
.stats-level .ic { width: 16px; height: 16px; }
.stats-points { font-size: 13px; font-weight: 700; color: var(--muted); }
.stats-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stats-row .stat {
  flex: 1; min-width: 74px; text-align: center;
  background: var(--accent-soft); border-radius: 12px; padding: 8px 6px;
}
.stats-row .stat b { display: block; font-size: 20px; font-weight: 800; color: var(--ink); }
.stats-row .stat b .ic { width: 16px; height: 16px; vertical-align: -2px; }
.stats-row .stat span { font-size: 11px; font-weight: 700; color: var(--muted); }
.stats-row .stat.warn { background: var(--red-soft); }
.stats-row .stat.warn b { color: var(--red); }
.stats-row .stat.hot b { color: #ea580c; }
.stats-ontime { margin-top: 12px; }
.badge-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 4px 10px;
}
.badge-pill .ic { width: 13px; height: 13px; }
.badge-pill.sm { padding: 3px; }

/* Team scoreboard */
.score-head, .score-row {
  display: grid; grid-template-columns: 32px 30px 1fr auto auto;
  align-items: center; gap: 10px; padding: 10px 12px;
}
.score-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.score-head .score-name { grid-column: 2 / 4; }
.score-row {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 8px;
}
.score-rank { font-size: 18px; font-weight: 800; text-align: center; }
.score-name { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.score-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.score-meta .ic { width: 12px; height: 12px; vertical-align: -2px; }
.score-points { font-weight: 800; font-size: 18px; color: var(--accent); min-width: 40px; text-align: right; }

/* ---- v3 restructure: unified goals, school banners, drill-ins ------------- */

/* Compact measure rows (cards, banners, goal pages) */
.m-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 7px 0;
  min-width: 0;
}
.m-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  flex: 0 1 auto;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-bar {
  flex: 1;
  min-width: 40px;
}
.m-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.m-rows {
  margin: 8px 0 4px;
}
.card-foot {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  min-height: 16px;
}
.card-foot .overdue { color: var(--red); font-weight: 700; }
.card-foot .due-soon { color: var(--amber); font-weight: 700; }
.card-owner {
  margin-left: auto;
  flex: none;
}
.goal-card2 .goal-head-row h2,
.goal-card2 .goal-head-row h3 {
  flex: 1;
  min-width: 0;
}

/* Goal marker: icon tinted in the goal's colour (falls back to .gdot) */
.gmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.gmark .ic { width: 18px; height: 18px; }
.gmark.lg .ic { width: 24px; height: 24px; }

/* School-goal banner (the lighthouse) */
.sg-banner { width: 100%; text-align: left; }
.sg-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sg-ico {
  display: inline-flex;
  color: var(--accent);
}
.sg-ico .ic { width: 20px; height: 20px; }
.sg-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  flex: 1;
}
.sg-pct {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.sg-banner h2 {
  font-size: 20px;
  margin: 6px 0 2px;
}
.sg-foot {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}
.sg-banner .chev { color: var(--muted); font-size: 20px; }
.sg-banner .m-label { color: var(--ink); opacity: 0.75; }

/* Breadcrumb trail on drill-ins */
.crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 2px 12px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  min-width: 0;
  max-width: 46vw;
}
.crumb-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumb-sg {
  background: var(--accent-soft);
  border-color: var(--border-accent);
  color: var(--accent);
}
.crumb-sep {
  color: var(--muted);
  display: inline-flex;
  flex: none;
}
.crumb-sep .ic { width: 13px; height: 13px; }
body[data-mode="desktop"] .crumb { max-width: 300px; }

/* Lineage line: "under parent" on deep sub-goal cards */
.lineage {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0 0 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact rows for sub-goals / projects inside a drill-in */
.row-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin: 0 0 8px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
}
.row-item:active { transform: scale(0.99); }
.row-title {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-ava { flex: none; display: inline-flex; }
.row-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.row-val .overdue { color: var(--red); }
.row-val .due-soon { color: var(--amber); }
.row-item .chev { color: var(--muted); font-size: 18px; flex: none; }

/* Goal page (drill-in) full card */
.goal-page-card { margin-bottom: 4px; }
.goal-page-card .goal-head-row h2 { flex: 1; min-width: 0; }
.goal-page-wrap { max-width: 640px; }

/* Icon picker in goal forms */
.icon-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ipill {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}
.ipill .ic { width: 20px; height: 20px; }
.ipill.on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Measures editor rows in goal forms */
.m-edit {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px 12px 2px;
  margin: 0 0 10px;
}
.m-edit .field { margin-bottom: 10px; }

/* Sidebar school-goal quick links */
.nav-ico { display: inline-flex; flex: none; }
.nav-ico .ic { width: 15px; height: 15px; }
.nav-goal.nav-school .nav-goal-title { font-weight: 800; }

/* Status pill (To-do → Ongoing → Done) + done chip */
.chip.done {
  background: var(--green-soft);
  color: var(--green);
  border-color: transparent;
}
button.chip.status-pill {
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
button.chip.status-pill:active { transform: scale(0.96); }

/* Role chips on Team-view goal cards: Owner / Helper / someone else's */
.chip.role {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  flex: none;
  margin-left: auto;
}
.chip.role + .card-owner { margin-left: 8px; }
.chip.role-owner {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.chip.role-helper {
  background: var(--green-soft);
  color: var(--green);
  border-color: transparent;
}
/* ---- 2.0 star (shared priority), helping toggle, search ---------------- */
.task.is-starred {
  border-left: 3px solid var(--amber);
}
.star-mark {
  color: var(--amber);
  margin-right: 5px;
  display: inline-flex;
  vertical-align: -2px;
}
.star-mark .ic,
.star-head .ic {
  width: 15px;
  height: 15px;
}
.section-head.star-head h3 {
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.star-btn {
  margin-left: auto;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--bg);
}
.star-btn.on {
  color: var(--amber);
  background: var(--amber-soft);
}
.star-btn .ic {
  width: 20px;
  height: 20px;
}
.star-btn.on .ic {
  fill: currentColor;
}
.chip.star-chip {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: transparent;
}
.helping-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 2px 12px;
  cursor: pointer;
}
.helping-check .hc-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.8px solid var(--line);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
}
.helping-check.on {
  color: var(--ink);
}
.helping-check.on .hc-box {
  background: var(--accent);
  border-color: var(--accent);
}
.helping-check .hc-n {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border-radius: 99px;
  padding: 2px 9px;
}
.search-wrap input[type="search"] {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 17px;
}
.search-out {
  max-height: 48vh;
  overflow-y: auto;
  margin-top: 4px;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}
.search-row .ic {
  width: 14px;
  height: 14px;
  color: var(--amber);
  flex: none;
}
.search-row span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-row .sr-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* pins (personal, per-view) + goal helper-filter chips */
.pin-wrap {
  position: relative;
}
.pin-wrap .pin-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.55;
}
.pin-wrap .pin-toggle.on {
  color: var(--accent);
  background: var(--accent-soft);
  opacity: 1;
}
.section-head.pin-head h3 {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.person-chips {
  margin: 2px 0 12px;
  flex-wrap: wrap;
}
.chip.pchip {
  background: var(--card);
  border: 1.5px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  padding: 6px 13px;
}
.chip.pchip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip.role-other {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

/* Goal clusters on the Team view: a goal + its sub-goals stick together.
   Mobile: tight stack inside a group, larger gap between groups. */
.goal-group {
  margin: 0 0 22px;
}
.goal-group .card {
  margin-bottom: 8px;
}
.goal-group .card:last-child {
  margin-bottom: 0;
}
/* Desktop: each group is its own column in the grid, gutters between groups. */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
  margin: 0 0 24px;
}
.group-grid .goal-group {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* School Goal Areas — the school goal's sub-parts, used as tags on goals.
   Section header (Team view + school goal page): dot, name, descriptor. */
.area-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 22px 2px 12px;
}
.area-head:first-child { margin-top: 0; }
.area-head .area-dot { margin-top: 5px; }
.area-head-txt { flex: 1; min-width: 0; }
.area-head h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.2px;
}
.area-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}
.area-head .n {
  background: var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 9px;
  margin-top: 3px;
}
.area-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: none;
  background: var(--accent);
}
/* Tag chips on goal cards/pages: one row of their own directly under the
   goal name, aligned past the colour marker so they read with the title. */
.chip.area {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 3px 12px;
  min-height: 0;
  white-space: nowrap;
}
.goal-card2 .area-chips { margin: 2px 0 10px 22px; }
.goal-card2.sm .area-chips { margin-left: 0; }
.goal-card2.sm .chip.area { font-size: 11.5px; padding: 2px 9px; }
.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 8px;
}
/* Area pills in the goal form: tinted with the area's colour when selected */
.pill.area-pill.on {
  background: var(--ac, var(--accent));
  border-color: var(--ac, var(--accent));
  color: #fff;
}

/* Scoreboard "how to score" tips */
.score-tips { margin-top: 16px; }
.score-tips ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.score-tips li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}
.score-tip-pts {
  flex: none;
  min-width: 42px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--line);
}
.score-tip-pts.hot { background: var(--accent); color: #fff; }
.score-tip-pts.warn { background: var(--red-soft, #fee2e2); color: var(--red, #dc2626); }
.score-tips-why {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
}
/* ⚡ instant-completion marker on scoreboard rows — sunlight on farming */
.score-instant { color: var(--amber, #b45309); font-weight: 800; white-space: nowrap; }

/* Level-2+ sub-goals in a cluster: smaller (.sm sizing), clearly narrower
   and deeply indented so the level 0/1 spine stays the loudest thing. */
.goal-group .goal-card2.sub {
  margin-left: 44px;
  margin-right: 10px;
}
.goal-group .card.goal-card2.sub {
  width: calc(100% - 54px);
}
.tile.goal-card2.sub .lineage {
  font-size: 11px;
}

/* Tree location picker (replaces parent <select>s in forms) */
.tree-pick .tp-filter {
  width: 100%;
  margin-bottom: 8px;
}
.tree-pick .tp-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  max-height: 264px;
  overflow-y: auto;
}
.tp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  padding-left: calc(12px + var(--ind, 0) * 20px);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  min-height: 42px;
}
.tp-row:last-child { border-bottom: none; }
.tp-row.on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tp-row.tp-school {
  font-weight: 800;
}
.tp-row.tp-none {
  color: var(--muted);
  font-weight: 600;
}
.tp-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-sub {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tp-row.on .tp-sub { color: var(--accent); }

/* Tiny parent marks inside lineage lines and parent chips */
.gmark.xs { display: inline-flex; vertical-align: -2px; }
.gmark.xs .ic { width: 13px; height: 13px; }
.gdot.xs {
  width: 8px;
  height: 8px;
  display: inline-block;
  vertical-align: 0;
}
.chip.parent-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lineage .gmark,
.lineage .gdot {
  margin: 0 1px;
}

/* Compact level-1 goal cards on My Goals: visibly smaller than the school
   banner so level 0 → level 1 reads without thinking. */
.goal-card2.sm {
  padding: 13px 15px;
}
.goal-card2.sm .goal-head-row h2 {
  font-size: 16.5px;
}
.goal-card2.sm .m-row {
  margin: 5px 0;
}
.goal-card2.sm .m-label,
.goal-card2.sm .m-val {
  font-size: 12px;
}
.goal-card2.sm .card-foot {
  font-size: 12px;
  margin-top: 6px;
}
/* "N of yours inside" — why a goal you don't own is on your list */
.card-foot .inside-note {
  color: var(--accent);
  font-weight: 700;
}

/* Sub-goal mini cards in drill-ins: 2-3 lines — title+role, measure bar,
   contents + personal alerts. Laid out as a two-column grid of smaller
   cards (wider columns auto-fit on desktop); a lone sub-goal spans full width. */
.subgoal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.subgoal-grid > :only-child {
  grid-column: 1 / -1;
}
body[data-mode="desktop"] .subgoal-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.subgoal-grid .row-item.subgoal-card {
  margin: 0;
  height: 100%;
}
.row-item.subgoal-card {
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 11px 12px;
}
.subgoal-card .row-title {
  font-size: 13.5px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.subgoal-card .sgc-foot {
  font-size: 11.5px;
}
/* Same rollup line on task cards, separated from the chips by a soft rule */
.sgc-foot.task-foot {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}

/* List-template picker rows (add-list sheet + template manager) */
.tpl-pick {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  max-height: 240px;
  overflow-y: auto;
}
.tpl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}
.tpl-row:last-child { border-bottom: none; }
.tpl-row.readonly { cursor: default; }
.tpl-ico {
  color: var(--accent);
  display: inline-flex;
  flex: none;
}
.tpl-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tpl-title {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tpl-sub { font-size: 12px; color: var(--muted); }
.tpl-check { opacity: 0; color: var(--accent); font-weight: 800; flex: none; }
.tpl-row.on { background: var(--accent-soft); }
.tpl-row.on .tpl-check { opacity: 1; }
.xbtn.tpl-save { color: var(--accent); }

/* Task meta as a tight 2×2 grid — each tile IS its own edit button */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.meta-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.meta-tile.readonly { cursor: default; }
.meta-tile:not(.readonly):active { transform: scale(0.98); }
.mt-k {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}
.mt-edit {
  margin-left: auto;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0;
}
.mt-v {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
}
.mt-v .chip { margin: 0; }
.mt-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-muted {
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
}

/* One compact row of small add buttons inside the task pop-up */
.task-add-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.task-add-row .btn.sm {
  flex: 1;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  border-style: dashed;
  color: var(--accent);
}
.sgc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sgc-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.subgoal-card .chip.role {
  margin-left: 0;
}
.subgoal-card .m-row {
  margin: 0;
}
.sgc-foot {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.7;
}
.sgc-foot .overdue { color: var(--red); }
.sgc-foot .due-soon { color: var(--amber); }
.alert-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: 1px;
}
.sgc-foot .inside-note {
  color: var(--accent);
  font-weight: 700;
  margin-left: 6px;
}

/* Small contextual ＋ in section headers (drill-ins) — sits right next to the
   header text, not pushed to the far edge. */
.icon-add {
  margin-left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--accent);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  align-self: center;
}
.icon-add:active { transform: scale(0.92); }
/* Universal header ＋: a circle in the topbar / content head, accent-filled so
   it reads as THE add button for whatever screen is open. */
.icon-add.lg {
  width: 36px;
  height: 36px;
  font-size: 20px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}
.head-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.head-row .crumbs { flex: 1; margin-bottom: 12px; }
/* The backlink is a <button>: stretched by flex:1, its UA text-align:center
   floated the label to the middle of the page — pin it left. */
.head-row .backlink { flex: 1; text-align: left; }
.head-row .icon-add.lg { margin: 0 0 12px; }

/* Personal tasks read as private at a glance: dashed card + a lock chip */
.task.is-personal {
  border-style: dashed;
}
.chip.personal {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  font-weight: 700;
}

/* Gamification demoted to a one-line footer under the stats */
.stats-foot {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-foot .ic { width: 14px; height: 14px; color: var(--amber); }
.add-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 4px;
}
.add-menu .btn {
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-chip.overdue {
  background: var(--red-soft);
  color: var(--red);
}
.alert-chip.soon {
  background: var(--amber-soft);
  color: var(--amber);
}

/* ===========================================================================
   Admissions — pipeline board, contacts, visits, targets, embed-adjacent bits.
   =========================================================================== */
/* Sheet form shorthand used by admissions sheets: like .field, lighter markup */
.fld {
  display: block;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.fld input,
.fld select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.fld input:focus,
.fld select:focus {
  outline: none;
  border-color: var(--accent);
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 72px auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.row2 > input,
.row3 > input,
.row3 > select {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--ink);
}

/* Mobile header + floating add button */
.mob-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-top)) var(--pad) 10px;
}
.mob-head h1 {
  margin: 0;
  font-size: 24px;
}
.mob-head select {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
/* Header tools (desktop) */
.adm-head-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.adm-head-tools select {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
}
.adm-views button {
  white-space: nowrap;
}

/* Pipeline board */
.adm-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 18px;
}
.adm-col {
  flex: 0 0 236px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 180px;
}
.adm-col.drop {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.adm-col.is-enrolled {
  background: var(--green-soft);
}
.adm-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink);
  padding: 6px 6px 10px;
}
.adm-col-head .n {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 15px;
  font-weight: 800;
}
.adm-col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.adm-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.adm-card.is-hot {
  border-color: var(--red);
}
.adm-card:active {
  transform: scale(0.99);
}
.adm-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.adm-card-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.adm-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 6px;
}
.adm-temp {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.adm-temp.hot { background: var(--red-soft); color: var(--red); }
.adm-temp.warm { background: var(--amber-soft); color: var(--amber); }
.adm-temp.cold { background: var(--blue-soft); color: var(--blue); }
.adm-temp.nurture { background: var(--accent-soft); color: var(--accent); }

/* Lead / family sheets */
.adm-lead-head h2 { margin: 0 0 6px; }
.adm-lead-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chip.stage { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.adm-contact-row {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.adm-contact-row .btn { text-decoration: none; }
.adm-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.adm-stage-actions { flex-wrap: wrap; }
.btn.danger-ghost { color: var(--red); border-color: var(--red-soft); }
.adm-timeline { max-height: 300px; overflow-y: auto; }
.adm-tl-row {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  width: 100%;
  text-align: left;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: var(--ink);
  display: block;
}
.adm-tl-row.tappable { cursor: pointer; }
.adm-tl-date {
  color: var(--muted);
  font-size: 12px;
  margin-right: 8px;
  white-space: nowrap;
}

/* Visit slot picker */
.adm-slot-day {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 6px;
}
.adm-slot-row { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-slot {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.adm-slot small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.adm-slot.sel {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Qualification */
.adm-qual-q { margin: 14px 0; }
.adm-qual-t { font-weight: 700; margin-bottom: 6px; }
.adm-qual-score {
  margin-top: 16px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg);
}
.adm-qual-score.good { background: var(--green-soft); color: var(--green); }
.adm-qual-score.mid { background: var(--amber-soft); color: var(--amber); }
.adm-qual-score.low { background: var(--red-soft); color: var(--red); }

/* Contacts + today lists */
.adm-search {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
}
.adm-fam-row, .adm-fu-row, .adm-visit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  padding: 12px 14px;
  cursor: pointer;
}
.adm-fam-row { display: block; }
.adm-fu-row.overdue { border-left: 4px solid var(--red); }
.adm-fu-row .ovd { color: var(--red); }
.adm-fu-acts { display: flex; gap: 6px; }
.adm-fu-acts .btn { text-decoration: none; }
.adm-visit-row.completed { opacity: 0.6; }
.adm-visit-row.no_show { border-left: 4px solid var(--amber); }
.adm-visit-acts { display: flex; gap: 6px; }

/* Targets table */
.adm-ttable {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}
.adm-ttable th, .adm-ttable td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}
.adm-ttable th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.adm-ttable input {
  width: 76px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--card);
  color: var(--ink);
}
.adm-bar {
  position: relative;
  background: var(--bg);
  border-radius: 8px;
  height: 22px;
  min-width: 130px;
  overflow: hidden;
}
.adm-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 8px;
}
.adm-bar-fill.leads { background: var(--accent-soft); }
.adm-bar-fill.enrolled { background: var(--green-soft); }
.adm-bar span {
  position: relative;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  display: inline-block;
}
.adm-wrap.mob { padding: 0 var(--pad) 120px; }
.adm-wrap.mob .adm-card { margin-bottom: 8px; }

/* Admissions v2: insights, tags, campaigns */
.adm-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.adm-kpi {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.adm-kpi-v { font-size: 26px; font-weight: 800; }
.adm-kpi-l { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.adm-kpi.good .adm-kpi-v { color: var(--green); }
.adm-kpi.bad .adm-kpi-v { color: var(--red); }
.adm-panel { padding: 14px 16px; margin-bottom: 12px; }
.adm-panel h3 { margin: 0 0 10px; font-size: 15px; }
.adm-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: start;
}
.adm-row-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.adm-row-line:last-child { border-bottom: 0; }
.adm-funnel-row {
  display: grid;
  grid-template-columns: 150px 1fr 40px;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  font-size: 13.5px;
}
.adm-funnel-label { color: var(--muted); font-weight: 600; }
.adm-funnel-bar { background: var(--bg); border-radius: 6px; height: 18px; overflow: hidden; }
.adm-funnel-bar > div { height: 100%; background: var(--accent-soft); border-right: 3px solid var(--accent); }
.linklike { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0; font-size: 14px; }

.adm-tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 10px; }
.chip.adm-tag { background: var(--blue-soft); color: var(--blue); }
.chip.adm-tag-add { background: var(--bg); color: var(--muted); cursor: pointer; border: 1px dashed var(--line); }
.adm-tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.adm-tag-opt {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}
.adm-tag-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.adm-life-seg { margin-bottom: 10px; flex-wrap: wrap; }

.adm-camp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.adm-camp-head h3 { margin: 0; }
.adm-step-row {
  display: grid;
  grid-template-columns: 64px 190px 1fr auto;
  gap: 8px;
  margin: 8px 0;
}
.adm-step-row input, .adm-step-row select {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--card);
  color: var(--ink);
}

/* Admissions space: its own bottom bar. A hairline accent on top marks the
   space; the last tab exits back to core Cadence. */
.tabbar.adm-space {
  border-top: 2px solid var(--accent);
}
/* Admissions v3: space sidebar, Families engagement view */
.adm-sidebar .brand span { color: var(--accent); }
.adm-fam-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.adm-fam-filters .adm-search { margin-bottom: 0; }
.adm-fam-filters select {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
}
body[data-mode="mobile"] .adm-fam-filters { grid-template-columns: 1fr 1fr; }
body[data-mode="mobile"] .adm-fam-filters .adm-search { grid-column: 1 / -1; }
.adm-fam-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 34px;
}
.adm-selall { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); font-weight: 700; }
.adm-selall input, .adm-fam-cb { width: 18px; height: 18px; accent-color: var(--accent); }
.adm-bulkbar { display: flex; gap: 8px; align-items: center; }
.adm-bulkbar.hidden { display: none; }
.adm-fam-row2 {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.adm-fam-row2.sel { border-color: var(--accent); background: var(--accent-soft); }
.adm-fam-row2 .adm-fam-cb { margin-top: 3px; flex: 0 0 auto; }
.adm-fam-main {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  flex: 1;
  font-size: 15px;
}
.adm-fam-line1 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adm-fam-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }

/* Contacts v3: registers, source checkboxes, referral rows, add chooser */
.adm-reg-seg { margin-bottom: 12px; flex-wrap: wrap; }
.adm-src-checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.adm-src-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
}
.adm-src-opt input { width: 14px; height: 14px; accent-color: var(--accent); margin: 0; }
.adm-src-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.adm-src-mgr { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.adm-src-chip button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
  padding: 0 0 0 2px;
}
.adm-reward-row { align-items: center; gap: 10px; }
.adm-reward-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.adm-left { opacity: 0.55; }

/* Admissions selects: same custom dropdown chrome as the app's .field select
   (no native arrow, our chevron, accent focus). */
.adm-fam-filters select,
.adm-head-tools select,
.mob-head select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a8a99' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-weight: 600;
  color: var(--ink);
}
.adm-fam-filters select:hover,
.adm-head-tools select:hover,
.mob-head select:hover {
  border-color: var(--border-accent);
}
.adm-fam-filters select:focus,
.adm-head-tools select:focus,
.mob-head select:focus {
  outline: none;
  border-color: var(--accent);
}
.adm-fam-filters select option,
.adm-head-tools select option,
.mob-head select option {
  color: var(--ink);
  background: var(--card);
}

/* Custom dropdowns, buckets, playbooks, segment lists */
.adm-dd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.adm-dd:hover { border-color: var(--border-accent); }
.adm-dd .dd-chev { transform: rotate(90deg); color: var(--muted); width: 14px; height: 14px; }
.adm-dd-pop {
  position: absolute;
  z-index: 200;
  min-width: 210px;
  max-height: 340px;
  overflow-y: auto;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(20, 20, 45, 0.16);
  padding: 6px;
}
.adm-dd-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.adm-dd-opt:hover { background: var(--bg); }
.adm-dd-opt.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.adm-dd-list .adm-dd-opt { border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 6px; }

.adm-buckets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.adm-bucket {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 20px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.adm-bucket.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.adm-playbook-note {
  background: var(--amber-soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 10px;
}
/* Pipeline switcher — mirrors .adm-pipe-dash exactly (same columns, same gap)
   so every chip sits directly under its dashboard card at any width. If one
   changes columns or gap, change the other too. */
.adm-seg-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

/* Pipeline dashboard cards (above the board) — stats + a switch in one. */
.adm-pipe-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.adm-pipe-card {
  text-align: left;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.adm-pipe-card:hover { border-color: var(--accent-soft); }
.adm-pipe-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-pipe-name { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.adm-pipe-card.on .adm-pipe-name { color: var(--accent); }
.adm-pipe-big { font-size: 24px; font-weight: 800; line-height: 1; }
.adm-pipe-unit { font-size: 13px; font-weight: 700; color: var(--muted); }
.adm-pipe-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.adm-pipe-stat { font-size: 12px; color: var(--muted); font-weight: 600; }
.adm-pipe-stat b { color: var(--ink); font-weight: 800; }
.adm-pipe-stat.bad b { color: var(--red); }

/* In-pipeline dashboard (funnel / breakdowns above the list). */
/* Highlighted "What's new" link that sits in the Admissions top bar. */
.adm-wn-link {
  border: 1.5px solid var(--border-accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.adm-wn-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.adm-wn-head { margin-bottom: 16px; }
.adm-wn-head h2 { margin: 0 0 2px; }
.adm-wn-new { background: var(--accent-soft); color: var(--accent); font-weight: 800; }

/* What's new — one block per release date. */
.adm-wn-group { margin-bottom: 22px; }
.adm-wn-date { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.adm-wn-datechip {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.adm-wn-count { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: auto; }
.adm-wn-note { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
.adm-wn-block { padding: 0; overflow: hidden; }
.adm-wn-item { padding: 16px 18px; border-top: 1px solid var(--line); }
.adm-wn-item:first-child { border-top: 0; }
.adm-wn-item h3 { margin: 0 0 5px; font-size: 15.5px; }
.adm-wn-body { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0; }

/* Feature diagram (or a real screenshot dropped into /whatsnew/). */
.adm-wn-art {
  margin: 12px 0 0;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 8px;
  overflow: hidden;
}
/* Real screenshots from /whatsnew/ are the primary content; the drawn diagram
   is only a fallback. The <img> must NOT be display:none or lazy — a hidden
   lazy image never enters the viewport, so it never loads and the fallback
   would show forever. onerror removes the <img>, which un-hides the diagram. */
.adm-wn-shot { display: block; width: 100%; height: auto; border-radius: 6px; }
.adm-wn-shot + .adm-wn-svg { display: none; }
/* Cap the diagram near its drawn size — stretched full-width the labels
   balloon and it stops reading like a screenshot. */
.adm-wn-art svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.adm-wn-shot { max-width: 420px; margin: 0 auto; }
.wn-panel { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.wn-field { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.wn-sel { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.wn-accent { fill: var(--accent); }
.wn-soft { fill: var(--line); }
.wn-green { fill: var(--green); }
.wn-green-soft { fill: var(--green-soft); }
.wn-red-soft { fill: var(--red-soft); }
.wn-line { stroke: var(--line); stroke-width: 2; }
.wn-arrow { stroke: var(--accent); stroke-width: 2; fill: none; }
.wn-t { font-size: 9px; font-weight: 700; fill: var(--ink); }
.wn-xs { font-size: 7px; font-weight: 800; fill: var(--ink); letter-spacing: 0.3px; }
.wn-big { font-size: 15px; font-weight: 800; fill: var(--ink); }
.wn-dim { fill: var(--muted); }
.wn-acc { fill: var(--accent); }
.wn-red { fill: var(--red); }
.wn-inv { fill: #fff; }

/* "For example …" — the concrete use case. */
.adm-wn-use {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  line-height: 1.5;
}
.adm-wn-use b { color: var(--accent); margin-right: 4px; }
.adm-guide-wrap { display: grid; gap: 10px; }
.adm-guide-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border-color: var(--border-accent);
  background: var(--accent-soft);
}
.adm-guide-cta:hover { border-color: var(--accent); }

/* Duplicate-merge picker: keep-vs-new, chosen field by field. */
.adm-merge-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  gap: 8px;
  align-items: stretch;
  margin: 8px 0;
}
.adm-merge-k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); align-self: center; }
.adm-merge-opt {
  text-align: left;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13.5px;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.adm-merge-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.adm-merge-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.adm-merge-opt.on .adm-merge-tag { color: var(--accent); }
body[data-mode="mobile"] .adm-merge-row { grid-template-columns: 1fr 1fr; }
body[data-mode="mobile"] .adm-merge-k { grid-column: 1 / -1; }

/* Global admissions search: box in the header + a rich results dropdown. */
.adm-gsearch { position: relative; }
.adm-gsearch > .adm-search { width: 280px; max-width: 42vw; }
.adm-gsearch-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(560px, 88vw);
  max-height: 420px;
  overflow-y: auto;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  z-index: 60;
  padding: 6px;
}
.adm-gsearch-panel.hidden { display: none; }
.adm-gs-empty { padding: 14px; color: var(--muted); font-size: 14px; }
/* Badge in its own column; name and context chips stack in the second, so a
   long child/parent name can never collide with the stage chips. */
.adm-gs-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.adm-gs-row > .adm-gs-kind { grid-column: 1; grid-row: 1; margin-top: 2px; }
.adm-gs-row > .adm-gs-main { grid-column: 2; grid-row: 1; }
.adm-gs-row > .adm-gs-ctx { grid-column: 2; grid-row: 2; }
.adm-gs-row:hover { background: var(--bg); }
.adm-gs-kind {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}
.adm-gs-kind.lead { background: var(--accent-soft); color: var(--accent); }
.adm-gs-kind.parent { background: var(--green-soft); color: var(--green); }
.adm-gs-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-gs-main b { font-size: 14.5px; }
.adm-gs-main .muted-note { font-size: 12.5px; }
.adm-gs-ctx { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-start; }
body[data-mode="mobile"] .adm-gsearch > .adm-search { width: 100%; }

/* Child row inside the family sheet: name button + a remove control. */
.adm-child-main {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}

.adm-seg-dash { margin-bottom: 12px; }
.adm-seg-dash h3 { margin: 12px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; }
.adm-seg-dash .adm-kpis { margin-bottom: 4px; }
.adm-seg-funnel { margin-top: 8px; }
.adm-guide { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; display: inline-flex; }
.adm-guide:hover { color: var(--accent); }

.adm-pb-stage { margin: 12px 0; }
.adm-pb-stage-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.adm-pb-days { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.adm-pb-days input { width: 56px; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--card); color: var(--ink); }
.adm-pb-guide, .adm-pbb-text {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.adm-pb-bucket { border-top: 1px solid var(--line); padding: 12px 0; }
.adm-pb-bucket input { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card); color: var(--ink); margin-bottom: 6px; width: 100%; }
.adm-pack-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
body[data-mode="mobile"] .adm-fam-filters { grid-template-columns: 1fr 1fr; }
body[data-mode="mobile"] .adm-fam-filters .adm-dd { justify-content: space-between; }

.adm-fam-lead { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 4px; }

/* Settings view: slot builder + custom templates */
.adm-slot-builder { margin: 10px 0 14px; }
.adm-dowpick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.adm-slot-params { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) auto; gap: 10px; align-items: end; }
body[data-mode="mobile"] .adm-slot-params { grid-template-columns: 1fr 1fr; }
.adm-slot-dayrow { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.adm-slot-dayrow > b { flex: 0 0 44px; padding-top: 4px; }
.adm-slot-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-slot-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 11px; padding: 0 0 0 2px; }
.adm-ct-new { margin-top: 10px; }
.adm-ct-new input, .adm-ct-new select { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card); color: var(--ink); width: 100%; margin-bottom: 8px; }
.adm-t-total td { border-top: 2px solid var(--line); }

/* Kill number-input spinners in admissions sheets and views */
.adm-wrap input[type="number"]::-webkit-inner-spin-button,
.adm-wrap input[type="number"]::-webkit-outer-spin-button,
.sheet input[type="number"]::-webkit-inner-spin-button,
.sheet input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.adm-wrap input[type="number"], .sheet input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* Settings selects: same custom chevron as the rest of the app */
.fld select, .adm-ct-new select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a8a99' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.fld select:hover, .adm-ct-new select:hover { border-color: var(--border-accent); }
.fld select option, .adm-ct-new select option { color: var(--ink); background: var(--card); }

/* Targets table: laptop-sized numbers and bars */
body[data-mode="desktop"] .adm-ttable th { font-size: 13px; padding: 12px 14px; }
body[data-mode="desktop"] .adm-ttable td { font-size: 17px; padding: 14px; }
body[data-mode="desktop"] .adm-ttable td.adm-t-grade { font-size: 18px; font-weight: 800; }
body[data-mode="desktop"] .adm-ttable td.adm-t-num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
body[data-mode="desktop"] .adm-ttable .adm-bar { height: 34px; width: 100%; min-width: 200px; border-radius: 10px; }
body[data-mode="desktop"] .adm-ttable .adm-bar span { font-size: 15px; font-weight: 800; padding: 7px 12px; }
body[data-mode="desktop"] .adm-t-total td { font-size: 19px; }

.stamp-copy { opacity: 0.8; font-size: 12px; margin-right: 3px; }
.build-stamp:hover { opacity: 1; }
.build-stamp.copied { opacity: 1; color: var(--green); }

/* Template library: per-field copy rows */
.adm-tpl-card {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
}
.adm-tpl-card.installed { border-color: var(--green); }
.adm-tpl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.adm-tpl-field {
  display: grid;
  grid-template-columns: 110px 1fr 34px;
  gap: 8px;
  align-items: start;
  padding: 5px 0;
  border-top: 1px solid var(--line);
}
.adm-tpl-k { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); padding-top: 2px; }
.adm-tpl-v { font-size: 13.5px; }
.adm-tpl-v.pre { white-space: pre-wrap; }
.adm-tpl-copy {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 8px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 13px;
}
.adm-tpl-copy:hover { border-color: var(--accent); color: var(--accent); }
.adm-tpl-copy.done { border-color: var(--green); color: var(--green); }
body[data-mode="mobile"] .adm-tpl-field { grid-template-columns: 80px 1fr 34px; }

/* ---- Emotional Safety Champions (ESC) -------------------------------------- */
.esc-rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 2px 7px;
  margin-right: 2px;
}
.esc-rank.lg { font-size: 14px; padding: 3px 9px; }
.esc-badge { border: none; cursor: pointer; font-weight: 700; }
.esc-badge.tier-Core { background: var(--red-soft); color: var(--red); }
.esc-badge.tier-Strong { background: var(--amber-soft); color: var(--amber); }
.esc-badge.tier-Supporting { background: var(--accent-soft); color: var(--accent); }
.esc-grade { font-weight: 800; min-width: 26px; text-align: center; }
.esc-grade.g-A { background: var(--green-soft); color: var(--green); }
.esc-grade.g-B { background: var(--amber-soft); color: var(--amber); }
.esc-grade.g-C { background: var(--accent-soft); color: var(--muted); }
.esc-squads { margin: 10px 2px; }
.esc-squad {
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: var(--card);
}
.esc-squad.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.esc-mini { font-size: 11px; padding: 1px 7px; }
.esc-play {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  margin: 10px 0;
}
.esc-checklist { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 12px; }
.esc-check {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 14px;
}
.esc-check.on { border-color: var(--green); background: var(--green-soft); }
.esc-reflead { display: block; width: 100%; text-align: left; margin: 4px 0; }

/* ---- Bulk move (admin select mode) ----------------------------------------- */
.bulk-sel { outline: 2.5px solid var(--accent); outline-offset: -1px; border-radius: 14px; }
#bulk-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 60;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
#bulk-bar .bb-count { font-weight: 800; font-size: 14px; }
body[data-mode="mobile"] #bulk-bar { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ---- A/E lead score chips --------------------------------------------------- */
/* 2.0 A·E lozenge — one pill, colored by the DERIVED temperature (eagerness
   first, else alignment): hot coral, warm amber, cold slate. */
.chip.ae-loz {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-color: transparent;
  white-space: nowrap;
}
.chip.ae-loz.hot { background: var(--red-soft); color: #c94f22; }
.chip.ae-loz.warm { background: var(--amber-soft); color: var(--amber); }
.chip.ae-loz.cold { background: var(--blue-soft); color: var(--muted); }
.chip.ae-loz.none { background: var(--accent-soft); color: var(--muted); }

/* ---- Visit tracker sheet (redesigned) --------------------------------------- */
.vt-head h2 { margin-bottom: 2px; }
.vt-sec { margin-top: 18px; }
.vt-sec h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin: 0 0 8px;
}
.vt-hint { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; }
.vt-checks { display: flex; flex-direction: column; gap: 6px; }
.vt-check {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14.5px;
  background: var(--card);
}
.vt-check.on { border-color: var(--green); background: var(--green-soft); }
.vt-check input { accent-color: var(--green); }
.vt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.vt-pill {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.vt-pill.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.vt-pill.danger.on { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.vt-scorerow { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.vt-scorelabel { min-width: 110px; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.vt-scorelabel small { font-weight: 400; color: var(--muted); }
.vt-stars { display: flex; gap: 6px; }
.vt-star {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  min-width: 44px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.vt-star span { font-size: 15px; }
.vt-star.on { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.vt-notes {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}
.vt-notes:focus { outline: none; border-color: var(--accent); }
.vt-statusseg button { font-weight: 700; }
.vt-formsold { max-width: 480px; }

/* ---- Stage auto-trigger icon on board columns -------------------------------- */
.stage-trig {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  opacity: 0.35;
  padding: 0 2px;
}
.stage-trig.on { opacity: 1; filter: drop-shadow(0 0 3px var(--amber)); }

/* ---- Settings section tabs ---------------------------------------------------- */
.adm-set-sec { display: none; }
.adm-set-sec.on { display: block; }

/* ---- WATI template card refinements ------------------------------------------- */
.adm-tpl-code {
  font-size: 11.5px;
  background: var(--accent-soft);
  color: var(--muted);
  border-radius: 6px;
  padding: 1px 7px;
}
.chip.muted { opacity: 0.55; }

/* ===========================================================================
   UI 2.0 — iteration-10 rebuild (docs/UI2-SPEC.md + docs/ui2-mockups.html)
   Row anatomy v3 · one chip row + filter button · popover · collapsible
   search · heroes & stat strips · leaderboard · task-sheet toggles.
   =========================================================================== */

/* ---- Control row: ONE chip line + ONE filter button (never wraps) -------- */
.ctlrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.ctlrow .chips2 {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  scrollbar-width: none;
  padding: 3px 1px; /* room for chip shadows */
  margin: -3px -1px;
}
.ctlrow .chips2::-webkit-scrollbar { display: none; }
.chip2 {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--card);
  color: var(--muted);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(29, 28, 38, 0.07);
  flex: none;
}
.chip2.on { background: var(--accent); color: #fff; }
.fbtn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(29, 28, 38, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  position: relative;
  color: var(--accent);
}
.fbtn.open { background: var(--accent); color: #fff; }
.fbtn .fdot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--accent);
}

/* ---- 2.0 header: title · search icon · ＋ · avatar ----------------------- */
.iconbtn2 {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(29, 28, 38, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: none;
}
.iconbtn2.lit { background: var(--accent); color: #fff; }
.iconbtn2 .ic { width: 17px; height: 17px; }

/* ---- Anchored filter popover --------------------------------------------- */
.pop-dim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(20, 18, 34, 0.3);
}
.pop2 {
  position: fixed;
  width: min(272px, calc(100vw - 24px));
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 16px 44px -10px rgba(20, 18, 34, 0.35), 0 2px 8px rgba(20, 18, 34, 0.12);
  padding: 13px 14px;
  z-index: 71;
}
.pop2 h6 {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 7px;
  font-family: var(--display);
}
.pop2 h6 + h6, .pop2 .pgroup + h6, .pop2 .pcheck + h6, .pop2 .plink + h6 { margin-top: 13px; }
.pop2 .pgroup { display: flex; gap: 5px; flex-wrap: wrap; }
.pop2 .gopt {
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--bg);
  color: var(--muted);
}
.pop2 .gopt.on { background: var(--accent); color: #fff; }
.pop2 .pcheck {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
  width: 100%;
  text-align: left;
}
.pop2 .pcheck .box {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  border: 1.7px solid var(--line);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  background: var(--card);
}
.pop2 .pcheck.on .box { background: var(--accent); border-color: var(--accent); }
.pop2 .pcheck .pc-n { color: var(--muted); font-weight: 600; margin-left: auto; font-size: 12px; }
.pop2 .plink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  width: 100%;
  text-align: left;
}
.pop2 .plink:first-of-type { border-top: 0; }
.pop2 .plink .chev2 { color: var(--muted); opacity: 0.6; }

/* ---- Collapsible search bar ---------------------------------------------- */
.searchrow {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 8px 12px;
  margin: 0 0 12px;
  color: var(--muted);
}
.searchrow .ic { width: 15px; height: 15px; flex: none; }
.searchrow input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-size: 15px;
  padding: 0;
  color: var(--ink);
}
.searchrow .sx {
  color: var(--muted);
  font-size: 15px;
  padding: 0 2px;
  flex: none;
}

/* ---- Hero card (My Tasks / Goals / drill / Team) -------------------------- */
.hero2 {
  border-radius: 17px;
  color: #fff;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: linear-gradient(135deg, #514ae0, #6f5ff0);
  box-shadow: 0 10px 20px -10px rgba(81, 74, 224, 0.5);
  margin: 0 0 9px;
  width: 100%;
  text-align: left;
}
body[data-app="adm"] .hero2 {
  background: linear-gradient(135deg, #0f8a7a, #16a08e);
  box-shadow: 0 10px 20px -10px rgba(15, 138, 122, 0.5);
}
.hero2 .ringwrap { position: relative; width: 50px; height: 50px; flex: none; }
.hero2 .ring2 {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 0 16.5px, #000 17px);
  mask: radial-gradient(circle, transparent 0 16.5px, #000 17px);
}
.hero2 .ringwrap i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-family: var(--display);
  font-size: 11.5px;
  font-weight: 800;
}
.hero2 .h2tx { min-width: 0; }
.hero2 .big {
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.2;
}
.hero2 .cap {
  font-size: 11.5px;
  opacity: 0.9;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.hero2 .cap .ic { width: 12px; height: 12px; }
.hero2.slim { padding: 10px 14px; }
.hero2.slim .ringwrap { width: 42px; height: 42px; }
.hero2.slim .ring2 {
  -webkit-mask: radial-gradient(circle, transparent 0 13.5px, #000 14px);
  mask: radial-gradient(circle, transparent 0 13.5px, #000 14px);
}

/* ---- Soft stat tiles ------------------------------------------------------ */
.strip2 { display: flex; gap: 8px; margin: 0 0 4px; }
.stat2 { flex: 1; border-radius: 13px; padding: 8px 10px; min-width: 0; }
.stat2 .n {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat2 .l {
  font-size: 10px;
  font-weight: 700;
  margin-top: 1px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat2.s1 { background: var(--accent-soft); }
.stat2.s1 .n { color: var(--accent); }
.stat2.s2 { background: var(--red-soft); }
.stat2.s2 .n { color: var(--red); }
.stat2.s3 { background: var(--amber-soft); }
.stat2.s3 .n { color: var(--amber); }
.stat2.s4 { background: var(--green-soft); }
.stat2.s4 .n { color: var(--green); }

/* ---- Row anatomy v3 -------------------------------------------------------
   [checkbox] [ tx: title / meta ] [ rt: indicator over due ] — titles ALWAYS
   start at the same x; ★/bookmark are right-column indicators, never leading. */
.trow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  width: 100%;
  text-align: left;
  background: none;
}
.rowcard .trow:last-child, .card .trow:last-child { border-bottom: 0; }
.trow .tx { flex: 1; min-width: 0; padding: 9px 0; }
.trow .tt {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.trow .tt .t {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.trow .tt .lockmk { color: var(--muted); display: inline-flex; flex: none; }
.trow .tt .lockmk .ic { width: 12px; height: 12px; }
.trow.rdone .tt .t { color: var(--muted); text-decoration: line-through; }
.trow .mt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.trow .mt .pts { color: var(--green); font-weight: 800; }
.trow .ctx { display: inline-flex; flex: none; align-items: center; }
.trow .rt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex: none;
}
.due2 {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.due2.red { color: var(--red); }
.due2.amber { color: var(--amber); }
.starmk { color: #e8963f; display: inline-flex; }
.pinmk { color: var(--accent); display: inline-flex; }
.trow.is-starred { box-shadow: inset 3px 0 0 #e8963f; }
.trow .cellpill {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  flex: none;
  background: var(--accent-soft);
  color: var(--accent);
}
.trow .checkbox { margin: 0; }

/* Section-head accents for v3 groups */
.section-head.red2 h3 { color: var(--red); }
.section-head.star2 h3 { color: var(--amber); }
.section-head.pin2 h3 { color: var(--accent); }

/* ---- Goal rows (T4) -------------------------------------------------------- */
.goalrow { min-height: 60px; }
.gring { position: relative; width: 38px; height: 38px; flex: none; }
.gring .r {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 0 12px, #000 12.5px);
  mask: radial-gradient(circle, transparent 0 12px, #000 12.5px);
}
.gring i {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink);
}
.chev2 { color: var(--muted); opacity: 0.55; flex: none; font-size: 17px; }

/* ---- Breadcrumb (drill) — also outside .screen, same gutter as .topbar ---- */
.crumb2 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding: calc(var(--safe-top) + 12px) var(--pad) 0;
  max-width: 640px;
  margin: 0 auto 10px;
  white-space: nowrap;
  overflow: hidden;
}
.crumb2 b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.crumb2 .cback { padding: 2px 8px 2px 0; font-size: 17px; color: var(--muted); }

/* ---- Task sheet: labeled toggle pills + whisper + seg3 + meta grid --------- */
.togs { display: flex; gap: 8px; margin: 8px 0 8px; flex-wrap: wrap; }
.togpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 99px;
  background: var(--card);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(29, 28, 38, 0.08);
  border: 1.5px solid var(--line);
}
.togpill .ic { width: 14px; height: 14px; }
.togpill.on-star { background: var(--amber-soft); color: var(--amber); border-color: #e8963f; }
.togpill.on-pin { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.whisper { font-size: 12px; color: var(--muted); padding: 2px 2px 10px; }
.seg3 {
  display: flex;
  background: var(--accent-soft);
  border-radius: 11px;
  padding: 2.5px;
  margin: 4px 0 10px;
}
[data-theme="dark"] .seg3 { background: var(--bg); }
.seg3 button {
  flex: 1;
  text-align: center;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 0;
  border-radius: 9px;
  color: var(--muted);
}
.seg3 button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 28, 33, 0.1); }

/* ---- Leaderboard rows (T6) -------------------------------------------------- */
.lbrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  min-height: 54px;
}
.card .lbrow:last-child { border-bottom: 0; }
.lbrow .rank {
  width: 20px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  flex: none;
}
.lbrow .lbtx { flex: 1; min-width: 0; }
.lbrow .lbn {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lbrow .lbm {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}
.lbrow .lbm .ic { width: 11px; height: 11px; }
.lbrow .pts2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.lbrow .lvlbar {
  height: 4px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin-top: 3px;
}
.lbrow .lvlbar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8a7bff);
  border-radius: 99px;
}

/* ---- Admissions v3 bits ----------------------------------------------------- */
.stagep {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  flex: none;
  background: var(--accent-soft);
  color: var(--accent);
}
.ae {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.02em;
  flex: none;
}
.ae.none { background: var(--line); color: var(--muted); }
.ae.good { background: var(--green-soft); color: var(--green); }
.ae.mid { background: var(--amber-soft); color: var(--amber); }
.ae.low { background: var(--red-soft); color: var(--red); }
.act2 {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--accent);
}
.act2 .ic { width: 14px; height: 14px; }

/* The 2.0 mobile header (shared by Tasks + Admissions screens). It renders
   OUTSIDE .screen, so it carries the same gutter/width geometry as .topbar —
   otherwise the title starts flush at the screen edge. */
.hrow2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(var(--safe-top) + 14px) var(--pad) 10px;
  max-width: 640px;
  margin: 0 auto;
}
.hrow2 h1 {
  font-size: 26px;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hrow2 .hbtns { display: flex; align-items: center; gap: 8px; flex: none; }
.hrow2 .icon-add.lg { margin: 0; }

/* UI 2.0 phone layout: the collapsible header search + filter popover replace
   the in-body search inputs and dropdown toolbars on the Admissions lists. */
body[data-mode="mobile"] .adm-wrap .adm-search,
body[data-mode="mobile"] .adm-wrap .adm-fam-filters,
body[data-mode="mobile"] .adm-wrap .adm-reg-seg {
  display: none;
}
body[data-mode="mobile"] .adm-wrap .adm-fam-toolbar .adm-selall input { display: none; }
.adm-contacts.card { overflow: hidden; }
.adm-contacts .trow .adm-fam-cb { flex: none; }

/* Phone: the pipeline/insights KPI grid compresses to a soft tile strip. */
body[data-mode="mobile"] .adm-kpis { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
body[data-mode="mobile"] .adm-kpis::-webkit-scrollbar { display: none; }
body[data-mode="mobile"] .adm-kpi { flex: 1; min-width: 62px; padding: 8px 6px; }
body[data-mode="mobile"] .adm-kpi-v { font-size: 17px; }
body[data-mode="mobile"] .adm-kpi-l { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===========================================================================
   UI 2.0 — desktop (deck: docs/ui2-desktop-mockups.html, D1–D8)
   Same grammar as the phone; width buys a hero band and two-up group flow.
   =========================================================================== */
/* Hero + 4 stat tiles fuse into one band (D1) — content starts ~150px down. */
.band2 { display: flex; gap: 10px; margin: 0 0 14px; align-items: stretch; }
.band2 .hero2 { flex: 1.4; margin: 0; }
.band2 .stat2 { flex: 0.55; display: flex; flex-direction: column; justify-content: center; }
/* The 2.0 desktop content column. */
.dcol { max-width: 820px; }
.dcol.wide { max-width: 1080px; }
/* Two-up group flow (D3/D4): a real grid — groups can NEVER be sliced across
   columns (CSS `columns` cut rows mid-card and floated content above its own
   heading). Row-major placement, tops aligned. */
.colflow { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 2px 16px; align-items: start; max-width: 1080px; }
.colflow .grp { min-width: 0; margin-bottom: 6px; }
.grp { min-width: 0; }
/* Desktop content header carries the 2.0 icon buttons. */
.content-head .hbtns2 { display: flex; align-items: center; gap: 8px; }
/* Task modal wears the T3 sheet at deck width (D5). */
[data-mode="desktop"] .task-modal { max-width: 600px; }
/* Kanban cards slim toward v3 (D7). */
[data-mode="desktop"] .adm-card { padding: 9px 11px; }
[data-mode="desktop"] .adm-card .adm-card-sub { font-size: 11px; }
/* Old permanent gsearch bar is retired (D8) — collapsible searchrow instead. */
/* Desktop drill: the breadcrumb aligns with the content column, not centred. */
[data-mode="desktop"] .content .crumb2 { max-width: none; margin: 0 0 12px; padding: 0 0 0 2px; }
/* Desktop too: the funnel popover + collapsible search own filtering — the
   old inline search/dropdown row on the Contacts list is retired (deck D8). */
[data-mode="desktop"] .adm-wrap .adm-fam-filters { display: none; }
[data-mode="desktop"] .adm-wrap .adm-search { display: none; }

/* A prominent, labeled filter button (screens whose controls live entirely in
   the filter menu — e.g. Goals): sits left, reads "Filters". */
.fbtn.labeled {
  width: auto;
  padding: 0 14px 0 12px;
  height: 36px;
  gap: 7px;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  border: 1.5px solid var(--border-accent);
}
.fbtn.labeled .fdot { position: static; margin-left: 2px; border: 0; width: 8px; height: 8px; }

/* Pipeline: the detailed filters live in the header itself (there are many);
   the funnel keeps only the prominent quick toggles. */
.pipe-filters {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pipe-filters::-webkit-scrollbar { display: none; }
.pipe-filters .adm-dd { flex: none; }

/* Tree picker: the current pick reads as a chip above the list, the selected
   row is unmistakable, and "specific" feedback replaces silent state. */
.tp-current {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--bg);
  border: 1.5px dashed var(--line);
  color: var(--muted);
  margin-bottom: 8px;
  min-width: 0;
}
.tp-current.has {
  background: var(--accent-soft);
  border: 1.5px solid var(--border-accent);
  color: var(--ink);
}
.tp-current b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-current .tpc-kind {
  margin-left: auto;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  flex: none;
}
.tp-current .tpc-none { font-size: 13px; }
.tree-pick .tp-row.on {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.tree-pick .tp-row.on .tp-title { color: var(--accent); font-weight: 800; }
.tree-pick .tp-row.on::after {
  content: "✓";
  margin-left: auto;
  color: var(--accent);
  font-weight: 800;
}
